@viewlift/player-backup 2.0.35-smarttv → 2.0.36-backup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/autoNextVideo-f43d3c6b.js +1 -0
- package/cjs/browser-77c57718.js +1 -0
- package/cjs/bundle.css +87 -73
- package/cjs/caption-settings-be714e97.js +1 -0
- package/cjs/captions-07bd3069.js +1 -0
- package/cjs/features-97b9ddd3.js +1 -0
- package/cjs/generic-d5a358b3.js +1 -0
- package/cjs/icons-1a3febef.js +1 -0
- package/cjs/index-84cce26a.js +1 -0
- package/cjs/index-878478ca.js +1 -0
- package/cjs/index-b93337ae.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/multicamv2-27a1f79a.js +1 -0
- package/cjs/multicamv2-e061b01b.js +1 -0
- package/cjs/nextEpisodeButton-9149040d.js +1 -0
- package/cjs/playlist-f9f44391.js +1 -0
- package/cjs/renditions-fed22c12.js +1 -0
- package/cjs/resolution-e46c9615.js +1 -0
- package/cjs/series-0ddcd078.js +1 -0
- package/cjs/series-v2-9caf000c.js +1 -0
- package/cjs/series-v2-e23e32e1.js +1 -0
- package/cjs/settings-icon-70f8857a.js +1 -0
- package/cjs/skin-11bb6869.js +1 -0
- package/cjs/skin-1d925909.js +1 -0
- package/cjs/skin-3544db58.js +1 -0
- package/cjs/skin-477469be.js +1 -0
- package/cjs/skin-4dacdda3.js +1 -0
- package/cjs/skin-8bfd28a5.js +1 -0
- package/cjs/skin-9337f348.js +1 -0
- package/cjs/util-ef2cd61e.js +1 -0
- package/cjs/videoSelector-2f34f31e.js +1 -0
- package/cjs/videoSelector-62fd5fa1.js +1 -0
- package/cjs/videojs_contrib_dash-5ac53a44.js +1 -0
- package/esm/autoNextVideo-a02e0bce.js +1 -0
- package/esm/browser-d4613b36.js +1 -0
- package/esm/bundle.css +87 -73
- package/esm/caption-settings-4ab479b0.js +1 -0
- package/esm/captions-b7fd8308.js +1 -0
- package/esm/features-ce8f391c.js +1 -0
- package/esm/generic-c74188d9.js +1 -0
- package/esm/icons-8e47e640.js +1 -0
- package/esm/index-44c8dad7.js +1 -0
- package/esm/index-5d92eaa3.js +1 -0
- package/esm/index-f842f911.js +1 -0
- package/esm/index.js +1 -1
- package/esm/multicamv2-8b4670ee.js +1 -0
- package/esm/multicamv2-d46580c3.js +1 -0
- package/esm/nextEpisodeButton-1016717d.js +1 -0
- package/esm/playlist-5874bf55.js +1 -0
- package/esm/renditions-4c09c626.js +1 -0
- package/esm/resolution-920515d1.js +1 -0
- package/esm/series-c42e7202.js +1 -0
- package/esm/series-v2-0329b92a.js +1 -0
- package/esm/series-v2-1d2ad120.js +1 -0
- package/esm/settings-icon-366126fa.js +1 -0
- package/esm/skin-20b21f43.js +1 -0
- package/esm/skin-58b9263c.js +1 -0
- package/esm/skin-7cb0aacc.js +1 -0
- package/esm/skin-ada9d790.js +1 -0
- package/esm/skin-f66d3f4d.js +1 -0
- package/esm/skin-f76c7dc3.js +1 -0
- package/esm/skin-f790ba88.js +1 -0
- package/esm/util-80257541.js +1 -0
- package/esm/videoSelector-2feea699.js +1 -0
- package/esm/videoSelector-fe5e1c99.js +1 -0
- package/esm/videojs_contrib_dash-a82e8b26.js +1 -0
- package/package.json +1 -1
- package/cjs/autoNextVideo-2ff24f68.js +0 -1
- package/cjs/browser-2df57579.js +0 -1
- package/cjs/caption-settings-e95cca56.js +0 -1
- package/cjs/captions-d160e397.js +0 -1
- package/cjs/features-d8e95dc9.js +0 -1
- package/cjs/generic-294ac08e.js +0 -1
- package/cjs/icons-9e9e6364.js +0 -1
- package/cjs/index-22c51eee.js +0 -1
- package/cjs/index-9210aba0.js +0 -1
- package/cjs/keyboardShortcuts-b1e158f8.js +0 -1
- package/cjs/multicamv2-141480c4.js +0 -1
- package/cjs/multicamv2-41f9696b.js +0 -1
- package/cjs/nextEpisodeButton-d938133c.js +0 -1
- package/cjs/playlist-01fd8996.js +0 -1
- package/cjs/renditions-6ca861f3.js +0 -1
- package/cjs/resolution-27153a3f.js +0 -1
- package/cjs/series-bb8a15e4.js +0 -1
- package/cjs/series-v2-264f1274.js +0 -1
- package/cjs/series-v2-d21309ce.js +0 -1
- package/cjs/settings-icon-574dc30a.js +0 -1
- package/cjs/skin-09425927.js +0 -1
- package/cjs/skin-4e236315.js +0 -1
- package/cjs/skin-6ed10ade.js +0 -1
- package/cjs/skin-99eb3c31.js +0 -1
- package/cjs/skin-a7171b70.js +0 -1
- package/cjs/skin-b28fa2ec.js +0 -1
- package/cjs/skin-d1f05fdb.js +0 -1
- package/cjs/util-1f5115f2.js +0 -1
- package/cjs/videoSelector-68b2ef10.js +0 -1
- package/cjs/videoSelector-6fc58bce.js +0 -1
- package/cjs/videojs_contrib_dash-9a5f4c2b.js +0 -1
- package/esm/autoNextVideo-fc102a98.js +0 -1
- package/esm/browser-000da9e7.js +0 -1
- package/esm/caption-settings-b11a19b3.js +0 -1
- package/esm/captions-2bcc449f.js +0 -1
- package/esm/features-9a77b3ec.js +0 -1
- package/esm/generic-979547e7.js +0 -1
- package/esm/icons-68d3a609.js +0 -1
- package/esm/index-9abdfceb.js +0 -1
- package/esm/index-caeb7f58.js +0 -1
- package/esm/keyboardShortcuts-6443082f.js +0 -1
- package/esm/multicamv2-10e8f652.js +0 -1
- package/esm/multicamv2-1b6bbad6.js +0 -1
- package/esm/nextEpisodeButton-66506110.js +0 -1
- package/esm/playlist-606bdc1a.js +0 -1
- package/esm/renditions-7724f87c.js +0 -1
- package/esm/resolution-de9dd282.js +0 -1
- package/esm/series-81680634.js +0 -1
- package/esm/series-v2-a9bd9cce.js +0 -1
- package/esm/series-v2-e6464c17.js +0 -1
- package/esm/settings-icon-51763bdf.js +0 -1
- package/esm/skin-31efcd21.js +0 -1
- package/esm/skin-3c8134ab.js +0 -1
- package/esm/skin-43755201.js +0 -1
- package/esm/skin-9c71c31d.js +0 -1
- package/esm/skin-bb1155ba.js +0 -1
- package/esm/skin-e12e8689.js +0 -1
- package/esm/skin-e597a51b.js +0 -1
- package/esm/util-7ef0c31b.js +0 -1
- package/esm/videoSelector-4c015dd4.js +0 -1
- package/esm/videoSelector-c91fa81d.js +0 -1
- package/esm/videojs_contrib_dash-d8104535.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime-corejs3/helpers/toConsumableArray"),t=require("@babel/runtime-corejs3/helpers/classCallCheck"),n=require("@babel/runtime-corejs3/helpers/createClass"),r=require("@babel/runtime-corejs3/helpers/assertThisInitialized"),i=require("@babel/runtime-corejs3/helpers/get"),o=require("@babel/runtime-corejs3/helpers/inherits"),l=require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"),u=require("@babel/runtime-corejs3/helpers/getPrototypeOf"),c=require("@babel/runtime-corejs3/helpers/typeof");require("core-js/modules/es.array.iterator.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.typed-array.uint8-array.js"),require("core-js/modules/es.typed-array.copy-within.js"),require("core-js/modules/es.typed-array.every.js"),require("core-js/modules/es.typed-array.fill.js"),require("core-js/modules/es.typed-array.filter.js"),require("core-js/modules/es.typed-array.find.js"),require("core-js/modules/es.typed-array.find-index.js"),require("core-js/modules/es.typed-array.for-each.js"),require("core-js/modules/es.typed-array.includes.js"),require("core-js/modules/es.typed-array.index-of.js"),require("core-js/modules/es.typed-array.iterator.js"),require("core-js/modules/es.typed-array.join.js"),require("core-js/modules/es.typed-array.last-index-of.js"),require("core-js/modules/es.typed-array.map.js"),require("core-js/modules/es.typed-array.reduce.js"),require("core-js/modules/es.typed-array.reduce-right.js"),require("core-js/modules/es.typed-array.reverse.js"),require("core-js/modules/es.typed-array.set.js"),require("core-js/modules/es.typed-array.slice.js"),require("core-js/modules/es.typed-array.some.js"),require("core-js/modules/es.typed-array.sort.js"),require("core-js/modules/es.typed-array.subarray.js"),require("core-js/modules/es.typed-array.to-locale-string.js"),require("core-js/modules/es.typed-array.to-string.js"),require("core-js/modules/es.array.join.js"),require("core-js/modules/es.array-buffer.constructor.js"),require("core-js/modules/es.regexp.to-string.js"),require("core-js/modules/es.array.concat.js"),require("core-js/modules/es.regexp.exec.js"),require("core-js/modules/es.string.match.js"),require("core-js/modules/es.array.includes.js"),require("core-js/modules/es.string.includes.js"),require("core-js/modules/es.number.constructor.js"),require("core-js/modules/web.url.to-json.js"),require("core-js/modules/es.array.slice.js"),require("core-js/modules/es.array.fill.js"),require("core-js/modules/es.string.replace.js"),require("core-js/modules/es.function.name.js"),require("core-js/modules/es.number.to-fixed.js"),require("core-js/modules/es.promise.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/web.dom-collections.iterator.js"),require("core-js/modules/es.regexp.constructor.js"),require("core-js/modules/es.string.split.js"),require("core-js/modules/es.string.search.js"),require("core-js/modules/es.typed-array.uint32-array.js"),require("core-js/modules/es.typed-array.uint16-array.js"),require("core-js/modules/es.regexp.flags.js"),require("core-js/modules/es.typed-array.uint8-clamped-array.js"),require("core-js/modules/es.promise.finally.js"),require("core-js/modules/es.array.map.js"),require("core-js/modules/es.object.keys.js"),require("core-js/modules/es.string.from-code-point.js");var f=require("@babel/runtime-corejs3/core-js-stable/set-timeout"),d=require("@babel/runtime-corejs3/core-js-stable/instance/concat"),h=require("@babel/runtime-corejs3/core-js-stable/array/is-array"),g=require("@babel/runtime-corejs3/core-js-stable/symbol"),p=require("@babel/runtime-corejs3/core-js-stable/symbol/species"),m=require("@babel/runtime-corejs3/core-js-stable/instance/fill"),v=require("@babel/runtime-corejs3/core-js-stable/instance/slice"),y=require("@babel/runtime-corejs3/core-js-stable/instance/index-of"),E=require("@babel/runtime-corejs3/core-js-stable/instance/last-index-of"),_=require("@babel/runtime-corejs3/core-js-stable/parse-int"),T=require("@babel/runtime-corejs3/core-js-stable/instance/trim"),b=require("@babel/runtime-corejs3/core-js-stable/json/stringify"),S=require("@babel/runtime-corejs3/core-js-stable/instance/splice"),A=require("@babel/runtime-corejs3/core-js-stable/instance/bind"),I=require("@babel/runtime-corejs3/core-js-stable/instance/for-each"),R=require("@babel/runtime-corejs3/core-js-stable/instance/some"),w=require("@babel/runtime-corejs3/core-js-stable/instance/filter"),N=require("@babel/runtime-corejs3/core-js-stable/symbol/iterator"),C=require("@babel/runtime-corejs3/core-js-stable/object/define-property"),D=require("@babel/runtime-corejs3/core-js-stable/url"),M=require("@babel/runtime-corejs3/core-js-stable/object/set-prototype-of"),L=require("@babel/runtime-corejs3/core-js-stable/object/get-prototype-of"),O=require("@babel/runtime-corejs3/core-js-stable/object/create"),P=require("@babel/runtime-corejs3/core-js-stable/reflect/construct"),F=require("@babel/runtime-corejs3/core-js-stable/promise"),x=require("@babel/runtime-corejs3/core-js-stable/parse-float"),k=require("@babel/runtime-corejs3/core-js-stable/set-interval"),U=require("@babel/runtime-corejs3/core-js-stable/date/now"),Z=require("@babel/runtime-corejs3/core-js-stable/instance/sort"),B=require("@babel/runtime-corejs3/core-js-stable/instance/find"),G=require("@babel/runtime-corejs3/core-js-stable/instance/flags"),q=require("@babel/runtime-corejs3/core-js-stable/array/from"),Y=require("@babel/runtime-corejs3/core-js/get-iterator-method"),j=require("@babel/runtime-corejs3/core-js/get-iterator"),H=require("@babel/runtime-corejs3/core-js-stable/instance/keys"),V=require("@babel/runtime-corejs3/core-js/is-iterable"),K=require("@babel/runtime-corejs3/core-js-stable/instance/reduce"),z=require("@babel/runtime-corejs3/core-js-stable/object/keys"),W=require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols"),X=require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor"),Q=require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors"),$=require("@babel/runtime-corejs3/core-js-stable/object/define-properties"),J=require("@babel/runtime-corejs3/core-js-stable/number/is-integer"),ee=require("@babel/runtime-corejs3/core-js-stable/instance/map"),te=require("@babel/runtime-corejs3/core-js-stable/number/max-safe-integer"),ne=require("@babel/runtime-corejs3/core-js-stable/instance/includes"),re=require("@babel/runtime-corejs3/core-js-stable/weak-map"),ie=require("@babel/runtime-corejs3/core-js-stable/symbol/replace"),ae=require("@babel/runtime-corejs3/core-js-stable/map"),oe=require("@babel/runtime-corejs3/core-js-stable/object/assign"),se=require("@babel/runtime-corejs3/core-js-stable/instance/starts-with"),le=require("@babel/runtime-corejs3/core-js-stable/instance/find-index"),ue=require("@babel/runtime-corejs3/core-js-stable/number/is-finite"),ce=require("@babel/runtime-corejs3/core-js-stable/instance/every"),fe=require("@babel/runtime-corejs3/core-js-stable/math/trunc"),de=require("@babel/runtime-corejs3/core-js-stable/instance/entries"),he=require("@babel/runtime-corejs3/core-js-stable/symbol/for"),ge=require("@babel/runtime-corejs3/core-js-stable/symbol/to-primitive"),pe=require("@babel/runtime-corejs3/core-js-stable/instance/copy-within"),me=require("@babel/runtime-corejs3/core-js-stable/reflect/apply"),ve=require("@babel/runtime-corejs3/core-js-stable/reflect/own-keys"),ye=require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-names"),Ee=require("@babel/runtime-corejs3/core-js-stable/number/is-nan"),_e=require("@babel/runtime-corejs3/core-js-stable/math/sign"),Te=require("@babel/runtime-corejs3/core-js-stable/string/from-code-point"),be=require("@babel/runtime-corejs3/core-js-stable/symbol/async-iterator"),Se=require("@babel/runtime-corejs3/core-js-stable/symbol/has-instance"),Ae=require("@babel/runtime-corejs3/core-js/global-this"),Ie=require("global/window"),Re=require("video.js"),we=require("global/document");function Ne(e){var t=Ce();return function(){var n,r=u(e);if(t){var i=u(this).constructor;n=P(r,arguments,i)}else n=r.apply(this,arguments);return l(this,n)}}function Ce(){try{var e=!Boolean.prototype.valueOf.call(P(Boolean,[],(function(){})))}catch(e){}return(Ce=function(){return!!e})()}var De="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function Me(){throw new Error("setTimeout has not been defined")}function Le(){throw new Error("clearTimeout has not been defined")}var Oe=Me,Pe=Le;function Fe(e){if(Oe===f)return f(e,0);if((Oe===Me||!Oe)&&f)return Oe=f,f(e,0);try{return Oe(e,0)}catch(t){try{return Oe.call(null,e,0)}catch(t){return Oe.call(this,e,0)}}}"function"==typeof f&&(Oe=f),"function"==typeof De.clearTimeout&&(Pe=clearTimeout);var xe,ke=[],Ue=!1,Ze=-1;function Be(){Ue&&xe&&(Ue=!1,xe.length?ke=d(xe).call(xe,ke):Ze=-1,ke.length&&Ge())}function Ge(){if(!Ue){var e=Fe(Be);Ue=!0;for(var t=ke.length;t;){for(xe=ke,ke=[];++Ze<t;)xe&&xe[Ze].run();Ze=-1,t=ke.length}xe=null,Ue=!1,function(e){if(Pe===clearTimeout)return clearTimeout(e);if((Pe===Le||!Pe)&&clearTimeout)return Pe=clearTimeout,clearTimeout(e);try{Pe(e)}catch(t){try{return Pe.call(null,e)}catch(t){return Pe.call(this,e)}}}(e)}}function qe(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];ke.push(new Ye(e,t)),1!==ke.length||Ue||Fe(Ge)}function Ye(e,t){this.fun=e,this.array=t}Ye.prototype.run=function(){this.fun.apply(null,this.array)};function je(){}var He=je,Ve=je,Ke=je,ze=je,We=je,Xe=je,Qe=je;var $e=De.performance||{},Je=$e.now||$e.mozNow||$e.msNow||$e.oNow||$e.webkitNow||function(){return(new Date).getTime()};var et=new Date;var tt={nextTick:qe,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:He,addListener:Ve,once:Ke,off:ze,removeListener:We,removeAllListeners:Xe,emit:Qe,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Je.call($e),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-et)/1e3}},nt=[],rt=[],it="undefined"!=typeof Uint8Array?Uint8Array:Array,at=!1;function ot(){at=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t<n;++t)nt[t]=e[t],rt[e.charCodeAt(t)]=t;rt["-".charCodeAt(0)]=62,rt["_".charCodeAt(0)]=63}function st(e,t,n){for(var r,i,a=[],o=t;o<n;o+=3)r=(e[o]<<16)+(e[o+1]<<8)+e[o+2],a.push(nt[(i=r)>>18&63]+nt[i>>12&63]+nt[i>>6&63]+nt[63&i]);return a.join("")}function lt(e){var t;at||ot();for(var n=e.length,r=n%3,i="",a=[],o=16383,s=0,l=n-r;s<l;s+=o)a.push(st(e,s,s+o>l?l:s+o));return 1===r?(t=e[n-1],i+=nt[t>>2],i+=nt[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=nt[t>>10],i+=nt[t>>4&63],i+=nt[t<<2&63],i+="="),a.push(i),a.join("")}function ut(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<<s)-1,u=l>>1,c=-7,f=n?i-1:0,d=n?-1:1,h=e[t+f];for(f+=d,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=d,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+f],f+=d,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),a-=u}return(h?-1:1)*o*Math.pow(2,a-r)}function ct(e,t,n,r,i,a){var o,s,l,u=8*a-i-1,c=(1<<u)-1,f=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,g=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+f>=1?d/l:d*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=255&s,h+=g,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[n+h]=255&o,h+=g,o/=256,u-=8);e[n+h-g]|=128*p}var ft={}.toString,dt=h||function(e){return"[object Array]"==ft.call(e)};function ht(){return pt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function gt(e,t){if(ht()<t)throw new RangeError("Invalid typed array length");return pt.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=pt.prototype:(null===e&&(e=new pt(t)),e.length=t),e}function pt(e,t,n){if(!(pt.TYPED_ARRAY_SUPPORT||this instanceof pt))return new pt(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return yt(this,e)}return mt(this,e,t,n)}function mt(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);pt.TYPED_ARRAY_SUPPORT?(e=t).__proto__=pt.prototype:e=Et(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!pt.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|bt(t,n);e=gt(e,r);var i=e.write(t,n);i!==r&&(e=v(e).call(e,0,i));return e}(e,t,n):function(e,t){if(Tt(t)){var n=0|_t(t.length);return 0===(e=gt(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?gt(e,0):Et(e,t);if("Buffer"===t.type&&dt(t.data))return Et(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function vt(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function yt(e,t){if(vt(t),e=gt(e,t<0?0:0|_t(t)),!pt.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function Et(e,t){var n=t.length<0?0:0|_t(t.length);e=gt(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function _t(e){if(e>=ht())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ht().toString(16)+" bytes");return 0|e}function Tt(e){return!(null==e||!e._isBuffer)}function bt(e,t){if(Tt(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return $t(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Jt(e).length;default:if(r)return $t(e).length;t=(""+t).toLowerCase(),r=!0}}function St(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ut(this,t,n);case"utf8":case"utf-8":return Pt(this,t,n);case"ascii":return xt(this,t,n);case"latin1":case"binary":return kt(this,t,n);case"base64":return Ot(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Zt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function At(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function It(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=pt.from(t,r)),Tt(t))return 0===t.length?-1:Rt(e,t,n,r,i);if("number"==typeof t)return t&=255,pt.TYPED_ARRAY_SUPPORT&&"function"==typeof y(Uint8Array.prototype)?i?y(Uint8Array.prototype).call(e,t,n):E(Uint8Array.prototype).call(e,t,n):Rt(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function Rt(e,t,n,r,i){var a,o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=n;a<s;a++)if(u(e,a)===u(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===l)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(n+l>s&&(n=s-l),a=n;a>=0;a--){for(var f=!0,d=0;d<l;d++)if(u(e,a+d)!==u(t,d)){f=!1;break}if(f)return a}return-1}function wt(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=_(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function Nt(e,t,n,r){return en($t(t,e.length-n),e,n,r)}function Ct(e,t,n,r){return en(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function Dt(e,t,n,r){return Ct(e,t,n,r)}function Mt(e,t,n,r){return en(Jt(t),e,n,r)}function Lt(e,t,n,r){return en(function(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function Ot(e,t,n){return 0===t&&n===e.length?lt(e):lt(v(e).call(e,t,n))}function Pt(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,o,s,l,u=e[i],c=null,f=u>239?4:u>223?3:u>191?2:1;if(i+f<=n)switch(f){case 1:u<128&&(c=u);break;case 2:128==(192&(a=e[i+1]))&&(l=(31&u)<<6|63&a)>127&&(c=l);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(l=(15&u)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return function(e){var t=e.length;if(t<=Ft)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,v(e).call(e,r,r+=Ft));return n}(r)}pt.TYPED_ARRAY_SUPPORT=void 0===De.TYPED_ARRAY_SUPPORT||De.TYPED_ARRAY_SUPPORT,ht(),pt.poolSize=8192,pt._augment=function(e){return e.__proto__=pt.prototype,e},pt.from=function(e,t,n){return mt(null,e,t,n)},pt.TYPED_ARRAY_SUPPORT&&(pt.prototype.__proto__=Uint8Array.prototype,pt.__proto__=Uint8Array,void 0!==g&&p&&pt[p]),pt.alloc=function(e,t,n){return function(e,t,n,r){return vt(t),t<=0?gt(e,t):void 0!==n?"string"==typeof r?m(i=gt(e,t)).call(i,n,r):m(a=gt(e,t)).call(a,n):gt(e,t);var i,a}(null,e,t,n)},pt.allocUnsafe=function(e){return yt(null,e)},pt.allocUnsafeSlow=function(e){return yt(null,e)},pt.isBuffer=tn,pt.compare=function(e,t){if(!Tt(e)||!Tt(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},pt.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},pt.concat=function(e,t){if(!dt(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return pt.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=pt.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!Tt(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},pt.byteLength=bt,pt.prototype._isBuffer=!0,pt.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)At(this,t,t+1);return this},pt.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)At(this,t,t+3),At(this,t+1,t+2);return this},pt.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)At(this,t,t+7),At(this,t+1,t+6),At(this,t+2,t+5),At(this,t+3,t+4);return this},pt.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?Pt(this,0,e):St.apply(this,arguments)},pt.prototype.equals=function(e){if(!Tt(e))throw new TypeError("Argument must be a Buffer");return this===e||0===pt.compare(this,e)},pt.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},pt.prototype.compare=function(e,t,n,r,i){if(!Tt(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),l=v(this).call(this,r,i),u=v(e).call(e,t,n),c=0;c<s;++c)if(l[c]!==u[c]){a=l[c],o=u[c];break}return a<o?-1:o<a?1:0},pt.prototype.includes=function(e,t,n){return-1!==y(this).call(this,e,t,n)},pt.prototype.indexOf=function(e,t,n){return It(this,e,t,n,!0)},pt.prototype.lastIndexOf=function(e,t,n){return It(this,e,t,n,!1)},pt.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return wt(this,e,t,n);case"utf8":case"utf-8":return Nt(this,e,t,n);case"ascii":return Ct(this,e,t,n);case"latin1":case"binary":return Dt(this,e,t,n);case"base64":return Mt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Lt(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},pt.prototype.toJSON=function(){return{type:"Buffer",data:v(Array.prototype).call(this._arr||this,0)}};var Ft=4096;function xt(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function kt(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function Ut(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=Qt(e[a]);return i}function Zt(e,t,n){for(var r=v(e).call(e,t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function Bt(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function Gt(e,t,n,r,i,a){if(!Tt(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function qt(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function Yt(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function jt(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Ht(e,t,n,r,i){return i||jt(e,0,n,4),ct(e,t,n,r,23,4),n+4}function Vt(e,t,n,r,i){return i||jt(e,0,n,8),ct(e,t,n,r,52,8),n+8}pt.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),pt.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=pt.prototype;else{var i=t-e;n=new pt(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+e]}return n},pt.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||Bt(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},pt.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||Bt(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},pt.prototype.readUInt8=function(e,t){return t||Bt(e,1,this.length),this[e]},pt.prototype.readUInt16LE=function(e,t){return t||Bt(e,2,this.length),this[e]|this[e+1]<<8},pt.prototype.readUInt16BE=function(e,t){return t||Bt(e,2,this.length),this[e]<<8|this[e+1]},pt.prototype.readUInt32LE=function(e,t){return t||Bt(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},pt.prototype.readUInt32BE=function(e,t){return t||Bt(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},pt.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||Bt(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},pt.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||Bt(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},pt.prototype.readInt8=function(e,t){return t||Bt(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},pt.prototype.readInt16LE=function(e,t){t||Bt(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},pt.prototype.readInt16BE=function(e,t){t||Bt(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},pt.prototype.readInt32LE=function(e,t){return t||Bt(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},pt.prototype.readInt32BE=function(e,t){return t||Bt(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},pt.prototype.readFloatLE=function(e,t){return t||Bt(e,4,this.length),ut(this,e,!0,23,4)},pt.prototype.readFloatBE=function(e,t){return t||Bt(e,4,this.length),ut(this,e,!1,23,4)},pt.prototype.readDoubleLE=function(e,t){return t||Bt(e,8,this.length),ut(this,e,!0,52,8)},pt.prototype.readDoubleBE=function(e,t){return t||Bt(e,8,this.length),ut(this,e,!1,52,8)},pt.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||Gt(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},pt.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||Gt(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},pt.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||Gt(this,e,t,1,255,0),pt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},pt.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||Gt(this,e,t,2,65535,0),pt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):qt(this,e,t,!0),t+2},pt.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||Gt(this,e,t,2,65535,0),pt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):qt(this,e,t,!1),t+2},pt.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||Gt(this,e,t,4,4294967295,0),pt.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Yt(this,e,t,!0),t+4},pt.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||Gt(this,e,t,4,4294967295,0),pt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Yt(this,e,t,!1),t+4},pt.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);Gt(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},pt.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);Gt(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},pt.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||Gt(this,e,t,1,127,-128),pt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},pt.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||Gt(this,e,t,2,32767,-32768),pt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):qt(this,e,t,!0),t+2},pt.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||Gt(this,e,t,2,32767,-32768),pt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):qt(this,e,t,!1),t+2},pt.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||Gt(this,e,t,4,2147483647,-2147483648),pt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Yt(this,e,t,!0),t+4},pt.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||Gt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),pt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Yt(this,e,t,!1),t+4},pt.prototype.writeFloatLE=function(e,t,n){return Ht(this,e,t,!0,n)},pt.prototype.writeFloatBE=function(e,t,n){return Ht(this,e,t,!1,n)},pt.prototype.writeDoubleLE=function(e,t,n){return Vt(this,e,t,!0,n)},pt.prototype.writeDoubleBE=function(e,t,n){return Vt(this,e,t,!1,n)},pt.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&n<t&&t<r)for(i=a-1;i>=0;--i)e[i+t]=this[i+n];else if(a<1e3||!pt.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},pt.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!pt.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var o=Tt(e)?e:$t(new pt(e,r).toString()),s=o.length;for(a=0;a<n-t;++a)this[a+t]=o[a%s]}return this};var Kt,zt,Wt=/[^+\/0-9A-Za-z-_]/g;function Xt(e){if((e=function(e){return T(e)?T(e).call(e):e.replace(/^\s+|\s+$/g,"")}(e).replace(Wt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Qt(e){return e<16?"0"+e.toString(16):e.toString(16)}function $t(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function Jt(e){return function(e){var t,n,r,i,a,o;at||ot();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new it(3*s/4-a),r=a>0?s-4:s;var l=0;for(t=0,n=0;t<r;t+=4,n+=3)i=rt[e.charCodeAt(t)]<<18|rt[e.charCodeAt(t+1)]<<12|rt[e.charCodeAt(t+2)]<<6|rt[e.charCodeAt(t+3)],o[l++]=i>>16&255,o[l++]=i>>8&255,o[l++]=255&i;return 2===a?(i=rt[e.charCodeAt(t)]<<2|rt[e.charCodeAt(t+1)]>>4,o[l++]=255&i):1===a&&(i=rt[e.charCodeAt(t)]<<10|rt[e.charCodeAt(t+1)]<<4|rt[e.charCodeAt(t+2)]>>2,o[l++]=i>>8&255,o[l++]=255&i),o}(Xt(e))}function en(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function tn(e){return null!=e&&(!!e._isBuffer||nn(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof v(e)&&nn(v(e).call(e,0,0))}/*! For license information please see dash.all.min.js.LICENSE.txt */(e))}function nn(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function rn(e,t){var n=e.dash.mediaPlayer,r=n.getTracksFor("audio"),i=e.audioTracks();function a(e){return"dash-audio-".concat(e)}function o(e,t){return B(e).call(e,(function(e){return a(e.index)===t.id}))}i.length&&t.clearTracks(["audio"]);var s=n.getCurrentTrackFor("audio");I(r).call(r,(function(t){var n,r;if(h(t.labels))for(var o=0;o<t.labels.length;o++){var l;if(t.labels[o].lang&&-1!==y(l=e.language()).call(l,t.labels[o].lang.toLowerCase())){n=t.labels[o];break}}n?r=n.text:h(t.labels)&&1===t.labels.length?r=t.labels[0].text:(r=t.lang,t.roles&&t.roles.length&&(r+=" ("+t.roles.join(", ")+")")),i.addTrack(new Re.AudioTrack({enabled:t===s,id:a(t.index),kind:t.kind||"main",label:r,language:t.lang}))}));var l=function(){for(var e=0;e<i.length;e++){var t=i[e];if(t.enabled){var a=o(r,t);n.setCurrentTrack(a)}else;}};i.addEventListener("change",l),e.dash.mediaPlayer.on(dashjs.MediaPlayer.events.STREAM_TEARDOWN_COMPLETE,(function(){i.removeEventListener("change",l)}))}function an(e,t){e.dash.mediaPlayer.on(dashjs.MediaPlayer.events.PLAYBACK_METADATA_LOADED,A(rn).call(rn,null,e,t))}function on(e,t,n){Ie.VTTCue&&!/\[native code\]/.test(Ie.VTTCue.toString())&&(Ie.VTTCue=!1);var r=[];if(t.featuresNativeTextTracks)Re.log.error("You must pass {html: {nativeCaptions: false}} in the videojs constructor to use text tracks in videojs-contrib-dash");else{var i=e.dash.mediaPlayer;i.on(dashjs.MediaPlayer.events.TEXT_TRACKS_ADDED,a),i.on(dashjs.MediaPlayer.events.CAN_PLAY,(function(){i.off(dashjs.MediaPlayer.events.TEXT_TRACKS_ADDED,a)}))}function a(t){t.index;var n,o=t.tracks;i.off(dashjs.MediaPlayer.events.TEXT_TRACKS_ADDED,a),I(r).call(r,A(n=e.removeRemoteTextTrack).call(n,e)),r=[],o.length&&(r=function(e,t,n){var r,i,a=[],o=w(r=ee(i=ee(n).call(n,(function(t){var n;if(h(t.labels))for(var r=0;r<t.labels.length;r++){var i;if(t.labels[r].lang&&-1!==y(i=e.language()).call(i,t.labels[r].lang.toLowerCase())){n=t.labels[r];break}}return{dashTrack:t,trackConfig:{label:n?n.text:h(t.labels)&&1===t.labels.length?t.labels[0].text:t.lang||t.label,language:t.lang,srclang:t.lang,kind:t.kind}}}))).call(i,(function(t){var n=t.trackConfig,r=t.dashTrack;if(r.isTTML&&!e.getChild("TTMLTextTrackDisplay"))return null;var i=e.addRemoteTextTrack(n,!1);return a.push({textTrack:i.track,dashTrack:r}),i}))).call(r,(function(e){return null!==e}));function s(){for(var t=e.dash.mediaPlayer,r=e.textTracks(),i=-1,o=function(){var e=r[s];if("showing"===e.mode){var t=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}(a,(function(t){return t.textTrack===e})),o=t?t.dashTrack:null;o&&(i=y(n).call(n,o))}},s=0;s<r.length;s+=1)o();i!==t.getCurrentTextTrackIndex()&&t.setTextTrack(i)}return e.textTracks().on("change",s),e.dash.mediaPlayer.on(dashjs.MediaPlayer.events.STREAM_TEARDOWN_COMPLETE,(function(){e.textTracks().off("change",s)})),s(),o}(e,0,o))}}Kt=self,zt=function(){return function(){var e={4593:function(e,t){var n,r,i,o,l,u={};n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=function(e){for(var t=0,r=[],i=0|e.length/3;0<i--;){var a=(e[t]<<16)+(e[t+1]<<8)+e[t+2];t+=3,r.push(n.charAt(63&a>>18)),r.push(n.charAt(63&a>>12)),r.push(n.charAt(63&a>>6)),r.push(n.charAt(63&a))}return 2==e.length-t?(a=(e[t]<<16)+(e[t+1]<<8),r.push(n.charAt(63&a>>18)),r.push(n.charAt(63&a>>12)),r.push(n.charAt(63&a>>6)),r.push("=")):1==e.length-t&&(a=e[t]<<16,r.push(n.charAt(63&a>>18)),r.push(n.charAt(63&a>>12)),r.push("==")),r.join("")},i=function(){for(var e=[],t=0;t<n.length;++t)e[n.charCodeAt(t)]=t;return e["=".charCodeAt(0)]=0,e}(),o=function(e){for(var t=0,n=[],r=0|e.length/4;0<r--;){var a=(i[e.charCodeAt(t)]<<18)+(i[e.charCodeAt(t+1)]<<12)+(i[e.charCodeAt(t+2)]<<6)+i[e.charCodeAt(t+3)];n.push(255&a>>16),n.push(255&a>>8),n.push(255&a),t+=4}return n&&("="==e.charAt(t-2)?(n.pop(),n.pop()):"="==e.charAt(t-1)&&n.pop()),n},l={encode:function(e){for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t},decode:function(e){for(var t=0;t<s.length;++t)a[t]=String.fromCharCode(a[t]);return a.join("")}},u.decodeArray=function(e){var t=o(e);return new Uint8Array(t)},u.encodeASCII=function(e){var t=l.encode(e);return r(t)},u.decodeASCII=function(e){var t=o(e);return l.decode(t)},u.encode=function(e){var t=function(e){for(var t=[],n=0;n<e.length;++n){var r=e.charCodeAt(n);r<128?t.push(r):r<2048?(t.push(192|r>>6),t.push(128|63&r)):r<65536?(t.push(224|r>>12),t.push(128|63&r>>6),t.push(128|63&r)):(t.push(240|r>>18),t.push(128|63&r>>12),t.push(128|63&r>>6),t.push(128|63&r))}return t}(e);return r(t)},u.decode=function(e){return function(e){for(var t=[],n=0;n<e.length;){var r=e[n++];r<128||(r<224?(r=(31&r)<<6,r|=63&e[n++]):r<240?(r=(15&r)<<12,r|=(63&e[n++])<<6,r|=63&e[n++]):(r=(7&r)<<18,r|=(63&e[n++])<<12,r|=(63&e[n++])<<6,r|=63&e[n++])),t.push(String.fromCharCode(r))}return t.join("")}(o(e))},t.decode=u.decode,t.decodeArray=u.decodeArray,t.encode=u.encode,t.encodeASCII=u.encodeASCII},452:function(e,t){!function(e){var t={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},n=function(e){var n=e;return t.hasOwnProperty(e)&&(n=t[e]),String.fromCharCode(n)},r=15,i=32,a={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},o={17:2,18:4,21:6,22:8,23:10,19:13,20:15},s={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},l={25:2,26:4,29:6,30:8,31:10,27:13,28:15},u=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],c={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e,t){var n=this.verboseFilter[e];this.verboseLevel>=n&&console.log(this.time+" ["+e+"] "+t)}},f=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},d=function(e,t,n,r,i){this.foreground=e||"white",this.underline=t||!1,this.italics=n||!1,this.background=r||"black",this.flash=i||!1};d.prototype={reset:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},setStyles:function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}},isDefault:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},equals:function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},copy:function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},toString:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}};var h=function(e,t,n,r,i,a){this.uchar=e||" ",this.penState=new d(t,n,r,i,a)};h.prototype={reset:function(){this.uchar=" ",this.penState.reset()},setChar:function(e,t){this.uchar=e,this.penState.copy(t)},setPenState:function(e){this.penState.copy(e)},equals:function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},copy:function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},isEmpty:function(){return" "===this.uchar&&this.penState.isDefault()}};var g=function(){this.chars=[];for(var e=0;e<i;e++)this.chars.push(new h);this.pos=0,this.currPenState=new d};g.prototype={equals:function(e){for(var t=!0,n=0;n<i;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},copy:function(e){for(var t=0;t<i;t++)this.chars[t].copy(e.chars[t])},isEmpty:function(){for(var e=!0,t=0;t<i;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},setCursor:function(e){this.pos!==e&&(this.pos=e),this.pos<0?(c.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>i&&(c.log("ERROR","Too large cursor position "+this.pos),this.pos=i)},moveCursor:function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)},backSpace:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},insertChar:function(e){e>=144&&this.backSpace();var t=n(e);this.pos>=i?c.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},clearFromPos:function(e){var t;for(t=e;t<i;t++)this.chars[t].reset()},clear:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},clearToEndOfRow:function(){this.clearFromPos(this.pos)},getTextString:function(){for(var e=[],t=!0,n=0;n<i;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},setPenStyles:function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}};var p=function(){this.rows=[];for(var e=0;e<r;e++)this.rows.push(new g);this.currRow=14,this.nrRollUpRows=null,this.reset()};p.prototype={reset:function(){for(var e=0;e<r;e++)this.rows[e].clear();this.currRow=14},equals:function(e){for(var t=!0,n=0;n<r;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},copy:function(e){for(var t=0;t<r;t++)this.rows[t].copy(e.rows[t])},isEmpty:function(){for(var e=!0,t=0;t<r;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},backSpace:function(){this.rows[this.currRow].backSpace()},clearToEndOfRow:function(){this.rows[this.currRow].clearToEndOfRow()},insertChar:function(e){this.rows[this.currRow].insertChar(e)},setPen:function(e){this.rows[this.currRow].setPenStyles(e)},moveCursor:function(e){this.rows[this.currRow].moveCursor(e)},setCursor:function(e){c.log("INFO","setCursor: "+e),this.rows[this.currRow].setCursor(e)},setPAC:function(e){c.log("INFO","pacData = "+b(e));var t=e.row-1;this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.currRow=t;var n=this.rows[this.currRow];if(null!==e.indent){var r=e.indent,i=Math.max(r-1,0);n.setCursor(e.indent),e.color=n.chars[i].penState.foreground}var a={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(a)},setBkgData:function(e){c.log("INFO","bkgData = "+b(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},setRollUpRows:function(e){this.nrRollUpRows=e},rollUp:function(){if(null!==this.nrRollUpRows){var e,t;c.log("TEXT",this.getDisplayText());var n=this.currRow+1-this.nrRollUpRows,r=S(e=this.rows).call(e,n,1)[0];r.clear(),S(t=this.rows).call(t,this.currRow,0,r),c.log("INFO","Rolling up")}else c.log("DEBUG","roll_up but nrRollUpRows not set yet")},getDisplayText:function(e){e=e||!1;for(var t=[],n="",i=-1,a=0;a<r;a++){var o=this.rows[a].getTextString();o&&(i=a+1,e?t.push("Row "+i+': "'+o+'"'):t.push(T(o).call(o)))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},getTextAndFormat:function(){return this.rows}};var m=function(e,t){this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new p,this.nonDisplayedMemory=new p,this.lastOutputScreen=new p,this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null};m.prototype={modes:["MODE_ROLL-UP","MODE_POP-ON","MODE_PAINT-ON","MODE_TEXT"],reset:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},getHandler:function(){return this.outputFilter},setHandler:function(e){this.outputFilter=e},setPAC:function(e){this.writeScreen.setPAC(e)},setBkgData:function(e){this.writeScreen.setBkgData(e)},setMode:function(e){e!==this.mode&&(this.mode=e,c.log("INFO","MODE="+e),"MODE_POP-ON"==this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},insertChars:function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";c.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(c.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},cc_RCL:function(){c.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},cc_BS:function(){c.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},cc_AOF:function(){},cc_AON:function(){},cc_DER:function(){c.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},cc_RU:function(e){c.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},cc_FON:function(){c.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},cc_RDC:function(){c.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},cc_TR:function(){c.log("INFO","TR"),this.setMode("MODE_TEXT")},cc_RTD:function(){c.log("INFO","RTD"),this.setMode("MODE_TEXT")},cc_EDM:function(){c.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()},cc_CR:function(){c.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()},cc_ENM:function(){c.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},cc_EOC:function(){if(c.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,c.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()},cc_TO:function(e){c.log("INFO","TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},cc_MIDROW:function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}c.log("INFO","MIDROW: "+b(t)),this.writeScreen.setPen(t)},outputDataUpdate:function(){var e=c.time;null!==e&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(e,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},cueSplitAtTime:function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}};var v=function(e,t,n){this.field=e||1,this.outputs=[t,n],this.channels=[new m(1,t),new m(2,n)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}};v.prototype={getHandler:function(e){return this.channels[e].getHandler()},setHandler:function(e,t){this.channels[e].setHandler(t)},addData:function(e,t){var n,r,i,a=!1;this.lastTime=e,c.setTime(e);for(var o=0;o<t.length;o+=2)r=127&t[o],i=127&t[o+1],r>=16&&r<=31&&r===this.lastCmdA&&i===this.lastCmdB?(this.lastCmdA=null,this.lastCmdB=null,c.log("DEBUG","Repeated command ("+f([r,i])+") is dropped")):0!==r||0!==i?(c.log("DATA","["+f([t[o],t[o+1]])+"] -> ("+f([r,i])+")"),(n=this.parseCmd(r,i))||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),n||(a=this.parseChars(r,i))&&(this.currChNr&&this.currChNr>=0?this.channels[this.currChNr-1].insertChars(a):c.log("WARNING","No channel found yet. TEXT-MODE?")),n?this.dataCounters.cmd+=2:a?this.dataCounters.char+=2:(this.dataCounters.other+=2,c.log("WARNING","Couldn't parse cleaned data "+f([r,i])+" orig: "+f([t[o],t[o+1]])))):this.dataCounters.padding+=2},parseCmd:function(e,t){var n;if(!((20===e||21===e||28===e||29===e)&&32<=t&&t<=47||(23===e||31===e)&&33<=t&&t<=35))return!1;n=20===e||21===e||23===e?1:2;var r=this.channels[n-1];return 20===e||21===e||28===e||29===e?32===t?r.cc_RCL():33===t?r.cc_BS():34===t?r.cc_AOF():35===t?r.cc_AON():36===t?r.cc_DER():37===t?r.cc_RU(2):38===t?r.cc_RU(3):39===t?r.cc_RU(4):40===t?r.cc_FON():41===t?r.cc_RDC():42===t?r.cc_TR():43===t?r.cc_RTD():44===t?r.cc_EDM():45===t?r.cc_CR():46===t?r.cc_ENM():47===t&&r.cc_EOC():r.cc_TO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},parseMidrow:function(e,t){var n=null;if((17===e||25===e)&&32<=t&&t<=47){if((n=17===e?1:2)!==this.currChNr)return c.log("ERROR","Mismatch channel in midrow parsing"),!1;var r=this.channels[n-1];return r.insertChars([32]),r.cc_MIDROW(t),c.log("DEBUG","MIDROW ("+f([e,t])+")"),this.lastCmdA=e,this.lastCmdB=t,!0}return!1},parsePAC:function(e,t){var n,r;if(!((17<=e&&e<=23||25<=e&&e<=31)&&64<=t&&t<=127||(16===e||24===e)&&64<=t&&t<=95))return!1;n=e<=23?1:2,r=64<=t&&t<=95?1===n?a[e]:s[e]:1===n?o[e]:l[e];var i=this.interpretPAC(r,t);return this.channels[n-1].setPAC(i),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},interpretPAC:function(e,t){var n,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},parseChars:function(e,t){var r,i=null,a=null,o=null;if(e>=25?(i=2,o=e-8):(i=1,o=e),17<=o&&o<=19?(r=17===o?t+80:18===o?t+112:t+144,c.log("INFO","Special char '"+n(r)+"' in channel "+i),a=[r],this.lastCmdA=e,this.lastCmdB=t):32<=e&&e<=127&&(a=0===t?[e]:[e,t],this.lastCmdA=null,this.lastCmdB=null),a){var s=f(a);c.log("DEBUG","Char codes = "+s.join(","))}return a},parseBackgroundAttributes:function(e,t){var n,r,i;return((16===e||24===e)&&32<=t&&t<=47||(23===e||31===e)&&45<=t&&t<=47)&&(n={},16===e||24===e?(r=Math.floor((t-32)/2),n.background=u[r],t%2==1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",47===t&&(n.underline=!0)),i=e<24?1:2,this.channels[i-1].setBkgData(n),this.lastCmdA=e,this.lastCmdB=t,!0)},reset:function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null},cueSplitAtTime:function(e){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e)}},e.logger=c,e.PenState=d,e.CaptionScreen=p,e.Cea608Parser=v,e.findCea608Nalus=function(e,t,n){for(var r=0,i=t,a=[],o=function(e,t,n,r){if(4!==e||t<8)return null;var i=n.getUint8(r),a=n.getUint16(r+1),o=n.getUint32(r+3),s=n.getUint8(r+7);return 181==i&&49==a&&1195456820==o&&3==s};i<t+n;){if(r=e.getUint32(i),6==(31&e.getUint8(i+4)))for(var s=i+5,l=-1;s<i+4+r-1;){l=0;for(var u=255;255===u;)l+=u=e.getUint8(s),s++;var c=0;for(u=255;255===u;)c+=u=e.getUint8(s),s++;o(l,c,e,s)&&a.push([s,c]),s+=c}i+=r+4}return a},e.extractCea608DataFromRange=function(e,t){var n=t[0],r=[[],[]];n+=8;var i=31&e.getUint8(n);n+=2;for(var a=0;a<i;a++){var o=e.getUint8(n),s=4&o,l=3&o;n++;var u=e.getUint8(n);n++;var c=e.getUint8(n);n++,s&&(127&u)+(127&c)!=0&&(0===l?(r[0].push(u),r[0].push(c)):1===l&&(r[1].push(u),r[1].push(c)))}return r}}(t)},8416:function(e,t,n){var r=n(1139),i=n(5448),a=n(6398),o=n(2032),s=(n(5530),"undefined"!=typeof window&&window||n.g),l=s.dashjs;l||(l=s.dashjs={}),l.MediaPlayer=r.Z,l.FactoryMaker=i.Z,l.Debug=a.Z,l.Version=(0,o.e)()},6398:function(e,t,n){var r=n(5595),i=n(8512),a=n(5448);function o(e){e=e||{};var t,n,a,o,s=this.context,l=(0,r.Z)(s).getInstance(),u=e.settings,c=[];function f(e){var t;return e&&A(e)?A(e).call(e,window.console):A(t=window.console.log).call(t,window.console)}function h(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];y.apply(void 0,d(e=[1,this]).call(e,n))}function g(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];y.apply(void 0,d(e=[2,this]).call(e,n))}function p(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];y.apply(void 0,d(e=[3,this]).call(e,n))}function m(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];y.apply(void 0,d(e=[4,this]).call(e,n))}function v(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];y.apply(void 0,d(e=[5,this]).call(e,n))}function y(e,t){var r,s="",f=null;n&&(f=(new Date).getTime(),s+="["+(f-o)+"]"),a&&t&&t.getClassName&&(s+="["+t.getClassName()+"]",t.getType&&(s+="["+t.getType()+"]")),s.length>0&&(s+=" ");for(var d=arguments.length,h=new Array(d>2?d-2:0),g=2;g<d;g++)h[g-2]=arguments[g];I(r=Array.apply(null,h)).call(r,(function(e){s+=e+" "})),c[e]&&u&&u.get().debug.logLevel>=e&&c[e](s),u&&u.get().debug.dispatchEvent&&l.trigger(i.Z.LOG,{message:s,level:e})}return t={getLogger:function(e){return{fatal:A(h).call(h,e),error:A(g).call(g,e),warn:A(p).call(p,e),info:A(m).call(m,e),debug:A(v).call(v,e)}},setLogTimestampVisible:function(e){n=e},setCalleeNameVisible:function(e){a=e}},n=!0,a=!0,o=(new Date).getTime(),"undefined"!=typeof window&&window.console&&(c[1]=f(window.console.error),c[2]=f(window.console.error),c[3]=f(window.console.warn),c[4]=f(window.console.info),c[5]=f(window.console.debug)),t}o.__dashjs_factory_name="Debug";var s=a.Z.getSingletonFactory(o);s.LOG_LEVEL_NONE=0,s.LOG_LEVEL_FATAL=1,s.LOG_LEVEL_ERROR=2,s.LOG_LEVEL_WARNING=3,s.LOG_LEVEL_INFO=4,s.LOG_LEVEL_DEBUG=5,a.Z.updateSingletonFactory(o.__dashjs_factory_name,s),t.Z=s},5595:function(e,t,n){var r=n(5448),i=n(8825);function a(){var e={};function t(t,n,r){var i,a=-1;return e[t]?(R(i=e[t]).call(i,(function(e,t){if(e&&e.callback===n&&(!r||r===e.scope))return a=t,!0})),a):a}var n={on:function(n,r,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!n)throw new Error("event type cannot be null or undefined");if(!r||"function"!=typeof r)throw new Error("listener must be a function: "+r);var o=a.priority||0;if(!(t(n,r,i)>=0)){var s;e[n]=e[n]||[];var l={callback:r,scope:i,priority:o};i&&i.getStreamId&&(l.streamId=i.getStreamId()),i&&i.getType&&(l.mediaType=i.getType()),a&&a.mode&&(l.mode=a.mode);var u=R(s=e[n]).call(s,(function(t,r){var i;if(t&&o>t.priority)return S(i=e[n]).call(i,r,0,l),!0}));u||e[n].push(l)}},off:function(n,r,i){if(n&&r&&e[n]){var a=t(n,r,i);a<0||(e[n][a]=null)}},trigger:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t&&e[t]){var a,o;if((n=n||{}).hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");n.type=t,r.streamId&&(n.streamId=r.streamId),r.mediaType&&(n.mediaType=r.mediaType),I(a=w(o=e[t]).call(o,(function(e){return!(!e||r.streamId&&e.streamId&&e.streamId!==r.streamId||r.mediaType&&e.mediaType&&e.mediaType!==r.mediaType||r.mode&&e.mode&&e.mode!==r.mode||!e.mode&&r.mode&&r.mode===i.Z.EVENT_MODE_ON_RECEIVE)}))).call(a,(function(e){return e&&e.callback.call(e.scope,n)}))}},reset:function(){e={}}};return n}a.__dashjs_factory_name="EventBus";var o=r.Z.getSingletonFactory(a);o.EVENT_PRIORITY_LOW=0,o.EVENT_PRIORITY_HIGH=5e3,r.Z.updateSingletonFactory(a.__dashjs_factory_name,o),t.Z=o},5448:function(e,t){var n=function(){var e,t=[],n={},r={};function i(e,n){for(var r in t){var i=t[r];if(i.context===e&&i.name===n)return i.instance}return null}function a(e,t){return t[e]}function o(e,t,n){e in n&&(n[e]=t)}function s(t,n,r){var i,a=t.__dashjs_factory_name,o=n[a];if(o){var s=o.instance;if(!o.override)return s.apply({context:n,factory:e},r);for(var l in i=t.apply({context:n},r),s=s.apply({context:n,factory:e,parent:i},r))i.hasOwnProperty(l)&&(i[l]=s[l])}else i=t.apply({context:n},r);return i.getClassName=function(){return a},i}return e={extend:function(e,t,n,r){!r[e]&&t&&(r[e]={instance:t,override:n})},getSingletonInstance:i,setSingletonInstance:function(e,n,r){for(var i in t){var a=t[i];if(a.context===e&&a.name===n)return void(t[i].instance=r)}t.push({name:n,context:e,instance:r})},deleteSingletonInstances:function(e){t=w(t).call(t,(function(t){return t.context!==e}))},getSingletonFactory:function(e){var r=a(e.__dashjs_factory_name,n);return r||(r=function(n){var r;return void 0===n&&(n={}),{getInstance:function(){return r||(r=i(n,e.__dashjs_factory_name)),r||(r=s(e,n,arguments),t.push({name:e.__dashjs_factory_name,context:n,instance:r})),r}}},n[e.__dashjs_factory_name]=r),r},getSingletonFactoryByName:function(e){return a(e,n)},updateSingletonFactory:function(e,t){o(e,t,n)},getClassFactory:function(e){var t=a(e.__dashjs_factory_name,r);return t||(t=function(t){return void 0===t&&(t={}),{create:function(){return s(e,t,arguments)}}},r[e.__dashjs_factory_name]=t),t},getClassFactoryByName:function(e){return a(e,r)},updateClassFactory:function(e,t){o(e,t,r)}},e}();t.Z=n},1264:function(e,t,n){var r=n(5448),i=n(703),a=n(6398),o=n(3393),s=n(7855),l=n(5595),u=n(8512);function f(e){return f="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},f(e)}function d(e,t,n){return t in e?C(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(){var e,t,n=this.context,r=(0,l.Z)(n).getInstance(),c={"streaming.delay.liveDelay":u.Z.SETTING_UPDATED_LIVE_DELAY,"streaming.delay.liveDelayFragmentCount":u.Z.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,"streaming.liveCatchup.enabled":u.Z.SETTING_UPDATED_CATCHUP_ENABLED,"streaming.liveCatchup.playbackRate.min":u.Z.SETTING_UPDATED_PLAYBACK_RATE_MIN,"streaming.liveCatchup.playbackRate.max":u.Z.SETTING_UPDATED_PLAYBACK_RATE_MAX},h={debug:{logLevel:a.Z.LOG_LEVEL_WARNING,dispatchEvent:!1},streaming:{abandonLoadTimeout:1e4,wallclockTimeUpdateInterval:100,manifestUpdateRetryInterval:100,liveUpdateTimeThresholdInMilliseconds:0,cacheInitSegments:!1,applyServiceDescription:!0,applyProducerReferenceTime:!0,applyContentSteering:!0,eventControllerRefreshDelay:100,enableManifestDurationMismatchFix:!0,parseInbandPrft:!1,enableManifestTimescaleMismatchFix:!1,capabilities:{filterUnsupportedEssentialProperties:!0,useMediaCapabilitiesApi:!1},timeShiftBuffer:{calcFromSegmentTimeline:!1,fallbackToSegmentTimeline:!0},metrics:{maxListDepth:100},delay:{liveDelayFragmentCount:NaN,liveDelay:NaN,useSuggestedPresentationDelay:!0},protection:{keepProtectionMediaKeys:!1,ignoreEmeEncryptedEvent:!1,detectPlayreadyMessageFormat:!0},buffer:{enableSeekDecorrelationFix:!1,fastSwitchEnabled:!0,flushBufferAtTrackSwitch:!1,reuseExistingSourceBuffers:!0,bufferPruningInterval:10,bufferToKeep:20,bufferTimeAtTopQuality:30,bufferTimeAtTopQualityLongForm:60,initialBufferLevel:NaN,stableBufferTime:12,longFormContentDurationThreshold:600,stallThreshold:.3,useAppendWindow:!0,setStallState:!0,avoidCurrentTimeRangePruning:!1,useChangeTypeForTrackSwitch:!0,mediaSourceDurationInfinity:!0,resetSourceBuffersForTrackSwitch:!1},gaps:{jumpGaps:!0,jumpLargeGaps:!0,smallGapLimit:1.5,threshold:.3,enableSeekFix:!0,enableStallFix:!1,stallSeek:.1},utcSynchronization:{enabled:!0,useManifestDateHeaderTimeSource:!0,backgroundAttempts:2,timeBetweenSyncAttempts:30,maximumTimeBetweenSyncAttempts:600,minimumTimeBetweenSyncAttempts:2,timeBetweenSyncAttemptsAdjustmentFactor:2,maximumAllowedDrift:100,enableBackgroundSyncAfterSegmentDownloadError:!0,defaultTimingSource:{scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"https://time.akamai.com/?iso&ms"}},scheduling:{defaultTimeout:500,lowLatencyTimeout:0,scheduleWhilePaused:!0},text:{defaultEnabled:!0,dispatchForManualRendering:!1,extendSegmentedCues:!0,imsc:{displayForcedOnlyMode:!1,enableRollUp:!0},webvtt:{customRenderingEnabled:!1}},liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN},playbackBufferMin:.5,enabled:null,mode:o.Z.LIVE_CATCHUP_MODE_DEFAULT},lastBitrateCachingInfo:{enabled:!0,ttl:36e4},lastMediaSettingsCachingInfo:{enabled:!0,ttl:36e4},saveLastMediaSettingsForCurrentStreamingSession:!0,cacheLoadThresholds:{video:50,audio:5},trackSwitchMode:{audio:o.Z.TRACK_SWITCH_MODE_ALWAYS_REPLACE,video:o.Z.TRACK_SWITCH_MODE_NEVER_REPLACE},selectionModeForInitialTrack:o.Z.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY,fragmentRequestTimeout:2e4,fragmentRequestProgressTimeout:-1,manifestRequestTimeout:1e4,retryIntervals:(e={},d(e,s.w.MPD_TYPE,500),d(e,s.w.XLINK_EXPANSION_TYPE,500),d(e,s.w.MEDIA_SEGMENT_TYPE,1e3),d(e,s.w.INIT_SEGMENT_TYPE,1e3),d(e,s.w.BITSTREAM_SWITCHING_SEGMENT_TYPE,1e3),d(e,s.w.INDEX_SEGMENT_TYPE,1e3),d(e,s.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE,1e3),d(e,s.w.LICENSE,1e3),d(e,s.w.OTHER_TYPE,1e3),d(e,"lowLatencyReductionFactor",10),e),retryAttempts:(t={},d(t,s.w.MPD_TYPE,3),d(t,s.w.XLINK_EXPANSION_TYPE,1),d(t,s.w.MEDIA_SEGMENT_TYPE,3),d(t,s.w.INIT_SEGMENT_TYPE,3),d(t,s.w.BITSTREAM_SWITCHING_SEGMENT_TYPE,3),d(t,s.w.INDEX_SEGMENT_TYPE,3),d(t,s.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE,3),d(t,s.w.LICENSE,3),d(t,s.w.OTHER_TYPE,3),d(t,"lowLatencyMultiplyFactor",5),t),abr:{movingAverageMethod:o.Z.MOVING_AVERAGE_SLIDING_WINDOW,ABRStrategy:o.Z.ABR_STRATEGY_DYNAMIC,additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0,abandonRequestsRule:!0},abrRulesParameters:{abandonRequestsRule:{graceTimeThreshold:500,abandonMultiplier:1.8,minLengthToAverage:5}},bandwidthSafetyFactor:.9,useDefaultABRRules:!0,useDeadTimeLatency:!0,limitBitrateByPortal:!1,usePixelRatioInLimitBitrateByPortal:!1,maxBitrate:{audio:-1,video:-1},minBitrate:{audio:-1,video:-1},maxRepresentationRatio:{audio:1,video:1},initialBitrate:{audio:-1,video:-1},initialRepresentationRatio:{audio:-1,video:-1},autoSwitchBitrate:{audio:!0,video:!0},fetchThroughputCalculationMode:o.Z.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING},cmcd:{enabled:!1,sid:null,cid:null,rtp:null,rtpSafetyFactor:5,mode:o.Z.CMCD_MODE_QUERY,enabledKeys:["br","d","ot","tb","bl","dl","mtp","nor","nrr","su","bs","rtp","cid","pr","sf","sid","st","v"]},cmsd:{enabled:!1,abr:{applyMb:!1,etpWeightRatio:0}}},errors:{recoverAttempts:{mediaErrorDecode:5}}},g=i.Z.clone(h);function p(e,t,n){for(var a in e)e.hasOwnProperty(a)&&(t.hasOwnProperty(a)?"object"!==f(e[a])||e[a]instanceof Array||null===e[a]?(t[a]=i.Z.clone(e[a]),c[n+a]&&r.trigger(c[n+a])):p(e[a],t[a],v(n).call(n)+a+"."):console.error("Settings parameter "+n+a+" is not supported"))}return{get:function(){return g},update:function(e){"object"===f(e)&&p(e,g,"")},reset:function(){g=i.Z.clone(h)}}}h.__dashjs_factory_name="Settings";var p=r.Z.getSingletonFactory(h);t.Z=p},703:function(e,t,n){var r=n(3875),i=n.n(r),a=n(1067);function o(e){return o="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},o(e)}var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t;return t=[{key:"mixin",value:function(t,n,r){var i,a={};if(t)for(var s in n)n.hasOwnProperty(s)&&(i=n[s],s in t&&(t[s]===i||s in a&&a[s]===i)||("object"===o(t[s])&&null!==t[s]?t[s]=e.mixin(t[s],i,r):t[s]=r(i)));return t}},{key:"clone",value:function(t){if(!t||"object"!==o(t))return t;var n;if(t instanceof Array){n=[];for(var r=0,i=t.length;r<i;++r)r in t&&n.push(e.clone(t[r]))}else n={};return e.mixin(n,t,e.clone)}},{key:"addAditionalQueryParameterToUrl",value:function(e,t){try{if(!t||0===t.length)return e;var n=new D(e);return I(t).call(t,(function(e){e.key&&e.value&&n.searchParams.set(e.key,e.value)})),n.href}catch(t){return e}}},{key:"parseHttpHeaders",value:function(e){var t={};if(!e)return t;for(var n=T(e).call(e).split("\r\n"),r=0,i=n.length;r<i;r++){var a=n[r],o=y(a).call(a,": ");o>0&&(t[a.substring(0,o)]=a.substring(o+2))}return t}},{key:"generateUuid",value:function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)}))}},{key:"generateHashCode",value:function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}},{key:"getRelativeUrl",value:function(e,t){try{var n,r,a,o=new D(e),s=new D(t);if(o.protocol=s.protocol,o.origin!==s.origin)return t;var l=i().relative(o.pathname.substr(0,E(n=o.pathname).call(n,"/")),s.pathname.substr(0,E(r=s.pathname).call(r,"/"))),u=0===l.length?1:0;return l+=s.pathname.substr(E(a=s.pathname).call(a,"/")+u,s.pathname.length-1),s.pathname.length<l.length?s.pathname:l}catch(e){return t}}},{key:"parseUserAgent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;try{var t=null===e&&"undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"";return(0,a.UAParser)(t)}catch(e){return{}}}},{key:"stringHasProtocol",value:function(e){return/(http(s?)):\/\//i.test(e)}}],t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e,t),e}();t.Z=s},2032:function(e,t,n){function r(){return"4.7.4"}n.d(t,{e:function(){return r}})},2230:function(e,t){var n=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t;return(t=[{key:"extend",value:function(e,t){if(e){var n=!!t&&t.override,r=!!t&&t.publicOnly;for(var i in e){var a;!e.hasOwnProperty(i)||this[i]&&!n||r&&-1===y(a=e[i]).call(a,"public_")||(this[i]=e[i])}}}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e.prototype,t),e}();t.Z=n},4351:function(e,t,n){function r(e){return r="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},r(e)}function i(e,t){return i=M||function(e,t){return e.__proto__=t,e},i(e,t)}function a(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return o=M?L:function(e){return e.__proto__||L(e)},o(e)}var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=O(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!P)return!1;if(P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=o(t);if(n){var i=o(this).constructor;e=P(r,arguments,i)}else e=r.apply(this,arguments);return a(this,e)});function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=r.call(this)).ATTEMPT_BACKGROUND_SYNC="attemptBackgroundSync",e.BUFFERING_COMPLETED="bufferingCompleted",e.BUFFER_CLEARED="bufferCleared",e.BYTES_APPENDED_END_FRAGMENT="bytesAppendedEndFragment",e.BUFFER_REPLACEMENT_STARTED="bufferReplacementStarted",e.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",e.CMSD_STATIC_HEADER="cmsdStaticHeader",e.CURRENT_TRACK_CHANGED="currentTrackChanged",e.DATA_UPDATE_COMPLETED="dataUpdateCompleted",e.INBAND_EVENTS="inbandEvents",e.INITIAL_STREAM_SWITCH="initialStreamSwitch",e.INIT_FRAGMENT_LOADED="initFragmentLoaded",e.INIT_FRAGMENT_NEEDED="initFragmentNeeded",e.INTERNAL_MANIFEST_LOADED="internalManifestLoaded",e.ORIGINAL_MANIFEST_LOADED="originalManifestLoaded",e.LOADING_COMPLETED="loadingCompleted",e.LOADING_PROGRESS="loadingProgress",e.LOADING_DATA_PROGRESS="loadingDataProgress",e.LOADING_ABANDONED="loadingAborted",e.MANIFEST_UPDATED="manifestUpdated",e.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",e.MEDIA_FRAGMENT_NEEDED="mediaFragmentNeeded",e.QUOTA_EXCEEDED="quotaExceeded",e.SEGMENT_LOCATION_BLACKLIST_ADD="segmentLocationBlacklistAdd",e.SEGMENT_LOCATION_BLACKLIST_CHANGED="segmentLocationBlacklistChanged",e.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD="serviceLocationBlacklistAdd",e.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",e.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD="serviceLocationLocationBlacklistAdd",e.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED="serviceLocationLocationBlacklistChanged",e.SET_FRAGMENTED_TEXT_AFTER_DISABLED="setFragmentedTextAfterDisabled",e.SET_NON_FRAGMENTED_TEXT="setNonFragmentedText",e.SOURCE_BUFFER_ERROR="sourceBufferError",e.STREAMS_COMPOSED="streamsComposed",e.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",e.STREAM_REQUESTING_COMPLETED="streamRequestingCompleted",e.TEXT_TRACKS_QUEUE_INITIALIZED="textTracksQueueInitialized",e.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",e.UPDATE_TIME_SYNC_OFFSET="updateTimeSyncOffset",e.URL_RESOLUTION_FAILED="urlResolutionFailed",e.VIDEO_CHUNK_RECEIVED="videoChunkReceived",e.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",e.XLINK_ELEMENT_LOADED="xlinkElementLoaded",e.XLINK_READY="xlinkReady",e.SEEK_TARGET="seekTarget",e.SETTING_UPDATED_LIVE_DELAY="settingUpdatedLiveDelay",e.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT="settingUpdatedLiveDelayFragmentCount",e.SETTING_UPDATED_CATCHUP_ENABLED="settingUpdatedCatchupEnabled",e.SETTING_UPDATED_PLAYBACK_RATE_MIN="settingUpdatedPlaybackRateMin",e.SETTING_UPDATED_PLAYBACK_RATE_MAX="settingUpdatedPlaybackRateMax",e}return s}(n(8342).Z);t.Z=s},8512:function(e,t,n){function r(e){return r="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},r(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return a=M||function(e,t){return e.__proto__=t,e},a(e,t)}function o(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return s=M?L:function(e){return e.__proto__||L(e)},s(e)}var l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=O(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(l,e);var t,n,r=(t=l,n=function(){if("undefined"==typeof Reflect||!P)return!1;if(P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=s(t);if(n){var i=s(this).constructor;e=P(r,arguments,i)}else e=r.apply(this,arguments);return o(this,e)});function l(){return i(this,l),r.apply(this,arguments)}return l}(n(4351).Z),u=new l;t.Z=u},8342:function(e,t){var n=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t;return(t=[{key:"extend",value:function(e,t){if(e){var n=!!t&&t.override,r=!!t&&t.publicOnly;for(var i in e){var a;!e.hasOwnProperty(i)||this[i]&&!n||r&&-1===y(a=e[i]).call(a,"public_")||(this[i]=e[i])}}}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e.prototype,t),e}();t.Z=n},9326:function(e,t,n){var r=n(3186),i=n(7855),a=n(5448),o=n(8825),s=n(7387),l=n(1553);function u(e){var t,n,a,u,c,f=(e=e||{}).eventBus,d=e.debug,h=e.urlUtils,g=e.type,p=e.streamInfo,m=e.segmentsController,v=e.timelineConverter,y=e.baseURLController;function E(){return g}function _(){a=null}function T(e,t,n){var r,i,a=y.resolve(n.path),o={};return a&&t!==a.url&&h.isRelative(t)?(r=a.url,i=a.serviceLocation,o=a.queryParams,t&&(r=h.resolve(t,r))):r=t,!h.isRelative(r)&&(e.url=r,e.serviceLocation=i,e.queryParams=o,!0)}function b(e,t){if(null==t)return null;var n=new r.Z,a=t.representation,o=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].bandwidth,l=t.media;return l=(0,s.vi)(l,"Number",t.replacementNumber),l=(0,s.vi)(l,"Time",t.replacementTime),l=(0,s.vi)(l,"Bandwidth",o),l=(0,s.Aj)(l,a.id),l=(0,s.eR)(l),n.mediaType=E(),n.type=i.w.MEDIA_SEGMENT_TYPE,n.range=t.mediaRange,n.startTime=t.presentationStartTime,n.mediaStartTime=t.mediaStartTime,n.duration=t.duration,n.timescale=a.timescale,n.availabilityStartTime=t.availabilityStartTime,n.availabilityEndTime=t.availabilityEndTime,n.availabilityTimeComplete=a.availabilityTimeComplete,n.wallStartTime=t.wallStartTime,n.quality=a.index,n.index=t.index,n.mediaInfo=e,n.adaptationIndex=a.adaptation.index,n.representationId=a.id,T(n,l,a)?n:void 0}function S(e,t,r){var i=null;if(!t||!t.segmentInfoType)return i;var o=m.getSegmentByTime(t,r);return o&&(a=o,n.debug("Index for time "+r+" is "+o.index),i=b(e,o)),i}function A(e,t,r){var i=null,o=m.getSegmentByIndex(t,r,a?a.mediaStartTime:-1);if(o)i=b(e,o),a=o;else{if(u&&!c)return n.debug(E()+" No segment found at index: "+r+". Wait for next loop"),null;c=!0}return i}function I(){n.debug("Dynamic stream complete"),c=!0}return t={getCurrentIndex:function(){return a?a.index:-1},getInitRequest:function(e,t){return t?function(e,t,n){var a=new r.Z,o=t.adaptation.period,l=o.start;if(a.mediaType=n,a.type=i.w.INIT_SEGMENT_TYPE,a.range=t.range,a.availabilityStartTime=v.calcAvailabilityStartTimeFromPresentationTime(l,t,u),a.availabilityEndTime=v.calcAvailabilityEndTimeFromPresentationTime(l+o.duration,t,u),a.quality=t.index,a.mediaInfo=e,a.representationId=t.id,T(a,t.initialization,t))return a.url=(0,s.vi)(a.url,"Bandwidth",t.bandwidth),a}(e,t,E()):null},getNextSegmentRequest:function(e,t){return t&&t.segmentInfoType?A(e,t,a?a.index+1:0):null},getNextSegmentRequestIdempotent:function(e,t){var n=a?a.index+1:0,r=m.getSegmentByIndex(t,n,a?a.mediaStartTime:-1);return r?b(e,r):null},getSegmentRequestForTime:S,getStreamId:function(){return p.id},getStreamInfo:function(){return p},getType:E,getValidTimeAheadOfTargetTime:function(e,t,n,r){try{if(isNaN(e)||!t||!n)return NaN;if(e<0&&(e=0),isNaN(r)&&(r=.5),S(t,n,e))return e;if(n.adaptation.period.start+n.adaptation.period.duration<e)return NaN;for(var i=isFinite(n.adaptation.period.duration)?n.adaptation.period.start+n.adaptation.period.duration:e+30,a=Math.min(e+r,i),o=NaN,s=null;a<=i;){var l=null;if(a<=i&&(l=S(t,n,a)),l){o=a,s=l;break}a+=r}if(s){var u=s.startTime+s.duration;return e>s.startTime&&u-e>r?e:!isNaN(s.startTime)&&e<s.startTime&&o>s.startTime?s.startTime+.001:Math.min(u-r,o)}return o}catch(e){return NaN}},initialize:function(e){u=e,c=!1,m.initialize(e)},isLastSegmentRequested:function(e,t){if(!e||!a)return!1;if(c)return!0;if(!isFinite(e.adaptation.period.duration))return!1;if(a.presentationStartTime+a.duration>t)return!1;if(e.mediaFinishedInformation&&!isNaN(e.mediaFinishedInformation.numberOfSegments)&&!isNaN(a.index)&&a.index>=e.mediaFinishedInformation.numberOfSegments-1){if(!u||e.segmentInfoType===l.Z.SEGMENT_TEMPLATE)return!0;if(u&&e.segmentInfoType===l.Z.SEGMENT_LIST&&e.adaptation.period.nextPeriodId)return!0}return!!(u&&e.adaptation.period.nextPeriodId&&e.segmentInfoType===l.Z.SEGMENT_TIMELINE&&e.mediaFinishedInformation&&!isNaN(e.mediaFinishedInformation.mediaTimeOfLastSignaledSegment)&&a&&!isNaN(a.mediaStartTime)&&!isNaN(a.duration)&&a.mediaStartTime+a.duration>=e.mediaFinishedInformation.mediaTimeOfLastSignaledSegment-.05)},repeatSegmentRequest:function(e,t){return t&&t.segmentInfoType?A(e,t,a?a.index:0):null},reset:function(){_(),f.off(o.Z.DYNAMIC_TO_STATIC,I,t)}},n=d.getLogger(t),_(),f.on(o.Z.DYNAMIC_TO_STATIC,I,t),t}u.__dashjs_factory_name="DashHandler",t.Z=a.Z.getClassFactory(u)},1553:function(e,t){var n=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var t;return(t=[{key:"init",value:function(){this.BASE_URL="BaseURL",this.SEGMENT_BASE="SegmentBase",this.SEGMENT_TEMPLATE="SegmentTemplate",this.SEGMENT_LIST="SegmentList",this.SEGMENT_URL="SegmentURL",this.SEGMENT_TIMELINE="SegmentTimeline",this.SEGMENT_PROFILES="segmentProfiles",this.ADAPTATION_SET="AdaptationSet",this.REPRESENTATION="Representation",this.REPRESENTATION_INDEX="RepresentationIndex",this.SUB_REPRESENTATION="SubRepresentation",this.INITIALIZATION="Initialization",this.INITIALIZATION_MINUS="initialization",this.MPD="MPD",this.PERIOD="Period",this.ASSET_IDENTIFIER="AssetIdentifier",this.EVENT_STREAM="EventStream",this.ID="id",this.PROFILES="profiles",this.SERVICE_LOCATION="serviceLocation",this.RANGE="range",this.INDEX="index",this.MEDIA="media",this.BYTE_RANGE="byteRange",this.INDEX_RANGE="indexRange",this.MEDIA_RANGE="mediaRange",this.VALUE="value",this.CONTENT_TYPE="contentType",this.MIME_TYPE="mimeType",this.BITSTREAM_SWITCHING="BitstreamSwitching",this.BITSTREAM_SWITCHING_MINUS="bitstreamSwitching",this.CODECS="codecs",this.DEPENDENCY_ID="dependencyId",this.MEDIA_STREAM_STRUCTURE_ID="mediaStreamStructureId",this.METRICS="Metrics",this.METRICS_MINUS="metrics",this.REPORTING="Reporting",this.WIDTH="width",this.HEIGHT="height",this.SAR="sar",this.FRAMERATE="frameRate",this.AUDIO_SAMPLING_RATE="audioSamplingRate",this.MAXIMUM_SAP_PERIOD="maximumSAPPeriod",this.START_WITH_SAP="startWithSAP",this.MAX_PLAYOUT_RATE="maxPlayoutRate",this.CODING_DEPENDENCY="codingDependency",this.SCAN_TYPE="scanType",this.FRAME_PACKING="FramePacking",this.AUDIO_CHANNEL_CONFIGURATION="AudioChannelConfiguration",this.CONTENT_PROTECTION="ContentProtection",this.ESSENTIAL_PROPERTY="EssentialProperty",this.ESSENTIAL_PROPERTY_ASARRAY="EssentialProperty_asArray",this.SUPPLEMENTAL_PROPERTY="SupplementalProperty",this.SUPPLEMENTAL_PROPERTY_ASARRAY="SupplementalProperty_asArray",this.INBAND_EVENT_STREAM="InbandEventStream",this.PRODUCER_REFERENCE_TIME="ProducerReferenceTime",this.INBAND="inband",this.TYPE="type",this.ACCESSIBILITY="Accessibility",this.ROLE="Role",this.RATING="Rating",this.CONTENT_COMPONENT="ContentComponent",this.SUBSET="Subset",this.LANG="lang",this.VIEWPOINT="Viewpoint",this.VIEWPOINT_ASARRAY="Viewpoint_asArray",this.ROLE_ASARRAY="Role_asArray",this.REPRESENTATION_ASARRAY="Representation_asArray",this.PRODUCERREFERENCETIME_ASARRAY="ProducerReferenceTime_asArray",this.ACCESSIBILITY_ASARRAY="Accessibility_asArray",this.AUDIOCHANNELCONFIGURATION_ASARRAY="AudioChannelConfiguration_asArray",this.CONTENTPROTECTION_ASARRAY="ContentProtection_asArray",this.MAIN="main",this.DYNAMIC="dynamic",this.STATIC="static",this.MEDIA_PRESENTATION_DURATION="mediaPresentationDuration",this.MINIMUM_UPDATE_PERIOD="minimumUpdatePeriod",this.CODEC_PRIVATE_DATA="codecPrivateData",this.BANDWITH="bandwidth",this.SOURCE_URL="sourceURL",this.TIMESCALE="timescale",this.DURATION="duration",this.START_NUMBER="startNumber",this.PRESENTATION_TIME_OFFSET="presentationTimeOffset",this.AVAILABILITY_START_TIME="availabilityStartTime",this.AVAILABILITY_END_TIME="availabilityEndTime",this.TIMESHIFT_BUFFER_DEPTH="timeShiftBufferDepth",this.MAX_SEGMENT_DURATION="maxSegmentDuration",this.PRESENTATION_TIME="presentationTime",this.MIN_BUFFER_TIME="minBufferTime",this.MAX_SUBSEGMENT_DURATION="maxSubsegmentDuration",this.START="start",this.AVAILABILITY_TIME_OFFSET="availabilityTimeOffset",this.AVAILABILITY_TIME_COMPLETE="availabilityTimeComplete",this.CENC_DEFAULT_KID="cenc:default_KID",this.DVB_PRIORITY="dvb:priority",this.DVB_WEIGHT="dvb:weight",this.DVB_URL="dvb:url",this.DVB_MIMETYPE="dvb:mimeType",this.DVB_FONTFAMILY="dvb:fontFamily",this.SUGGESTED_PRESENTATION_DELAY="suggestedPresentationDelay",this.SERVICE_DESCRIPTION="ServiceDescription",this.SERVICE_DESCRIPTION_SCOPE="Scope",this.SERVICE_DESCRIPTION_LATENCY="Latency",this.SERVICE_DESCRIPTION_PLAYBACK_RATE="PlaybackRate",this.SERVICE_DESCRIPTION_OPERATING_QUALITY="OperatingQuality",this.SERVICE_DESCRIPTION_OPERATING_BANDWIDTH="OperatingBandwidth",this.PATCH_LOCATION="PatchLocation",this.PATCH_LOCATION_AS_ARRAY="PatchLocation_asArray",this.LOCATION="Location",this.LOCATION_AS_ARRAY="Location_asArray",this.PUBLISH_TIME="publishTime",this.ORIGINAL_PUBLISH_TIME="originalPublishTime",this.ORIGINAL_MPD_ID="mpdId",this.WALL_CLOCK_TIME="wallClockTime",this.PRESENTATION_TIME="presentationTime",this.LABEL="Label",this.GROUP_LABEL="GroupLabel",this.CONTENT_STEERING="ContentSteering",this.CONTENT_STEERING_AS_ARRAY="ContentSteering_asArray",this.DEFAULT_SERVICE_LOCATION="defaultServiceLocation",this.QUERY_BEFORE_START="queryBeforeStart",this.CLIENT_REQUIREMENT="clientRequirement",this.TTL="ttl",this.CONTENT_STEERING_RESPONSE={VERSION:"VERSION",TTL:"TTL",RELOAD_URI:"RELOAD-URI",PATHWAY_PRIORITY:"PATHWAY-PRIORITY",PATHWAY_CLONES:"PATHWAY-CLONES",BASE_ID:"BASE-ID",ID:"ID",URI_REPLACEMENT:"URI-REPLACEMENT",HOST:"HOST",PARAMS:"PARAMS"},this.PRODUCER_REFERENCE_TIME_TYPE={ENCODER:"encoder",CAPTURED:"captured",APPLICATION:"application"},this.SEGMENT_ALIGNMENT="segmentAlignment",this.SUB_SEGMENT_ALIGNMENT="subsegmentAlignment"}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e.prototype,t),e}());t.Z=n},7802:function(e,t,n){var r=n(5448),i=n(1724),a=n(3636),o=n(1736),s=n(5246);function l(e){e=e||{};var t,n,r=this.context,l=e.dashConstants,u=e.type,c=e.segmentBaseController;function f(e){return e?e.segments?n[l.SEGMENT_BASE]:n[e.segmentInfoType]:null}return t={initialize:function(t){n[l.SEGMENT_TIMELINE]=(0,i.Z)(r).create(e,t),n[l.SEGMENT_TEMPLATE]=(0,a.Z)(r).create(e,t),n[l.SEGMENT_LIST]=(0,o.Z)(r).create(e,t),n[l.SEGMENT_BASE]=(0,s.Z)(r).create(e,t)},updateInitData:function(e,t){return t?F.resolve():c.getSegmentBaseInitSegment({representation:e,mediaType:u})},updateSegmentData:function(e,t){return t?F.resolve():c.getSegmentList({mimeType:e.mimeType,representation:e,mediaType:u})},getSegmentByIndex:function(e,t,n){var r=f(e);return r?r.getSegmentByIndex(e,t,n):null},getSegmentByTime:function(e,t){var n=f(e);return n?n.getSegmentByTime(e,t):null},getMediaFinishedInformation:function(e){var t=f(e);return t?t.getMediaFinishedInformation(e):{numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN}}},n={},t}l.__dashjs_factory_name="SegmentsController";var u=r.Z.getClassFactory(l);t.Z=u},1736:function(e,t,n){var r=n(5448),i=n(3393),a=n(7387);function o(e,t){var n=(e=e||{}).timelineConverter;function r(){if(!n||!n.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(i.Z.MISSING_CONFIG_ERROR)}function o(e,i){if(r(),!e)return null;var o=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentList,s=o.SegmentURL_asArray.length,l=e&&!isNaN(e.startNumber)?e.startNumber:1,u=Math.max(l-1,0),c=Math.max(i-u,0),f=null;if(c<s){var d=o.SegmentURL_asArray[c];(f=(0,a.NF)(n,t,e,i))&&(f.replacementTime=(l+i-1)*e.segmentDuration,f.media=d.media?d.media:"",f.mediaRange=d.mediaRange,f.indexRange=d.indexRange)}return f}return{getSegmentByIndex:o,getSegmentByTime:function(e,t){if(r(),!e)return null;var i=e.segmentDuration;if(isNaN(i))return null;var a=n.calcPeriodRelativeTimeFromMpdRelativeTime(e,t);return o(e,Math.floor(a/i))},getMediaFinishedInformation:function(e){var t={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};if(!e)return t;var n=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentList,r=e&&!isNaN(e.startNumber)?e.startNumber:1,i=Math.max(r-1,0);return t.numberOfSegments=i+n.SegmentURL_asArray.length,t}}}o.__dashjs_factory_name="ListSegmentsGetter";var s=r.Z.getClassFactory(o);t.Z=s},5246:function(e,t,n){var r=n(5448),i=n(3393);function a(e){var t=(e=e||{}).timelineConverter;function n(){if(!t||!t.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(i.Z.MISSING_CONFIG_ERROR)}function r(e,t){if(n(),!e)return null;var r,i=e.segments?e.segments.length:-1;if(t<i&&(r=e.segments[t])&&r.index===t)return r;for(var a=0;a<i;a++)if((r=e.segments[a])&&r.index===t)return r;return null}return{getSegmentByIndex:r,getSegmentByTime:function(e,t){n();var i=function(e,t){if(!e)return-1;var n,r,i,a,o,s=e.segments,l=s?s.length:null,u=-1;if(s&&l>0)for(o=0;o<l;o++)if(i=(r=s[o]).presentationStartTime,t+(n=(a=r.duration)/2)>=i&&t-n<i+a){u=r.index;break}return u}(e,t);return r(e,i)},getMediaFinishedInformation:function(e){var t={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};return e&&e.segments?(t.numberOfSegments=e.segments.length,t):t}}}a.__dashjs_factory_name="SegmentBaseGetter";var o=r.Z.getClassFactory(a);t.Z=o},7387:function(e,t,n){n.d(t,{Aj:function(){return o},NF:function(){return c},TJ:function(){return f},eR:function(){return a},vi:function(){return s}});var r=n(2011);function i(e,t){for(;e.length<t;)e="0"+e;return e}function a(e){return e?e.split("$$").join("$"):e}function o(e,t){if(!t||!e||-1===y(e).call(e,"$RepresentationID$"))return e;var n=t.toString();return e.split("$RepresentationID$").join(n)}function s(e,t,n){var r,a,o,s,l,u,c=t.length,f="%0".length;if(!e)return e;for(;;){if((r=y(e).call(e,"$"+t))<0)return e;if((a=y(e).call(e,"$",r+c))<0)return e;if((o=y(e).call(e,"%0",r+c))>r&&o<a)switch(s=e.charAt(a-1),l=_(e.substring(o+f,a-1),10),s){case"d":case"i":case"u":u=i(n.toString(),l);break;case"x":u=i(n.toString(16),l);break;case"X":u=i(n.toString(16),l).toUpperCase();break;case"o":u=i(n.toString(8),l);break;default:return e}else u=n;e=e.substring(0,r)+u+e.substring(a+1)}}function l(e,t,n,i,a,o,s,l){var u,c=new r.Z;return c.representation=e,c.duration=t,c.presentationStartTime=n,c.mediaStartTime=i,c.availabilityStartTime=a.calcAvailabilityStartTimeFromPresentationTime(o,e,s),c.availabilityEndTime=a.calcAvailabilityEndTimeFromPresentationTime(o+t,e,s),c.wallStartTime=a.calcWallTimeForSegment(c,s),c.replacementNumber=(u=l,c.representation.startNumber+u),c.index=l,c}function u(e,t,n,r){var i=t.adaptation.period;if(isFinite(i.duration)&&i.start+i.duration<=n.presentationStartTime)return!1;if(r){if("INF"===t.availabilityTimeOffset)return!0;var a=e.getClientReferenceTime();return n.availabilityStartTime.getTime()<=a&&(!isFinite(n.availabilityEndTime)||n.availabilityEndTime.getTime()>=a)}return!0}function c(e,t,n,r){var i,a,o;i=n.segmentDuration,isNaN(i)&&(i=n.adaptation.period.duration),a=x((n.adaptation.period.start+r*i).toFixed(5)),o=x((a+i).toFixed(5));var s=l(n,i,a,e.calcMediaTimeFromPresentationTime(a,n),e,o,t,r);return u(e,n,s,t)?s:null}function f(e,t,n,r,i,a,o,c,f,d){var h,g,p=r/a,m=i/a;return h=e.calcPresentationTimeFromMediaTime(p,n),u(e,n,g=l(n,m,h,p,e,h+m,t,f),t)?(g.replacementTime=d||r,o=s(o,"Number",g.replacementNumber),o=s(o,"Time",g.replacementTime),g.media=o,g.mediaRange=c,g):null}},3636:function(e,t,n){var r=n(5448),i=n(3393),a=n(7387);function o(e,t){var n=(e=e||{}).timelineConverter;function r(){if(!n||!n.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(i.Z.MISSING_CONFIG_ERROR)}function o(e,i){if(r(),!e)return null;var o=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentTemplate;i=Math.max(i,0);var s=(0,a.NF)(n,t,e,i);if(s){s.replacementTime=Math.round((i-1)*e.segmentDuration*e.timescale,10);var l=o.media;l=(0,a.vi)(l,"Number",s.replacementNumber),l=(0,a.vi)(l,"Time",s.replacementTime),s.media=l}return s}return{getSegmentByIndex:o,getSegmentByTime:function(e,t){if(r(),!e)return null;var i=e.segmentDuration;if(isNaN(i))return null;var a=n.calcPeriodRelativeTimeFromMpdRelativeTime(e,t);return o(e,Math.floor(a/i))},getMediaFinishedInformation:function(e){var t={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};if(!e)return t;var n=e.segmentDuration;return isNaN(n)?t.numberOfSegments=1:t.numberOfSegments=Math.ceil(e.adaptation.period.duration/n),t}}}o.__dashjs_factory_name="TemplateSegmentsGetter";var s=r.Z.getClassFactory(o);t.Z=s},1724:function(e,t,n){var r=n(5448),i=n(3393),a=n(7387);function o(e,t){var n=(e=e||{}).timelineConverter,r=e.dashMetrics;function o(){if(!n)throw new Error(i.Z.MISSING_CONFIG_ERROR)}function s(e,t){var n,r,i,a,o,s,u,c=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentTemplate||e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentList,f=c.SegmentTimeline,d=c.SegmentURL_asArray,h=0,g=-1;u=e.timescale;var p=!1;for(i=0,a=(n=f.S_asArray).length;i<a&&!p;i++)for(s=0,(r=n[i]).hasOwnProperty("r")&&(s=r.r),r.hasOwnProperty("t")&&(h=r.t),s<0&&(s=l(e,n[i+1],r,u,h/u)),o=0;o<=s&&!p;o++)(p=t(h,c,d,r,u,++g,i))&&(e.segmentDuration=r.d/u),h+=r.d}function l(e,t,i,a,o){var s;if(t&&t.hasOwnProperty("t"))s=t.t/a;else try{var l=0;if(isNaN(e.adaptation.period.start)||isNaN(e.adaptation.period.duration)||!isFinite(e.adaptation.period.duration)){var u=r.getCurrentDVRInfo();l=isNaN(u.end)?0:u.end}else l=e.adaptation.period.start+e.adaptation.period.duration;s=n.calcMediaTimeFromPresentationTime(l,e),e.segmentDuration=i.d/a}catch(e){s=0}return Math.max(Math.ceil((s-o)/(i.d/a))-1,0)}return{getSegmentByIndex:function(e,r,i){if(o(),!e)return null;var l=null,u=!1;return s(e,(function(r,o,s,c,f,d,h){if(u||i<0){var g=o.media,p=c.mediaRange;return s&&(g=s[h].media||"",p=s[h].mediaRange),l=(0,a.TJ)(n,t,e,r,c.d,f,g,p,d,c.tManifest),!0}return r>=i*f-.5*c.d&&(u=!0),!1})),l},getSegmentByTime:function(e,r){if(o(),!e)return null;void 0===r&&(r=null);var i=null,l=n.calcMediaTimeFromPresentationTime(r,e);return s(e,(function(r,o,s,u,c,f,d){var h=x((l*c).toPrecision(15));if(h<r+u.d&&h>=r){var g=o.media,p=u.mediaRange;return s&&(g=s[d].media||"",p=s[d].mediaRange),i=(0,a.TJ)(n,t,e,r,u.d,c,g,p,f,u.tManifest),!0}return!1})),i},getMediaFinishedInformation:function(e){if(!e)return 0;var t,n,r,i,a,o,s,u=(e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentTemplate||e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentList).SegmentTimeline,c=0,f=0,d=0;for(s=e.timescale,i=(t=u.S_asArray).length,r=0;r<i;r++)for(o=0,(n=t[r]).hasOwnProperty("r")&&(o=n.r),n.hasOwnProperty("t")&&(f=(c=n.t)/s),o<0&&(o=l(e,t[r+1],n,s,f)),a=0;a<=o;a++)d++,f=(c+=n.d)/s;return{numberOfSegments:d,mediaTimeOfLastSignaledSegment:f}}}}o.__dashjs_factory_name="TimelineSegmentsGetter";var s=r.Z.getClassFactory(o);t.Z=s},2011:function(e,t){t.Z=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.indexRange=null,this.index=null,this.mediaRange=null,this.media=null,this.duration=NaN,this.replacementTime=null,this.replacementNumber=NaN,this.mediaStartTime=NaN,this.presentationStartTime=NaN,this.availabilityStartTime=NaN,this.availabilityEndTime=NaN,this.wallStartTime=NaN,this.representation=null}},2610:function(e,t){t.Z=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.schemeIdUri="",this.value=""}},1139:function(e,t,n){n.d(t,{Z:function(){return Ho}});var r=n(452),i=n.n(r),a=n(3393),o=n(1553),s=n(3860),l=n(5595),u=n(8512),p=n(5448),m=n(6398),E=n(8825);function de(){var e,t,n,r,i,o,c,f,h,g,p,v,_,T,b,S,A,R,w,N,C,D,M,L,O,P=this.context,F=(0,l.Z)(P).getInstance();function Z(){Y(),T=!1,g=0,p=0,A=0,M=!1,R=!0,w=!1,L=!1,N=NaN,S=NaN,c&&(F.off(u.Z.DATA_UPDATE_COMPLETED,ie,e),F.off(u.Z.LOADING_PROGRESS,Ae,e),F.off(u.Z.MANIFEST_UPDATED,Ne,e),F.off(u.Z.STREAMS_COMPOSED,Ce,e),F.off(E.Z.PLAYBACK_ENDED,Te,e),F.off(E.Z.STREAM_INITIALIZING,Re,e),F.off(E.Z.REPRESENTATION_SWITCH,we,e),F.off(E.Z.BUFFER_LEVEL_STATE_CHANGED,se,e),re(),c.removeEventListener("canplay",ae),c.removeEventListener("canplaythrough",oe),c.removeEventListener("play",le),c.removeEventListener("waiting",ue),c.removeEventListener("playing",ce),c.removeEventListener("pause",fe),c.removeEventListener("error",be),c.removeEventListener("seeking",de),c.removeEventListener("seeked",he),c.removeEventListener("timeupdate",ge),c.removeEventListener("progress",pe),c.removeEventListener("ratechange",me),c.removeEventListener("loadedmetadata",ve),c.removeEventListener("loadeddata",ye),c.removeEventListener("stalled",Ie),c.removeEventListener("ended",Ee),c.removeEventListener("volumechange",_e)),h=null,c=null,v=null,_=null}function B(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return x((G(e)-K()).toFixed(5))}function G(e){var t=e||v;return t.start+t.duration}function q(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];v&&c&&c.getElement()?(e&&_&&V(K()),c.play()):T=!0}function Y(){v&&c&&c.pause()}function j(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(v&&c&&c.getElement()){var a=isNaN(N)?c.getTime():N;e!==a&&((C=!0===r)||(N=e),t.info("Requesting seek to time: "+e+(C?" (internal)":"")),_&&i&&V(e),c.setCurrentTime(e,n))}}function H(){if(v&&c&&_){var e=n&&n.hasVideoTrack()?a.Z.VIDEO:a.Z.AUDIO,t=i.getCurrentDVRInfo(e);return t&&t.range?t.range.end:0}}function V(e){var t=new Date(f.getClientReferenceTime()),n=o.getRegularPeriods()[0],r=f.calcPresentationTimeFromWallTime(t,n);g=r-e}function K(){return v&&c?c.getTime():null}function z(){return v&&c?c.isPaused():null}function W(){return v&&c?c.isSeeking():null}function X(){return v&&c?c.isStalled():null}function Q(){return v&&c?c.getPlaybackRate():null}function $(){return v&&c?c.getEnded():null}function J(){return _}function ee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!z()&&_&&0!==c.getReadyState()&&!W()&&!M){var r;e||(e=n.hasVideoTrack()?a.Z.VIDEO:a.Z.AUDIO);var i=K(),o=te(i,e),s=!isNaN(o)&&o!==i;s&&!W()&&(X()||D||1===c.getReadyState())&&(t.debug(d(r="UpdateCurrentTime: Seek to actual time: ".concat(o," from currentTime: ")).call(r,i)),j(o,!1,!1))}}function te(e,t){var n=i.getCurrentDVRInfo(t),r=n?n.range:null;return r?e>r.end?Math.max(r.end-g,r.start):e>0&&e+.25<r.start&&Math.abs(e-r.start)<31536e4?w?Math.max(r.end-g,r.start):r.start:e:NaN}function ne(){null===h&&(h=k((function(){!function(){if(F.trigger(u.Z.WALLCLOCK_TIME_UPDATED,{isDynamic:_,time:new Date}),J()){var e=U();(isNaN(S)||e>S+O.get().streaming.liveUpdateTimeThresholdInMilliseconds)&&(n.addDVRMetric(),z()?function(){var e=U();(!b||e>b+500)&&(b=e,ge())}():ee(),S=e)}}()}),O.get().streaming.wallclockTimeUpdateInterval))}function re(){clearInterval(h),h=null}function ie(e){var t=o.convertRepresentationToRepresentationInfo(e.currentRepresentation),n=t?t.mediaInfo.streamInfo:null;null!==n&&v.id===n.id&&(v=n)}function ae(){F.trigger(u.Z.CAN_PLAY)}function oe(){F.trigger(u.Z.CAN_PLAY_THROUGH)}function se(e){e.streamId===n.getActiveStreamInfo().id&&(D=e.state===s.Z.BUFFER_EMPTY,O.get().streaming.buffer.setStallState&&c.setStallState(e.mediaType,e.state===s.Z.BUFFER_EMPTY))}function le(){t.info("Native video element event: play"),ee(),ne(),F.trigger(u.Z.PLAYBACK_STARTED,{startTime:K()})}function ue(){t.info("Native video element event: waiting"),F.trigger(u.Z.PLAYBACK_WAITING,{playingTime:K()})}function ce(){t.info("Native video element event: playing"),C=!1,F.trigger(u.Z.PLAYBACK_PLAYING,{playingTime:K()})}function fe(){t.info("Native video element event: pause"),F.trigger(u.Z.PLAYBACK_PAUSED,{ended:$()})}function de(){if(!C){var e=K();isNaN(N)||N===e||(e=N),N=NaN,t.info("Seeking to: "+e),ne(),F.trigger(u.Z.PLAYBACK_SEEKING,{seekTime:e,streamId:v.id})}}function he(){t.info("Native video element event: seeked"),C=!1,F.trigger(u.Z.PLAYBACK_SEEKED)}function ge(){v&&F.trigger(u.Z.PLAYBACK_TIME_UPDATED,{timeToEnd:B(),time:K(),streamId:v.id})}function pe(){F.trigger(u.Z.PLAYBACK_PROGRESS,{streamId:v.id})}function me(){var e=Q();t.info("Native video element event: ratechange: ",e),F.trigger(u.Z.PLAYBACK_RATE_CHANGED,{playbackRate:e})}function ve(){t.info("Native video element event: loadedmetadata"),F.trigger(u.Z.PLAYBACK_METADATA_LOADED),ne()}function ye(){t.info("Native video element event: loadeddata"),F.trigger(u.Z.PLAYBACK_LOADED_DATA)}function Ee(){t.info("Native video element event: ended"),Y(),re();var e=n?n.getActiveStreamInfo():null;e&&F.trigger(u.Z.PLAYBACK_ENDED,{isLast:e.isLast})}function _e(){F.trigger(u.Z.PLAYBACK_VOLUME_CHANGED)}function Te(e){if(h&&e.isLast){t.info("onPlaybackEnded -- PLAYBACK_ENDED but native video element didn't fire ended");var n=e.seekTime?e.seekTime:G();c.setCurrentTime(n),Y(),re()}}function be(e){var t=e.target||e.srcElement;F.trigger(u.Z.PLAYBACK_ERROR,{error:t.error})}function Se(){_=!1}function Ae(e){if(!1===e.stream&&w&&!isNaN(e.request.duration)){var n=1.2*e.request.duration;n>g&&(t.warn("Browser does not support fetch API with StreamReader. Increasing live delay to be 20% higher than segment duration:",n.toFixed(2)),g=n,p=n)}}function Ie(e){F.trigger(u.Z.PLAYBACK_STALLED,{e:e})}function Re(e){var n;(n=e.mediaInfo)&&n.supplementalProperties&&n.supplementalProperties[a.Z.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME]&&"true"===n.supplementalProperties[a.Z.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME].value&&(t.debug("Low Latency critical SupplementalProperty set: Enabling low Latency"),w=!0)}function we(e){var t=n.getActiveStreamInfo();e&&t&&e.currentRepresentation&&e.streamId&&e.streamId===t.id&&e.mediaType&&(e.mediaType===a.Z.VIDEO||e.mediaType===a.Z.AUDIO)&&(R=e.currentRepresentation.availabilityTimeComplete,(w=!R)&&!L&&(L=!0))}function Ne(){M=!0}function Ce(){M=!1}return e={initialize:function(t,n){v=t,!0!==n&&(c.addEventListener("canplay",ae),c.addEventListener("canplaythrough",oe),c.addEventListener("play",le),c.addEventListener("waiting",ue),c.addEventListener("playing",ce),c.addEventListener("pause",fe),c.addEventListener("error",be),c.addEventListener("seeking",de),c.addEventListener("seeked",he),c.addEventListener("timeupdate",ge),c.addEventListener("progress",pe),c.addEventListener("ratechange",me),c.addEventListener("loadedmetadata",ve),c.addEventListener("loadeddata",ye),c.addEventListener("stalled",Ie),c.addEventListener("ended",Ee),c.addEventListener("volumechange",_e),_=v.manifestInfo.isDynamic,D=!1,C=!1,F.on(u.Z.DATA_UPDATE_COMPLETED,ie,e),F.on(u.Z.LOADING_PROGRESS,Ae,e),F.on(u.Z.MANIFEST_UPDATED,Ne,e),F.on(u.Z.STREAMS_COMPOSED,Ce,e),F.on(E.Z.PLAYBACK_ENDED,Te,e,{priority:l.Z.EVENT_PRIORITY_HIGH}),F.on(E.Z.STREAM_INITIALIZING,Re,e),F.on(E.Z.REPRESENTATION_SWITCH,we,e),F.on(E.Z.BUFFER_LEVEL_STATE_CHANGED,se,e),F.on(E.Z.DYNAMIC_TO_STATIC,Se,e),T&&(T=!1,q()))},setConfig:function(e){e&&(e.streamController&&(n=e.streamController),e.serviceDescriptionController&&(r=e.serviceDescriptionController),e.dashMetrics&&(i=e.dashMetrics),e.adapter&&(o=e.adapter),e.videoModel&&(c=e.videoModel),e.timelineConverter&&(f=e.timelineConverter),e.settings&&(O=e.settings))},getTimeToStreamEnd:B,getBufferLevel:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=null;return I(e=n.getActiveStreamProcessors()).call(e,(function(e){if(!t||0===t.length||-1===y(t).call(t,e.getType())){var n=e.getBufferLevel();r=null===r?n:Math.min(r,n)}})),r},getPlaybackStalled:function(){return D},getTime:K,getLowLatencyModeEnabled:function(){return w},getInitialCatchupModeActivated:function(){return L},getIsManifestUpdateInProgress:function(){return M},getPlaybackRate:Q,getPlayedRanges:function(){return v&&c?c.getPlayedRanges():null},getEnded:$,getIsDynamic:J,getStreamController:function(){return n},computeAndSetLiveDelay:function(e,t){var n,i,a,s=!isNaN(e)&&isFinite(e)?e:NaN,l=o.getSuggestedPresentationDelay(),u=r.getServiceDescriptionSettings();return n=isNaN(O.get().streaming.delay.liveDelay)?null===O.get().streaming.delay.liveDelayFragmentCount||isNaN(O.get().streaming.delay.liveDelayFragmentCount)||isNaN(s)?u&&!isNaN(u.liveDelay)&&u.liveDelay>0?u.liveDelay:!0===O.get().streaming.delay.useSuggestedPresentationDelay&&null!==l&&!isNaN(l)&&l>0?l:isNaN(s)?t&&!isNaN(t.minBufferTime)?4*t.minBufferTime:4*v.manifestInfo.minBufferTime:4*s:s*O.get().streaming.delay.liveDelayFragmentCount:O.get().streaming.delay.liveDelay,null!==(a=o.getAvailabilityStartTime())&&(A=a),i=t&&t.dvrWindowSize>0?Math.min(n,t.dvrWindowSize):n,g=i,p=i,i},getLiveDelay:function(){return g},getOriginalLiveDelay:function(){return p},getCurrentLiveLatency:function(){if(!_||isNaN(A))return NaN;var e=K();if(isNaN(e)||0===e)return 0;var t=(new Date).getTime()+1e3*f.getClientTimeOffset();return Math.max(((t-A-1e3*e)/1e3).toFixed(3),0)},play:q,isPaused:z,isStalled:X,pause:Y,isSeeking:W,getStreamEndTime:G,seek:j,seekToOriginalLive:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=H();if(0!==r){var i=r-(g=p);j(i,e,t,n)}},seekToCurrentLive:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=H();if(0!==r){var i=r-g;j(i,e,t,n)}},reset:Z,updateCurrentTime:ee,getAvailabilityStartTime:function(){return A}},t=(0,m.Z)(P).getInstance().getLogger(e),Z(),e}de.__dashjs_factory_name="PlaybackController";var he=p.Z.getSingletonFactory(de),ge=n(3186),pe="loading",me="executed",ve="failed";function ye(e){var t,n,r,i,a=(e=e||{}).eventBus,o=e.events,s=e.dashMetrics,l=e.fragmentLoader,u=e.debug,c=e.streamInfo,f=e.type;function h(e){var t;return!!e&&(t=!1,R(r).call(r,(function(n){if(r=e,i=n,!isNaN(r.index)&&r.startTime===i.startTime&&r.adaptationIndex===i.adaptationIndex&&r.type===i.type||function(e,t){return isNaN(e.index)&&isNaN(t.index)&&e.quality===t.quality}(e,n)||function(e,t){return e.action===ge.Z.ACTION_COMPLETE&&e.action===t.action}(e,n))return t=!0;var r,i})),t)}function g(e){return isNaN(e.duration)?.25:Math.min(e.duration/8,.5)}function p(e){r=w(r).call(r,(function(t){var n=g(t);return isNaN(t.startTime)||void 0!==e&&t.startTime>=e-n}))}function m(e,t){t<=e+.5||(r=w(r).call(r,(function(n){var r=g(n);return isNaN(n.startTime)||n.startTime>=t-r||isNaN(n.duration)||n.startTime+n.duration<=e+r})))}function v(e,t,n){for(var r=e.length-1;r>=0;r--){var i=e[r],a=i.startTime,o=a+i.duration;if(n=isNaN(n)?g(i):n,!isNaN(a)&&!isNaN(o)&&t+n>=a&&t-n<o||isNaN(a)&&isNaN(t))return i}return null}function E(e,t){s.addSchedulingInfo(e,t),s.addRequestsQueue(e.mediaType,i,r)}function _(e){e.sender===l&&(S(i).call(i,y(i).call(i,e.request),1),e.response&&!e.error&&r.push(e.request),E(e.request,e.error?ve:me),a.trigger(o.FRAGMENT_LOADING_COMPLETED,{request:e.request,response:e.response,error:e.error,sender:this},{streamId:c.id,mediaType:f}))}function T(e){e.sender===l&&a.trigger(o.FRAGMENT_LOADING_PROGRESS,{request:e.request,response:e.response,error:e.error,sender:this},{streamId:c.id,mediaType:f})}function b(e){e.sender===l&&a.trigger(o.FRAGMENT_LOADING_ABANDONED,{request:e.request},{streamId:c.id,mediaType:f})}function A(){r=[],i=[]}return t={getStreamId:function(){return c.id},getType:function(){return f},getRequests:function(e){var t=e?e.state instanceof Array?e.state:[e.state]:[],n=[];return I(t).call(t,(function(t){var a=function(e){var t;switch(e){case pe:t=i;break;case me:t=r;break;default:t=[]}return t}(t);n=d(n).call(n,function(e,t){return t.hasOwnProperty("time")?[v(e,t.time,t.threshold)]:w(e).call(e,(function(e){for(var n in t)if("state"!==n&&t.hasOwnProperty(n)&&e[n]!=t[n])return!1;return!0}))}(a,e))})),n},isFragmentLoaded:h,isFragmentLoadedOrPending:function(e){var t,n=!1,r=0;if(!(n=h(e)))for(r=0;r<i.length;r++)t=i[r],e.url===t.url&&e.startTime===t.startTime&&(n=!0);return n},removeExecutedRequestsBeforeTime:p,removeExecutedRequestsAfterTime:function(e){r=w(r).call(r,(function(t){return isNaN(t.startTime)||void 0!==e&&t.startTime<e}))},syncExecutedRequestsWithBufferedRange:function(e,t){if(e&&0!==e.length){for(var n=0,r=0,i=e.length;r<i;r++)m(n,e.start(r)),n=e.end(r);t>0&&m(n,t)}else p()},abortRequests:function(){n.debug("abort requests"),l.abort(),i=[]},executeRequest:function(e){e.action===ge.Z.ACTION_DOWNLOAD?(E(e,pe),i.push(e),function(e){a.trigger(o.FRAGMENT_LOADING_STARTED,{request:e},{streamId:c.id,mediaType:f}),l.load(e)}(e)):n.warn("Unknown request action.")},reset:function(){a.off(o.LOADING_COMPLETED,_,this),a.off(o.LOADING_DATA_PROGRESS,T,this),a.off(o.LOADING_ABANDONED,b,this),l&&l.reset(),A()},resetInitialSettings:A,addExecutedRequest:function(e){r.push(e)}},n=u.getLogger(t),A(),a.on(o.LOADING_COMPLETED,_,t),a.on(o.LOADING_DATA_PROGRESS,T,t),a.on(o.LOADING_ABANDONED,b,t),t}ye.__dashjs_factory_name="FragmentModel";var Ee=p.Z.getClassFactory(ye);Ee.FRAGMENT_MODEL_LOADING=pe,Ee.FRAGMENT_MODEL_EXECUTED=me,Ee.FRAGMENT_MODEL_CANCELED="canceled",Ee.FRAGMENT_MODEL_FAILED=ve,p.Z.updateClassFactory(ye.__dashjs_factory_name,Ee);var _e=Ee,Te=n(5459);function be(e){return be="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},be(e)}function Se(e,t){return Se=M||function(e,t){return e.__proto__=t,e},Se(e,t)}function Ae(e,t){return!t||"object"!==be(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ie(e){return Ie=M?L:function(e){return e.__proto__||L(e)},Ie(e)}var Re=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=O(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Se(e,t)}(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!P)return!1;if(P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Ie(t);if(n){var i=Ie(this).constructor;e=P(r,arguments,i)}else e=r.apply(this,arguments);return Ae(this,e)});function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this)).MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE=10,e.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE=11,e.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE=12,e.SEGMENT_BASE_LOADER_ERROR_CODE=15,e.TIME_SYNC_FAILED_ERROR_CODE=16,e.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE=17,e.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE=18,e.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=19,e.APPEND_ERROR_CODE=20,e.REMOVE_ERROR_CODE=21,e.DATA_UPDATE_FAILED_ERROR_CODE=22,e.CAPABILITY_MEDIASOURCE_ERROR_CODE=23,e.CAPABILITY_MEDIAKEYS_ERROR_CODE=24,e.DOWNLOAD_ERROR_ID_MANIFEST_CODE=25,e.DOWNLOAD_ERROR_ID_SIDX_CODE=26,e.DOWNLOAD_ERROR_ID_CONTENT_CODE=27,e.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE=28,e.DOWNLOAD_ERROR_ID_XLINK_CODE=29,e.MANIFEST_ERROR_ID_PARSE_CODE=31,e.MANIFEST_ERROR_ID_NOSTREAMS_CODE=32,e.TIMED_TEXT_ERROR_ID_PARSE_CODE=33,e.MANIFEST_ERROR_ID_MULTIPLEXED_CODE=34,e.MEDIASOURCE_TYPE_UNSUPPORTED_CODE=35,e.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE="parsing failed for ",e.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading manifest: ",e.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading Xlink element: ",e.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE="Segments update failed",e.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE="no segments are available yet",e.SEGMENT_BASE_LOADER_ERROR_MESSAGE="error loading segment ranges from sidx",e.TIME_SYNC_FAILED_ERROR_MESSAGE="Failed to synchronize client and server time",e.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE="request is null",e.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE="Failed to resolve a valid URL",e.APPEND_ERROR_MESSAGE="chunk is not defined",e.REMOVE_ERROR_MESSAGE="Removing data from the SourceBuffer",e.DATA_UPDATE_FAILED_ERROR_MESSAGE="Data update failed",e.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE="mediasource is not supported",e.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE="mediakeys is not supported",e.TIMED_TEXT_ERROR_MESSAGE_PARSE="parsing error :",e.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE="Error creating source buffer of type : ",e}return i}(n(2230).Z)),we=n(1264),Ne=n(7855);function Ce(e){var t,n,r,i,o,s,l=this.context,c=(0,we.Z)(l).getInstance(),f=e.textController,h=e.eventBus,g=[],p=[],v=!1,E=e.mediaSource,_=null;function T(e){return new F((function(t){L((function(){i.changeType&&i.changeType(e),t()}))}))}function b(e){return i=f.getTextSourceBuffer(e),F.resolve()}function I(){if("function"==typeof i.addEventListener)try{i.addEventListener("updateend",D,!1),i.addEventListener("error",M,!1),i.addEventListener("abort",M,!1)}catch(e){s=k(D,50)}else s=k(D,50)}function R(e){return new F((function(t){i&&c.get().streaming.buffer.useAppendWindow?L((function(){try{var n,a;if(!i)return void t();var s=E.duration,l=0;e&&!isNaN(e.start)&&!isNaN(e.duration)&&isFinite(e.duration)&&(s=e.start+e.duration),e&&!isNaN(e.start)&&(l=e.start),i.appendWindowEnd===s&&i.appendWindowStart===l||(i.appendWindowStart=0,i.appendWindowEnd=s+.01,i.appendWindowStart=Math.max(l-.1,0),r.debug(d(n=d(a="Updated append window for ".concat(o.type,". Set start to ")).call(a,i.appendWindowStart," and end to ")).call(n,i.appendWindowEnd))),t()}catch(e){r.warn("Failed to set append window"),t()}})):t()}))}function w(e){return new F((function(t){i?L((function(){try{i.timestampOffset===e||isNaN(e)||(i.timestampOffset=e,r.debug("Set MSE timestamp offset to ".concat(e))),t()}catch(e){t()}})):t()}))}function N(){if(!v&&p.length>0){v=!0;var e=p[0];S(p).call(p,0,1);var t=function(){v=!1,p.length>0&&N.call(this),e&&e.data&&e.data.segmentType&&e.data.segmentType!==Ne.w.INIT_SEGMENT_TYPE&&delete e.data.bytes,e.promise.resolve({chunk:e.data})};try{_=e.request,0===e.data.bytes.byteLength?t.call(this):(i.appendBuffer?i.appendBuffer(e.data.bytes):i.append(e.data.bytes,e.data),L(A(t).call(t,this)))}catch(t){r.fatal('SourceBuffer append failed "'+t+'"'),p.length>0?N():v=!1,delete e.data.bytes,e.promise.reject({chunk:e.data,error:new Te.Z(t.code,t.message)})}}}function C(){g.length>0&&(i.updating||(g.shift()(),C()))}function D(){i.updating||C()}function M(e){var t,r,i=e.target||{};t=u.Z.SOURCE_BUFFER_ERROR,r={error:i,lastRequestAppended:_}||{},h.trigger(t,r,{streamId:o.streamInfo.id,mediaType:n})}function L(e){g.push(e),i.updating||C()}return t={getType:function(){return n},getAllBufferRanges:function(){try{return i.buffered}catch(e){return r.error("getAllBufferRanges exception: "+e.message),null}},getBuffer:function(){return i},append:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new F((function(r,i){e?(p.push({data:e,promise:{resolve:r,reject:i},request:n}),L(A(N).call(N,t))):i({chunk:e,error:new Te.Z(Re.APPEND_ERROR_CODE,Re.APPEND_ERROR_MESSAGE)})}))},remove:function(e){return new F((function(t,n){var r=e.start,a=e.end;r>=0&&a>r?L((function(){try{i.remove(r,a),L((function(){t({from:r,to:a,unintended:!1}),e.resolve&&e.resolve()}))}catch(t){n({from:r,to:a,unintended:!1,error:new Te.Z(Re.REMOVE_ERROR_CODE,Re.REMOVE_ERROR_MESSAGE)}),e.reject&&e.reject(t)}})):t()}))},abort:function(){return new F((function(e){try{p=[],"open"===E.readyState?L((function(){try{i&&i.abort(),e()}catch(t){e()}})):i&&i.setTextTrack&&"ended"===E.readyState?(i.abort(),e()):e()}catch(t){e()}}))},reset:function(){if(i){try{g=[],function(){try{"function"==typeof i.removeEventListener&&(i.removeEventListener("updateend",D,!1),i.removeEventListener("error",M,!1),i.removeEventListener("abort",M,!1)),clearInterval(s)}catch(e){r.error(e)}}(),v=!1,p=[],i.getClassName&&"TextSourceBuffer"===i.getClassName()||(r.debug("Removing sourcebuffer from media source"),E.removeSourceBuffer(i))}catch(e){}i=null}_=null},updateTimestampOffset:w,initializeForStreamSwitch:function(e,t,r){n=(o=e).type;var a=o.codec;!function(e){i=e.getBuffer()}(r),I();var s=[];return s.push(new F((function(e){L((function(){var t=i.appendWindowStart,n=i.appendWindowEnd;i&&(i.abort(),i.appendWindowStart=t,i.appendWindowEnd=n),e()}))}))),s.push(R(o.streamInfo)),c.get().streaming.buffer.useChangeTypeForTrackSwitch&&s.push(T(a)),t&&void 0!==t.MSETimeOffset&&s.push(w(t.MSETimeOffset)),F.all(s)},initializeForFirstUse:function(e,t,r){n=(o=t).type;var s=o.codec;try{if(s.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))return b(e);i=E.addSourceBuffer(s),I();var l=[];return l.push(R(o.streamInfo)),r&&void 0!==r.MSETimeOffset&&l.push(w(r.MSETimeOffset)),F.all(l)}catch(t){return o.type==a.Z.TEXT&&!o.isFragmented||-1!==y(s).call(s,'codecs="stpp')||-1!==y(s).call(s,'codecs="vtt')||-1!==y(s).call(s,"text/vtt")?b(e):F.reject(t)}},updateAppendWindow:R,changeType:T},r=(0,m.Z)(l).getInstance().getLogger(t),t}Ce.__dashjs_factory_name="SourceBufferSink";var De=p.Z.getClassFactory(Ce);function Me(e){var t,n,r,i=this.context,a=[],o=e;function s(e,t){return a=w(a).call(a,(function(n){return!((isNaN(t)||n.start<t)&&(isNaN(e)||n.end>e))})),F.resolve()}return t={getAllBufferRanges:function(){for(var e=[],t=0;t<a.length;t++){var n=a[t];0===e.length||n.start>e[e.length-1].end?e.push({start:n.start,end:n.end}):e[e.length-1].end=n.end}var r={start:function(t){return e[t].start},end:function(t){return e[t].end}};return C(r,"length",{get:function(){return e.length}}),r},append:function(e){return"InitializationSegment"!==e.segmentType?(a.push(e),Z(a).call(a,(function(e,t){return e.start-t.start})),r=null):r=e,n.debug("PreBufferSink appended chunk s: "+e.start+"; e: "+e.end),o&&o({chunk:e}),F.resolve()},remove:s,abort:function(){return F.resolve()},discharge:function(e,t){var n=function(e,t){return w(a).call(a,(function(n){return(isNaN(t)||n.start<t)&&(isNaN(e)||n.end>e)}))}(e,t);return r&&(n.push(r),r=null),s(e,t),n},reset:function(){a=[],r=null,o=null},updateTimestampOffset:function(){return F.resolve()},waitForUpdateEnd:function(e){e()},getBuffer:function(){return this}},n=(0,m.Z)(i).getInstance().getLogger(t),t}Me.__dashjs_factory_name="PreBufferSink";var Le=p.Z.getClassFactory(Me);function Oe(){var e={};return{save:function(t){var n=t.streamId,r=t.representationId;e[n]=e[n]||{},e[n][r]=t},extract:function(t,n){return e&&e[t]&&e[t][n]?e[t][n]:null},reset:function(){e={}}}}Oe.__dashjs_factory_name="InitCache";var Pe=p.Z.getSingletonFactory(Oe),Fe=.01,xe="BufferController";function ke(e){e=e||{};var t,n,r,i,o,c,f,h,g,p,v,_,T,b,S,R,w,N,C,D,M,L=this.context,O=(0,l.Z)(L).getInstance(),P=e.errHandler,k=e.fragmentModel,U=e.representationController,Z=e.adapter,B=e.textController,G=e.abrController,q=e.playbackController,Y=e.streamInfo,j=e.type,H=e.settings;function V(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new F((function(n,r){c=e,g&&t&&"function"==typeof g.discharge?(p=g,z(t).then((function(){n()})).catch((function(e){r(e)}))):n()}))}function K(e){return Z.convertRepresentationToRepresentationInfo(U.getRepresentationForQuality(e))}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return new F((function(n,r){N&&e?c?(v=!1,X(e,t).then((function(e){n(e)})).catch((function(e){r(e)}))):(v=!0,W().then((function(e){n(e)})).catch((function(e){r(e)}))):n(null)}))}function W(){var e=this;return new F((function(t,n){var r=G.getQualityFor(j,Y.id);g=Le(L).create(A(te).call(te,e)),ve(K(r)).then((function(){t(g)})).catch((function(){n()}))}))}function X(e,t){return new F((function(r,i){var o=G.getQualityFor(j,Y.id);g=De(L).create({mediaSource:c,textController:B,eventBus:O}),function(e,t,n){var r=K(n);return t&&t[j]&&(j===a.Z.VIDEO||j===a.Z.AUDIO)?g.initializeForStreamSwitch(e,r,t[j]):g.initializeForFirstUse(Y,e,r)}(e,t,o).then((function(){return ve(K(o))})).then((function(){r(g)})).catch((function(e){n.fatal("Caught error on create SourceBuffer: "+e),P.error(new Te.Z(Re.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,Re.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+j)),i(e)}))}))}function Q(e){H.get().streaming.cacheInitSegments&&(n.info("Init fragment finished loading saving to",j+"'s init cache"),N.save(e.chunk)),n.debug("Append Init fragment",j," with representationId:",e.chunk.representationId," and quality:",e.chunk.quality,", data size:",e.chunk.bytes.byteLength),J(e.chunk)}function $(e){J(e.chunk,e.request)}function J(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;g&&(g.append(e,t).then((function(e){te(e)})).catch((function(e){te(e)})),e.mediaInfo.type===a.Z.VIDEO&&Ce(u.Z.VIDEO_CHUNK_RECEIVED,{chunk:e}))}function ee(e){if(e&&e.length>0)for(var t=0,r=e.length;t<r;t++)n.debug("Buffered range: "+e.start(t)+" - "+e.end(t)+", currentTime = ",q.getTime())}function te(e){if(e.error)return 22===e.error.code&&function(){if(w=!0,o=.8*Ae(),n.warn("Quota exceeded, Critical Buffer: "+o),o>0){var e=Math.max(.2*o,1),t=o-e,r=Math.min(H.get().streaming.buffer.bufferTimeAtTopQuality,.9*t),i=Math.min(H.get().streaming.buffer.bufferTimeAtTopQualityLongForm,.9*t),a={streaming:{buffer:{bufferToKeep:x(e.toFixed(5)),bufferTimeAtTopQuality:x(r.toFixed(5)),bufferTimeAtTopQualityLongForm:x(i.toFixed(5))}}};H.update(a)}}(),void(22!==e.error.code&&we()||(n.warn("Clearing playback buffer to overcome quota exceed situation"),Ce(u.Z.QUOTA_EXCEEDED,{criticalBufferLevel:o,quotaExceededTime:e.chunk.start}),ge(he())));if(g&&(le(),w=!1,(b=e.chunk)&&b.endFragment)){b&&!isNaN(b.index)&&(f=Math.max(b.index,f),ue());var t=g.getAllBufferRanges();b.segmentType===Ne.w.MEDIA_SEGMENT_TYPE&&(ee(t),ie(),function(){if(!isNaN(M)&&!v)if(j===a.Z.AUDIO||j===a.Z.VIDEO){var e=q.getTime(),t=se(e,0),n=se(M,0);if(t&&n&&t.start===n.start)M=NaN;else{var r=U.getCurrentRepresentation().segmentDuration,i=se(M,r);i&&(H.get().streaming.buffer.enableSeekDecorrelationFix&&Math.abs(e-M)>r?M<=i.end&&q.seek(Math.max(M,i.start),!1,!0):e<i.start&&q.seek(i.start,!1,!0))}}else M=NaN}());var r=!1;_&&(y(_).call(_,b)>0&&(r=!0),_=null),b&&!r&&Ce(u.Z.BYTES_APPENDED_END_FRAGMENT,{quality:b.quality,startTime:b.start,index:b.index,bufferedRanges:t,segmentType:b.segmentType,mediaType:j})}}function ne(){return new F((function(e,t){var n=re();if(!n||0===n.length)return ie(),void e();ge(n).then((function(){e()})).catch((function(e){t(e)}))}))}function re(e){var t=[],r=g.getAllBufferRanges();if(!r||0===r.length)return t;if(!e&&0!==e||isNaN(e))t.push({start:r.start(0),end:r.end(r.length-1)+.5});else{var i=function(e,t){var n=H.get().streaming.buffer.bufferToKeep,r=t.start(0);if(e-r>n){var i=Math.max(0,e-n),a=k.getRequests({state:_e.FRAGMENT_MODEL_EXECUTED,time:e,threshold:Fe})[0];if(a&&(i=Math.min(a.startTime,i)),i>0)return{start:r,end:i}}return null}(e,r),a=function(e,t){var r=t.end(t.length-1)+.5,i=Ie(e),a=Y.manifestInfo.duration>=H.get().streaming.buffer.longFormContentDurationThreshold?H.get().streaming.buffer.bufferTimeAtTopQualityLongForm:H.get().streaming.buffer.bufferTimeAtTopQuality,o=isNaN(i)?e:Math.min(i,e+a);if(o>=t.end(t.length-1))return null;var s=k.getRequests({state:_e.FRAGMENT_MODEL_EXECUTED,time:e,threshold:Fe})[0];if(s&&(o=Math.max(s.startTime+s.duration,o)),H.get().streaming.buffer.avoidCurrentTimeRangePruning)for(var l=0;l<t.length;l++)if(t.start(l)<=e&&e<=t.end(l)&&t.start(l)<=o&&o<=t.end(l)){var u=o;o=l+1<t.length?t.start(l+1):t.end(l)+1,n.debug("Buffered range ["+t.start(l)+", "+t.end(l)+"] overlaps with targetTime "+e+" and range to be pruned ["+u+", "+r+"], using ["+o+", "+r+"] instead"+(o<r?"":" (no actual pruning)"));break}return o<t.end(t.length-1)?{start:o,end:r}:null}(e,r);i&&t.push(i),a&&t.push(a)}return t}function ie(){(!D||j===a.Z.TEXT&&B.isTextEnabled())&&le()}function ae(){ce()}function oe(){ce(),M=NaN}function se(e,t){if(!g)return null;var n,r,i=g.getAllBufferRanges(),a=0,o=0,s=null,l=null,u=0,c=isNaN(t)?.15:t;if(null!=i){for(r=0,n=i.length;r<n;r++)if(a=i.start(r),o=i.end(r),null===s)u=Math.abs(a-e),(e>=a&&e<o||u<=c)&&(s=a,l=o);else{if(!((u=a-l)<=c))break;l=o}if(null!==s)return{start:s,end:l}}return null}function le(){if(q){var e=q.getTime()||0;v&&(e=isNaN(M)?0:M);var t=H.get().streaming.gaps.jumpGaps&&!isNaN(H.get().streaming.gaps.smallGapLimit)?H.get().streaming.gaps.smallGapLimit:NaN;i=Math.max(function(e,t){var n;return H.get().streaming.gaps.jumpGaps&&(t=H.get().streaming.gaps.smallGapLimit),null===(n=se(e,t))?0:n.end-e}(e,t),0),Ce(u.Z.BUFFER_LEVEL_UPDATED,{mediaType:j,bufferLevel:i}),ce()}}function ue(){var e,t=f>=h-1,a=q.getTimeToStreamEnd(Y)-i<1e-5;!t&&!a||r||(Se(!0),n.debug(d(e="checkIfBufferingCompleted trigger BUFFERING_COMPLETED for stream id ".concat(Y.id," and type ")).call(e,j)))}function ce(){j!==a.Z.AUDIO&&j!==a.Z.VIDEO||((!q.getLowLatencyModeEnabled()&&i<H.get().streaming.buffer.stallThreshold||0===i)&&!r?fe(s.Z.BUFFER_EMPTY):(r||i>=H.get().streaming.buffer.stallThreshold||q.getLowLatencyModeEnabled()&&i>0)&&fe(s.Z.BUFFER_LOADED))}function fe(e){T===e||e===s.Z.BUFFER_EMPTY&&0===q.getTime()||j===a.Z.TEXT&&!B.isTextEnabled()||(T=e,Ce(u.Z.BUFFER_LEVEL_STATE_CHANGED,{state:e}),Ce(e===s.Z.BUFFER_LOADED?u.Z.BUFFER_LOADED:u.Z.BUFFER_EMPTY),n.debug(e===s.Z.BUFFER_LOADED?"Got enough buffer to start":"Waiting for more buffer before starting playback"))}function de(){g&&j!==a.Z.TEXT&&(r||ge(he()))}function he(){var e=[],t=g.getAllBufferRanges();if(!t||0===t.length)return e;var n=q.getTime(),r=Math.max(0,n-H.get().streaming.buffer.bufferToKeep),i=k.getRequests({state:_e.FRAGMENT_MODEL_EXECUTED,time:n,threshold:Fe})[0];if(i)r=Math.min(i.startTime,r);else if(0===n&&q.getIsDynamic())return[];if(t.start(0)<=r){for(var a={start:0,end:r},o=0;o<t.length&&t.end(o)<=r;o++)a.end=t.end(o);a.start<a.end&&e.push(a)}return e}function ge(e){return new F((function(t,n){if(e&&g&&0!==e.length){var r=[];I(e).call(e,(function(e){r.push(function(e){return new F((function(t,n){e.resolve=t,e.reject=n,C.push(e)}))}(e))})),R||pe(),F.all(r).then((function(){t()})).catch((function(e){n(e)}))}else t()}))}function pe(){try{var e,t;if(0===C.length||!g)return n.debug("Nothing to prune, halt pruning"),C=[],void(R=!1);var r=g.getBuffer();if(!r||!r.buffered||0===r.buffered.length)return n.debug("SourceBuffer is empty (or does not exist), halt pruning"),C=[],void(R=!1);var i=C.shift();n.debug(d(e=d(t="".concat(j,": Removing buffer from: ")).call(t,i.start," to ")).call(e,i.end)),R=!0,q.getTime()<i.end&&Se(!1),g.remove(i).then((function(e){me(e)})).catch((function(e){me(e)}))}catch(r){R=!1}}function me(e){n.debug("onRemoved buffer from:",e.from,"to",e.to),g&&(ee(g.getAllBufferRanges()),0===C.length&&(R=!1,le()),e.unintended&&(n.warn("Detected unintended removal from:",e.from,"to",e.to,"setting streamprocessor time to",e.from),Ce(u.Z.SEEK_TARGET,{time:e.from})),R?pe():(D?D=!1:le(),Ce(u.Z.BUFFER_CLEARED,{from:e.from,to:e.to,unintended:e.unintended,hasEnoughSpaceToAppend:we(),quotaExceeded:w})))}function ve(e){return new F((function(t){e&&void 0!==e.MSETimeOffset&&g&&g.updateTimestampOffset?g.updateTimestampOffset(e.MSETimeOffset).then((function(){t()})).catch((function(){t()})):t()}))}function ye(){return g&&!r?g.updateAppendWindow(Y):F.resolve()}function Ee(){++S*(H.get().streaming.wallclockTimeUpdateInterval/1e3)>=H.get().streaming.buffer.bufferPruningInterval&&(S=0,de())}function be(){ce()}function Se(e){(r=e)?Ce(u.Z.BUFFERING_COMPLETED):h=Number.POSITIVE_INFINITY}function Ae(){try{var e,t,n=g.getAllBufferRanges(),r=0;if(!n)return r;for(t=0,e=n.length;t<e;t++)r+=n.end(t)-n.start(t);return r}catch(e){return 0}}function Ie(e){try{var t=e,n=g.getAllBufferRanges();if(!n||0===n.length)return NaN;for(var r=0;t===e&&r<n.length;){var i=n.start(r),a=n.end(r);t>=i&&t<=a&&(t=a),r+=1}return t===e?NaN:t}catch(e){}}function we(){var e=Ae();return isNaN(e)||e<o}function Ce(e,t){var n=t||{};O.trigger(e,n,{streamId:Y.id,mediaType:j})}function Me(e,t){if(o=Number.POSITIVE_INFINITY,T=void 0,h=Number.POSITIVE_INFINITY,f=0,b=null,r=!1,R=!1,w=!1,i=0,S=0,C=[],M=NaN,v=!1,g){var n=g;g=null,e||t||n.abort().then((function(){n.reset(t),n=null}))}D=!1}return t={initialize:function(e){V(e),O.on(u.Z.INIT_FRAGMENT_LOADED,Q,t),O.on(u.Z.MEDIA_FRAGMENT_LOADED,$,t),O.on(u.Z.WALLCLOCK_TIME_UPDATED,Ee,t),O.on(E.Z.PLAYBACK_PLAYING,oe,t),O.on(E.Z.PLAYBACK_PROGRESS,ie,t),O.on(E.Z.PLAYBACK_TIME_UPDATED,ie,t),O.on(E.Z.PLAYBACK_RATE_CHANGED,be,t),O.on(E.Z.PLAYBACK_STALLED,ae,t)},getStreamId:function(){return Y.id},getType:function(){return j},getBufferControllerType:function(){return xe},createBufferSink:z,dischargePreBuffer:function(){if(g&&p&&"function"==typeof p.discharge){var e=p.getAllBufferRanges();if(e.length>0){for(var t="Beginning "+j+"PreBuffer discharge, adding buffer for:",r=0;r<e.length;r++)t+=" start: "+e.start(r)+", end: "+e.end(r)+";";n.debug(t)}else n.debug("PreBuffer discharge requested, but there were no media segments in the PreBuffer.");_=[];for(var i=p.discharge(),a=null,o=0;o<i.length;o++){var s=i[o];if(s.segmentType!==Ne.w.INIT_SEGMENT_TYPE){var l=N.extract(s.streamId,s.representationId);l&&a!==l&&(_.push(l),g.append(l),a=l)}_.push(s),g.append(s)}p.reset(),p=null}},getBuffer:function(){return g},getBufferLevel:function(){return i},getRangeAt:se,hasBufferAtTime:function(e){try{var t=g.getAllBufferRanges();if(!t||0===t.length)return!1;for(var r=0;r<t.length;){var i=t.start(r),a=t.end(r);if(e>=i&&e<=a)return!0;r+=1}return!1}catch(e){return n.error(e),!1}},pruneBuffer:de,setMediaSource:V,getMediaSource:function(){return c},appendInitSegmentFromCache:function(e){var t=N.extract(Y.id,e);return!!t&&(n.info("Append Init fragment",j," with representationId:",t.representationId," and quality:",t.quality,", data size:",t.bytes.byteLength),J(t),!0)},getIsBufferingCompleted:function(){return r},setIsBufferingCompleted:Se,getIsPruningInProgress:function(){return R},reset:function(e,t){O.off(u.Z.INIT_FRAGMENT_LOADED,Q,this),O.off(u.Z.MEDIA_FRAGMENT_LOADED,$,this),O.off(u.Z.WALLCLOCK_TIME_UPDATED,Ee,this),O.off(E.Z.PLAYBACK_PLAYING,oe,this),O.off(E.Z.PLAYBACK_PROGRESS,ie,this),O.off(E.Z.PLAYBACK_TIME_UPDATED,ie,this),O.off(E.Z.PLAYBACK_RATE_CHANGED,be,this),O.off(E.Z.PLAYBACK_STALLED,ae,this),Me(e,t)},prepareForPlaybackSeek:function(){return r&&Se(!1),g.abort()},prepareForReplacementTrackSwitch:function(e){return new F((function(t,n){g.abort().then((function(){return ye()})).then((function(){return H.get().streaming.buffer.useChangeTypeForTrackSwitch?g.changeType(e):F.resolve()})).then((function(){return ne()})).then((function(){Se(!1),t()})).catch((function(e){n(e)}))}))},prepareForNonReplacementTrackSwitch:function(e){return new F((function(t,n){ye().then((function(){return H.get().streaming.buffer.useChangeTypeForTrackSwitch?g.changeType(e):F.resolve()})).then((function(){t()})).catch((function(e){n(e)}))}))},prepareForForceReplacementQualitySwitch:function(e){return new F((function(t,n){g.abort().then((function(){return ye()})).then((function(){return ne()})).then((function(){return ve(e)})).then((function(){Se(!1),t()})).catch((function(e){n(e)}))}))},updateAppendWindow:ye,getAllRangesWithSafetyFactor:re,getContinuousBufferTimeForTargetTime:Ie,clearBuffers:ge,pruneAllSafely:ne,updateBufferTimestampOffset:ve,setSeekTarget:function(e){M=e},segmentRequestingCompleted:function(e){isNaN(e)||(h=e,ue())}},n=(0,m.Z)(L).getInstance().getLogger(t),N=Pe(L).getInstance(),Me(),t}ke.__dashjs_factory_name=xe;var Ue=p.Z.getClassFactory(ke),Ze="NotFragmentedTextBufferController";function Be(e){e=e||{};var t,n,r,i,a,o,s=this.context,c=(0,l.Z)(s).getInstance(),f=e.textController,d=e.errHandler,h=e.streamInfo,g=e.type;function p(e){i=e}function m(e){var t,r;n!==e&&(n=e)&&(t=u.Z.BUFFERING_COMPLETED,r={},c.trigger(t,r,{streamId:h.id,mediaType:g}))}function v(e){e.chunk.bytes&&!n&&(o.save(e.chunk),a.append(e.chunk),m(!0))}return t={initialize:function(e){p(e)},getStreamId:function(){return h.id},getType:function(){return g},getBufferControllerType:function(){return Ze},createBufferSink:function(e){return new F((function(t,n){try{(a=De(s).create({mediaSource:i,textController:f,eventBus:c})).initializeForFirstUse(h,e),r||(a.getBuffer()&&"function"==typeof a.getBuffer().initialize&&a.getBuffer().initialize(),r=!0),t(a)}catch(e){d.error(new Te.Z(Re.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,Re.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+g)),n(e)}}))},dischargePreBuffer:function(){},getBuffer:function(){return a},getBufferLevel:function(){return 0},getRangeAt:function(){return null},pruneBuffer:function(){},hasBufferAtTime:function(){return!0},getAllRangesWithSafetyFactor:function(){return[]},getContinuousBufferTimeForTargetTime:function(){return Number.POSITIVE_INFINITY},setMediaSource:p,getMediaSource:function(){return i},appendInitSegmentFromCache:function(e){return null!==o.extract(h.id,e)},getIsBufferingCompleted:function(){return n},setIsBufferingCompleted:m,getIsPruningInProgress:function(){return!1},reset:function(e){c.off(u.Z.INIT_FRAGMENT_LOADED,v,t),!e&&a&&(a.abort(),a.reset(),a=null)},clearBuffers:function(){return F.resolve()},prepareForPlaybackSeek:function(){return F.resolve()},prepareForReplacementTrackSwitch:function(){return n=!1,F.resolve()},setSeekTarget:function(){},updateAppendWindow:function(){return F.resolve()},pruneAllSafely:function(){return F.resolve()},updateBufferTimestampOffset:function(){return F.resolve()},segmentRequestingCompleted:function(){}},r=!1,i=null,n=!1,o=Pe(s).getInstance(),c.on(u.Z.INIT_FRAGMENT_LOADED,v,t),t}Be.__dashjs_factory_name=Ze;var Ge=p.Z.getClassFactory(Be);function qe(e){e=e||{};var t,n,r,i,o,c,h,g,p,v,y,_,T,b=this.context,S=(0,l.Z)(b).getInstance(),A=e.dashMetrics,I=e.mediaPlayerModel,R=e.fragmentModel,w=e.abrController,N=e.playbackController,C=e.textController,D=e.type,M=e.bufferController,L=e.representationController,O=e.settings;function P(){_=!0}function F(){_=!1}function x(e){if(!M.getIsBufferingCompleted()){k();var t=isNaN(e)?0:e;o=f(U,t)}}function k(){o&&(clearTimeout(o),o=null)}function U(){try{if(function(){try{return D===a.Z.TEXT&&!C.isTextEnabled()||N.isPaused()&&(!N.getStreamController().getInitialPlayback()||!N.getStreamController().getAutoPlay())&&!O.get().streaming.scheduling.scheduleWhilePaused}catch(e){return!1}}())return void k();if(function(){try{return!!_&&L.getCurrentRepresentationInfo()&&(isNaN(p)||v||(e=n.id,t=w.getMaxAllowedIndexFor(D,e),!(!isNaN(g)&&g==t||(r.info("Top quality "+D+" index has changed from "+g+" to "+t),g=t,0)))||function(){var e=L.getCurrentRepresentationInfo();return!D||!e||A.getCurrentBufferLevel(D)<Z()}())}catch(e){return!1}var e,t}()){var e,i=!1;T&&(i=w.checkPlaybackQuality(D,n.id)),i||(o=L.getCurrentRepresentationInfo(),y||o.quality!==p||v?(v?(r.debug("Switch track for "+D+", representation id = "+o.id),v=!1):r.debug("Quality has changed, get init request for representationid = "+o.id),S.trigger(u.Z.INIT_FRAGMENT_NEEDED,{representationId:o.id,sender:t},{streamId:n.id,mediaType:D}),T=!1,y=!1):(r.debug(d(e="Media segment needed for ".concat(D," and stream id ")).call(e,n.id)),S.trigger(u.Z.MEDIA_FRAGMENT_NEEDED,{},{streamId:n.id,mediaType:D}),T=!0))}else x(N.getLowLatencyModeEnabled()?O.get().streaming.scheduling.lowLatencyTimeout:O.get().streaming.scheduling.defaultTimeout)}catch(i){x(N.getLowLatencyModeEnabled()?O.get().streaming.scheduling.lowLatencyTimeout:O.get().streaming.scheduling.defaultTimeout)}var o}function Z(){var e=NaN,t=L.getCurrentRepresentationInfo();return D&&t?(e=D===a.Z.TEXT?function(){try{if(C.isTextEnabled()){var e=L.getCurrentRepresentationInfo();if(isNaN(e.fragmentDuration)){var t=A.getCurrentSchedulingInfo(s.Z.SCHEDULING_INFO);return t?t.duration:0}return e.fragmentDuration}return 0}catch(e){return 0}}():D===a.Z.AUDIO&&c?function(){try{var e=A.getCurrentBufferLevel(a.Z.VIDEO),t=L.getCurrentRepresentationInfo();return isNaN(t.fragmentDuration)?e+1:Math.max(e+1,t.fragmentDuration)}catch(e){return 0}}():function(){try{var e=L.getCurrentRepresentationInfo().mediaInfo.streamInfo;return w.isPlayingAtTopQuality(e)?e.manifestInfo.duration>=O.get().streaming.buffer.longFormContentDurationThreshold?O.get().streaming.buffer.bufferTimeAtTopQualityLongForm:O.get().streaming.buffer.bufferTimeAtTopQuality:I.getStableBufferTime()}catch(e){return I.getStableBufferTime()}}(),e):e}function B(){G(!0)}function G(e){if(N&&R){var t,i=R.getRequests({state:_e.FRAGMENT_MODEL_EXECUTED,time:N.getTime(),threshold:0})[0];i&&N.getTime()>=i.startTime&&((!h.mediaInfo||i.mediaInfo.type===h.mediaInfo.type&&i.mediaInfo.index!==h.mediaInfo.index)&&e&&S.trigger(u.Z.TRACK_CHANGE_RENDERED,{mediaType:D,oldMediaInfo:h.mediaInfo,newMediaInfo:i.mediaInfo,streamId:n.id}),i.quality===h.quality&&i.adaptationIndex===h.adaptationIndex||!e||(r.debug(d(t="Quality change rendered for streamId ".concat(n.id," and type ")).call(t,D)),S.trigger(u.Z.QUALITY_CHANGE_RENDERED,{mediaType:D,oldQuality:h.quality,newQuality:i.quality,streamId:n.id})),h={mediaInfo:i.mediaInfo,quality:i.quality,adaptationIndex:i.adaptationIndex})}}function q(){R.abortRequests(),k()}function Y(){O.get().streaming.scheduling.scheduleWhilePaused||x()}function j(e){A.updatePlayListTraceMetrics({playbackspeed:e.playbackRate.toString()})}function H(){T=!0,i=0,p=NaN,h={mediaInfo:void 0,quality:NaN,adaptationIndex:NaN},g=NaN,v=!1,y=!1,_=!0}return t={initialize:function(e){c=e,S.on(u.Z.URL_RESOLUTION_FAILED,q,t),S.on(E.Z.PLAYBACK_STARTED,Y,t),S.on(E.Z.PLAYBACK_RATE_CHANGED,j,t),S.on(E.Z.PLAYBACK_TIME_UPDATED,B,t),S.on(E.Z.MANAGED_MEDIA_SOURCE_START_STREAMING,P,t),S.on(E.Z.MANAGED_MEDIA_SOURCE_END_STREAMING,F,t)},getType:function(){return D},getStreamId:function(){return n.id},setTimeToLoadDelay:function(e){i=e},getTimeToLoadDelay:function(){return i},setSwitchTrack:function(e){v=e},getSwitchTrack:function(){return v},startScheduleTimer:x,clearScheduleTimer:k,reset:function(){S.off(u.Z.URL_RESOLUTION_FAILED,q,t),S.off(E.Z.PLAYBACK_STARTED,Y,t),S.off(E.Z.PLAYBACK_RATE_CHANGED,j,t),S.off(E.Z.PLAYBACK_TIME_UPDATED,B,t),S.off(E.Z.MANAGED_MEDIA_SOURCE_START_STREAMING,P,t),S.off(E.Z.MANAGED_MEDIA_SOURCE_END_STREAMING,F,t),k(),G(!1),H(),n=null},getBufferTarget:Z,getPlaybackController:function(){return N},setCheckPlaybackQuality:function(e){T=e},setInitSegmentRequired:function(e){y=e},setLastInitializedQuality:function(e){p=e}},r=(0,m.Z)(b).getInstance().getLogger(t),H(),n=e.streamInfo,t}qe.__dashjs_factory_name="ScheduleController";var Ye=p.Z.getClassFactory(qe),je=n(7387);function He(e){var t,n,r,i,o,s,l=(e=e||{}).eventBus,u=e.events,c=e.abrController,f=e.dashMetrics,d=e.playbackController,h=e.timelineConverter,g=e.type,p=e.streamInfo,m=e.dashConstants,v=e.segmentsController,_=e.isDynamic,T=e.adapter;function b(){return g}function S(){return r}function A(){return s}function I(){n=null,r=!0,i=[],o=null}function R(e){return new F((function(t,n){var r=e.hasInitialization(),a=e.hasSegments(),o=[];o.push(v.updateInitData(e,r)),o.push(v.updateSegmentData(e,a)),F.all(o).then((function(n){var r;n[0]&&!n[0].error&&(e=function(e,t){return t&&!t.error&&t.representation?t.representation:e}(e,n[0])),n[1]&&!n[1].error&&(e=function(e,t){if(t&&!t.error){var n,r,i,a,o=t.segments,s=[],l=0;for(n=0,r=o?o.length:0;n<r;n++)i=o[n],(a=(0,je.TJ)(h,_,e,i.startTime,i.duration,i.timescale,i.media,i.mediaRange,l))&&(s.push(a),a=null,l++);return s.length>0&&(e.segments=s),e}}(e,n[1])),(r=e).mediaFinishedInformation=v.getMediaFinishedInformation(r),function(e){if(S()){var t,n,r=f.getCurrentManifestUpdate(),a=!1;if(r){for(var o=0;o<r.representationInfo.length;o++)if((t=r.representationInfo[o]).index===e.index&&t.mediaType===b()){a=!0;break}a||f.addManifestUpdateRepresentationInfo(e,b())}if(function(){for(var e=0,t=i.length;e<t;e++){var n=i[e].segmentInfoType;if(!i[e].hasInitialization()||(n===m.SEGMENT_BASE||n===m.BASE_URL)&&!i[e].segments)return!1}return!0}()){c.setPlaybackQuality(g,p,(n=s,y(i).call(i,n)));var l=f.getCurrentDVRInfo(g);l&&f.updateManifestUpdateInfo({latency:l.range.end-d.getTime()}),f.getCurrentRepresentationSwitch(A().adaptation.type)||w(),C()}}}(e),t()})).catch((function(e){n(e)}))}))}function w(){!function(){if(!(c&&f&&d&&h))throw new Error(a.Z.MISSING_CONFIG_ERROR)}();var e=new Date,t=A(),n=1e3*d.getTime();t&&f.addRepresentationSwitch(t.adaptation.type,e,n,t.id),l.trigger(E.Z.REPRESENTATION_SWITCH,{mediaType:g,streamId:p.id,currentRepresentation:t,numberOfRepresentations:i.length},{streamId:p.id,mediaType:g})}function N(e){return null==e||e>=i.length?null:i[e]}function C(e){r=!1,l.trigger(u.DATA_UPDATE_COMPLETED,{data:n,currentRepresentation:s,error:e},{streamId:p.id,mediaType:g})}function D(e){s=e,o=T.convertRepresentationToRepresentationInfo(s)}function M(e){if(e.newDuration){var t=A();t&&t.adaptation.period&&(t.adaptation.period.duration=e.newDuration)}}return t={getStreamId:function(){return p.id},getType:b,getData:function(){return n},isUpdating:S,updateData:function(e,t,o,s,l){return new F((function(u,c){if(r=!0,i=t,n=e,D(N(l)),o!==a.Z.VIDEO&&o!==a.Z.AUDIO&&(o!==a.Z.TEXT||!s))return C(),void u();for(var f=[],d=0,h=i.length;d<h;d++){var g=i[d];f.push(R(g))}F.all(f).then((function(){D(N(l)),u()})).catch((function(e){c(e)}))}))},getCurrentRepresentation:A,getCurrentRepresentationInfo:function(){return o},getRepresentationForQuality:N,prepareQualityChange:function(e){D(N(e)),w()},reset:function(){l.off(E.Z.MANIFEST_VALIDITY_CHANGED,M,t),I()}},I(),l.on(E.Z.MANIFEST_VALIDITY_CHANGED,M,t),t}He.__dashjs_factory_name="RepresentationController";var Ve=p.Z.getClassFactory(He),Ke=n(3106),ze=n(9326),We=n(7473),Xe=n(2594);function Qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var $e=function e(){Qe(this,e),this.start=null,this.mstart=null,this.starttype=null,this.trace=[]};$e.INITIAL_PLAYOUT_START_REASON="initial_playout",$e.SEEK_START_REASON="seek",$e.RESUME_FROM_PAUSE_START_REASON="resume",$e.METRICS_COLLECTION_START_REASON="metrics_collection_start";var Je=function e(){Qe(this,e),this.representationid=null,this.subreplevel=null,this.start=null,this.mstart=null,this.duration=null,this.playbackspeed=null,this.stopreason=null};Je.REPRESENTATION_SWITCH_STOP_REASON="representation_switch",Je.REBUFFERING_REASON="rebuffering",Je.USER_REQUEST_STOP_REASON="user_request",Je.END_OF_PERIOD_STOP_REASON="end_of_period",Je.END_OF_CONTENT_STOP_REASON="end_of_content",Je.METRICS_COLLECTION_STOP_REASON="metrics_collection_end",Je.FAILURE_STOP_REASON="failure";var et=n(7802);function tt(){return{ntpToUTC:function(e){var t=new Date(Date.UTC(1900,0,1,0,0,0));return new Date(t.getTime()+e).getTime()}}}tt.__dashjs_factory_name="TimeUtils";var nt=p.Z.getSingletonFactory(tt);function rt(e){e=e||{};var t,n,r,i,c,f,h,g,p,v,_,T,b,S,A,R=this.context,w=(0,l.Z)(R).getInstance(),N=e.streamInfo,C=e.type,D=e.errHandler,M=e.mimeType,L=e.timelineConverter,O=e.adapter,P=e.manifestModel,x=e.mediaPlayerModel,k=e.fragmentModel,U=e.abrController,Z=e.playbackController,q=e.mediaController,Y=e.textController,j=e.dashMetrics,H=e.settings,V=e.boxParser,K=e.segmentBlacklistController;function z(){return N.id}function W(){return C}function X(){return O.getIsTextTrack(g.getData())}function Q(){c=[],i=null,S=0,p=!1,v=!1,_=!1,A=null}function $(e){return!isNaN(e)&&!isNaN(N.duration)&&isFinite(N.duration)&&e>=N.start+N.duration}function J(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.sender)if(Z.getIsManifestUpdateInProgress())ie();else if((!X()||Y.isTextEnabled())&&f&&e.representationId&&!f.appendInitSegmentFromCache(e.representationId)){var n=g.getCurrentRepresentation();if(0===n.range)return void ee();var r=T?T.getInitRequest(i,n):null;r?k.executeRequest(r):t&&(h.setInitSegmentRequired(!0),ie())}}function ee(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(Z.getIsManifestUpdateInProgress()||f.getIsPruningInProgress())ie();else{var n=re();n?(p=!1,v=!1,te(n)):ne(t)}}function te(e){var t,r,i,a;isNaN(e.startTime+e.duration)||(S=e.startTime+e.duration),e.delayLoadingTime=(new Date).getTime()+h.getTimeToLoadDelay(),h.setTimeToLoadDelay(0),function(e){var t=e.url;return e.range&&(t=d(t).call(t,"_",e.range)),K.contains(t)}(e)?(n.warn(d(t=d(r="Fragment request url ".concat(e.url," for stream id ")).call(r,N.id," and media type ")).call(t,C," is on the ignore list and will be skipped")),ie()):(n.debug(d(i=d(a="Next fragment request url for stream id ".concat(N.id," and media type ")).call(a,C," is ")).call(i,e.url)),k.executeRequest(e))}function ne(e){var t,a,s,l=g.getCurrentRepresentation();if(!H.get().streaming.gaps.enableSeekFix||!p&&0!==Z.getTime()||(r?r&&l.segmentInfoType===o.Z.SEGMENT_TIMELINE&&(s=T.getValidTimeAheadOfTargetTime(S,i,l,H.get().streaming.gaps.threshold)):s=T.getValidTimeAheadOfTargetTime(S,i,l,H.get().streaming.gaps.threshold),isNaN(s)||s===S)){if(T.isLastSegmentRequested(l,S)){var c=T.getCurrentIndex();return n.debug("Segment requesting for stream ".concat(N.id," has finished")),w.trigger(u.Z.STREAM_REQUESTING_COMPLETED,{segmentIndex:c},{streamId:N.id,mediaType:C}),f.segmentRequestingCompleted(c),void h.clearScheduleTimer()}e&&ie()}else Z.isSeeking()||0===Z.getTime()?(n.warn(d(t="Adjusting playback time ".concat(s," because of gap in the manifest. Seeking by ")).call(t,s-S)),Z.seek(s,!1,!1)):(n.warn(d(a="Adjusting buffering time ".concat(s," because of gap in the manifest. Adjusting time by ")).call(a,s-S)),De(s),e&&ie())}function re(){var e,t=Ee();if(isNaN(S)||W()===a.Z.TEXT&&!Y.isTextEnabled())return null;if(T){var n=g&&t?g.getRepresentationForQuality(t.quality):null;e=p?T.getSegmentRequestForTime(i,n,S):v?T.repeatSegmentRequest(i,n):T.getNextSegmentRequest(i,n)}return e}function ie(){h.startScheduleTimer(Z.getLowLatencyModeEnabled()?H.get().streaming.scheduling.lowLatencyTimeout:H.get().streaming.scheduling.defaultTimeout)}function ae(e){e.error||f.getIsBufferingCompleted()||f.updateBufferTimestampOffset(e.currentRepresentation)}function oe(e){j.addBufferState(C,e.state,h.getBufferTarget()),e.state!==s.Z.BUFFER_EMPTY||Z.isSeeking()||(n.info("Buffer is empty! Stalling!"),j.pushPlayListTraceMetrics(new Date,Je.REBUFFERING_REASON))}function se(e){k.syncExecutedRequestsWithBufferedRange(f.getBuffer().getAllBufferRanges(),N.duration),e.quotaExceeded&&e.from>Z.getTime()&&De(e.from),e.hasEnoughSpaceToAppend&&e.quotaExceeded&&h.startScheduleTimer()}function le(e){if(e&&e.lastRequestAppended&&e.lastRequestAppended.url){var t=e.lastRequestAppended.url;e.lastRequestAppended.range&&(t=d(t).call(t,"_",e.lastRequestAppended.range)),n.warn("Blacklisting segment with url ".concat(t)),K.add(t)}}function ue(e){var t;if(n.debug(d(t="Appended bytes for ".concat(e.mediaType," and stream id ")).call(t,e.streamId)),e.segmentType===Ne.w.INIT_SEGMENT_TYPE){var r=e.quality;h.setLastInitializedQuality(r),n.info("["+C+"] lastInitializedRepresentationInfo changed to "+e.quality)}A?ce(A):h.startScheduleTimer(0)}function ce(e){var t=k.getRequests({state:_e.FRAGMENT_MODEL_LOADING});if(t&&t.length>0)return n.debug("Preparing for default quality switch: Waiting for ongoing segment request to be finished before applying switch."),void(A=e);f.updateBufferTimestampOffset(e).then((function(){h.setCheckPlaybackQuality(!1),i.segmentAlignment||i.subSegmentAlignment?h.startScheduleTimer():we(),A=null,_=!1})).catch((function(){A=null,_=!1}))}function fe(e){n.info("onFragmentLoadingAbandoned request: "+e.request.url+" has been aborted"),Z.isSeeking()||h.getSwitchTrack()||_||(n.info("onFragmentLoadingAbandoned request: "+e.request.url+" has to be downloaded again, origin is not seeking process or switch track call"),e.request&&e.request.isInitializationRequest()?h.setInitSegmentRequired(!0):De(e.request.startTime+e.request.duration/2),h.startScheduleTimer(0))}function de(e){n.info("OnFragmentLoadingCompleted for stream id "+N.id+" and media type "+C+" - Url:",e.request?e.request.url:"undefined",e.request.range?", Range:"+e.request.range:""),X()&&h.startScheduleTimer(0),e.error&&e.request.serviceLocation&&function(e){n.info("Fragment loading completed with an error"),e&&e.request&&e.request.type&&(e.request.type===Ne.w.INIT_SEGMENT_TYPE?J({representationId:e.request.representationId,sender:{}},!1):e.request.type===Ne.w.MEDIA_SEGMENT_TYPE&&(De(e.request.startTime+e.request.duration/2),ee({},!1)))}(e)}function he(){De(Z.getTime()),ye().startScheduleTimer()}function ge(e){var t=e.currentTrackInfo;if(t){var n=B(c).call(c,(function(e){return e.index===t.index&&e.lang===t.lang}));n&&ve(n).then((function(){f.setIsBufferingCompleted(!1),De(Z.getTime()),h.setInitSegmentRequired(!0),h.startScheduleTimer()}))}}function pe(e){De(e.quotaExceededTime),h.clearScheduleTimer()}function me(){return f?f.getBuffer():null}function ve(e){e===i||e&&i&&e.type!==i.type||(i=e);var t=O.getRealAdaptation(N,i),n=O.getVoRepresentations(i);if(g){var o,s=g.getData(),l=U.getMaxAllowedIndexFor(C,N.id),u=U.getMinAllowedIndexFor(C,N.id),c=null;return null!==s&&s.id===t.id||C===a.Z.TEXT?o=U.getQualityFor(C,N.id):(c=U.getThroughputHistory().getAverageThroughput(C,r)||U.getInitialBitrateFor(C,N.id),o=U.getQualityForBitrate(i,c,N.id)),void 0!==u&&o<u&&(o=u),o>l&&(o=l),g.updateData(t,n,C,i.isFragmented,o)}return F.resolve()}function ye(){return h}function Ee(e){var t;return void 0!==e?((0,Ke.SE)(e),t=g?g.getRepresentationForQuality(e):null):t=g?g.getCurrentRepresentation():null,O.convertRepresentationToRepresentationInfo(t)}function be(){return!!f&&f.getIsBufferingCompleted()}function Se(e){if(H.get().streaming.enableManifestTimescaleMismatchFix){var t=e.chunk,n=t.bytes,r=Ee(t.quality),i=g&&r?g.getRepresentationForQuality(r.quality):null;r&&i&&(i.timescale=V.getMediaTimescaleFromMoov(n))}}function Ae(e){var t=e.chunk,n=t.bytes,r=t.quality,i=Ee(r),a=g&&i?g.getRepresentationForQuality(i.quality):null;if(i&&a){var s;if(H.get().streaming.parseInbandPrft&&e.request.type===Ne.w.MEDIA_SEGMENT_TYPE){var l=function(e,t){var n=e.getBoxes("prft"),r=[];return I(n).call(n,(function(e){r.push(function(e,t){var n="unknown";switch(G(e)){case 0:n=o.Z.PRODUCER_REFERENCE_TIME_TYPE.ENCODER;break;case 16:n=o.Z.PRODUCER_REFERENCE_TIME_TYPE.APPLICATION;break;case 24:n=o.Z.PRODUCER_REFERENCE_TIME_TYPE.CAPTURED}var r=1e3*e.ntp_timestamp_sec+e.ntp_timestamp_frac/Math.pow(2,32)*1e3;return{type:n,ntpTimestamp:r=nt(R).getInstance().ntpToUTC(r),mediaTime:e.media_time/t}}(e,t))})),r}(s=s||V.parse(n),a.timescale);l&&l.length&&w.trigger(E.Z.INBAND_PRFT,{data:l},{streamId:N.id,mediaType:C})}var c=O.getEventsFor(i.mediaInfo,null,N),f=O.getEventsFor(i,a,N);if(c&&c.length>0||f&&f.length>0){var h=k.getRequests({state:_e.FRAGMENT_MODEL_EXECUTED,quality:r,index:t.index})[0],p=function(e,t,n,r){try{for(var i={},a=[],o=d(n).call(n,r),s=0,l=o.length;s<l;s++)i[o[s].schemeIdUri+"/"+o[s].value]=o[s];var u=e.getBoxes("emsg");if(!u||0===u.length)return a;for(var c=e.getBox("sidx"),f=!c||isNaN(c.earliest_presentation_time)||isNaN(c.timescale)?t&&!isNaN(t.mediaStartTime)?t.mediaStartTime:0:c.earliest_presentation_time/c.timescale,h=Math.max(f,0),p=g.getCurrentRepresentation(),m=0,v=u.length;m<v;m++){var y=O.getEvent(u[m],i,h,p);y&&a.push(y)}return a}catch(e){return[]}}(s=s||V.parse(n),h,c,f);w.trigger(u.Z.INBAND_EVENTS,{events:p},{streamId:N.id})}}}function Ie(){var e=Z.getTime();H.get().streaming.buffer.flushBufferAtTrackSwitch&&Z.seek(e+.001,!1,!0),De(e),f.setSeekTarget(e),h.startScheduleTimer()}function we(){var e=Z.getTime(),t=f.getContinuousBufferTimeForTargetTime(e);De(isNaN(t)?e:t),h.startScheduleTimer()}function Ce(e){e&&!isNaN(e.time)&&(De(e.time),f.setSeekTarget(e.time))}function De(e){S=e,p=!0}return t={initialize:function(n,i,s){b=(0,et.Z)(R).create({events:u.Z,eventBus:w,streamInfo:N,timelineConverter:L,dashConstants:o.Z,segmentBaseController:e.segmentBaseController,type:C}),T=(0,ze.Z)(R).create({streamInfo:N,type:C,timelineConverter:L,dashMetrics:j,mediaPlayerModel:x,baseURLController:e.baseURLController,errHandler:D,segmentsController:b,settings:H,boxParser:V,events:u.Z,eventBus:w,errors:Re,debug:(0,m.Z)(R).getInstance(),requestModifier:(0,We.Z)(R).getInstance(),dashConstants:o.Z,constants:a.Z,urlUtils:(0,Xe.Z)(R).getInstance()}),r=N.manifestInfo.isDynamic,T.initialize(r),U.registerStreamType(C,t),g=Ve(R).create({streamInfo:N,type:C,abrController:U,dashMetrics:j,playbackController:Z,timelineConverter:L,dashConstants:o.Z,events:u.Z,eventBus:w,errors:Re,isDynamic:r,adapter:O,segmentsController:b}),f=function(e,t){return e?e!==a.Z.TEXT||t?Ue(R).create({streamInfo:N,type:e,mediaPlayerModel:x,manifestModel:P,fragmentModel:k,errHandler:D,mediaController:q,representationController:g,adapter:O,textController:Y,abrController:U,playbackController:Z,settings:H}):Ge(R).create({streamInfo:N,type:e,mimeType:M,fragmentModel:k,textController:Y,errHandler:D,settings:H}):(D.error(new Te.Z(Re.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,Re.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+"not properly defined")),null)}(C,s),f&&f.initialize(n),(h=Ye(R).create({streamInfo:N,type:C,mimeType:M,adapter:O,dashMetrics:j,mediaPlayerModel:x,fragmentModel:k,abrController:U,playbackController:Z,textController:Y,mediaController:q,bufferController:f,representationController:g,settings:H})).initialize(i),S=0,p=!1,v=!1},getStreamId:z,getType:W,isUpdating:function(){return!!g&&g.isUpdating()},getBufferController:function(){return f},dischargePreBuffer:function(){f.dischargePreBuffer()},getFragmentModel:function(){return k},getScheduleController:ye,getRepresentationController:function(){return g},getRepresentationInfo:Ee,getBufferLevel:function(){return f?f.getBufferLevel():0},isBufferingCompleted:be,createBufferSinks:function(e){var t=me();return t?F.resolve(t):f?f.createBufferSink(i,e):F.resolve(null)},updateStreamInfo:function(e){return N=e,be()?F.resolve():f.updateAppendWindow()},getStreamInfo:function(){return N},selectMediaInfo:ve,clearMediaInfoArray:function(){c=[]},addMediaInfo:function(e){-1===y(c).call(c,e)&&c.push(e)},prepareTrackSwitch:function(){return new F((function(e){n.debug("Preparing track switch for type ".concat(C));var t=C===a.Z.TEXT||H.get().streaming.trackSwitchMode[C]===a.Z.TRACK_SWITCH_MODE_ALWAYS_REPLACE&&Z.getTimeToStreamEnd(N)>H.get().streaming.buffer.stallThreshold;if(f.getIsBufferingCompleted()&&!t)return f.prepareForNonReplacementTrackSwitch(i.codec).then((function(){w.trigger(u.Z.BUFFERING_COMPLETED,{},{streamId:N.id,mediaType:C})})).catch((function(){w.trigger(u.Z.BUFFERING_COMPLETED,{},{streamId:N.id,mediaType:C})})),void e();h.clearScheduleTimer(),h.setSwitchTrack(!0),t?(w.trigger(u.Z.BUFFER_REPLACEMENT_STARTED,{mediaType:C,streamId:N.id},{mediaType:C,streamId:N.id}),k.abortRequests(),f.prepareForReplacementTrackSwitch(i.codec).then((function(){var e=Ee();return f.updateBufferTimestampOffset(e)})).then((function(){Ie(),e()})).catch((function(){Ie(),e()}))):f.prepareForNonReplacementTrackSwitch(i.codec).then((function(){we(),e()})).catch((function(){we(),e()}))}))},prepareQualityChange:function(e){var t;A&&n.warn(d(t="Canceling queued representation switch to ".concat(A.quality," for ")).call(t,C)),n.debug("Preparing quality switch for type ".concat(C));var r=e.newQuality;_=!0,h.clearScheduleTimer(),g.prepareQualityChange(r);var i=Ee(r);e.reason&&e.reason.forceReplace?function(e){k.abortRequests(),w.trigger(u.Z.BUFFER_REPLACEMENT_STARTED,{mediaType:C,streamId:N.id},{mediaType:C,streamId:N.id}),h.setCheckPlaybackQuality(!1),f.prepareForForceReplacementQualitySwitch(e).then((function(){Ie(),A=null,_=!1})).catch((function(){Ie(),A=null,_=!1}))}(i):e&&e.reason&&e.reason.forceAbandon?function(e){f.updateBufferTimestampOffset(e).then((function(){k.abortRequests(),v=!0,h.setCheckPlaybackQuality(!1),h.startScheduleTimer(),_=!1,A=null})).catch((function(){A=null,_=!1}))}(i):H.get().streaming.buffer.fastSwitchEnabled?function(e){var t=Z.getTime(),n=1.5*(isNaN(e.fragmentDuration)?1:e.fragmentDuration),r=k.getRequests({state:_e.FRAGMENT_MODEL_EXECUTED,time:t+n,threshold:0})[0];if(r&&!X()){var i=f.getBufferLevel(),a=U.getAbandonmentStateFor(N.id,C);r.quality<e.quality&&i>=n&&a!==s.Z.ABANDON_LOAD?f.updateBufferTimestampOffset(e).then((function(){k.abortRequests(),De(t+n),h.setCheckPlaybackQuality(!1),h.startScheduleTimer(),_=!1})).catch((function(){_=!1})):ce(e)}else ce(e)}(i):ce(i),j.pushPlayListTraceMetrics(new Date,Je.REPRESENTATION_SWITCH_STOP_REASON),j.createPlaylistTraceMetrics(i.id,1e3*Z.getTime(),Z.getPlaybackRate())},getMediaInfo:function(){return i},getMediaSource:function(){return f.getMediaSource()},setMediaSource:function(e){return f.setMediaSource(e,i)},getBuffer:me,setExplicitBufferingTime:De,finalisePlayList:function(e,t){j.pushPlayListTraceMetrics(e,t)},probeNextRequest:function(){var e=Ee(),t=g&&e?g.getRepresentationForQuality(e.quality):null;return T.getNextSegmentRequestIdempotent(i,t)},prepareInnerPeriodPlaybackSeeking:function(e){return new F((function(t){if(f.hasBufferAtTime(e.seekTime))return f.pruneBuffer(),$(f.getContinuousBufferTimeForTargetTime(e.seekTime))&&f.setIsBufferingCompleted(!0),void t();h.clearScheduleTimer(),k.abortRequests(),f.prepareForPlaybackSeek().then((function(){var t=f.getAllRangesWithSafetyFactor(e.seekTime);return f.clearBuffers(t)})).then((function(){var n=f.getContinuousBufferTimeForTargetTime(e.seekTime);if($(n))f.setIsBufferingCompleted(!0),t();else{var r=isNaN(n)?e.seekTime:n;De(r),f.setSeekTarget(r);var i=[];i.push(f.updateAppendWindow());var a=Ee();i.push(f.updateBufferTimestampOffset(a)),F.all(i).then((function(){h.setInitSegmentRequired(!0),h.setCheckPlaybackQuality(!1),h.startScheduleTimer(),t()}))}})).catch((function(e){n.error(e)}))}))},prepareOuterPeriodPlaybackSeeking:function(){return new F((function(e,t){try{h.clearScheduleTimer(),k.abortRequests(),f.prepareForPlaybackSeek().then((function(){return f.pruneAllSafely()})).then((function(){e()}))}catch(e){t(e)}}))},reset:function(e,n){T&&T.reset(),f&&(f.reset(e,n),f=null),h&&(h.reset(),h=null),g&&(g.reset(),g=null),b&&(b=null),U&&U.unRegisterStreamType(z(),C),w.off(u.Z.DATA_UPDATE_COMPLETED,ae,t),w.off(u.Z.INIT_FRAGMENT_NEEDED,J,t),w.off(u.Z.MEDIA_FRAGMENT_NEEDED,ee,t),w.off(u.Z.INIT_FRAGMENT_LOADED,Se,t),w.off(u.Z.MEDIA_FRAGMENT_LOADED,Ae,t),w.off(u.Z.BUFFER_LEVEL_STATE_CHANGED,oe,t),w.off(u.Z.BUFFER_CLEARED,se,t),w.off(u.Z.SEEK_TARGET,Ce,t),w.off(u.Z.FRAGMENT_LOADING_ABANDONED,fe,t),w.off(u.Z.FRAGMENT_LOADING_COMPLETED,de,t),w.off(u.Z.SET_FRAGMENTED_TEXT_AFTER_DISABLED,he,t),w.off(u.Z.SET_NON_FRAGMENTED_TEXT,ge,t),w.off(u.Z.QUOTA_EXCEEDED,pe,t),w.off(u.Z.SOURCE_BUFFER_ERROR,le,t),w.off(u.Z.BYTES_APPENDED_END_FRAGMENT,ue,t),Q(),C=null,N=null}},n=(0,m.Z)(R).getInstance().getLogger(t),Q(),w.on(u.Z.DATA_UPDATE_COMPLETED,ae,t,{priority:l.Z.EVENT_PRIORITY_HIGH}),w.on(u.Z.INIT_FRAGMENT_NEEDED,J,t),w.on(u.Z.MEDIA_FRAGMENT_NEEDED,ee,t),w.on(u.Z.INIT_FRAGMENT_LOADED,Se,t),w.on(u.Z.MEDIA_FRAGMENT_LOADED,Ae,t),w.on(u.Z.BUFFER_LEVEL_STATE_CHANGED,oe,t),w.on(u.Z.BUFFER_CLEARED,se,t),w.on(u.Z.SEEK_TARGET,Ce,t),w.on(u.Z.FRAGMENT_LOADING_ABANDONED,fe,t),w.on(u.Z.FRAGMENT_LOADING_COMPLETED,de,t),w.on(u.Z.QUOTA_EXCEEDED,pe,t),w.on(u.Z.SET_FRAGMENTED_TEXT_AFTER_DISABLED,he,t),w.on(u.Z.SET_NON_FRAGMENTED_TEXT,ge,t),w.on(u.Z.SOURCE_BUFFER_ERROR,le,t),w.on(u.Z.BYTES_APPENDED_END_FRAGMENT,ue,t),t}rt.__dashjs_factory_name="StreamProcessor";var it=p.Z.getClassFactory(rt),at=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.streamId=null,this.mediaInfo=null,this.segmentType=null,this.quality=NaN,this.index=NaN,this.bytes=null,this.start=NaN,this.end=NaN,this.duration=NaN,this.representationId=null,this.endFragment=null},ot=n(9032);function st(e,t){if(e){var n;if("string"==typeof e)return lt(e,t);var r=v(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?q(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lt(e,t):void 0}}function lt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ut(e){e=e||{};var t,n,r=this.context,i=e.requestModifier,o=e.lowLatencyThroughputModel,s=e.boxParser,l=(0,we.Z)(r).getInstance();function u(e){var t,r=new Date,u=e.request,p=new Headers;if(u.range&&p.append("Range","bytes="+u.range),e.headers)for(var m in e.headers){var v=e.headers[m];v&&p.append(m,v)}u.requestStartDate||(u.requestStartDate=r),i&&i.modifyRequestHeader&&i.modifyRequestHeader({setRequestHeader:function(e,t){p.append(e,t)}},{url:e.url}),"function"==typeof window.AbortController&&(t=new AbortController,e.abortController=t,t.signal.onabort=e.onabort);var y={method:e.method,headers:p,credentials:e.withCredentials?"include":void 0,signal:t?t.signal:void 0},E=l.get().streaming.abr.fetchThroughputCalculationMode,T=U(),b=0;new F((function(e){if(E===a.Z.ABR_FETCH_THROUGHPUT_CALCULATION_AAST&&o&&(b=o.getThroughputCapacityDelayMS(u,1e3*n.getCurrentBufferLevel(u.mediaType))))return f(e,b);e()})).then((function(){var t=U();fetch(e.url,y).then((function(r){var i;e.response||(e.response={}),e.response.status=r.status,e.response.statusText=r.statusText,e.response.responseURL=r.url,r.ok||e.onerror();var l,f="",p=function(e,t){var n;if(void 0===g||null==Y(e)){if(h(e)||(n=st(e))){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=j(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(H(i=r.headers).call(i));try{for(p.s();!(l=p.n()).done;){var m=l.value;f+=m+": "+r.headers.get(m)+"\r\n"}}catch(e){p.e(e)}finally{p.f()}if(e.response.responseHeaders=f,!r.body)return r.arrayBuffer().then((function(t){e.response.response=t;var n={loaded:t.byteLength,total:t.byteLength,stream:!1};e.progress(n),e.onload(),e.onend()}));var v,y,S,A=_(r.headers.get("Content-Length"),10),I=0,R=!1,N=new Uint8Array,C=0;if(E===a.Z.ABR_FETCH_THROUGHPUT_CALCULATION_AAST&&o){var D=t,M=0,L=function(e){if(h(e))return e}(S=r.body.tee())||function(e,t){if(void 0!==g&&V(Object(e))){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=j(e);!(r=(o=s.next()).done)&&(n.push(o.value),2!==n.length);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}(S)||st(S,2)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),O=L[0],P=L[1];v=O.getReader(),y=[],v.read().then((function r(i){var a=i.value,s=i.done;if(M=U(),a&&a.length){var l=M-D,c=a.length;y.push({chunkDownloadTimeRelativeMS:M-t,chunkDownloadDurationMS:l,chunkBytes:c,kbps:Math.round(8*c/(l/1e3)),bufferLevel:n.getCurrentBufferLevel(u.mediaType)})}if(s){var d=M-t,h=K(y).call(y,(function(e,t){return e+t.chunkBytes}),0);return o.addMeasurement(u,d,y,T,b,f),void e.progress({loaded:h,total:h,lengthComputable:!0,time:o.getEstimatedDownloadDurationMS(u),stream:!0})}return D=U(),v.read().then(r)})),e.reader=P.getReader()}else e.reader=r.body.getReader();var F=[],x=[],k=[],Z=!0;c(e,(function t(n){var r=n.value;if(n.done){if(N){if(E!==a.Z.ABR_FETCH_THROUGHPUT_CALCULATION_AAST){var i=null,o=null;E===a.Z.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING?(i=function(e,t){try{var n,r;n=w(e).call(e,(function(t,n){return n<e.length-1})),r=w(t).call(t,(function(e,n){return n<t.length-1}));var i=[];if(n.length>1){for(var a=0,o=0,s=0;s<n.length;s++)if(n[s]&&r[s]){var l=r[s].ts-n[s].ts;if(l>1)i.push(8*r[s].bytes/l),o=0;else{0===o&&(o=n[s].ts,a=0);var u=r[s].ts-o;u>1?(a+=r[s].bytes,i.push(8*a/u),o=0):a+=r[s].bytes}}if(i.length>0)return K(i).call(i,(function(e,t){return e+t}),0)/i.length}return null}catch(e){return null}}(x,k),i&&(o=8*I/i)):E===a.Z.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA&&(o=d(F,I)),e.progress({loaded:I,total:isNaN(A)?I:A,lengthComputable:!0,time:o,stream:!0})}e.response.response=N.buffer}return e.onload(),void e.onend()}if(r&&r.length>0){N=function(e,t){if(0===e.length)return t;var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(N,r),I+=r.length,F.push({ts:U(),bytes:r.length}),E===a.Z.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING&&Z&&s.findLastTopIsoBoxCompleted(["moof"],N,C).found&&(Z=!1,x.push({ts:performance.now(),bytes:r.length}));var l=s.findLastTopIsoBoxCompleted(["moov","mdat"],N,C);if(l.found){var u,f=l.lastCompletedOffset+l.size;E!==a.Z.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING||Z||(Z=!0,k.push({ts:performance.now(),bytes:N.length})),f===N.length?(u=N,N=new Uint8Array):(u=new Uint8Array(N.subarray(0,f)),N=N.subarray(f)),e.progress({data:u.buffer,lengthComputable:!1,noTrace:!0}),C=0}else C=l.lastCompletedOffset,R||(e.progress({lengthComputable:!1,noTrace:!0}),R=!0)}c(e,t)}))})).catch((function(t){e.onerror&&e.onerror(t)}))}))}function c(e,t){e.reader.read().then(t).catch((function(t){e.onerror&&200===e.response.status&&e.onerror(t)}))}function d(e,t){try{if((e=w(e).call(e,(function(n){return n.bytes>t/4/e.length}))).length>1){var n=0,r=(e[e.length-1].ts-e[0].ts)/e.length;return I(e).call(e,(function(t,i){var a=e[i+1];if(a){var o=a.ts-t.ts;n+=o<r?o:0}})),n}return null}catch(e){return null}}return t={load:function(e){i&&i.modifyRequest?(0,We.k)(e,i).then((function(){return u(e)})):u(e)},abort:function(e){if(e.abortController)e.abortController.abort();else if(e.reader)try{e.reader.cancel(),e.onabort()}catch(e){}},calculateDownloadedTime:d,setup:function(e){n=e.dashMetrics}},t}ut.__dashjs_factory_name="FetchLoader";var ct=p.Z.getClassFactory(ut),ft=n(1180),dt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.index=-1,this.adaptation=null,this.segmentInfoType=null,this.initialization=null,this.codecs=null,this.mimeType=null,this.codecPrivateData=null,this.segmentDuration=NaN,this.timescale=1,this.startNumber=1,this.indexRange=null,this.range=null,this.presentationTimeOffset=0,this.MSETimeOffset=NaN,this.mediaFinishedInformation={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN},this.bandwidth=NaN,this.width=NaN,this.height=NaN,this.scanType=null,this.maxPlayoutRate=NaN,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0,this.frameRate=null}var t;return(t=[{key:"hasInitialization",value:function(){return null!==this.initialization||null!==this.range}},{key:"hasSegments",value:function(){return this.segmentInfoType!==o.Z.BASE_URL&&this.segmentInfoType!==o.Z.SEGMENT_BASE&&!this.indexRange}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e.prototype,t),e}(),ht=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.period=null,this.index=-1,this.type=null},gt=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.index=-1,this.duration=NaN,this.start=NaN,this.mpd=null,this.nextPeriodId=null};gt.DEFAULT_ID="defaultId";var pt=gt,mt=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.manifest=null,this.suggestedPresentationDelay=0,this.availabilityStartTime=null,this.availabilityEndTime=Number.POSITIVE_INFINITY,this.timeShiftBufferDepth=Number.POSITIVE_INFINITY,this.maxSegmentDuration=Number.POSITIVE_INFINITY,this.publishTime=null,this.minimumUpdatePeriod=NaN,this.mediaPresentationDuration=NaN},vt=n(2610),yt=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type="",this.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN},Et=function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=t||"",this.serviceLocation=n||t||"",this.dvbPriority=r||1,this.dvbWeight=i||1,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0,this.queryParams={}};Et.DEFAULT_DVB_PRIORITY=1,Et.DEFAULT_DVB_WEIGHT=1;var _t=Et,Tt=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri="",this.presentationTimeOffset=0},bt=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.inband=!1,this.type="encoder",this.applicationScheme=null,this.wallClockTime=null,this.presentationTime=NaN,this.UTCTiming=null},St=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.defaultServiceLocation=null,this.defaultServiceLocationArray=[],this.queryBeforeStart=!1,this.serverUrl=null,this.clientRequirement=!0},At=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.schemeIdUri=null,this.value=null,this.id=null}var t;return(t=[{key:"init",value:function(e){return e&&(this.schemeIdUri=e.schemeIdUri?e.schemeIdUri:null,this.value=e.value?e.value:null,this.id=e.id?e.id:null,e[o.Z.DVB_URL]&&(this.dvbUrl=e[o.Z.DVB_URL]),e[o.Z.DVB_MIMETYPE]&&(this.dvbMimeType=e[o.Z.DVB_MIMETYPE]),e[o.Z.DVB_FONTFAMILY]&&(this.dvbFontFamily=e[o.Z.DVB_FONTFAMILY])),this}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e.prototype,t),e}(),It=n(3101),Rt=n.n(It);function wt(){return{areEqual:function(e,t){return Rt()(e,t)}}}wt.__dashjs_factory_name="ObjectUtils";var Nt=p.Z.getSingletonFactory(wt),Ct=n(7803),Dt=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=t||"",this.serviceLocation=n||null,this.queryParams={}},Mt=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=t||"",this.serviceLocation=n||null,this.ttl=r||NaN,this.queryParams={}};function Lt(e,t){var n=z(e);if(W){var r=W(e);t&&(r=w(r).call(r,(function(t){return X(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ot(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?I(n=Lt(Object(i),!0)).call(n,(function(t){Pt(e,t,i[t])})):Q?$(e,Q(i)):I(r=Lt(Object(i))).call(r,(function(t){C(e,t,X(i,t))}))}return e}function Pt(e,t,n){return t in e?C(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ft(e,t){var n;if(void 0===g||null==Y(e)){if(h(e)||(n=xt(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=j(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function xt(e,t){if(e){var n;if("string"==typeof e)return kt(e,t);var r=v(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?q(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kt(e,t):void 0}}function kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ut(){var e,t,n,r,i=this.context,s=(0,Xe.Z)(i).getInstance(),l=J||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function u(e,t){if(!e)throw new Error("adaptation is not defined");if(!t)throw new Error("type is not defined");if(e.Representation_asArray&&e.Representation_asArray.length){var n,r=S(e.Representation_asArray[0]);if(r&&r.length>0&&y(n=Ct.Y).call(n,r[0].schemeIdUri)>=0)return t===a.Z.IMAGE}if(e.ContentComponent_asArray&&e.ContentComponent_asArray.length>0){if(e.ContentComponent_asArray.length>1)return t===a.Z.MUXED;if(e.ContentComponent_asArray[0].contentType===t)return!0}var i=t===a.Z.TEXT?new RegExp("(ttml|vtt|wvtt|stpp)"):new RegExp(t);if(e.Representation_asArray&&e.Representation_asArray.length){var s=e.Representation_asArray[0].codecs;if(i.test(s))return!0}if(e.hasOwnProperty(o.Z.MIME_TYPE))return i.test(e.mimeType);if(e.Representation_asArray)for(var l,u=0;u<e.Representation_asArray.length;u++)if((l=e.Representation_asArray[u]).hasOwnProperty(o.Z.MIME_TYPE))return i.test(l.mimeType);return!1}function c(e){if(!e)throw new Error("adaptation is not defined");if(e.hasOwnProperty(o.Z.SEGMENT_TEMPLATE)||e.hasOwnProperty(o.Z.SEGMENT_TIMELINE)||e.hasOwnProperty(o.Z.SEGMENT_LIST)||e.hasOwnProperty(o.Z.SEGMENT_BASE))return!0;if(e.Representation_asArray&&e.Representation_asArray.length>0){var t=e.Representation_asArray[0];if(t.hasOwnProperty(o.Z.SEGMENT_TEMPLATE)||t.hasOwnProperty(o.Z.SEGMENT_TIMELINE)||t.hasOwnProperty(o.Z.SEGMENT_LIST)||t.hasOwnProperty(o.Z.SEGMENT_BASE))return!0}return!1}function f(e){return u(e,a.Z.VIDEO)}function d(e){return u(e,a.Z.TEXT)}function p(e){return u(e,a.Z.IMAGE)}function v(e){var t;return e&&h(e.Representation_asArray)&&Z(t=e.Representation_asArray).call(t,(function(e,t){return e.bandwidth-t.bandwidth})),e}function E(e,t){return e&&e.Period_asArray&&l(t)&&e.Period_asArray[t]?e.Period_asArray[t].AdaptationSet_asArray:[]}function T(e){return e&&e.Period_asArray?e.Period_asArray:[]}function b(e){var t=!1;return e&&e.hasOwnProperty("type")&&(t=e.type===o.Z.DYNAMIC),t}function S(e){var t;return e&&e.EssentialProperty_asArray&&e.EssentialProperty_asArray.length?ee(t=e.EssentialProperty_asArray).call(t,(function(e){return{schemeIdUri:e.schemeIdUri,value:e.value}})):null}function A(e){if(!e||!e.S_asArray)return NaN;var t=e.S_asArray[0],n=e.S_asArray[1];return t.hasOwnProperty("d")?t.d:n.t-t.t}function w(e,t){if(!e)throw new Error("Period cannot be null or undefined");var n=pt.DEFAULT_ID+"_"+t;return e.hasOwnProperty(o.Z.ID)&&e.id.length>0&&"__proto__"!==e.id&&(n=e.id),n}function N(e,t,n){var r,i=[];if(!e)return i;for(r=0;r<e.length;r++){var s=new Tt;if(s.timescale=1,s.representation=t,!e[r].hasOwnProperty(a.Z.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");s.schemeIdUri=e[r].schemeIdUri,e[r].hasOwnProperty(o.Z.TIMESCALE)&&(s.timescale=e[r].timescale),e[r].hasOwnProperty(o.Z.VALUE)&&(s.value=e[r].value),i.push(s),s.period=n}return i}function C(e){var t=[],n=e.BaseURL_asArray||[e.baseUri],r=!1;return R(n).call(n,(function(n){if(n){var i=new _t,a=n.__text||n;return s.isRelative(a)&&(r=!0,e.baseUri&&(a=s.resolve(a,e.baseUri))),i.url=a,n.hasOwnProperty(o.Z.SERVICE_LOCATION)&&n.serviceLocation.length?i.serviceLocation=n.serviceLocation:i.serviceLocation=a,n.hasOwnProperty(o.Z.DVB_PRIORITY)&&(i.dvbPriority=n[o.Z.DVB_PRIORITY]),n.hasOwnProperty(o.Z.DVB_WEIGHT)&&(i.dvbWeight=n[o.Z.DVB_WEIGHT]),n.hasOwnProperty(o.Z.AVAILABILITY_TIME_OFFSET)&&(i.availabilityTimeOffset=n[o.Z.AVAILABILITY_TIME_OFFSET]),n.hasOwnProperty(o.Z.AVAILABILITY_TIME_COMPLETE)&&(i.availabilityTimeComplete="false"!==n[o.Z.AVAILABILITY_TIME_COMPLETE]),t.push(i),r}})),t}function D(e){var t=new St;return t.serverUrl=e.__text,e.hasOwnProperty(o.Z.DEFAULT_SERVICE_LOCATION)&&(t.defaultServiceLocation=e[o.Z.DEFAULT_SERVICE_LOCATION],t.defaultServiceLocationArray=t.defaultServiceLocation.split(" ")),e.hasOwnProperty(o.Z.QUERY_BEFORE_START)&&(t.queryBeforeStart="true"===e[o.Z.QUERY_BEFORE_START].toLowerCase()),e.hasOwnProperty(o.Z.CLIENT_REQUIREMENT)&&(t.clientRequirement="false"!==e[o.Z.CLIENT_REQUIREMENT].toLowerCase()),t}return e={getIsTypeOf:u,getIsText:d,getIsFragmented:c,getProducerReferenceTimesForAdaptation:function(e){var t,n=e&&e.hasOwnProperty(o.Z.PRODUCERREFERENCETIME_ASARRAY)?e[o.Z.PRODUCERREFERENCETIME_ASARRAY]:[];I(t=e&&e.hasOwnProperty(o.Z.REPRESENTATION_ASARRAY)?e[o.Z.REPRESENTATION_ASARRAY]:[]).call(t,(function(e){var t;e.hasOwnProperty(o.Z.PRODUCERREFERENCETIME_ASARRAY)&&n.push.apply(n,function(e){if(h(e))return kt(e)}(t=e[o.Z.PRODUCERREFERENCETIME_ASARRAY])||function(e){if(void 0!==g&&V(Object(e)))return q(e)}(t)||xt(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}));var r=[];return I(n).call(n,(function(e){var t=new bt;e.hasOwnProperty(o.Z.ID)&&(t[o.Z.ID]=e[o.Z.ID],e.hasOwnProperty(o.Z.WALL_CLOCK_TIME)&&(t[o.Z.WALL_CLOCK_TIME]=e[o.Z.WALL_CLOCK_TIME],e.hasOwnProperty(o.Z.PRESENTATION_TIME)&&(t[o.Z.PRESENTATION_TIME]=e[o.Z.PRESENTATION_TIME],e.hasOwnProperty(o.Z.INBAND)&&(t[o.Z.INBAND]="false"!==e[o.Z.INBAND]),e.hasOwnProperty(o.Z.TYPE)&&(t[o.Z.TYPE]=e[o.Z.TYPE]),r.push(t))))})),r},getLanguageForAdaptation:function(e){var t="";return e&&e.hasOwnProperty(o.Z.LANG)&&(t=e.lang),t},getViewpointForAdaptation:function(e){var t;return e&&e.hasOwnProperty(o.Z.VIEWPOINT_ASARRAY)&&e[o.Z.VIEWPOINT_ASARRAY].length?ee(t=e[o.Z.VIEWPOINT_ASARRAY]).call(t,(function(e){return(new At).init(e)})):[]},getRolesForAdaptation:function(e){var t;return e&&e.hasOwnProperty(o.Z.ROLE_ASARRAY)&&e[o.Z.ROLE_ASARRAY].length?ee(t=e[o.Z.ROLE_ASARRAY]).call(t,(function(e){return(new At).init(e)})):[]},getAccessibilityForAdaptation:function(e){var t;return e&&e.hasOwnProperty(o.Z.ACCESSIBILITY_ASARRAY)&&e[o.Z.ACCESSIBILITY_ASARRAY].length?ee(t=e[o.Z.ACCESSIBILITY_ASARRAY]).call(t,(function(e){return(new At).init(e)})):[]},getAudioChannelConfigurationForAdaptation:function(e){var t;return e&&e.hasOwnProperty(o.Z.AUDIOCHANNELCONFIGURATION_ASARRAY)&&e[o.Z.AUDIOCHANNELCONFIGURATION_ASARRAY].length?ee(t=e[o.Z.AUDIOCHANNELCONFIGURATION_ASARRAY]).call(t,(function(e){return(new At).init(e)})):[]},getAudioChannelConfigurationForRepresentation:function(e){var t;return e&&e.hasOwnProperty(o.Z.AUDIOCHANNELCONFIGURATION_ASARRAY)&&e[o.Z.AUDIOCHANNELCONFIGURATION_ASARRAY].length?ee(t=e[o.Z.AUDIOCHANNELCONFIGURATION_ASARRAY]).call(t,(function(e){return(new At).init(e)})):[]},getAdaptationForIndex:function(e,t,n){var r=E(t,n);return r.length>0&&l(e)?r[e]:null},getIndexForAdaptation:function(e,t,n){if(!e)return-1;for(var r=E(t,n),a=0;a<r.length;a++)if(Nt(i).getInstance().areEqual(r[a],e))return a;return-1},getAdaptationForId:function(e,t,n){var r,i,a=E(t,n);for(r=0,i=a.length;r<i;r++)if(a[r].hasOwnProperty(o.Z.ID)&&a[r].id===e)return a[r];return null},getAdaptationsForType:function(e,t,n){var r,i,a=E(e,t),o=[];for(r=0,i=a.length;r<i;r++)u(a[r],n)&&o.push(v(a[r]));return o},getRealPeriods:T,getRealPeriodForIndex:function(e,t){var n=T(t);return n.length>0&&l(e)?n[e]:null},getCodec:function(e,t,n){var r=null;if(e&&e.Representation_asArray&&e.Representation_asArray.length>0){var i=l(t)&&t>=0&&t<e.Representation_asArray.length?e.Representation_asArray[t]:e.Representation_asArray[0];i&&(r=i.mimeType+';codecs="'+i.codecs+'"',n&&void 0!==i.width&&(r+=';width="'+i.width+'";height="'+i.height+'"'))}return r&&(r=r.replace(/\sprofiles=[^;]*/g,"")),r},getSelectionPriority:function(e){try{var t=e&&void 0!==e.selectionPriority?_(e.selectionPriority):1;return isNaN(t)?1:t}catch(e){return 1}},getMimeType:function(e){return e&&e.Representation_asArray&&e.Representation_asArray.length>0?e.Representation_asArray[0].mimeType:null},getKID:function(e){return e&&e.hasOwnProperty(o.Z.CENC_DEFAULT_KID)?e[o.Z.CENC_DEFAULT_KID]:null},getLabelsForAdaptation:function(e){if(!e||!h(e.Label_asArray))return[];for(var t=[],n=0;n<e.Label_asArray.length;n++)t.push({lang:e.Label_asArray[n].lang,text:e.Label_asArray[n].__text||e.Label_asArray[n]});return t},getContentProtectionData:function(e){return e&&e.hasOwnProperty(o.Z.CONTENTPROTECTION_ASARRAY)&&0!==e.ContentProtection_asArray.length?e.ContentProtection_asArray:null},getIsDynamic:b,getId:function(e){return e&&e[o.Z.ID]||null},hasProfile:function(e,t){var n,r=!1;return e&&e.profiles&&e.profiles.length>0&&(r=-1!==y(n=e.profiles).call(n,t)),r},getDuration:function(e){return e&&e.hasOwnProperty(o.Z.MEDIA_PRESENTATION_DURATION)?e.mediaPresentationDuration:e&&"dynamic"==e.type?Number.POSITIVE_INFINITY:te||Number.MAX_VALUE},getBandwidth:function(e){return e&&e.bandwidth?e.bandwidth:NaN},getManifestUpdatePeriod:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=NaN;return e&&e.hasOwnProperty(o.Z.MINIMUM_UPDATE_PERIOD)&&(n=e.minimumUpdatePeriod),isNaN(n)?n:Math.max(n-t,1)},getPublishTime:function(e){return e&&e.hasOwnProperty(o.Z.PUBLISH_TIME)?new Date(e[o.Z.PUBLISH_TIME]):null},getRepresentationCount:function(e){return e&&h(e.Representation_asArray)?e.Representation_asArray.length:0},getBitrateListForAdaptation:function(e){var t,n=v(e);return ee(t=n&&h(n.Representation_asArray)?n.Representation_asArray:[]).call(t,(function(e){return{bandwidth:e.bandwidth,width:e.width||0,height:e.height||0,scanType:e.scanType||null,id:e.id||null}}))},getRepresentationFor:function(e,t){return t&&t.Representation_asArray&&t.Representation_asArray.length>0&&l(e)?t.Representation_asArray[e]:null},getRepresentationsForAdaptation:function(e){var t,n,r,i,a=[],s=function(e){if(e&&e.period&&l(e.period.index)){var t=e.period.mpd.manifest.Period_asArray[e.period.index];if(t&&t.AdaptationSet_asArray&&l(e.index))return v(t.AdaptationSet_asArray[e.index])}}(e);if(s&&s.Representation_asArray){if(e&&e.period&&l(e.period.index)){var u=C(e.period.mpd.manifest);u&&(n=u[0])}for(var f=0,h=s.Representation_asArray.length;f<h;++f){var g=s.Representation_asArray[f],p=new dt;if(p.index=f,p.adaptation=e,g.hasOwnProperty(o.Z.ID)&&(p.id=g.id),g.hasOwnProperty(o.Z.CODECS)&&(p.codecs=g.codecs),g.hasOwnProperty(o.Z.MIME_TYPE)&&(p.mimeType=g[o.Z.MIME_TYPE]),g.hasOwnProperty(o.Z.CODEC_PRIVATE_DATA)&&(p.codecPrivateData=g.codecPrivateData),g.hasOwnProperty(o.Z.BANDWITH)&&(p.bandwidth=g.bandwidth),g.hasOwnProperty(o.Z.WIDTH)&&(p.width=g.width),g.hasOwnProperty(o.Z.HEIGHT)&&(p.height=g.height),g.hasOwnProperty(o.Z.SCAN_TYPE)&&(p.scanType=g.scanType),g.hasOwnProperty(o.Z.MAX_PLAYOUT_RATE)&&(p.maxPlayoutRate=g.maxPlayoutRate),g.hasOwnProperty(o.Z.SEGMENT_BASE)?(t=g.SegmentBase,p.segmentInfoType=o.Z.SEGMENT_BASE):g.hasOwnProperty(o.Z.SEGMENT_LIST)?(t=g.SegmentList).hasOwnProperty(o.Z.SEGMENT_TIMELINE)?p.segmentInfoType=o.Z.SEGMENT_TIMELINE:p.segmentInfoType=o.Z.SEGMENT_LIST:g.hasOwnProperty(o.Z.SEGMENT_TEMPLATE)?((t=g.SegmentTemplate).hasOwnProperty(o.Z.SEGMENT_TIMELINE)?p.segmentInfoType=o.Z.SEGMENT_TIMELINE:p.segmentInfoType=o.Z.SEGMENT_TEMPLATE,t.hasOwnProperty(o.Z.INITIALIZATION_MINUS)&&(p.initialization=t.initialization.split("$Bandwidth$").join(g.bandwidth).split("$RepresentationID$").join(g.id))):p.segmentInfoType=o.Z.BASE_URL,p.essentialProperties=S(g),t){var m;if(t.hasOwnProperty(o.Z.INITIALIZATION)){var E=t.Initialization;E.hasOwnProperty(o.Z.SOURCE_URL)&&(p.initialization=E.sourceURL),E.hasOwnProperty(o.Z.RANGE)&&(p.range=E.range)}else d(s)&&c(s)&&s.mimeType&&-1===y(m=s.mimeType).call(m,"application/mp4")&&(p.range=0);t.hasOwnProperty(o.Z.TIMESCALE)&&(p.timescale=t.timescale),t.hasOwnProperty(o.Z.DURATION)?p.segmentDuration=t.duration/p.timescale:g.hasOwnProperty(o.Z.SEGMENT_TEMPLATE)&&(t=g.SegmentTemplate).hasOwnProperty(o.Z.SEGMENT_TIMELINE)&&(p.segmentDuration=A(t.SegmentTimeline)/p.timescale),t.hasOwnProperty(o.Z.MEDIA)&&(p.media=t.media),t.hasOwnProperty(o.Z.START_NUMBER)&&(p.startNumber=t.startNumber),t.hasOwnProperty(o.Z.INDEX_RANGE)&&(p.indexRange=t.indexRange),t.hasOwnProperty(o.Z.PRESENTATION_TIME_OFFSET)&&(p.presentationTimeOffset=t.presentationTimeOffset/p.timescale),t.hasOwnProperty(o.Z.AVAILABILITY_TIME_OFFSET)?p.availabilityTimeOffset=t.availabilityTimeOffset:n&&void 0!==n.availabilityTimeOffset&&(p.availabilityTimeOffset=n.availabilityTimeOffset),t.hasOwnProperty(o.Z.AVAILABILITY_TIME_COMPLETE)?p.availabilityTimeComplete="false"!==t.availabilityTimeComplete:n&&void 0!==n.availabilityTimeComplete&&(p.availabilityTimeComplete=n.availabilityTimeComplete)}p.MSETimeOffset=(i=(r=p).presentationTimeOffset,r.adaptation.period.start-i),p.path=[e.period.index,e.index,f],a.push(p)}}return a},getAdaptationsForPeriod:function(e){var n,r,i,s=e&&l(e.index)?e.mpd.manifest.Period_asArray[e.index]:null,c=[];if(s&&s.AdaptationSet_asArray)for(i=0;i<s.AdaptationSet_asArray.length;i++)r=s.AdaptationSet_asArray[i],n=new ht,r.hasOwnProperty(o.Z.ID)&&(n.id=r.id),n.index=i,n.period=e,u(r,a.Z.MUXED)?n.type=a.Z.MUXED:u(r,a.Z.AUDIO)?n.type=a.Z.AUDIO:f(r)?n.type=a.Z.VIDEO:d(r)?n.type=a.Z.TEXT:p(r)?n.type=a.Z.IMAGE:t.warn("Unknown Adaptation stream type"),c.push(n);return c},getRegularPeriods:function(e){var r,i,s=!!e&&b(e.manifest),l=[],u=null,c=null,f=null,d=null;for(i=0,r=e&&e.manifest&&e.manifest.Period_asArray?e.manifest.Period_asArray.length:0;i<r;i++)(c=e.manifest.Period_asArray[i]).hasOwnProperty(o.Z.START)?(d=new pt).start=c.start:null!==u&&u.hasOwnProperty(o.Z.DURATION)&&null!==f?(d=new pt).start=x((f.start+f.duration).toFixed(5)):0!==i||s||((d=new pt).start=0),null!==f&&isNaN(f.duration)&&(null!==d?f.duration=x((d.start-f.start).toFixed(5)):t.warn("First period duration could not be calculated because lack of start and duration period properties. This will cause timing issues during playback")),null!==d&&(d.id=w(c,i),d.index=i,d.mpd=e,c.hasOwnProperty(o.Z.DURATION)&&(d.duration=c.duration),f&&(f.nextPeriodId=d.id),l.push(d),u=c,f=d),c=null,d=null;return 0===l.length||null!==f&&isNaN(f.duration)&&(f.duration=x((function(e){!function(){if(!n||!n.hasOwnProperty("error"))throw new Error(a.Z.MISSING_CONFIG_ERROR)}();var t,r=b(e.mpd.manifest);return e.mpd.manifest.mediaPresentationDuration?t=e.mpd.manifest.mediaPresentationDuration:e.duration?t=e.duration:r?t=Number.POSITIVE_INFINITY:n.error(new Te.Z(Re.MANIFEST_ERROR_ID_PARSE_CODE,"Must have @mediaPresentationDuration on MPD or an explicit @duration on the last period.",e)),t}(f)-f.start).toFixed(5))),l},getMpd:function(e){var t=new mt;return e&&(t.manifest=e,e.hasOwnProperty(o.Z.AVAILABILITY_START_TIME)?t.availabilityStartTime=new Date(e.availabilityStartTime.getTime()):e.loadedTime&&(t.availabilityStartTime=new Date(e.loadedTime.getTime())),e.hasOwnProperty(o.Z.AVAILABILITY_END_TIME)&&(t.availabilityEndTime=new Date(e.availabilityEndTime.getTime())),e.hasOwnProperty(o.Z.MINIMUM_UPDATE_PERIOD)&&(t.minimumUpdatePeriod=e.minimumUpdatePeriod),e.hasOwnProperty(o.Z.MEDIA_PRESENTATION_DURATION)&&(t.mediaPresentationDuration=e.mediaPresentationDuration),e.hasOwnProperty(o.Z.SUGGESTED_PRESENTATION_DELAY)&&(t.suggestedPresentationDelay=e.suggestedPresentationDelay),e.hasOwnProperty(o.Z.TIMESHIFT_BUFFER_DEPTH)&&(t.timeShiftBufferDepth=e.timeShiftBufferDepth),e.hasOwnProperty(o.Z.MAX_SEGMENT_DURATION)&&(t.maxSegmentDuration=e.maxSegmentDuration),e.hasOwnProperty(o.Z.PUBLISH_TIME)&&(t.publishTime=new Date(e.publishTime))),t},getEventsForPeriod:function(e){var t,n,i=e&&e.mpd&&e.mpd.manifest?e.mpd.manifest:null,s=i?i.Period_asArray:null,u=s&&e&&l(e.index)?s[e.index].EventStream_asArray:null,c=[];if(u)for(t=0;t<u.length;t++){var f=new Tt;if(f.period=e,f.timescale=1,!u[t].hasOwnProperty(a.Z.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");for(f.schemeIdUri=u[t][a.Z.SCHEME_ID_URI],u[t].hasOwnProperty(o.Z.TIMESCALE)&&(f.timescale=u[t][o.Z.TIMESCALE]),u[t].hasOwnProperty(o.Z.VALUE)&&(f.value=u[t][o.Z.VALUE]),u[t].hasOwnProperty(o.Z.PRESENTATION_TIME_OFFSET)&&(f.presentationTimeOffset=u[t][o.Z.PRESENTATION_TIME_OFFSET]),n=0;u[t].Event_asArray&&n<u[t].Event_asArray.length;n++){var d=u[t].Event_asArray[n],h=new yt;h.presentationTime=0,h.eventStream=f,d.hasOwnProperty(o.Z.PRESENTATION_TIME)&&(h.presentationTime=d.presentationTime);var g=f.presentationTimeOffset?f.presentationTimeOffset/f.timescale:0;h.calculatedPresentationTime=h.presentationTime/f.timescale+e.start-g,d.hasOwnProperty(o.Z.DURATION)&&(h.duration=d.duration/f.timescale),d.hasOwnProperty(o.Z.ID)?h.id=d.id:h.id=null,d.Signal&&d.Signal.Binary?h.messageData=r.decodeArray(d.Signal.Binary.toString()):h.messageData=d.messageData||d.__cdata||d.__text,c.push(h)}}return c},getEssentialPropertiesForAdaptation:function(e){var t={};if(e&&e.hasOwnProperty(o.Z.ESSENTIAL_PROPERTY_ASARRAY)){var n,r=Ft(e.EssentialProperty_asArray);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.hasOwnProperty(a.Z.SCHEME_ID_URI)&&(t[i[a.Z.SCHEME_ID_URI]]=Ot({},i))}}catch(e){r.e(e)}finally{r.f()}}return t},getEssentialPropertiesAsArrayForAdaptation:function(e){var t;return e&&e.hasOwnProperty(o.Z.ESSENTIAL_PROPERTY_ASARRAY)&&e.EssentialProperty_asArray.length?ee(t=e.EssentialProperty_asArray).call(t,(function(e){return(new At).init(e)})):[]},getEssentialPropertiesForRepresentation:S,getEventStreamForAdaptationSet:function(e,t,n){var r,i,a;return e&&e.Period_asArray&&t&&t.period&&l(t.period.index)&&(i=e.Period_asArray[t.period.index])&&i.AdaptationSet_asArray&&l(t.index)&&(a=i.AdaptationSet_asArray[t.index])&&(r=a.InbandEventStream_asArray),N(r,null,n)},getEventStreamForRepresentation:function(e,t,n){var r,i,a,o;return e&&e.Period_asArray&&t&&t.adaptation&&t.adaptation.period&&l(t.adaptation.period.index)&&(i=e.Period_asArray[t.adaptation.period.index])&&i.AdaptationSet_asArray&&l(t.adaptation.index)&&(a=i.AdaptationSet_asArray[t.adaptation.index])&&a.Representation_asArray&&l(t.index)&&(o=a.Representation_asArray[t.index])&&(r=o.InbandEventStream_asArray),N(r,t,n)},getUTCTimingSources:function(e){var t=b(e),n=!!e&&e.hasOwnProperty(o.Z.AVAILABILITY_START_TIME),r=e?e.UTCTiming_asArray:null,i=[];return(t||n)&&r&&I(r).call(r,(function(e){var t=new vt.Z;e.hasOwnProperty(a.Z.SCHEME_ID_URI)&&(t.schemeIdUri=e.schemeIdUri,e.hasOwnProperty(o.Z.VALUE)&&(t.value=e.value.toString(),i.push(t)))})),i},getBaseURLsFromElement:C,getRepresentationSortFunction:function(){return function(e,t){return e.bandwidth-t.bandwidth}},getContentSteering:function(e){if(e&&e.hasOwnProperty(o.Z.CONTENT_STEERING_AS_ARRAY))return D(e[o.Z.CONTENT_STEERING_AS_ARRAY][0])},getLocation:function(e){var t;return e&&e.hasOwnProperty(o.Z.LOCATION_AS_ARRAY)?ee(t=e[o.Z.LOCATION_AS_ARRAY]).call(t,(function(e){var t=e.__text||e,n=e.hasOwnProperty(o.Z.SERVICE_LOCATION)?e[o.Z.SERVICE_LOCATION]:null;return new Dt(t,n)})):[]},getPatchLocation:function(e){var t;return e&&e.hasOwnProperty(o.Z.PATCH_LOCATION_AS_ARRAY)?ee(t=e[o.Z.PATCH_LOCATION_AS_ARRAY]).call(t,(function(e){var t=e.__text||e,n=e.hasOwnProperty(o.Z.SERVICE_LOCATION)?e[o.Z.SERVICE_LOCATION]:null,r=e.hasOwnProperty(o.Z.TTL)?1e3*x(e[o.Z.TTL]):NaN;return new Mt(t,n,r)})):[]},getSuggestedPresentationDelay:function(e){return e&&e.hasOwnProperty(o.Z.SUGGESTED_PRESENTATION_DELAY)?e.suggestedPresentationDelay:null},getAvailabilityStartTime:function(e){return e&&e.hasOwnProperty(o.Z.AVAILABILITY_START_TIME)&&null!==e.availabilityStartTime?e.availabilityStartTime.getTime():null},getServiceDescriptions:function(e){var t=[];if(e&&e.hasOwnProperty(o.Z.SERVICE_DESCRIPTION)){var n,r=Ft(e.ServiceDescription_asArray);try{for(r.s();!(n=r.n()).done;){var i=n.value,a=null,s=null,l=null,u=null,c=null,f=null,d=null;for(var h in i)i.hasOwnProperty(h)&&(h===o.Z.ID?a=i[h]:h===o.Z.SERVICE_DESCRIPTION_SCOPE?s=i[h].schemeIdUri:h===o.Z.SERVICE_DESCRIPTION_LATENCY?l={target:_(i[h].target),max:_(i[h].max),min:_(i[h].min),referenceId:_(i[h].referenceId)}:h===o.Z.SERVICE_DESCRIPTION_PLAYBACK_RATE?u={max:x(i[h].max),min:x(i[h].min)}:h===o.Z.SERVICE_DESCRIPTION_OPERATING_QUALITY?c={mediaType:i[h].mediaType,max:_(i[h].max),min:_(i[h].min),target:_(i[h].target),type:i[h].type,maxQualityDifference:_(i[h].maxQualityDifference)}:h===o.Z.SERVICE_DESCRIPTION_OPERATING_BANDWIDTH?f={mediaType:i[h].mediaType,max:_(i[h].max),min:_(i[h].min),target:_(i[h].target)}:h===o.Z.CONTENT_STEERING&&(d=D(i[h])));t.push({id:a,schemeIdUri:s,latency:l,playbackRate:u,operatingQuality:c,operatingBandwidth:f,contentSteering:d})}}catch(e){r.e(e)}finally{r.f()}}return t},getSegmentAlignment:function(e){return!(!e||!e.hasOwnProperty(o.Z.SEGMENT_ALIGNMENT))&&"true"===e[o.Z.SEGMENT_ALIGNMENT]},getSubSegmentAlignment:function(e){return!(!e||!e.hasOwnProperty(o.Z.SUB_SEGMENT_ALIGNMENT))&&"true"===e[o.Z.SUB_SEGMENT_ALIGNMENT]},getSupplementalPropertiesForAdaptation:function(e){var t={};if(e&&e.hasOwnProperty(o.Z.SUPPLEMENTAL_PROPERTY_ASARRAY)){var n,r=Ft(e.SupplementalProperty_asArray);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.hasOwnProperty(a.Z.SCHEME_ID_URI)&&(t[i[a.Z.SCHEME_ID_URI]]=Ot({},i))}}catch(e){r.e(e)}finally{r.f()}}return t},getSupplementalPropertiesAsArrayForAdaptation:function(e){var t;return e&&e.hasOwnProperty(o.Z.SUPPLEMENTAL_PROPERTY_ASARRAY)&&e.SupplementalProperty_asArray.length?ee(t=e.SupplementalProperty_asArray).call(t,(function(e){return(new At).init(e)})):[]},getSupplementalPropertiesForRepresentation:function(e){var t={};if(e&&e.hasOwnProperty(o.Z.SUPPLEMENTAL_PROPERTY_ASARRAY)){var n,r=Ft(e.SupplementalProperty_asArray);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.hasOwnProperty(a.Z.SCHEME_ID_URI)&&(t[i[a.Z.SCHEME_ID_URI]]=Ot({},i))}}catch(e){r.e(e)}finally{r.f()}}return t},getSupplementalPropertiesAsArrayForRepresentation:function(e){var t;return e&&e.hasOwnProperty(o.Z.SUPPLEMENTAL_PROPERTY_ASARRAY)&&e.SupplementalProperty_asArray.length?ee(t=e.SupplementalProperty_asArray).call(t,(function(e){return(new At).init(e)})):[]},setConfig:function(e){e&&(e.errHandler&&(n=e.errHandler),e.BASE64&&(r=e.BASE64))}},t=(0,m.Z)(i).getInstance().getLogger(e),e}Ut.__dashjs_factory_name="DashManifestModel";var Zt=p.Z.getSingletonFactory(Ut),Bt=n(703);function Gt(e,t){var n;if(void 0===g||null==Y(e)){if(h(e)||(n=function(e,t){if(e){var n;if("string"==typeof e)return qt(e,t);var r=v(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?q(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=j(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function qt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yt(){var e,t,n,r,i,o,s,u,c,f,h=this.context,g=(0,l.Z)(h).getInstance(),p=(0,we.Z)(h).getInstance();function m(){n={pr:1,nor:null,st:null,sf:null,sid:"".concat(Bt.Z.generateUuid()),cid:null},c={},u={},f={},y()}function v(){y()}function y(){if(o){var e=o.getStreamController();if(e&&"function"==typeof e.getActiveStream){var t=e.getActiveStream();t&&(s=t.getProcessors())}}}function T(e,t){var n,r={},i=Gt(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;e[a]&&(r[a]=e[a])}}catch(e){i.e(e)}finally{i.f()}return r}function S(e){var t=p.get().streaming.cmcd.enabledKeys;return w(e).call(e,(function(e){return ne(t).call(t,e)}))}function A(e){try{return e.type===Ne.w.MPD_TYPE?((l=I()).ot="m",l):e.type===Ne.w.MEDIA_SEGMENT_TYPE?(t=e.mediaType,f.hasOwnProperty(t)||(f[t]=!1),u.hasOwnProperty(t)||(u[t]=!1),c.hasOwnProperty(t)||(c[t]=!1),function(e){var t,l=I(),d=function(e){try{var t=e.quality,n=e.mediaInfo.bitrateList;return _(n[t].bandwidth/1e3)}catch(e){return null}}(e),h=function(e){try{return isNaN(e.duration)?NaN:Math.round(1e3*e.duration)}catch(e){return null}}(e),g=function(e){try{return 100*_(r.getThroughputHistory().getSafeAverageThroughput(e)/100)}catch(e){return null}}(e.mediaType),m=function(e){try{var t=n.pr,r=i.getCurrentBufferLevel(e);return isNaN(t)||isNaN(r)?null:100*_(r/t*10)}catch(e){return null}}(e.mediaType),v=R(e.mediaType),y=function(e){try{var t=r.getTopBitrateInfoFor(e);return Math.round(t.bitrate/1e3)}catch(e){return null}}(e.mediaType),E=n.pr,T=function(e){if(s&&0!==s.length){var t,n=Gt(s);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.getType()===e)return r.probeNextRequest()}}catch(e){n.e(e)}finally{n.f()}}}(e.mediaType);e.mediaType===a.Z.VIDEO&&(t="v"),e.mediaType===a.Z.AUDIO&&(t="a"),e.mediaType===a.Z.TEXT&&(t="application/mp4"===e.mediaInfo.mimeType?"tt":"c");var b=p.get().streaming.cmcd.rtp;return b||(b=function(e){try{var t=o.getPlaybackRate();t||(t=1);var n=e.quality,r=e.mediaType,i=e.mediaInfo,a=e.duration;if(!i)return NaN;var s=R(r);0===s&&(s=500);var l=i.bitrateList[n].bandwidth*a/1e3/(s/t/1e3),u=p.get().streaming.cmcd.rtpSafetyFactor&&!isNaN(p.get().streaming.cmcd.rtpSafetyFactor)?p.get().streaming.cmcd.rtpSafetyFactor:5;return 100*(_(l*u/100)+1)}catch(e){return NaN}}(e)),isNaN(b)||(l.rtp=b),T&&(e.url!==T.url?l.nor=encodeURIComponent(Bt.Z.getRelativeUrl(e.url,T.url)):T.range&&(l.nrr=T.range)),d&&(l.br=d),t&&(l.ot=t),isNaN(h)||(l.d=h),isNaN(g)||(l.mtp=g),isNaN(m)||(l.dl=m),isNaN(v)||(l.bl=v),isNaN(y)||(l.tb=y),isNaN(E)||1===E||(l.pr=E),c[e.mediaType]&&(l.bs=!0,c[e.mediaType]=!1),!u[e.mediaType]&&f[e.mediaType]||(l.su=!0,u[e.mediaType]=!1,f[e.mediaType]=!0),l}(e)):e.type===Ne.w.INIT_SEGMENT_TYPE?function(){var e=I();return e.ot="i",e.su=!0,e}():e.type===Ne.w.OTHER_TYPE||e.type===Ne.w.XLINK_EXPANSION_TYPE?function(){var e=I();return e.ot="o",e}():e.type===Ne.w.LICENSE?function(e){var t=I();return t.ot="k",t}():null}catch(e){return null}var t,l}function I(){var e={},t=p.get().streaming.cmcd.cid?p.get().streaming.cmcd.cid:n.cid;return e.v=1,e.sid=p.get().streaming.cmcd.sid?p.get().streaming.cmcd.sid:n.sid,e.sid="".concat(e.sid),t&&(e.cid="".concat(t)),isNaN(n.pr)||1===n.pr||null===n.pr||(e.pr=n.pr),n.st&&(e.st=n.st),n.sf&&(e.sf=n.sf),e}function R(e){try{var t=i.getCurrentBufferLevel(e);return isNaN(t)?null:100*_(10*t)}catch(e){return null}}function N(e){try{n.pr=e.playbackRate}catch(e){}}function C(t){try{var r=e.getIsDynamic(t.data)?"l":"v",i=t.protocol&&"MSS"===t.protocol?"s":"d";n.st="".concat(r),n.sf="".concat(i)}catch(e){}}function D(e){try{e.state&&e.mediaType&&e.state===E.Z.BUFFER_EMPTY&&(c[e.mediaType]||(c[e.mediaType]=!0),u[e.mediaType]||(u[e.mediaType]=!0))}catch(e){}}function M(){for(var e in c)c.hasOwnProperty(e)&&(c[e]=!0);for(var t in u)u.hasOwnProperty(t)&&(u[t]=!0)}function L(e){try{var t;if(!e)return null;var n=Z(t=z(e)).call(t,(function(e,t){return e.localeCompare(t)})),r=n.length,i=K(n).call(n,(function(t,n,i){var a,o;return"v"===n&&1===e[n]||("string"==typeof e[n]&&"ot"!==n&&"sf"!==n&&"st"!==n?t+=d(a="".concat(n,"=")).call(a,b(e[n])):t+=d(o="".concat(n,"=")).call(o,e[n]),i<r-1&&(t+=",")),t}),"");return(i=i.replace(/=true/g,"")).replace(/,\s*$/,"")}catch(e){return null}}return t={getQueryParameter:function(e){try{if(p.get().streaming.cmcd&&p.get().streaming.cmcd.enabled){var t=A(e),n=function(e){try{var t,n,r=p.get().streaming.cmcd.enabledKeys;return K(t=w(n=z(e)).call(n,(function(e){return ne(r).call(r,e)}))).call(t,(function(t,n){return t[n]=e[n],t}),{})}catch(r){return e}}(t),r=L(n);return g.trigger(ft.Z.CMCD_DATA_GENERATED,{url:e.url,mediaType:e.mediaType,cmcdData:t,cmcdString:r}),{key:"CMCD",value:r}}return null}catch(e){return null}},getHeaderParameters:function(e){try{if(p.get().streaming.cmcd&&p.get().streaming.cmcd.enabled){var t=A(e),n=T(t,S(["br","d","ot","tb"])),r=T(t,S(["bl","dl","mtp","nor","nrr","su"])),i=T(t,S(["bs","rtp"])),a=T(t,S(["cid","pr","sf","sid","st","v"])),o={"CMCD-Object":L(n),"CMCD-Request":L(r),"CMCD-Status":L(i),"CMCD-Session":L(a)};return g.trigger(ft.Z.CMCD_DATA_GENERATED,{url:e.url,mediaType:e.mediaType,cmcdData:t,headers:o}),o}return null}catch(e){return null}},setConfig:function(e){e&&(e.abrController&&(r=e.abrController),e.dashMetrics&&(i=e.dashMetrics),e.playbackController&&(o=e.playbackController))},reset:function(){g.off(E.Z.PLAYBACK_RATE_CHANGED,N,this),g.off(E.Z.MANIFEST_LOADED,C,this),g.off(E.Z.BUFFER_LEVEL_STATE_CHANGED,D,t),g.off(E.Z.PLAYBACK_SEEKED,M,t),m()},initialize:function(){g.on(E.Z.PLAYBACK_RATE_CHANGED,N,t),g.on(E.Z.MANIFEST_LOADED,C,t),g.on(E.Z.BUFFER_LEVEL_STATE_CHANGED,D,t),g.on(E.Z.PLAYBACK_SEEKED,M,t),g.on(E.Z.PERIOD_SWITCH_COMPLETED,v,t)}},e=Zt(h).getInstance(),m(),t}Yt.__dashjs_factory_name="CmcdModel";var jt=p.Z.getSingletonFactory(Yt);function Ht(e){return Ht="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},Ht(e)}function Vt(e,t){Vt=function(e,t){return new a(e,void 0,t)};var n=zt(RegExp),r=RegExp.prototype,i=new re;function a(e,t,r){var a=n.call(this,e,t);return i.set(a,r||i.get(e)),a}function o(e,t){var n,r=i.get(t);return K(n=z(r)).call(n,(function(t,n){return t[n]=e[r[n]],t}),O(null))}return Kt(a,n),a.prototype.exec=function(e){var t=r.exec.call(this,e);return t&&(t.groups=o(t,this)),t},a.prototype[ie]=function(e,t){if("string"==typeof t){var n=i.get(this);return r[ie].call(this,e,t.replace(/\$<([^>]+)>/g,(function(e,t){return"$"+n[t]})))}if("function"==typeof t){var a=this;return r[ie].call(this,e,(function(){var e=[];return e.push.apply(e,arguments),"object"!==Ht(e[e.length-1])&&e.push(o(e,a)),t.apply(this,e)}))}return r[ie].call(this,e,t)},Vt.apply(this,arguments)}function Kt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=O(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qt(e,t)}function zt(e){var t="function"==typeof ae?new ae:void 0;return zt=function(e){var n,r;if(null===e||(r=e,-1===y(n=Function.toString.call(r)).call(n,"[native code]")))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return Wt(e,arguments,$t(this).constructor)}return i.prototype=O(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Qt(i,e)},zt(e)}function Wt(e,t,n){return Wt=Xt()?P:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(A(Function).apply(e,r));return n&&Qt(i,n.prototype),i},Wt.apply(null,arguments)}function Xt(){if("undefined"==typeof Reflect||!P)return!1;if(P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Qt(e,t){return Qt=M||function(e,t){return e.__proto__=t,e},Qt(e,t)}function $t(e){return $t=M?L:function(e){return e.__proto__||L(e)},$t(e)}var Jt="static",en="dynamic",tn="cmsd-",nn=tn+Jt,rn=tn+en,an="stream",on=["mb","st","sf","v"],sn={video:"v",audio:"a",text:"tt",stream:an},ln=/^[-0-9]/;function un(){var e,t,n,r,i=this.context,a=(0,l.Z)(i).getInstance();function o(){n={},r={}}function s(e){var t;e&&I(t=z(e)).call(t,(function(t){ne(on).call(on,t)||delete e[t]}))}function c(e){return!e||"false"!==e.toLowerCase()&&(ln.test(e)?_(e,10):e.replace(/["]+/g,""))}function f(e){try{for(var n={},r=e.split(","),i=0;i<r.length;i++){var a=r[i].split("="),o=a[0],s=c(a[1]);n[o]=s}return n}catch(e){t.error("Failed to parse CMSD-Static response header value:",e)}}function d(e){try{for(var n={},r=e.split(","),i=r[r.length-1].split(";"),a=1;a<i.length;a++){var o=i[a].split("="),s=o[0],l=c(o[1]);n[s]=l}return n}catch(e){return t.error("Failed to parse CMSD-Dynamic response header value:",e),[]}}function h(e){return sn[e]||"o"}function g(e,t,i){var a=e===Jt?n:r,o=a[t]||{},s=a[an]||{};return o[i]||s[i]}return e={setConfig:function(){},initialize:function(){},reset:function(){o()},parseResponseHeaders:function(e,t){for(var i=null,o=null,l=e.split("\r\n"),c=l.length-1;c>=0;c--){var g=l[c].match(Vt(/^((?:(?!:)[\s\S])*):[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(.*)$/,{key:1,value:2}));if(g&&g.groups){var p=g.groups.key.toLowerCase(),m=g.groups.value;switch(p){case nn:i=f(m),a.trigger(u.Z.CMSD_STATIC_HEADER,i);break;case rn:o||(o=d(m))}}}var v=an;return i&&i.ot?v=i.ot:t&&(v=h(t)),s(n[v]),s(r[v]),i&&(n[v]=oe(n[v]||{},i)),o&&(r[v]=oe(r[v]||{},o)),{static:i,dynamic:o}},getMaxBitrate:function(e){var t=h(e);return g(en,t,"mb")||-1},getEstimatedThroughput:function(e){var t=h(e);return g(en,t,"etp")||null},getResponseDelay:function(e){var t=h(e);return g(en,t,"rd")||null},getRoundTripTime:function(e){var t=h(e);return g(en,t,"rtt")||null}},t=(0,m.Z)(i).getInstance().getLogger(e),o(),e}un.__dashjs_factory_name="CmsdModel";var cn=p.Z.getSingletonFactory(un);function fn(){var e,t,n=this.context,r={};function i(){t=(0,m.Z)(n).getInstance().getLogger(e)}function a(e){for(var t={},n=0,r=0,i=0,a=0,o=e.length,s=0;s<o;++s)n+=e[s].chunkDownloadTimeRelativeMS,r+=e[s].bufferLevel,i+=e[s].chunkDownloadTimeRelativeMS*e[s].bufferLevel,a+=e[s].chunkDownloadTimeRelativeMS*e[s].chunkDownloadTimeRelativeMS;return t.m=(i-n*r/o)/(a-n*n/o),t.b=r/o-t.m*n/o,function(e){return t.m*e+t.b}}function o(e){var t,n=!0,r=K(e).call(e,(function(e,t){return e+t.bufferLevelAtSegmentEnd}),0)/e.length;return I(e).call(e,(function(e){Math.abs(e.bufferLevelAtSegmentEnd/e.bufferLevelAtSegmentStart)<.95&&(n=!1),e.bufferLevelAtSegmentEnd/r<.8&&(n=!1),t?t>e.bitrate&&(n=!1):t=e.bitrate})),n}return e={setup:i,addMeasurement:function(e,t,n,i,o){var s;e&&e.mediaType&&!r[e.mediaType]&&(r[e.mediaType]=[]);var l=B(s=e.mediaInfo.bitrateList).call(s,(function(t){return t.id===e.representationId}));r[e.mediaType].push({index:e.index,repId:e.representationId,mediaType:e.mediaType,requestTimeMS:i,adjustedAvailabilityStartTimeMS:e.availabilityStartTime.getTime(),segDurationMS:1e3*e.duration,chunksDurationMS:K(n).call(n,(function(e,t){return e+t.chunkDownloadDurationMS}),0),segmentBytes:K(n).call(n,(function(e,t){return e+t.chunkBytes}),0),bitrate:l&&l.bandwidth,bitrateList:e.mediaInfo.bitrateList,chunkMeasurements:n,fetchDownloadDurationMS:t,throughputCapacityDelayMS:o,getEstimatedBufferLevel:a(v(n).call(n,1))}),r[e.mediaType].length>10&&r[e.mediaType].shift()},getThroughputCapacityDelayMS:function(e,t){var n,i=r[e.mediaType]&&v(n=r[e.mediaType]).call(n,-3);return!i||i.length<3?0:o(i)?t/4>250?250:t/4:0},getEstimatedDownloadDurationMS:function(e){var n,i,a,s,l=v(n=r[e.mediaType]).call(n,-1).pop(),u=v(i=r[e.mediaType]).call(i,-3),c=v(a=l.chunkMeasurements).call(a,-1).pop().chunkDownloadTimeRelativeMS;l.bufferLevelAtSegmentStart=l.getEstimatedBufferLevel(c/2),l.bufferLevelAtSegmentEnd=l.getEstimatedBufferLevel(c);var f=o(u),d=f?.6:.8;if(l.isBufferStable&&1.05*l.segDurationMS<l.fetchDownloadDurationMS)return l.fetchDownloadDurationMS;if(!f||l.segDurationMS<l.fetchDownloadDurationMS)return.8*l.fetchDownloadDurationMS;if(l.adjustedAvailabilityStartTimeMS<=l.requestTimeMS+l.throughputCapacityDelayMS-l.segDurationMS)return.8*l.fetchDownloadDurationMS;for(var h=l.requestTimeMS+l.throughputCapacityDelayMS-l.adjustedAvailabilityStartTimeMS,g=0,p=0,m=0,y=0;y<l.chunkMeasurements.length;y++){var E=l.chunkMeasurements[y];if(h<p+E.chunkDownloadDurationMS)break;p+=E.chunkDownloadDurationMS,g+=E.chunkBytes,m++}if(h<0&&t.warn("request time was before adjusted availibitly start time"),g&&p&&m>.2*l.chunkMeasurements.length){var _=g/p,T=l.segmentBytes/_;return l.fetchDownloadDurationMS<T?l.fetchDownloadDurationMS*d:T*d}var b=l.bitrate;return R(s=l.bitrateList).call(s,(function(e){if(e.bandwidth>l.bitrate)return b=e.bandwidth,!0})),b===l.bitrate?l.fetchDownloadDurationMS*d:d*l.segmentBytes*8*1e3/b}},i(),e}fn.__dashjs_factory_name="LowLatencyThroughputModel";var dn=p.Z.getSingletonFactory(fn),hn=n(5717);function gn(e,t,n){return t in e?C(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pn(e){e=e||{};var t,n,r,i,o,s,c,d,h,g,p,v=this.context,E=e.errHandler,_=e.dashMetrics,T=e.mediaPlayerModel,b=e.requestModifier,A=e.boxParser,R=e.errors,w=e.requestTimeout||0,N=(0,l.Z)(v).getInstance(),C=(0,we.Z)(v).getInstance();function D(e,t){var l,p=e.request,m=[],I=!0,R=!0,M=new Date,L=M,O=0,P=null,F=null;if(!b||!_||!E)throw new Error("config object is not correct or missing");var x,k=function(e){p.requestStartDate=M,p.requestEndDate=new Date,p.firstByteDate=p.firstByteDate||M,p.fileLoaderType=F;var t=l.response?l.response.responseURL:null,n=l.response?l.response.status:null,r=l.response&&l.response.getAllResponseHeaders?l.response.getAllResponseHeaders():l.response?l.response.responseHeaders:null,i=r&&C.get().streaming.cmsd&&C.get().streaming.cmsd.enabled?c.parseResponseHeaders(r,p.mediaType):null;_.addHttpRequest(p,t,n,r,e?m:null,i)},U=function(e){R=!1,k(e),p.type===Ne.w.MPD_TYPE&&(_.addManifestUpdate(p),N.trigger(u.Z.MANIFEST_LOADING_FINISHED,{request:p}))},Z=function(){if(P&&(clearTimeout(P),P=null),-1!==y(n).call(n,l)&&(S(n).call(n,y(n).call(n,l),1),R))if(U(!1),t>0){try{C.get().streaming.utcSynchronization.enableBackgroundSyncAfterSegmentDownloadError&&p.type===Ne.w.MEDIA_SEGMENT_TYPE&&T.getRetryAttemptsForType(Ne.w.MEDIA_SEGMENT_TYPE)===t&&N.trigger(u.Z.ATTEMPT_BACKGROUND_SYNC)}catch(e){}t--;var r={config:e};i.push(r),r.timeout=f((function(){-1!==y(i).call(i,r)&&(S(i).call(i,y(i).call(i,r),1),D(e,t))}),T.getRetryIntervalsForType(p.type))}else{if(p.type===Ne.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE)return;E.error(new Te.Z(o[p.type],p.url+" is not available",{request:p,response:l.response})),e.error&&e.error(p,"error",l.response.statusText,l.response),e.complete&&e.complete(p,l.response.statusText)}};p.hasOwnProperty("availabilityTimeComplete")&&!1===p.availabilityTimeComplete&&window.fetch&&"arraybuffer"===p.responseType&&p.type===Ne.w.MEDIA_SEGMENT_TYPE?((x=ct(v).create({requestModifier:b,lowLatencyThroughputModel:h,boxParser:A})).setup({dashMetrics:_}),F=a.Z.FILE_LOADER_TYPES.FETCH):(x=(0,ot.Z)(v).create({requestModifier:b}),F=a.Z.FILE_LOADER_TYPES.XHR);var B=null,G=b.modifyRequestURL?b.modifyRequestURL(p.url):p.url;if(C.get().streaming.cmcd&&C.get().streaming.cmcd.enabled){var q=C.get().streaming.cmcd.mode;if(q===a.Z.CMCD_MODE_QUERY){var Y=function(e){try{var t=[],n=s.getQueryParameter(e);return n&&t.push(n),t}catch(e){return[]}}(p);G=Bt.Z.addAditionalQueryParameterToUrl(G,Y)}else q===a.Z.CMCD_MODE_HEADER&&(B=s.getHeaderParameters(p))}var j=d.getXHRWithCredentialsForType(p.type);if(p.queryParams){var H,V=ee(H=z(p.queryParams)).call(H,(function(e){return{key:e,value:p.queryParams[e]}}));G=Bt.Z.addAditionalQueryParameterToUrl(G,V)}p.url=G,l={url:G,method:Ne.w.GET,withCredentials:j,request:p,onload:function(){l.response.status>=200&&l.response.status<=299&&(U(!0),e.success&&e.success(l.response.response,l.response.statusText,l.response.responseURL),e.complete&&e.complete(p,l.response.statusText))},onend:Z,onerror:Z,progress:function(t){var n=new Date;I&&(I=!1,(!t.lengthComputable||t.lengthComputable&&t.total!==t.loaded)&&(p.firstByteDate=n)),t.lengthComputable&&(p.bytesLoaded=t.loaded,p.bytesTotal=t.total),t.noTrace||(m.push({s:L,d:t.time?t.time:n.getTime()-L.getTime(),b:[t.loaded?t.loaded-O:0]}),L=n,O=t.loaded),P&&(clearTimeout(P),P=null),C.get().streaming.fragmentRequestProgressTimeout>0&&(P=f((function(){g.warn("Abort request "+l.url+" due to progress timeout"),l.response.onabort=null,l.loader.abort(l),Z()}),C.get().streaming.fragmentRequestProgressTimeout)),e.progress&&t&&e.progress(t)},onabort:function(){k(!0),P&&(clearTimeout(P),P=null),e.abort&&e.abort(p)},ontimeout:function(e){var t;if(e.lengthComputable){var n=e.loaded/e.total*100;t="Request timeout: loaded: "+e.loaded+", out of: "+e.total+" : "+n.toFixed(3)+"% Completed"}else t="Request timeout: non-computable download size";g.warn(t)},loader:x,timeout:w,headers:B};var K=(new Date).getTime();if(isNaN(p.delayLoadingTime)||K>=p.delayLoadingTime)n.push(l),x.load(l);else{var W={httpRequest:l};r.push(W),W.delayTimeout=f((function(){if(-1!==y(r).call(r,W)){S(r).call(r,y(r).call(r,W),1);try{M=new Date,L=M,n.push(W.httpRequest),x.load(W.httpRequest)}catch(e){W.httpRequest.onerror()}}}),p.delayLoadingTime-K)}}return t={load:function(e){e.request?D(e,T.getRetryAttemptsForType(e.request.type)):e.error&&e.error(e.request,"error")},abort:function(){I(i).call(i,(function(e){clearTimeout(e.timeout),e.config.request&&e.config.abort&&e.config.abort(e.config.request)})),i=[],I(r).call(r,(function(e){return clearTimeout(e.delayTimeout)})),r=[],I(n).call(n,(function(e){e.request.type!==Ne.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE&&(e.onloadend=e.onerror=e.onprogress=void 0,e.loader.abort(e))})),n=[]}},g=(0,m.Z)(v).getInstance().getLogger(t),n=[],r=[],i=[],s=jt(v).getInstance(),c=cn(v).getInstance(),h=dn(v).getInstance(),d=(0,hn.Z)(v).getInstance(),gn(p={},Ne.w.MPD_TYPE,R.DOWNLOAD_ERROR_ID_MANIFEST_CODE),gn(p,Ne.w.XLINK_EXPANSION_TYPE,R.DOWNLOAD_ERROR_ID_XLINK_CODE),gn(p,Ne.w.INIT_SEGMENT_TYPE,R.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE),gn(p,Ne.w.MEDIA_SEGMENT_TYPE,R.DOWNLOAD_ERROR_ID_CONTENT_CODE),gn(p,Ne.w.INDEX_SEGMENT_TYPE,R.DOWNLOAD_ERROR_ID_CONTENT_CODE),gn(p,Ne.w.BITSTREAM_SWITCHING_SEGMENT_TYPE,R.DOWNLOAD_ERROR_ID_CONTENT_CODE),gn(p,Ne.w.OTHER_TYPE,R.DOWNLOAD_ERROR_ID_CONTENT_CODE),o=p,t}pn.__dashjs_factory_name="HTTPLoader";var mn=p.Z.getClassFactory(pn);function vn(){var e;function t(){e={}}function n(){t()}return n(),{getLoader:function(t){for(var n in e)if(e.hasOwnProperty(n)&&se(t).call(t,n))return e[n];return mn},registerLoader:function(t,n){e[t]=n},unregisterLoader:function(t){e[t]&&delete e[t]},unregisterAllLoader:t,reset:n}}vn.__dashjs_factory_name="SchemeLoaderFactory";var yn=p.Z.getSingletonFactory(vn);function En(e){e=e||{};var t,n,r=this.context;return t=yn(r).getInstance(),{load:function(i){if(!n){var a=t.getLoader(i&&i.request?i.request.url:null);n=a(r).create({errHandler:e.errHandler,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,dashMetrics:e.dashMetrics,boxParser:e.boxParser?e.boxParser:null,constants:e.constants?e.constants:null,dashConstants:e.dashConstants?e.dashConstants:null,urlUtils:e.urlUtils?e.urlUtils:null,requestTimeout:isNaN(e.requestTimeout)?0:e.requestTimeout,errors:e.errors})}n.load(i)},abort:function(){n&&n.abort()}}}En.__dashjs_factory_name="URLLoader";var _n=p.Z.getClassFactory(En);function Tn(e){return Tn="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},Tn(e)}function bn(e,t){return bn=M||function(e,t){return e.__proto__=t,e},bn(e,t)}function Sn(e,t){return!t||"object"!==Tn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function An(e){return An=M?L:function(e){return e.__proto__||L(e)},An(e)}var In=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=O(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bn(e,t)}(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!P)return!1;if(P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=An(t);if(n){var i=An(this).constructor;e=P(r,arguments,i)}else e=r.apply(this,arguments);return Sn(this,e)});function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=r.call(this,e)).checkForExistenceOnly=!0,t}return i}(ge.Z);function Rn(e){e=e||{};var t,n,r=this.context,i=e.eventBus,o=e.events,s=e.urlUtils,l=e.errors,u=e.streamId;return t={checkForExistence:function(e){var t=function(t){i.trigger(o.CHECK_FOR_EXISTENCE_COMPLETED,{request:e,exists:t})};if(e){var r=new In(e.url);n.load({request:r,success:function(){t(!0)},error:function(){t(!1)}})}else t(!1)},load:function(e){var r=function(n,r){i.trigger(o.LOADING_COMPLETED,{request:e,response:n||null,error:r||null,sender:t})};e?n.load({request:e,progress:function(n){i.trigger(o.LOADING_PROGRESS,{request:e,stream:n.stream,streamId:u}),n.data&&i.trigger(o.LOADING_DATA_PROGRESS,{request:e,response:n.data||null,error:null,sender:t})},success:function(e){r(e)},error:function(e,t,n){r(void 0,new Te.Z(l.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE,n,t))},abort:function(e){e&&i.trigger(o.LOADING_ABANDONED,{mediaType:e.mediaType,request:e,sender:t})}}):r(void 0,new Te.Z(l.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE,l.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE))},abort:function(){n&&n.abort()},reset:function(){n&&(n.abort(),n=null)}},n=_n(r).create({errHandler:e.errHandler,errors:l,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,urlUtils:s,constants:a.Z,boxParser:e.boxParser,dashConstants:e.dashConstants,requestTimeout:e.settings.get().streaming.fragmentRequestTimeout}),t}Rn.__dashjs_factory_name="FragmentLoader";var wn=p.Z.getClassFactory(Rn);function Nn(){return{modifyResponseAsync:function(e){return F.resolve(e)}}}Nn.__dashjs_factory_name="SegmentResponseModifier";var Cn=p.Z.getSingletonFactory(Nn);function Dn(e){e=e||{};var t,n,r,i=this.context,o=(0,l.Z)(i).getInstance(),s=e.errHandler,c=e.mediaPlayerModel,f=e.dashMetrics,d=(0,m.Z)(i).getInstance(),h=Cn(i).getInstance(),g=e.streamInfo;function p(){return g.id}function v(){for(var e in r)r[e].reset();r={}}function y(e){if(e.sender){var t=e.request,r=e.response,i=t.isInitializationRequest(),s=t.mediaInfo.streamInfo;if(e.error&&(t.mediaType===a.Z.AUDIO||t.mediaType===a.Z.VIDEO||t.mediaType===a.Z.TEXT&&t.mediaInfo.isFragmented)&&o.trigger(u.Z.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD,{entry:e.request.serviceLocation}),r&&s){var l=function(e,t,n,r){var i=new at;return i.streamId=n,i.mediaInfo=t.mediaInfo,i.segmentType=t.type,i.start=t.startTime,i.duration=t.duration,i.end=i.start+i.duration,i.bytes=e,i.index=t.index,i.quality=t.quality,i.representationId=t.representationId,i.endFragment=r,i}(r,t,g.id,e.type!==u.Z.FRAGMENT_LOADING_PROGRESS);h.modifyResponseAsync(l).then((function(e){o.trigger(i?u.Z.INIT_FRAGMENT_LOADED:u.Z.MEDIA_FRAGMENT_LOADED,{chunk:e,request:t},{streamId:s.id,mediaType:t.mediaType})})).catch((function(e){n.error(e),o.trigger(i?u.Z.INIT_FRAGMENT_LOADED:u.Z.MEDIA_FRAGMENT_LOADED,{chunk:l,request:t},{streamId:s.id,mediaType:t.mediaType})}))}else n.warn("No "+t.mediaType+" bytes to push or stream is inactive.")}}return t={getStreamId:p,getModel:function(t){var n=r[t];return n||(n=_e(i).create({streamInfo:g,type:t,dashMetrics:f,fragmentLoader:wn(i).create({dashMetrics:f,mediaPlayerModel:c,errHandler:s,requestModifier:(0,We.Z)(i).getInstance(),settings:e.settings,boxParser:e.boxParser,eventBus:o,events:u.Z,errors:Re,dashConstants:e.dashConstants,urlUtils:e.urlUtils,streamId:p()}),debug:d,eventBus:o,events:u.Z}),r[t]=n),n},reset:function(){o.off(E.Z.FRAGMENT_LOADING_COMPLETED,y,this),o.off(E.Z.FRAGMENT_LOADING_PROGRESS,y,this),v()}},n=d.getLogger(t),v(),o.on(E.Z.FRAGMENT_LOADING_COMPLETED,y,t),o.on(E.Z.FRAGMENT_LOADING_PROGRESS,y,t),t}Dn.__dashjs_factory_name="FragmentController";var Mn=p.Z.getClassFactory(Dn),Ln=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=null,this.width=null,this.height=null,this.x=null,this.y=null},On=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mediaType=null,this.bitrate=null,this.width=null,this.height=null,this.scanType=null,this.qualityIndex=NaN};function Pn(e){var t,n,r=this.context,i=e.streamInfo;function o(e){n.setTrackByIndex(e)}function s(){n&&n.reset()}return t={getStreamId:function(){return i.id},initialize:function(){n.addTracks();var e=n.getTracks();e&&e.length>0&&o(0)},provide:function(e,t){if("function"==typeof t){var r,i,a=n.getCurrentTrack();if(!a||a.segmentDuration<=0||null==e)t(null);else{(i=n.getThumbnailRequestForTime(e))&&(a.segmentDuration=i.duration),r=e%a.segmentDuration;var o=Math.floor(r*a.tilesHor*a.tilesVert/a.segmentDuration),s=new Ln;if(s.width=Math.floor(a.widthPerTile),s.height=Math.floor(a.heightPerTile),s.x=Math.floor(o%a.tilesHor)*a.widthPerTile,s.y=Math.floor(o/a.tilesHor)*a.heightPerTile,"readThumbnail"in a)return a.readThumbnail(e,(function(e){s.url=e,t(s)}));if(i)s.url=i.url,a.segmentDuration=NaN;else{var l=Math.floor(e/a.segmentDuration);s.url=function(e,t){var n=t+e.startNumber,r=(0,je.vi)(e.templateUrl,"Number",n);return r=(0,je.vi)(r,"Time",(n-1)*e.segmentDuration*e.timescale),r=(0,je.vi)(r,"Bandwidth",e.bandwidth),(0,je.eR)(r)}(a,l)}t(s)}}},setTrackByIndex:o,getCurrentTrackIndex:function(){return n.getCurrentTrackIndex()},getBitrateList:function(){var e=n.getTracks(),t=0;return ee(e).call(e,(function(e){var n=new On;return n.mediaType=a.Z.IMAGE,n.qualityIndex=t++,n.bitrate=e.bitrate,n.width=e.width,n.height=e.height,n}))},reset:s},s(),n=(0,Ct.Z)(r).create({streamInfo:i,adapter:e.adapter,baseURLController:e.baseURLController,timelineConverter:e.timelineConverter,debug:e.debug,eventBus:e.eventBus,events:e.events,dashConstants:e.dashConstants,dashMetrics:e.dashMetrics,segmentBaseController:e.segmentBaseController}),t}Pn.__dashjs_factory_name="ThumbnailController";var Fn=p.Z.getClassFactory(Pn),xn=n(7417);function kn(e){var t;e=e||{};var n=[],r=(0,l.Z)(this.context).getInstance(),i=e.updateEventName,a=e.addBlacklistEventName;function o(e){-1===y(n).call(n,e)&&(n.push(e),r.trigger(i,{entry:e}))}return t={add:o,contains:function(e){return!!(n.length&&e&&e.length)&&-1!==y(n).call(n,e)},reset:function(){n=[]}},a&&r.on(a,(function(e){o(e.entry)}),t),t}kn.__dashjs_factory_name="BlackListController";var Un=p.Z.getClassFactory(kn),Zn=[a.Z.VIDEO,a.Z.AUDIO,a.Z.TEXT,a.Z.MUXED,a.Z.IMAGE];function Bn(e){e=e||{};var t,n,r,i,s,c,f,d,h,g,p,v,E,_,T,b,A,N,C=this.context,D=(0,l.Z)(C).getInstance(),M=(0,Xe.Z)(C).getInstance(),L=e.manifestModel,O=e.mediaPlayerModel,P=e.dashMetrics,x=e.manifestUpdater,k=e.adapter,U=e.timelineConverter,Z=e.capabilities,B=e.errHandler,G=e.abrController,q=e.playbackController,Y=e.eventController,j=e.mediaController,H=e.protectionController,V=e.textController,K=e.videoModel,z=e.streamInfo,W=e.settings;function X(e,t){return new F((function(i,o){oe(),g=!0,le();var s=K.getElement(),l=[];I(Zn).call(Zn,(function(t){(t!==a.Z.TEXT||e)&&(t!==a.Z.VIDEO||!s||s&&/^VIDEO$/i.test(s.nodeName))&&l.push(Q(t,e))})),F.all(l).then((function(){return e=t,new F((function(t){var n={},i=ee(r).call(r,(function(t){return t.createBufferSinks(e)}));F.all(i).then((function(e){I(e).call(e,(function(e){e&&(n[e.getType()]=e)})),t(n)})).catch((function(){t(n)}))}));var e})).then((function(t){if(g=!1,0===r.length){var a="No streams to play.";B.error(new Te.Z(Re.MANIFEST_ERROR_ID_NOSTREAMS_CODE,a,L.getValue())),n.fatal(a)}else ue();e&&V.createTracks(z),i(t)})).catch((function(e){o(e)}))}))}function Q(t,i){var s,l=k.getAllMediaInfoForType(z,t),c=[],h=null;if(!l||0===l.length)return n.info("No "+t+" data."),F.resolve();t===a.Z.VIDEO&&(f=!0),t===a.Z.AUDIO&&(d=!0);for(var g=0,m=l.length;g<m;g++)h=l[g],t===a.Z.TEXT&&h.isEmbedded&&(V.addEmbeddedTrack(z,h),c.push(h)),$(h)&&j.addTrack(h);if(c.length>0&&(j.setInitialMediaSettingsForType(t,z),V.addMediaInfosToBuffer(z,t,c)),l=w(l).call(l,(function(e){return!e.isEmbedded})),0===l.length)return F.resolve();if(t===a.Z.IMAGE)return(v=Fn(C).create({streamInfo:z,adapter:k,baseURLController:e.baseURLController,timelineConverter:e.timelineConverter,debug:b,eventBus:D,events:u.Z,dashConstants:o.Z,dashMetrics:e.dashMetrics,segmentBaseController:e.segmentBaseController})).initialize(),F.resolve();D.trigger(u.Z.STREAM_INITIALIZING,{streamInfo:z,mediaInfo:h}),j.setInitialMediaSettingsForType(t,z);var y=function(t,n){var i=t&&t.length>0?t[0]:null,o=p.getModel(i?i.type:null),s=i?i.type:null,l=i?i.mimeType:null,u=i?i.isFragmented:null,c=it(C).create({streamInfo:z,type:s,mimeType:l,timelineConverter:U,adapter:k,manifestModel:L,mediaPlayerModel:O,fragmentModel:o,dashMetrics:e.dashMetrics,baseURLController:e.baseURLController,segmentBaseController:e.segmentBaseController,abrController:G,playbackController:q,mediaController:j,textController:V,errHandler:B,settings:W,boxParser:T,segmentBlacklistController:E});c.initialize(n,f,u),r.push(c);for(var d=0;d<t.length;d++)c.addMediaInfo(t[d]);return s===a.Z.TEXT&&V.addMediaInfosToBuffer(z,s,t,o),c}(l,i);return(s=j.getCurrentTrackFor(t,z.id))?(G.updateTopQualityIndex(s),y.selectMediaInfo(t===a.Z.TEXT&&s.isEmbedded?l[0]:s)):F.resolve()}function $(e){var t,r=e?e.type:null;return r===a.Z.MUXED?(t="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",n.fatal(t),B.error(new Te.Z(Re.MANIFEST_ERROR_ID_MULTIPLEXED_CODE,t,L.getValue())),!1):!(r!==a.Z.TEXT&&r!==a.Z.IMAGE&&e.contentProtection&&!Z.supportsEncryptedMedia()&&(B.error(new Te.Z(Re.CAPABILITY_MEDIAKEYS_ERROR_CODE,Re.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE)),1))}function J(e){for(var t=r?r.length:0,n=0;n<t;n++){var i=r[n].getFragmentModel();i.abortRequests(),i.resetInitialSettings(),r[n].reset(!1,e)}V&&V.deactivateStream(z),r=[],s=!1,c=!1,Ee(!1),ne(!1),D.trigger(u.Z.STREAM_DEACTIVATED,{streamInfo:z})}function te(e){J(e),i=!1,f=!1,d=!1,h={},g=!1,A=!1,N=[]}function ne(e){A=e}function re(){return z?z.start:NaN}function ie(){return z?z.id:null}function ae(){return z}function oe(){if(!K||!G)throw new Error(a.Z.MISSING_CONFIG_ERROR)}function se(e){e.error&&(B.error(e.error),n.fatal(e.error.message))}function le(){if(Y){var e=k.getEventsFor(z);e&&e.length>0&&Y.addInlineEvents(e,z.id)}}function ue(){for(var e=r.length,t=h.audio||h.video?new Te.Z(Re.DATA_UPDATE_FAILED_ERROR_CODE,Re.DATA_UPDATE_FAILED_ERROR_MESSAGE):null,n=0;n<e;n++)if(r[n].isUpdating()||g)return;if(H){H.clearMediaInfoArray();for(var o=0;o<e&&r[o];o++){var s=r[o].getType(),l=r[o].getMediaInfo();if(s===a.Z.AUDIO||s===a.Z.VIDEO||s===a.Z.TEXT&&l.isFragmented){var c=r[o].getMediaInfo();c&&H.initializeForMedia(c)}}H.handleKeySystemFromManifest()}t?B.error(t):i||(i=!0,K.waitForReadyState(a.Z.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,(function(){D.trigger(u.Z.STREAM_INITIALIZED,{streamInfo:z})})))}function ce(){var e=pe(),t=e.length;if(0!==t){for(var r=0;r<t;r++)if(!e[r].isBufferingCompleted()&&(e[r].getType()===a.Z.AUDIO||e[r].getType()===a.Z.VIDEO))return void n.debug("onBufferingCompleted - One streamProcessor has finished but",e[r].getType(),"one is not buffering completed");n.debug("onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED"),c=!0,D.trigger(u.Z.STREAM_BUFFERING_COMPLETED,{streamInfo:z},{streamInfo:z})}else n.warn("onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined")}function fe(e){h[e.mediaType]=e.error,ue()}function de(e){Y&&Y.addInbandEvents(e.events,z.id)}function he(e){return e&&e.type?ge(e.type):null}function ge(e){var t;return e?w(t=pe()).call(t,(function(t){return t.getType()===e}))[0]:null}function pe(){for(var e,t,n=[],i=0;i<r.length;i++)(e=(t=r[i]).getType())!==a.Z.AUDIO&&e!==a.Z.VIDEO&&e!==a.Z.TEXT||n.push(t);return n}function me(e,t){var n=ae(),r=t.getStreamInfo();if(!r||!n)return!0;var i=k.getAdaptationForType(r.index,e,r),a=k.getAdaptationForType(n.index,e,n);return i&&a?!(!ve(a)&&ve(i)):!i&&!a}function ve(e){return!!e&&!!(e.ContentProtection||e.Representation_asArray&&e.Representation_asArray.length>0&&e.Representation_asArray[0].ContentProtection)}function ye(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e||!e.hasOwnProperty("getStreamInfo"))return!1;var a=e.getStreamInfo(),o=i?i.getStreamInfo():ae();if(!a||!o)return!1;var s=k.getAdaptationForType(a.index,t,a),l=k.getAdaptationForType(o.index,t,o);if(!s||!l)return!s&&!l;var u=s&&l&&s.mimeType===l.mimeType,c=ee(n=l.Representation_asArray).call(n,(function(e){return e.codecs})),f=ee(r=s.Representation_asArray).call(r,(function(e){return e.codecs})),d=R(f).call(f,(function(e){return y(c).call(c,e)>-1})),h=R(f).call(f,(function(e){return R(c).call(c,(function(t){return Z.codecRootCompatibleWithCodec(t,e)}))}));return d||h&&u}function Ee(e){_=e}function _e(){return _}return t={initialize:function(){D.on(u.Z.BUFFERING_COMPLETED,ce,t),D.on(u.Z.DATA_UPDATE_COMPLETED,fe,t),D.on(u.Z.INBAND_EVENTS,de,t),H&&(D.on(u.Z.KEY_ERROR,se,t),D.on(u.Z.SERVER_CERTIFICATE_UPDATED,se,t),D.on(u.Z.LICENSE_REQUEST_COMPLETE,se,t),D.on(u.Z.KEY_SYSTEM_SELECTED,se,t),D.on(u.Z.KEY_SESSION_CREATED,se,t),D.on(u.Z.KEY_STATUSES_CHANGED,se,t)),V.initializeForStream(z),D.trigger(u.Z.STREAM_UPDATED,{streamInfo:z})},getStreamId:function(){return z?z.id:null},activate:function(e,t){return new F((function(n,r){if(!s)return _e()?(s=!0,D.trigger(u.Z.STREAM_ACTIVATED,{streamInfo:z}),void n(t)):void function(e,t){return X(e,t)}(e,t).then((function(e){s=!0,D.trigger(u.Z.STREAM_ACTIVATED,{streamInfo:z}),n(e)})).catch((function(e){r(e)}));n(t)}))},deactivate:J,getIsActive:function(){return s},getDuration:function(){return z?z.duration:NaN},getStartTime:re,getId:ie,getStreamInfo:ae,getHasAudioTrack:function(){return d},getHasVideoTrack:function(){return f},startPreloading:function(e,t){return new F((function(i,a){_e()?a():(n.info("[startPreloading] Preloading next stream with id ".concat(ie())),Ee(!0),X(e,t).then((function(){for(var e=0;e<r.length&&r[e];e++)r[e].setExplicitBufferingTime(re()),r[e].getScheduleController().startScheduleTimer();i()})).catch((function(){Ee(!1),a()})))}))},initializeForTextWithMediaSource:function(e){return new F((function(t,n){Q(a.Z.TEXT,e).then((function(){return(e=ge(a.Z.TEXT))?e.createBufferSinks():F.resolve();var e})).then((function(){V.createTracks(z),t()})).catch((function(e){n(e)}))}))},getThumbnailController:function(){return v},getBitrateListFor:function(e){if(oe(),e===a.Z.IMAGE)return v?v.getBitrateList():[];var t=function(e){for(var t=null,n=0;n<r.length;n++)if((t=r[n]).getType()===e)return t.getMediaInfo();return null}(e);return G.getBitrateList(t)},updateData:function(e){return new F((function(t){g=!0,z=e,Y&&le();for(var n=[],i=0,a=r.length;i<a;i++){var o=r[i],s=o.getMediaInfo();n.push(o.updateStreamInfo(z));var l=k.getAllMediaInfoForType(z,o.getType());if(l=w(l).call(l,(function(e){return!e.isEmbedded}))){o.clearMediaInfoArray();for(var c=0;c<l.length;c++){var f=l[c];o.addMediaInfo(l[c]),k.areMediaInfosEqual(s,f)&&(G.updateTopQualityIndex(f),n.push(o.selectMediaInfo(f)))}}}F.all(n).then((function(){for(n=[];N.length>0;){var e=N.pop(),t=e.newMediaInfo,r=he(e.oldMediaInfo);if(!r)return;n.push(r.prepareTrackSwitch()),n.push(r.selectMediaInfo(t))}return F.all(n)})).then((function(){g=!1,ue(),D.trigger(u.Z.STREAM_UPDATED,{streamInfo:z}),t()}))}))},reset:function(e){p&&(p.reset(),p=null),G&&z&&G.clearDataForStream(z.id),E&&(E.reset(),E=null),te(e),z=null,D.off(u.Z.DATA_UPDATE_COMPLETED,fe,t),D.off(u.Z.BUFFERING_COMPLETED,ce,t),D.off(u.Z.INBAND_EVENTS,de,t),H&&(D.off(u.Z.KEY_ERROR,se,t),D.off(u.Z.SERVER_CERTIFICATE_UPDATED,se,t),D.off(u.Z.LICENSE_REQUEST_COMPLETE,se,t),D.off(u.Z.KEY_SYSTEM_SELECTED,se,t),D.off(u.Z.KEY_SESSION_CREATED,se,t),D.off(u.Z.KEY_STATUSES_CHANGED,se,t))},getProcessors:pe,setMediaSource:function(e){return new F((function(t,i){for(var a=[],o=0;o<r.length;)$(r[o].getMediaInfo())?(a.push(r[o].setMediaSource(e)),o++):(r[o].reset(),S(r).call(r,o,1));F.all(a).then((function(){for(var e=0;e<r.length;e++)r[e].dischargePreBuffer();if(0===r.length){var i="No streams to play.";B.error(new Te.Z(Re.MANIFEST_ERROR_ID_NOSTREAMS_CODE,i+"nostreams",L.getValue())),n.fatal(i)}t()})).catch((function(e){n.error(e),i(e)}))}))},isMediaCodecCompatible:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return ye(e,a.Z.VIDEO,t)&&ye(e,a.Z.AUDIO,t)},isProtectionCompatible:function(e){return!e||me(a.Z.VIDEO,e)&&me(a.Z.AUDIO,e)},getPreloaded:_e,getIsEndedEventSignaled:function(){return A},setIsEndedEventSignaled:ne,getAdapter:function(){return k},getHasFinishedBuffering:function(){return c},setPreloaded:Ee,startScheduleControllers:function(){for(var e=r.length,t=0;t<e&&r[t];t++)r[t].getScheduleController().startScheduleTimer()},prepareTrackChange:function(e){if(s&&z){c=!1;var t=e.newMediaInfo,r=L.getValue();k.setCurrentMediaInfo(z.id,t.type,t);var i=he(t);if(i){var o=q.getTime();n.info("Stream - Process track changed at current time "+o),r.refreshManifestOnSwitchTrack?(N.push(e),x.getIsUpdating()||(n.debug("Stream - Refreshing manifest for switch track"),x.refreshManifest())):i.selectMediaInfo(t).then((function(){t.type!==a.Z.VIDEO&&t.type!==a.Z.AUDIO||G.updateTopQualityIndex(t),i.prepareTrackSwitch()}))}}},prepareQualityChange:function(e){var t=ge(e.mediaType);t&&t.prepareQualityChange(e)}},function(){try{b=(0,m.Z)(C).getInstance(),n=b.getLogger(t),te(),T=(0,xn.Z)(C).getInstance(),E=Un(C).create({updateEventName:u.Z.SEGMENT_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:u.Z.SEGMENT_LOCATION_BLACKLIST_ADD}),p=Mn(C).create({streamInfo:z,mediaPlayerModel:O,dashMetrics:P,errHandler:B,settings:W,boxParser:T,dashConstants:o.Z,urlUtils:M})}catch(e){throw e}}(),t}Bn.__dashjs_factory_name="Stream";var Gn=p.Z.getClassFactory(Bn),qn=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=t||null,this.type=Ne.w.CONTENT_STEERING_TYPE,this.responseType="json"},Yn=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.version=null,this.ttl=300,this.reloadUri=null,this.pathwayPriority=[],this.pathwayClones=[]};function jn(){var e,t,n,r,i,a,s,l,u,c,h,g,p,v,T,b=this.context,S=(0,Xe.Z)(b).getInstance();function A(e){L(e,"baseUrl")}function R(e){L(e,"location")}function N(e){if(e&&e.request&&e.request.serviceLocation&&e.request.requestStartDate&&e.request.requestEndDate&&!isNaN(e.request.bytesTotal)){var t=e.request.serviceLocation,n=e.request.requestEndDate.getTime()-e.request.requestStartDate.getTime();M(t,_(8*e.request.bytesTotal/n*1e3))}}function C(e){e&&e.httpRequest&&e.httpRequest._serviceLocation&&!isNaN(e.throughput)&&M(e.httpRequest._serviceLocation,1e3*e.throughput)}function M(e,t){i[e]||(i[e]=[]),i[e].push(t),i[e].length>4&&i[e].shift()}function L(e,t){if(e&&e.request&&e.request.serviceLocation){var n,i=e.request.serviceLocation;-1===y(n=r[t].all).call(n,i)&&r[t].all.push(i),r[t].current=i}}function O(){var e=h.getValue(),t=T.getContentSteering(e);return t||(t=p.getServiceDescriptionSettings().contentSteering),t}function P(){return new F((function(e){try{var a=O();if(!a||!a.serverUrl)return void e();var l=function(e,t){var a=e.serverUrl;n&&n.reloadUri&&(a=S.isRelative(n.reloadUri)?S.resolve(n.reloadUri,e.serverUrl):n.reloadUri);var o=[],s=d(t=r.baseUrl.all).call(t,r.location.all);if(s.length>0){var l=ee(s).call(s,(function(e){var t=function(e,t){if(!e||!i[e]||0===i[e].length)return-1;var n=K(t=i[e]).call(t,(function(e,t){return e+t}))/i[e].length;return _(n)}(e);return{serviceLocation:e,throughput:t}}));Z(l).call(l,(function(e,t){return t.throughput-e.throughput}));var u="",c="";I(l).call(l,(function(e,t){var n,r;0!==t&&(u="".concat(u,","),e.throughput>-1&&(c="".concat(c,","))),u=d(n="".concat(u)).call(n,e.serviceLocation),e.throughput>-1&&(c=d(r="".concat(c)).call(r,e.throughput))})),o.push({key:"_DASH_pathway",value:'"'.concat(u,'"')}),o.push({key:"_DASH_throughput",value:c})}return Bt.Z.addAditionalQueryParameterToUrl(a,o)}(a),u=new qn(l);s.load({request:u,success:function(t){!function(e,t){e&&e[o.Z.CONTENT_STEERING_RESPONSE.VERSION]&&1===_(e[o.Z.CONTENT_STEERING_RESPONSE.VERSION])&&((n=new Yn).version=e[o.Z.CONTENT_STEERING_RESPONSE.VERSION],e[o.Z.CONTENT_STEERING_RESPONSE.TTL]&&!isNaN(e[o.Z.CONTENT_STEERING_RESPONSE.TTL])&&(n.ttl=e[o.Z.CONTENT_STEERING_RESPONSE.TTL]),e[o.Z.CONTENT_STEERING_RESPONSE.RELOAD_URI]&&(n.reloadUri=e[o.Z.CONTENT_STEERING_RESPONSE.RELOAD_URI]),e[o.Z.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]&&(n.pathwayPriority=e[o.Z.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]),e[o.Z.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES]&&(n.pathwayClones=e[o.Z.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES],n.pathwayClones=w(t=n.pathwayClones).call(t,(function(e){return function(e){return e[o.Z.CONTENT_STEERING_RESPONSE.BASE_ID]&&e[o.Z.CONTENT_STEERING_RESPONSE.ID]&&e[o.Z.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT]&&e[o.Z.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][o.Z.CONTENT_STEERING_RESPONSE.HOST]}(e)}))),U())}(t),v.trigger(E.Z.CONTENT_STEERING_REQUEST_COMPLETED,{currentSteeringResponseData:n,url:l}),e()},error:function(r,i,a,o){!function(e,r){try{switch(t.warn("Error fetching data from content steering server",e),r.status){case 410:break;case 429:var i=r&&r.getResponseHeader?r.getResponseHeader("retry-after"):null;null!==i&&(n||(n={}),n.ttl=_(i)),U();break;default:U()}}catch(e){t.error(e)}}(r,o),e(r)},complete:function(){r.baseUrl.all=x(r.baseUrl),r.location.all=x(r.location)}})}catch(t){e(t)}}))}function x(e){var t;return e.all&&0!==e.all.length&&e.current?w(t=e.all).call(t,(function(t){return t===e.current})):[]}function k(e){try{var r,i=[];return e&&0!==e.length&&n&&n.pathwayClones&&0!==n.pathwayClones.length?(I(r=n.pathwayClones).call(r,(function(t){var n=w(e).call(e,(function(e){return t[o.Z.CONTENT_STEERING_RESPONSE.BASE_ID]===e.serviceLocation})),r=null;if(n&&n.length>0&&(r=n[0]),r){var a,s,l=new D(r.url),u=t[o.Z.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][o.Z.CONTENT_STEERING_RESPONSE.HOST];u=Bt.Z.stringHasProtocol(u)?u:d(a="".concat(l.protocol,"//")).call(a,u);var c={synthesizedUrl:d(s="".concat(u)).call(s,l.pathname),serviceLocation:t[o.Z.CONTENT_STEERING_RESPONSE.ID],queryParams:t[o.Z.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][o.Z.CONTENT_STEERING_RESPONSE.PARAMS],reference:r};i.push(c)}})),i):i}catch(e){return t.error(e),[]}}function U(){n&&n.ttl&&!isNaN(n.ttl)&&(a&&clearTimeout(a),a=f((function(){P()}),1e3*n.ttl))}function B(){a&&clearTimeout(a),a=null}function G(){n=null,i={},r={baseUrl:{current:null,all:[]},location:{current:null,all:[]}},B()}return e={reset:function(){G(),v.off(E.Z.FRAGMENT_LOADING_STARTED,A,e),v.off(E.Z.MANIFEST_LOADING_STARTED,R,e),v.off(E.Z.MANIFEST_LOADING_FINISHED,N,e),v.off(E.Z.THROUGHPUT_MEASUREMENT_STORED,C,e)},setConfig:function(e){e&&(e.adapter&&(T=e.adapter),e.errHandler&&(l=e.errHandler),e.dashMetrics&&(u=e.dashMetrics),e.mediaPlayerModel&&(c=e.mediaPlayerModel),e.requestModifier&&(g=e.requestModifier),e.manifestModel&&(h=e.manifestModel),e.serviceDescriptionController&&(p=e.serviceDescriptionController),e.eventBus&&(v=e.eventBus))},loadSteeringData:P,getCurrentSteeringResponseData:function(){return n},shouldQueryBeforeStart:function(){var e=O();return!!e&&e.queryBeforeStart},getSteeringDataFromManifest:O,stopSteeringRequestTimer:B,getSynthesizedBaseUrlElements:function(e){try{var n;return ee(n=k(e)).call(n,(function(e){var t=new _t(e.synthesizedUrl,e.serviceLocation);return t.queryParams=e.queryParams,t.dvbPriority=e.reference.dvbPriority,t.dvbWeight=e.reference.dvbWeight,t.availabilityTimeOffset=e.reference.availabilityTimeOffset,t.availabilityTimeComplete=e.reference.availabilityTimeComplete,t}))}catch(e){return t.error(e),[]}},getSynthesizedLocationElements:function(e){try{var n;return ee(n=k(e)).call(n,(function(e){var t=new Dt(e.synthesizedUrl,e.serviceLocation);return t.queryParams=e.queryParams,t}))}catch(e){return t.error(e),[]}},initialize:function(){s=_n(b).create({errHandler:l,dashMetrics:u,mediaPlayerModel:c,requestModifier:g,errors:Re}),v.on(E.Z.FRAGMENT_LOADING_STARTED,A,e),v.on(E.Z.MANIFEST_LOADING_STARTED,R,e),v.on(E.Z.MANIFEST_LOADING_FINISHED,N,e),v.on(E.Z.THROUGHPUT_MEASUREMENT_STORED,C,e)}},t=(0,m.Z)(b).getInstance().getLogger(e),G(),e}jn.__dashjs_factory_name="ContentSteeringController";var Hn=p.Z.getSingletonFactory(jn);function Vn(){var e,t,n,r=this.context,i=(0,we.Z)(r).getInstance();return e={select:function(e){if(!e||0===e.length)return null;var r=null;return i.get().streaming.applyContentSteering&&(r=function(e){var r=n.getCurrentSteeringResponseData();return r&&r.pathwayPriority&&r.pathwayPriority.length>0?function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=0,i=null,a=function(){var a=e[r],o=le(n).call(n,(function(e){return e.serviceLocation&&e.serviceLocation===a}));if(-1!==o&&!t.contains(n[o].serviceLocation))return i=n[o],"break";r+=1};r<e.length&&"break"!==a(););return i}(r.pathwayPriority,e):null}(e)),r||(r=function(e){return e[0]}(e)),r},setConfig:function(e){e.blacklistController&&(t=e.blacklistController),e.contentSteeringController&&(n=e.contentSteeringController)},reset:function(){t.reset()}},t=Un(r).create({updateEventName:u.Z.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:u.Z.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD}),n=Hn(r).getInstance(),e}Vn.__dashjs_factory_name="LocationSelector";var Kn=p.Z.getClassFactory(Vn);function zn(){var e,t,n,r,i,a,s,c,h,g,p,v,y,_,T=this.context,b=(0,l.Z)(T).getInstance(),S=(0,Xe.Z)(T).getInstance();function A(){n=NaN,s=!1,i=!0,a=!1,I()}function I(){null!==r&&(clearTimeout(r),r=null)}function R(e){I(),a||(isNaN(e)&&!isNaN(n)&&(e=1e3*n),isNaN(e)||(t.debug("Refresh manifest in "+e+" milliseconds."),r=f(D,e)))}function w(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];s=!0;var t=h.getValue(),n=t.url,r=null,i=p.getPatchLocation(t),a=g.select(i),o=null;if(a&&!e)n=a.url,r=a.serviceLocation,o=a.queryParams;else{var l=N(t),u=g.select(l);u&&(n=u.url,r=u.serviceLocation,o=u.queryParams)}S.isRelative(n)&&(n=S.resolve(n,t.url)),c.load(n,r,o)}function N(e){var t=p.getLocation(e),n=y.getSynthesizedLocationElements(t);return d(t).call(t,n)}function C(e){if(e){if(p.getIsPatch(e)){var r=e;e=h.getValue();var l=p.isPatchValid(e,r),c=l;if(l){var f=p.getPublishTime(e);c=p.applyPatchToManifest(e,r);var d=p.getPublishTime(e);c=f.getTime()!=d.getTime()}if(!c)return t.debug("Patch provided is invalid, performing full manifest refresh"),void w(!0);e.loadedTime=new Date}}else(e=h.getValue()).loadedTime=new Date;if(h.getValue()&&h.getValue().type===o.Z.DYNAMIC&&e.type===o.Z.STATIC)return b.trigger(u.Z.DYNAMIC_TO_STATIC),s=!1,void(a=!0);h.setValue(e);var g=new Date,m=(g.getTime()-e.loadedTime.getTime())/1e3;1e3*(n=p.getManifestUpdatePeriod(e,m))>2147483647&&(n=2147483.647),b.trigger(u.Z.MANIFEST_UPDATED,{manifest:e}),t.info("Manifest has been refreshed at "+g+"["+g.getTime()/1e3+"] "),i||R()}function D(){i||(s?R(_.get().streaming.manifestUpdateRetryInterval):w())}function M(e){e.error?e.error.code===Re.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE&&v.error(e.error):C(e.manifest)}function L(){i=!1,R()}function O(){(i=!_.get().streaming.scheduling.scheduleWhilePaused)&&I()}function P(){s=!1}return e={initialize:function(){A(),b.on(u.Z.STREAMS_COMPOSED,P,this),b.on(E.Z.PLAYBACK_STARTED,L,this),b.on(E.Z.PLAYBACK_PAUSED,O,this),b.on(u.Z.INTERNAL_MANIFEST_LOADED,M,this)},setManifest:function(e){C(e)},refreshManifest:w,getIsUpdating:function(){return s},setConfig:function(e){e&&(e.manifestModel&&(h=e.manifestModel),e.adapter&&(p=e.adapter),e.manifestLoader&&(c=e.manifestLoader),e.errHandler&&(v=e.errHandler),e.locationSelector&&(g=e.locationSelector),e.settings&&(_=e.settings),e.contentSteeringController&&(y=e.contentSteeringController))},reset:function(){b.off(E.Z.PLAYBACK_STARTED,L,this),b.off(E.Z.PLAYBACK_PAUSED,O,this),b.off(u.Z.STREAMS_COMPOSED,P,this),b.off(u.Z.INTERNAL_MANIFEST_LOADED,M,this),A()}},t=(0,m.Z)(T).getInstance().getLogger(e),g=Kn(T).create(),e}zn.__dashjs_factory_name="ManifestUpdater";var Wn=p.Z.getClassFactory(zn);function Xn(){var e,t,n,r,i,a,o,s,c,f,d,h,g,p,v,y,E=this.context,T=(0,l.Z)(E).getInstance(),b=(0,Xe.Z)(E).getInstance();function S(){s=[],c=[],f=null,d=null,g=null,h=NaN,n=!1,r=!1,p=i.get().streaming.utcSynchronization.timeBetweenSyncAttempts}function I(){i.get().streaming.utcSynchronization.enabled&&!n&&!r&&g&&g.value&&g.schemeIdUri&&!isNaN(h)&&!isNaN(i.get().streaming.utcSynchronization.backgroundAttempts)&&(d&&(U()-d)/1e3<30||(s=[],r=!0,R(isNaN(i.get().streaming.utcSynchronization.backgroundAttempts)?2:i.get().streaming.utcSynchronization.backgroundAttempts)))}function R(e){try{if(e<=0)return void G();var t=U();a[g.schemeIdUri](g.value,(function(n){var r=U(),i=N(t,r,n);s.push(i),R(e-1)}),(function(){G()}))}catch(e){G()}}function w(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=e||0;if(!c||0===c.length||t>=c.length)C();else{var n=c[t];if(n)if(a.hasOwnProperty(n.schemeIdUri)){var r=(new Date).getTime();a[n.schemeIdUri](n.value,(function(e){var t=(new Date).getTime(),i=N(r,t,e);g=n,C(i)}),(function(){w(t+1)}))}else w(t+1);else C()}}function N(e,t,n){return n-(t-(t-e)/2)}function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:NaN,t=isNaN(e);t&&i.get().streaming.utcSynchronization.useManifestDateHeaderTimeSource?Z():B(t,e)}function D(e){var t=Date.parse(e);return isNaN(t)&&(t=function(e){var t,n,r=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+\-])([0-9]{2})([0-9]{2}))?/.exec(e);return t=Date.UTC(_(r[1],10),_(r[2],10)-1,_(r[3],10),_(r[4],10),_(r[5],10),r[6]&&(_(r[6],10)||0),r[7]&&1e3*x(r[7])||0),r[9]&&r[10]&&(n=60*_(r[9],10)+_(r[10],10),t+=("+"===r[8]?-1:1)*n*60*1e3),new Date(t).getTime()}(e)),t}function M(e){return Date.parse(e)}function L(e){return Date.parse(e)}function O(e,t,n){n()}function P(e,t,n){var r=D(e);isNaN(r)?n():t(r)}function F(e,t,n,r,i){var a,o,s=!1,l=new XMLHttpRequest,u=i?Ne.w.HEAD:Ne.w.GET,c=t.match(/\S+/g);if(t=c.shift(),a=function(){s||(s=!0,c.length?F(e,c.join(" "),n,r,i):r())},o=function(){var t,r;200===l.status&&(t=i?l.getResponseHeader("Date"):l.response,r=e(t),isNaN(r)||(n(r),s=!0))},b.isRelative(t)){var f=y.resolve();f&&(t=b.resolve(t,f.url))}l.open(u,t),l.timeout=5e3,l.onload=o,l.onloadend=a,l.send()}function k(e,t,n){F(L,e,t,n,!0)}function Z(){var e=o.getLatestMPDRequestHeaderValueByID("Date"),t=null!==e?new Date(e).getTime():Number.NaN;isNaN(t)?B(!0):B(!1,t-U())}function B(e,r){if(isNaN(h)||isNaN(r)||e||function(e){try{var n,r=q(e),a=isNaN(p)?30:p,o=isNaN(i.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor)?2:i.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor,s=isNaN(i.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts)?600:i.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts,l=isNaN(i.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts)?2:i.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts;r?(n=Math.min(a*o,s),t.debug("Increasing timeBetweenSyncAttempts to ".concat(n))):(n=Math.max(a/o,l),t.debug("Decreasing timeBetweenSyncAttempts to ".concat(n))),p=n}catch(e){}}(r),!e&&!isNaN(r)){f=U(),n=!1;var a=isNaN(h);h=r,a&&I(),t.debug("Completed UTC sync. Setting client - server offset to ".concat(r))}e&&(g=null,n=!1,v.error(new Te.Z(Re.TIME_SYNC_FAILED_ERROR_CODE,Re.TIME_SYNC_FAILED_ERROR_MESSAGE))),T.trigger(u.Z.UPDATE_TIME_SYNC_OFFSET,{offset:r}),T.trigger(u.Z.TIME_SYNCHRONIZATION_COMPLETED)}function G(){if(s&&0!==s.length){var e=K(s).call(s,(function(e,t){return e+t}),0)/s.length;q(e)?t.debug("Completed background UTC sync. Offset is within allowed threshold and is not adjusted."):(t.debug("Completed background UTC sync. Setting client - server offset to ".concat(e)),h=e,T.trigger(u.Z.UPDATE_TIME_SYNC_OFFSET,{offset:h})),r=!1,d=U()}}function q(e){try{if(isNaN(h))return!0;var t=i.get().streaming.utcSynchronization.maximumAllowedDrift&&!isNaN(i.get().streaming.utcSynchronization.maximumAllowedDrift)?i.get().streaming.utcSynchronization.maximumAllowedDrift:100;return e>=h-t&&e<=h+t}catch(e){return!0}}return e={initialize:function(){S(),a={"urn:mpeg:dash:utc:http-head:2014":k,"urn:mpeg:dash:utc:http-xsdate:2014":A(F).call(F,null,D),"urn:mpeg:dash:utc:http-iso:2014":A(F).call(F,null,M),"urn:mpeg:dash:utc:direct:2014":P,"urn:mpeg:dash:utc:http-head:2012":k,"urn:mpeg:dash:utc:http-xsdate:2012":A(F).call(F,null,D),"urn:mpeg:dash:utc:http-iso:2012":A(F).call(F,null,M),"urn:mpeg:dash:utc:direct:2012":P,"urn:mpeg:dash:utc:http-ntp:2014":O,"urn:mpeg:dash:utc:ntp:2014":O,"urn:mpeg:dash:utc:sntp:2014":O}},attemptSync:function(e,t){c=e,n||(function(e){try{if(!e||!i.get().streaming.utcSynchronization.enabled)return!1;var t=isNaN(p)?30:p;return!(f&&t&&!isNaN(t))||(U()-f)/1e3>=t}catch(e){return!0}}(t)?(n=!0,w()):T.trigger(u.Z.TIME_SYNCHRONIZATION_COMPLETED))},setConfig:function(e){e&&(e.dashMetrics&&(o=e.dashMetrics),e.baseURLController&&(y=e.baseURLController),e.errHandler&&(v=e.errHandler),e.settings&&(i=e.settings))},reset:function(){S(),T.off(u.Z.ATTEMPT_BACKGROUND_SYNC,I,e)}},t=(0,m.Z)(E).getInstance().getLogger(e),T.on(u.Z.ATTEMPT_BACKGROUND_SYNC,I,e),e}Xn.__dashjs_factory_name="TimeSyncController";var Qn=p.Z.getSingletonFactory(Xn);Qn.HTTP_TIMEOUT_MS=5e3,p.Z.updateSingletonFactory(Xn.__dashjs_factory_name,Qn);var $n=Qn;function Jn(){var e,t,n,r,i,a=this.context,o=(0,l.Z)(a).getInstance();return e={attachMediaSource:function(e){var n=D.createObjectURL(t);return e.setSource(n),"managedMediaSource"===r&&(e.setDisableRemotePlayback(!0),t.addEventListener("startstreaming",(function(){o.trigger(E.Z.MANAGED_MEDIA_SOURCE_START_STREAMING)})),t.addEventListener("endstreaming",(function(){o.trigger(E.Z.MANAGED_MEDIA_SOURCE_END_STREAMING)}))),n},createMediaSource:function(){var e="WebKitMediaSource"in window,n="MediaSource"in window;return"ManagedMediaSource"in window?(t=new ManagedMediaSource,r="managedMediaSource",i.info("Created ManagedMediaSource")):n?(t=new MediaSource,r="mediaSource",i.info("Created MediaSource")):e&&(t=new WebKitMediaSource,i.info("Created WebkitMediaSource")),t},detachMediaSource:function(e){e.setSource(null)},setConfig:function(e){e&&e.settings&&(n=e.settings)},setDuration:function e(r){t&&"open"===t.readyState&&(null===r&&isNaN(r)||t.duration!==r&&(r!==1/0||n.get().streaming.buffer.mediaSourceDurationInfinity||(r=Math.pow(2,32)),function(e){for(var t=e.sourceBuffers,n=0;n<t.length;n++)if(t[n].updating)return!0;return!1}(t)?f(A(e).call(e,null,r),50):(i.info("Set MediaSource duration:"+r),t.duration=r)))},setSeekable:function(e,n){t&&"function"==typeof t.setLiveSeekableRange&&"function"==typeof t.clearLiveSeekableRange&&"open"===t.readyState&&e>=0&&e<n&&(t.clearLiveSeekableRange(),t.setLiveSeekableRange(e,n))},signalEndOfStream:function(e){if(e&&"open"===e.readyState){for(var t=e.sourceBuffers,n=0;n<t.length;n++){if(t[n].updating)return;if(0===t[n].buffered.length)return}i.info("call to mediaSource endOfStream"),e.endOfStream()}}},i=(0,m.Z)(a).getInstance().getLogger(e),e}Jn.__dashjs_factory_name="MediaSourceController";var er=p.Z.getSingletonFactory(Jn);function tr(){var e,t,n,r,i,a,o,s,u,c,f,h="urn:mpeg:dash:event:2012",g="discarded",p="updated",v="added",y=this.context,_=(0,l.Z)(y).getInstance();function T(){if(!o||!s)throw new Error("setConfig function has to be called previously")}function b(){f=!1,n={},r={},i=null,c=!1,a=U()/1e3}function S(){try{if(!c){c=!0;var e=s.getTime(),i=e-a;i=a>0?Math.max(0,i):0,A(r,i,e),A(n,i,e),R(r),R(n),a=e,c=!1}}catch(e){c=!1,t.error(e)}}function A(e,n,r){try{M(e,(function(i){if(void 0!==i){var a,o=isNaN(i.duration)?0:i.duration;i.calculatedPresentationTime<=r&&i.calculatedPresentationTime+n+o>=r?O(i,E.Z.EVENT_MODE_ON_START):(L(r,o+n,i.calculatedPresentationTime)||function(e){try{var n=e.eventStream.period.start+e.eventStream.period.duration;return e.calculatedPresentationTime>n}catch(e){return t.error(e),!1}}(i))&&(t.debug(d(a="Removing event ".concat(i.id," from period ")).call(a,i.eventStream.period.id," as it is expired or invalid")),function(e,n){try{var r,i=n.eventStream.schemeIdUri,a=n.eventStream.period.id,o=n.eventStream.value,s=n.id;e[a][i]=w(r=e[a][i]).call(r,(function(e){return o&&e.eventStream.value&&e.eventStream.value!==o||e.id!==s})),0===e[a][i].length&&delete e[a][i]}catch(e){t.error(e)}}(e,i))}}))}catch(e){t.error(e)}}function R(e){try{for(var n in e)e.hasOwnProperty(n)&&0===z(e[n]).length&&delete e[n]}catch(e){t.error(e)}}function N(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e.eventStream.schemeIdUri,a=e.eventStream.value,o=e.id,s=g;t[i]||(t[i]=[]);var l=le(n=t[i]).call(n,(function(e){return(!a||e.eventStream.value&&e.eventStream.value===a)&&e.id===o}));if(-1===l)t[i].push(e),e.triggeredReceivedEvent=!1,e.triggeredStartEvent=!1,s=v;else if(r){var u=t[i][l];e.triggeredReceivedEvent=u.triggeredReceivedEvent,e.triggeredStartEvent=u.triggeredStartEvent,t[i][l]=e,s=p}return s}function C(e){try{if(1==e.eventStream.value){var n,r=e.calculatedPresentationTime;n=4294967295==e.calculatedPresentationTime?NaN:e.calculatedPresentationTime+e.duration,_.trigger(E.Z.MANIFEST_VALIDITY_CHANGED,{id:e.id,validUntil:r,newDuration:n,newManifestValidAfter:NaN},{mode:E.Z.EVENT_MODE_ON_START})}}catch(e){t.error(e)}}function D(e){try{var n=s.getTime();M(e,(function(e){var t=e.eventStream&&e.eventStream.period&&!isNaN(e.eventStream.period.duration)?e.eventStream.period.duration:NaN,r=e.eventStream&&e.eventStream.period&&!isNaN(e.eventStream.period.start)?e.eventStream.period.start:NaN;if(!isNaN(t)&&!isNaN(r)){var i=e.calculatedPresentationTime;Math.abs(i-n)<300&&O(e,E.Z.EVENT_MODE_ON_START)}}))}catch(e){t.error(e)}}function M(e,n){try{if(e)for(var r=z(e),i=0;i<r.length;i++)for(var a=e[r[i]],o=z(a),s=0;s<o.length;s++){var l;I(l=a[o[s]]).call(l,(function(e){void 0!==e&&n(e)}))}}catch(e){t.error(e)}}function L(e,n,r){try{return e-n>r}catch(e){return t.error(e),!1}}function O(e,n){try{var r,i,a,l,u=s.getTime(),c=e.id;if(n===E.Z.EVENT_MODE_ON_RECEIVE&&!e.triggeredReceivedEvent)return t.debug("Received event ".concat(c)),e.triggeredReceivedEvent=!0,void _.trigger(e.eventStream.schemeIdUri,{event:e},{mode:n});e.triggeredStartEvent||(e.eventStream.schemeIdUri===h&&1==e.eventStream.value?0===e.duration&&0===e.presentationTimeDelta||(t.debug(d(r="Starting manifest refresh event ".concat(c," at ")).call(r,u)),function(){try{T(),o.refreshManifest()}catch(e){t.error(e)}}()):"urn:mpeg:dash:event:callback:2015"===e.eventStream.schemeIdUri&&1==e.eventStream.value?(t.debug(d(i="Starting callback event ".concat(c," at ")).call(i,u)),function(e){try{(0,ot.Z)(y).create({}).load({method:"get",url:e,request:{responseType:"arraybuffer"}})}catch(e){t.error(e)}}(e.messageData)):(t.debug(d(a=d(l="Starting event ".concat(c," from period ")).call(l,e.eventStream.period.id," at ")).call(a,u)),_.trigger(e.eventStream.schemeIdUri,{event:e},{mode:n})),e.triggeredStartEvent=!0)}catch(e){t.error(e)}}return e={addInlineEvents:function(e,r){try{if(T(),n[r]||(n[r]={}),e)for(var i=0;i<e.length;i++){var a=e[i];if(!L(s.getTime(),isNaN(a.duration)?0:a.duration,a.calculatedPresentationTime)){var o,l,u=N(a,n[r],!0);u===v?(t.debug(d(o="Added inline event with id ".concat(a.id," from period ")).call(o,r)),O(a,E.Z.EVENT_MODE_ON_RECEIVE)):u===p&&t.debug(d(l="Updated inline event with id ".concat(a.id," from period ")).call(l,r))}}}catch(e){throw e}},addInbandEvents:function(e,n){try{T(),r[n]||(r[n]={});for(var i=0;i<e.length;i++){var a,o,l,u,c=e[i];L(s.getTime(),isNaN(c.duration)?0:c.duration,c.calculatedPresentationTime)||(N(c,r[n],!1)===v?(c.eventStream.schemeIdUri===h&&C(c),t.debug(d(a="Added inband event with id ".concat(c.id," from period ")).call(a,n)),O(c,E.Z.EVENT_MODE_ON_RECEIVE)):t.debug(d(o=d(l=d(u="Inband event with scheme_id_uri ".concat(c.eventStream.schemeIdUri,", value ")).call(u,c.eventStream.value,", period id ")).call(l,n," and event id ")).call(o,c.id," was ignored because it has been added before.")))}S()}catch(e){throw e}},getInbandEvents:function(){return r},getInlineEvents:function(){return n},start:function(){try{T(),t.debug("Start Event Controller");var e=u.get().streaming.eventControllerRefreshDelay;f||isNaN(e)||(f=!0,i=k(S,e))}catch(e){throw e}},setConfig:function(e){try{if(!e)return;e.manifestUpdater&&(o=e.manifestUpdater),e.playbackController&&(s=e.playbackController),e.settings&&(u=e.settings)}catch(e){throw e}},reset:function(){(function(){try{null!==i&&f&&(clearInterval(i),i=null,f=!1,function(){try{D(r),D(n)}catch(e){t.error(e)}}())}catch(e){throw e}})(),b()}},t=(0,m.Z)(y).getInstance().getLogger(e),b(),e}tr.__dashjs_factory_name="EventController";var nr=p.Z.getSingletonFactory(tr),rr={LEVELS:{SUGGESTION:"Suggestion",WARNING:"Warning",ERROR:"Error"},EVENTS:{NO_UTC_TIMING_ELEMENT:{key:"NO_UTC_TIMING_ELEMENT",message:"No UTCTiming element is present in the manifest. You may experience playback failures. For a detailed validation use https://conformance.dashif.org/"},NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE:{key:"NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE",message:'SMPTE 2052-1:2013 defines the attribute name as "imageType" and does not define "imagetype"'},INVALID_DVR_WINDOW:{key:"INVALID_DVR_WINDOW",message:"No valid segment found when applying a specification compliant DVR window calculation. Using SegmentTimeline entries as a fallback."}}};function ir(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ar(){var e,t,n,r,i,o,c,p,_,T,b,S,A,R,N,C,M,L,O,P,Z,B,G,Y,j,H,W,X,Q,$,J,te,ne,re,ie,ae,oe,se,le,ce,fe,de,he,ge,pe,me,ve,ye,Ee=this.context,_e=(0,l.Z)(Ee).getInstance();function be(){if(!(o&&o.hasOwnProperty("load")&&Z&&Z.hasOwnProperty("initialize")&&Z.hasOwnProperty("reset")&&Z.hasOwnProperty("getClientTimeOffset")&&c&&P&&_&&ne))throw new Error(a.Z.MISSING_CONFIG_ERROR)}function Se(){if(!i||!i.hasOwnProperty("setManifest"))throw new Error("initialize function has to be called previously")}function Ae(){!function(){try{var e=p.getStreamsInfo();if(!G&&0===e.length)throw new Error("There are no periods in the MPD");G&&e.length>0&&_.updateManifestUpdateInfo({currentTime:ne.getTime(),buffered:te.getBufferRange(),presentationStartTime:e[0].start,clientTimeOffset:Z.getClientTimeOffset()}),B.length>0&&function(e){0!==e.length?B=w(B).call(B,(function(n){var r=w(e).call(e,(function(e){return e.id===n.getId()})).length>0||n.getId()===G.getId();return r||(t.debug("Removing stream ".concat(n.getId())),n.reset(!0)),r})):t.warn("No periods included in the current manifest. Skipping the filtering of outdated stream objects.")}(e);for(var n=[],r=0,i=e.length;r<i;r++){var a=e[r];n.push(we(a)),_.addManifestUpdateStreamInfo(a)}F.all(n).then((function(){return new F((function(t,n){G?t():Ne(e,t,n)}))})).then((function(){_e.trigger(u.Z.STREAMS_COMPOSED),We()})).catch((function(e){throw e}))}catch(e){P.error(new Te.Z(Re.MANIFEST_ERROR_ID_NOSTREAMS_CODE,e.message+" nostreamscomposed",c.getValue())),$=!0,mt()}}()}function Ie(){pe=!0}function we(e){var t=ht(e.id);return t?t.updateData(e):(t=Gn(Ee).create({manifestModel:c,mediaPlayerModel:ie,dashMetrics:_,manifestUpdater:i,adapter:p,timelineConverter:Z,capabilities:n,capabilitiesFilter:r,errHandler:P,baseURLController:A,segmentBaseController:R,textController:j,abrController:C,playbackController:ne,eventController:L,mediaController:M,protectionController:Y,videoModel:te,streamInfo:e,settings:ge}),B.push(t),t.initialize(),F.resolve())}function Ne(e,n,r){try{Ge();var i=_.getCurrentDVRInfo().range;if(i.end<i.start){me&&clearTimeout(me);var a=Math.min(1e3*(-1*(i.end-i.start)+2),2147483647);return t.debug("Waiting for ".concat(a," ms before playback can start")),_e.trigger(u.Z.AST_IN_FUTURE,{delay:a}),void(me=f((function(){Ne(e,n,r)}),a))}ge.get().streaming.applyProducerReferenceTime&&re.calculateProducerReferenceTimeOffsets(e);var o=e[0].manifestInfo;if(ge.get().streaming.applyServiceDescription&&re.applyServiceDescription(o),p.getIsDynamic()){var s=at(e,o);ne.computeAndSetLiveDelay(s,o)}(ge.get().streaming.applyContentSteering&&S.shouldQueryBeforeStart()?S.loadSteeringData():F.resolve()).then((function(){var e=c.getValue();e&&A.update(e),Ce(),n()})).catch((function(e){t.error(e),Ce(),n()}))}catch(e){r(e)}}function Ce(){var e=function(){var e;if(p.getIsDynamic()){var n=_.getCurrentDVRInfo();e=(n&&n.range?n.range.end:0)-ne.getOriginalLiveDelay();var r=n?n.range:null;if(r){var i;if(isNaN(ve)&&-1===y(i=ve.toString()).call(i,"posix:")){var a=nt(!0);isNaN(a)||(t.info("Start time from URI parameters: ".concat(a)),e=Math.min(e,a))}else{t.info("Start time provided by the app: ".concat(ve));var o=rt(!0,ve);isNaN(o)||(e=Math.min(e,o))}var s=ge.get().streaming.timeShiftBuffer.calcFromSegmentTimeline?.1:0;e=Math.max(e,r.start+s)}}else if(e=yt()[0].getStreamInfo().start,isNaN(ve)){var l=nt(!1);isNaN(l)||(t.info("Start time from URI parameters: ".concat(l)),e=Math.max(e,l))}else{t.info("Start time provided by the app: ".concat(ve));var u=rt(!1,ve);isNaN(u)||(e=Math.max(e,u))}return e}(),n=Be(e),r=null!==n?n:B[0];_e.trigger(u.Z.INITIAL_STREAM_SWITCH,{startTime:e}),De(r,null,e),ce||(ce=k((function(){!X&&ne.getTimeToStreamEnd()<=0&&!ne.isSeeking()&&_e.trigger(u.Z.PLAYBACK_ENDED,{isLast:dt().isLast})}),200))}function De(e,n,r){try{var i,a,o;if(X||!e||n===e&&e.getIsActive())return;X=!0,_e.trigger(u.Z.PERIOD_SWITCH_STARTED,{fromStreamInfo:n?n.getStreamInfo():null,toStreamInfo:e.getStreamInfo()});var s=!1;G=e,n&&(s=Ue(e,n),n.deactivate(s)),r=isNaN(r)?!s&&n?e.getStreamInfo().start:NaN:r,t.info(d(i=d(a=d(o="Switch to stream ".concat(e.getId(),". Seektime is ")).call(o,r,", current playback time is ")).call(a,ne.getTime(),". Seamless period switch is set to ")).call(i,s)),de=w(de).call(de,(function(e){return e.getId()!==G.getId()})),ne.initialize(dt(),!!n),te.getElement()?Me(r,s,!1):Le(r,s)}catch(e){X=!1}}function Me(e,n){var r,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];function a(){if(J&&"open"===J.readyState){t.debug("MediaSource is open!"),D.revokeObjectURL(r),J.removeEventListener("sourceopen",a),J.removeEventListener("webkitsourceopen",a),tt();var o=_.getCurrentDVRInfo();T.setSeekable(o.range.start,o.range.end),i?(isNaN(e)||ne.seek(e,!0,!0),G.setMediaSource(J).then((function(){G.initializeForTextWithMediaSource(J)}))):Le(e,n)}}function o(){J.addEventListener("sourceopen",a,!1),J.addEventListener("webkitsourceopen",a,!1),r=T.attachMediaSource(te),t.debug("MediaSource attached to element. Waiting on open...")}J?n?Le(e,n):(T.detachMediaSource(te),o()):(J=T.createMediaSource(),o())}function Le(e,t){G.activate(J,t?fe:void 0,e).then((function(t){if(t){var n=z(t);n.length>0&&t[n[0]].getBuffer().changeType&&(he=!0),fe=t}isNaN(e)||(_e.trigger(u.Z.SEEK_TARGET,{time:e},{streamId:G.getId()}),ne.seek(e,!1,!0),G.startScheduleControllers()),X=!1,_e.trigger(u.Z.PERIOD_SWITCH_COMPLETED,{toStreamInfo:dt()})}))}function Oe(e){var t=Be(e.seekTime);t&&t!==G?t&&t!==G&&(Fe(),function(e,t,n){var r=e&&!isNaN(e.seekTime)?e.seekTime:NaN,i=ee(n=G.getProcessors()).call(n,(function(t){return t.prepareOuterPeriodPlaybackSeeking(e)}));F.all(i).then((function(){De(t,G,r)})).catch((function(e){P.error(e)}))}(e,t)):(Fe(),function(e,t){I(t=G.getProcessors()).call(t,(function(t){return t.prepareInnerPeriodPlaybackSeeking(e)})),ut(Je.USER_REQUEST_STOP_REASON)}(e)),ct($e.SEEK_START_REASON)}function Fe(){xe()}function xe(){de&&de.length>0&&(I(de).call(de,(function(e){e.deactivate(!0)})),de=[])}function ke(e){if(e.newMediaInfo.streamInfo.id===G.getId()){if(xe(),ge.get().streaming.buffer.resetSourceBuffersForTrackSwitch&&e.oldMediaInfo&&e.oldMediaInfo.codec!==e.newMediaInfo.codec){var t=ne.getTime();return G.deactivate(!1),void Me(t,!1,!1)}G.prepareTrackChange(e)}}function Ue(e,t){try{return ge.get().streaming.buffer.reuseExistingSourceBuffers&&(t.isProtectionCompatible(e)||pe)&&(he&&ge.get().streaming.buffer.useChangeTypeForTrackSwitch||t.isMediaCodecCompatible(e,t))}catch(e){return!1}}function Ze(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(J&&!e.getPreloaded()){var n=Ue(e,t);n&&e.startPreloading(J,fe).then((function(){de.push(e)}))}}function Be(e){if(isNaN(e))return null;for(var t=B.length,n=0;n<t;n++){var r=B[n];if(e<x((r.getStartTime()+r.getDuration()).toFixed(5)))return r}return null}function Ge(){try{var e=p.getIsDynamic(),t=p.getStreamsInfo()[0].manifestInfo,n=ne.getTime(),r=Z.calcTimeShiftBufferWindow(B,e),i=Qe();if(void 0===r.start||void 0===r.end)return;i&&0!==i.length?I(i).call(i,(function(e){_.addDVRInfo(e.getType(),n,t,r)})):_.addDVRInfo(a.Z.VIDEO,n,t,r)}catch(e){}}function qe(e){if(se&&W){var t=ie.getInitialBufferLevel(),n=[a.Z.TEXT];(isNaN(t)||t<=ne.getBufferLevel(n)||p.getIsDynamic()&&t>ne.getLiveDelay())&&(se=!1,ct($e.INITIAL_PLAYOUT_START_REASON),ne.play())}e&&e.mediaType&&_.addBufferLevel(e.mediaType,new Date,1e3*e.bufferLevel)}function Ye(e){e.streamInfo.id===G.getId()&&e.reason&&e.reason.forceReplace&&xe(),ht(e.streamInfo.id).prepareQualityChange(e)}function je(){if(p.getIsDynamic()&&0!==ne.getOriginalLiveDelay()&&G){var e=p.getStreamsInfo();if(e.length>0){var t=e[0].manifestInfo,n=at(e,t);ne.computeAndSetLiveDelay(n,t)}}}function He(){if(st()){var e=te.getPlaybackQuality();e&&_.addDroppedFrames(e)}}function Ve(){t.debug("[onPlaybackStarted]"),!se&&oe&&ct($e.RESUME_FROM_PAUSE_START_REASON),se&&(se=!1),le&&(le=!1,ge.get().streaming.applyContentSteering&&!S.shouldQueryBeforeStart()&&S.loadSteeringData()),oe=!1}function Ke(e){t.debug("[onPlaybackPaused]"),e.ended||(oe=!0,ut(Je.USER_REQUEST_STOP_REASON))}function ze(e){t.debug("Stream with id ".concat(e.streamInfo.id," finished buffering"));var n=e.streamInfo.isLast;J&&n?(t.info("[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."),T.signalEndOfStream(J)):We()}function We(){if(G&&G.getHasFinishedBuffering())for(var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;try{var t=e||G||null;if(t){var n=t.getStreamInfo();return w(B).call(B,(function(e){var t=e.getStreamInfo();return t.start>n.start&&n.id!==t.id}))}}catch(e){return[]}}(G),t=0;t<e.length;){var n=e[t],r=0===t?G:e[t-1];!n.getPreloaded()&&r.getHasFinishedBuffering()&&J&&Ze(n,r),t+=1}}function Xe(){ce&&(clearInterval(ce),ce=null)}function Qe(){return G?G.getProcessors():[]}function et(e){if(G&&!G.getIsEndedEventSignaled()){var n,r;G.setIsEndedEventSignaled(!0);var i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=e||G||null;if(!t)return null;for(var n=t.getStreamInfo(),r=n.start,i=0,a=-1,o=NaN;i<B.length;){var s=B[i].getStreamInfo(),l=s.start-r;l>0&&(isNaN(o)||l<o)&&n.id!==s.id&&(o=l,a=i),i+=1}return a>=0?B[a]:null}();i?(t.debug(d(n=d(r="StreamController onEnded, found next stream with id ".concat(i.getStreamInfo().id,". Switching from ")).call(r,G.getStreamInfo().id," to ")).call(n,i.getStreamInfo().id)),De(i,G,NaN)):(t.debug("StreamController no next stream found"),G.setIsEndedEventSignaled(!1)),ut(i?Je.END_OF_PERIOD_STOP_REASON:Je.END_OF_CONTENT_STOP_REASON)}e&&e.isLast&&(Xe(),S.stopSteeringRequestTimer())}function tt(e){var t=e||dt().manifestInfo.duration;T.setDuration(t)}function nt(e){var t=N.getURIFragmentData();if(!t||!t.t)return NaN;var n=yt()[0].getStreamInfo().start;return t.t=t.t.split(",")[0],it(e,t.t,n)}function rt(e,t){var n=0;return e||(n=yt()[0].getStreamInfo().start),it(e,t,n)}function it(e,t,n){var r=p.getRegularPeriods()[0],i=t.toString(),a=-1!==y(i).call(i,"posix:")?"now"===i.substring(6)?U()/1e3:x(i.substring(6)):NaN;return e&&!isNaN(a)?Z.calcPresentationTimeFromWallTime(new Date(1e3*a),r):x(i)+n}function at(e,t){try{var n=NaN;if(t&&!isNaN(t.maxFragmentDuration)&&isFinite(t.maxFragmentDuration))return t.maxFragmentDuration;if(e&&1===e.length){var r,i,o,s=e[0],l=K(r=K(i=K(o=[a.Z.VIDEO,a.Z.AUDIO,a.Z.TEXT]).call(o,(function(e,t){var n=p.getMediaInfoForType(s,t);return n&&!1!==n.isFragmented&&e.push(n),e}),[])).call(i,(function(e,t){var n=p.getVoRepresentations(t);return n&&n.length>0&&I(n).call(n,(function(t){t&&e.push(t)})),e}),[])).call(r,(function(e,t){var n=p.convertRepresentationToRepresentationInfo(t);return n&&n.fragmentDuration&&!isNaN(n.fragmentDuration)&&e.push(n.fragmentDuration),e}),[]);n=Math.max.apply(Math,function(e){if(h(e))return ir(e)}(u=l)||function(e){if(void 0!==g&&V(Object(e)))return q(e)}(u)||function(e,t){if(e){var n;if("string"==typeof e)return ir(e,t);var r=v(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?q(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ir(e,t):void 0}}(u)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}return isFinite(n)?n:NaN}catch(e){return NaN}var u}function ot(e){if(e.error)$=!0,mt();else{t.info("Manifest updated... updating data system wide.");var n=e.manifest;p.updatePeriods(n);var i=p.getUTCTimingSources();!p.getIsDynamic()||i&&0!==i.length||_e.trigger(E.Z.CONFORMANCE_VIOLATION,{level:rr.LEVELS.WARNING,event:rr.EVENTS.NO_UTC_TIMING_ELEMENT});var a=p.getIsDynamic()?d(i).call(i,ae.getUTCTimingSources()):i;r.filterUnsupportedFeatures(n).then((function(){A.initialize(n),b.attemptSync(a,p.getIsDynamic())}))}}function st(){return!!G&&G.getHasVideoTrack()}function lt(){return!!G&&G.getHasAudioTrack()}function ut(e,t){var n;t=t||new Date,I(n=Qe()).call(n,(function(n){n.finalisePlayList(t,e)})),_.addPlayList()}function ct(e){_.createPlaylistMetrics(1e3*ne.getTime(),e)}function ft(e){if(e.error){var n="";switch(e.error.code){case 1:n="MEDIA_ERR_ABORTED";break;case 2:n="MEDIA_ERR_NETWORK";break;case 3:n="MEDIA_ERR_DECODE",ye.counts.mediaErrorDecode+=1;break;case 4:n="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:n="MEDIA_ERR_ENCRYPTED";break;default:n="UNKNOWN"}"MEDIA_ERR_DECODE"===n&&ge.get().errors.recoverAttempts.mediaErrorDecode>=ye.counts.mediaErrorDecode?function(){t.warn("A MEDIA_ERR_DECODE occured: Resetting the MediaSource");var e=ne.getTime();G.deactivate(!1),t.warn("MediaSource has been resetted. Resuming playback from time ".concat(e)),Me(e,!1,!1)}():(Q=!0,e.error.message&&(n+=" ("+e.error.message+")"),e.error.msExtendedCode&&(n+=" (0x"+(e.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),t.fatal("Video Element Error: "+n),e.error&&t.fatal(e.error),P.error(new Te.Z(e.error.code,n)),mt())}}function dt(){return G?G.getStreamInfo():null}function ht(e){for(var t=0,n=B.length;t<n;t++)if(B[t].getId()===e)return B[t];return null}function gt(e){isNaN(e.newDuration)||tt(e.newDuration)}function pt(){B=[],ve=NaN,Y=null,X=!1,G=null,Q=!1,$=!1,se=!0,le=!0,oe=!1,W=!0,ce=null,pe=!1,he=!1,de=[],me=null,ye={counts:{mediaErrorDecode:0}}}function mt(){be(),b.reset(),ut(Q||$?Je.FAILURE_STOP_REASON:Je.USER_REQUEST_STOP_REASON);for(var t=0,n=B?B.length:0;t<n;t++)B[t].reset(Q);_e.off(E.Z.PLAYBACK_TIME_UPDATED,He,e),_e.off(E.Z.PLAYBACK_SEEKING,Oe,e),_e.off(E.Z.PLAYBACK_ERROR,ft,e),_e.off(E.Z.PLAYBACK_STARTED,Ve,e),_e.off(E.Z.PLAYBACK_PAUSED,Ke,e),_e.off(E.Z.PLAYBACK_ENDED,et,e),_e.off(E.Z.METRIC_ADDED,vt,e),_e.off(E.Z.MANIFEST_VALIDITY_CHANGED,gt,e),_e.off(E.Z.BUFFER_LEVEL_UPDATED,qe,e),_e.off(E.Z.QUALITY_CHANGE_REQUESTED,Ye,e),u.Z.KEY_SESSION_UPDATED&&_e.off(u.Z.KEY_SESSION_UPDATED,Ie,e),_e.off(u.Z.MANIFEST_UPDATED,ot,e),_e.off(u.Z.STREAM_BUFFERING_COMPLETED,ze,e),_e.off(u.Z.TIME_SYNCHRONIZATION_COMPLETED,Ae,e),_e.off(u.Z.CURRENT_TRACK_CHANGED,ke,e),_e.off(u.Z.SETTING_UPDATED_LIVE_DELAY,je,e),_e.off(u.Z.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,je,e),A.reset(),i.reset(),L.reset(),_.clearAllCurrentMetrics(),c.setValue(null),o.reset(),Z.reset(),O.reset(),J&&(T.detachMediaSource(te),J=null),te=null,Y&&(Y=null,H=null,c.getValue()&&_e.trigger(u.Z.PROTECTION_DESTROYED,{data:c.getValue().url})),Xe(),_e.trigger(u.Z.STREAM_TEARDOWN_COMPLETE),pt()}function vt(e){if(e.metric===s.Z.DVR_INFO){var t=lt()?a.Z.AUDIO:a.Z.VIDEO;e.mediaType===t&&T.setSeekable(e.value.range.start,e.value.range.end)}}function yt(){return B}return e={initialize:function(t,n){be(),W=t,H=n,Z.initialize(),(i=Wn(Ee).create()).setConfig({manifestModel:c,adapter:p,manifestLoader:o,errHandler:P,settings:ge,contentSteeringController:S}),i.initialize(),(L=nr(Ee).getInstance()).setConfig({manifestUpdater:i,playbackController:ne,settings:ge}),L.start(),b.setConfig({dashMetrics:_,baseURLController:A,errHandler:P,settings:ge}),b.initialize(),T.setConfig({settings:ge}),Y&&(_e.trigger(u.Z.PROTECTION_CREATED,{controller:Y}),Y.setMediaElement(te.getElement()),H&&Y.setProtectionData(H)),_e.on(E.Z.PLAYBACK_TIME_UPDATED,He,e),_e.on(E.Z.PLAYBACK_SEEKING,Oe,e),_e.on(E.Z.PLAYBACK_ERROR,ft,e),_e.on(E.Z.PLAYBACK_STARTED,Ve,e),_e.on(E.Z.PLAYBACK_PAUSED,Ke,e),_e.on(E.Z.PLAYBACK_ENDED,et,e),_e.on(E.Z.METRIC_ADDED,vt,e),_e.on(E.Z.MANIFEST_VALIDITY_CHANGED,gt,e),_e.on(E.Z.BUFFER_LEVEL_UPDATED,qe,e),_e.on(E.Z.QUALITY_CHANGE_REQUESTED,Ye,e),u.Z.KEY_SESSION_UPDATED&&_e.on(u.Z.KEY_SESSION_UPDATED,Ie,e),_e.on(u.Z.MANIFEST_UPDATED,ot,e),_e.on(u.Z.STREAM_BUFFERING_COMPLETED,ze,e),_e.on(u.Z.TIME_SYNCHRONIZATION_COMPLETED,Ae,e),_e.on(u.Z.CURRENT_TRACK_CHANGED,ke,e),_e.on(u.Z.SETTING_UPDATED_LIVE_DELAY,je,e),_e.on(u.Z.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,je,e)},getActiveStreamInfo:dt,addDVRMetric:Ge,hasVideoTrack:st,hasAudioTrack:lt,getStreamById:ht,getStreamForTime:Be,getTimeRelativeToStreamId:function(e,t){for(var n=null,r=0,i=0,a=null,o=0;o<B.length;o++){if(i=(n=B[o]).getStartTime(),a=n.getDuration(),ue(i)&&(r=i),n.getId()===t)return e-r;ue(a)&&(r+=a)}return null},load:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN;be(),ve=t,o.load(e)},loadWithManifest:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN;Se(),ve=t,i.setManifest(e)},getActiveStreamProcessors:Qe,setConfig:function(e){e&&(e.capabilities&&(n=e.capabilities),e.capabilitiesFilter&&(r=e.capabilitiesFilter),e.manifestLoader&&(o=e.manifestLoader),e.manifestModel&&(c=e.manifestModel),e.mediaPlayerModel&&(ie=e.mediaPlayerModel),e.customParametersModel&&(ae=e.customParametersModel),e.protectionController&&(Y=e.protectionController),e.adapter&&(p=e.adapter),e.dashMetrics&&(_=e.dashMetrics),e.errHandler&&(P=e.errHandler),e.timelineConverter&&(Z=e.timelineConverter),e.videoModel&&(te=e.videoModel),e.playbackController&&(ne=e.playbackController),e.serviceDescriptionController&&(re=e.serviceDescriptionController),e.contentSteeringController&&(S=e.contentSteeringController),e.textController&&(j=e.textController),e.abrController&&(C=e.abrController),e.mediaController&&(M=e.mediaController),e.settings&&(ge=e.settings),e.baseURLController&&(A=e.baseURLController),e.uriFragmentModel&&(N=e.uriFragmentModel),e.segmentBaseController&&(R=e.segmentBaseController),e.manifestUpdater&&(i=e.manifestUpdater))},setProtectionData:function(e){H=e,Y&&Y.setProtectionData(H)},getIsStreamSwitchInProgress:function(){return X},switchToVideoElement:function(e){G&&(ne.initialize(dt()),Me(e,!1,!0))},getHasMediaOrInitialisationError:function(){return Q||$},getStreams:yt,getActiveStream:function(){return G},getInitialPlayback:function(){return se},getAutoPlay:function(){return W},refreshManifest:function(){i.getIsUpdating()||i.refreshManifest()},reset:mt},t=(0,m.Z)(Ee).getInstance().getLogger(e),b=$n(Ee).getInstance(),T=er(Ee).getInstance(),O=Pe(Ee).getInstance(),pt(),e}ar.__dashjs_factory_name="StreamController";var or=p.Z.getSingletonFactory(ar);function sr(){var e,t,n,r,i,o,s,c,h,g,p,v,y=this.context,E=(0,l.Z)(y).getInstance();function _(){v.debug("Stopping the gap controller"),i&&(clearInterval(i),i=null),function(){E.off(u.Z.WALLCLOCK_TIME_UPDATED,I,this),E.off(u.Z.INITIAL_STREAM_SWITCH,A,this),E.off(u.Z.PLAYBACK_SEEKING,T,this),E.off(u.Z.BUFFER_REPLACEMENT_STARTED,b,e),E.off(u.Z.TRACK_CHANGE_RENDERED,S,e)}(),i=null,o=NaN,r=0,g=null,p={}}function T(){g&&(clearTimeout(g),g=null)}function b(e){try{if(e.streamId!==c.getActiveStreamInfo().id||e.mediaType!==a.Z.VIDEO&&e.mediaType!==a.Z.AUDIO)return;e.streamId===c.getActiveStreamInfo().id&&(p[e.mediaType]=!0)}catch(e){v.error(e)}}function S(e){e&&e.mediaType&&(p[e.mediaType]=!1)}function A(){i||function(){try{i||(v.debug("Starting the gap controller"),i=k((function(){w()&&M(s.getTime())}),100))}catch(e){}}()}function I(){if(w(n.get().streaming.gaps.enableSeekFix)&&++r>=10){var e=s.getTime();t===e?M(e,!0):(t=e,o=NaN),r=0}}function w(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!c.getActiveStream())return!1;var r=R(e=z(p)).call(e,(function(e){return p[e]})),i=!!t&&N();return!r&&n.get().streaming.gaps.jumpGaps&&c.getActiveStreamProcessors().length>0&&(!s.isSeeking()||i)&&!s.isPaused()&&!c.getIsStreamSwitchInProgress()&&!c.getHasMediaOrInitialisationError()}function N(){var e=c.getActiveStream(),t=x((e.getStartTime()+e.getDuration()).toFixed(5));return s.getTime()+n.get().streaming.gaps.threshold>=t}function C(e,t){try{if(!e||e.length<=1&&t>0)return NaN;for(var r=NaN,i=0;isNaN(r)&&i<e.length;){var a=i>0?e.end(i-1):0;t<e.start(i)&&a-t<n.get().streaming.gaps.threshold&&(r=i),i+=1}return r}catch(e){return null}}function D(e,t){for(var n=0,r=e.length;n<r;n++)if(t>=e.start(n)&&t<=e.end(n))return!0;return!1}function M(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=n.get().streaming.gaps.enableStallFix,a=n.get().streaming.gaps.stallSeek,l=n.get().streaming.gaps.smallGapLimit,u=n.get().streaming.gaps.jumpLargeGaps,p=h.getBufferRange(),m=NaN,y=!1;if(t=C(p,e),!isNaN(t)){var E=p.start(t),_=E-e;_>0&&(_<=l||u)&&(m=E)}var T=s.getTimeToStreamEnd();if(isNaN(m)&&r&&isFinite(T)&&!isNaN(T)&&T<l&&(m=x(s.getStreamEndTime().toFixed(5)),y=!0),i&&isNaN(m)&&r&&isNaN(t)&&D(p,e)&&(0===a?(v.warn("Toggle play pause to break stall"),h.pause(),h.play()):(v.warn("Jumping ".concat(a,"s to break stall")),m=e+a)),m>0&&o!==m&&m>e&&!g){var b=m-e;if(y){var S,A,I=c.getStreamForTime(m),R=I&&!!I.getPreloaded();v.warn(d(S=d(A="Jumping to end of stream because of gap from ".concat(e," to ")).call(A,m,". Gap duration: ")).call(S,b)),s.seek(m,!0,R)}else{var w=s.getIsDynamic(),N=t>0?p.end(t-1):e,M=w?1e3*Math.max(0,b-.1):0;g=f((function(){var e,t,n;s.seek(m,!0,!0),v.warn(d(e=d(t=d(n="Jumping gap occuring in period ".concat(c.getActiveStream().getStreamId()," starting at ")).call(n,N," and ending at ")).call(t,m,". Jumping by: ")).call(e,m-N)),g=null}),M)}o=m}}return e={reset:_,setConfig:function(e){e&&(e.settings&&(n=e.settings),e.playbackController&&(s=e.playbackController),e.streamController&&(c=e.streamController),e.videoModel&&(h=e.videoModel))},initialize:function(){!function(){E.on(u.Z.WALLCLOCK_TIME_UPDATED,I,this),E.on(u.Z.INITIAL_STREAM_SWITCH,A,this),E.on(u.Z.PLAYBACK_SEEKING,T,this),E.on(u.Z.BUFFER_REPLACEMENT_STARTED,b,e),E.on(u.Z.TRACK_CHANGE_RENDERED,S,e)}()}},v=(0,m.Z)(y).getInstance().getLogger(e),_(),e}sr.__dashjs_factory_name="GapController";var lr=p.Z.getSingletonFactory(sr);function ur(){var e,t,n,r,i,o,c,f,d,h,g=this.context,p=(0,l.Z)(g).getInstance();function v(){t=!1;var e=Bt.Z.parseUserAgent();n=e&&e.browser&&e.browser.name&&"safari"===e.browser.name.toLowerCase()}function y(){t=!1}function _(e){if(e.streamId===o.getActiveStreamInfo().id&&d){var t=c.getLiveDelay();c.getBufferLevel()>t/2&&(d=!1)}}function T(e){e.streamId===o.getActiveStreamInfo().id&&(d=e.state===s.Z.BUFFER_EMPTY)}function b(){f.getCatchupModeEnabled()||r.setPlaybackRate(1)}function S(){c.getIsDynamic()&&f.getCatchupModeEnabled()&&(f.getCatchupPlaybackRates().max>0||f.getCatchupPlaybackRates().min<0)&&!c.isPaused()&&!c.isSeeking()&&function(){try{return!(!c.getTime()>0||t)&&(I()===a.Z.LIVE_CATCHUP_MODE_LOLP?function(e,t){try{return Math.abs(A())>0||e<t}catch(e){return!1}}(c.getBufferLevel(),i.get().streaming.liveCatchup.playbackBufferMin):function(){try{return Math.abs(A())>0}catch(e){return!1}}())}catch(e){return!1}}()&&function(){if(!t&&r){var e,o=r.getPlaybackRate(),s=f.getCatchupPlaybackRates(),l=c.getBufferLevel(),u=A(),g=f.getCatchupMaxDrift();if(!isNaN(g)&&g>0&&u>g)h.info("[CatchupController]: Low Latency catchup mechanism. Latency too high, doing a seek to live point"),t=!0,c.seekToCurrentLive(!0,!1);else{var p=c.getCurrentLiveLatency(),m=c.getLiveDelay();e=I()===a.Z.LIVE_CATCHUP_MODE_LOLP?function(e,t,n,r,i){var a;if(i<r){var o=Math.abs(e.min),s=5*(i-r);a=1-o+2*o/(1+Math.pow(Math.E,-s)),h.debug("[LoL+ playback control_buffer-based] bufferLevel: "+i+", newRate: "+a)}else{if(Math.abs(t-n)<=.02*n)a=1;else{var l=t-n,u=l<0?Math.abs(e.min):e.max,c=5*l;a=1-u+2*u/(1+Math.pow(Math.E,-c))}h.debug("[LoL+ playback control_latency-based] latency: "+t+", newRate: "+a)}return a}(s,p,m,i.get().streaming.liveCatchup.playbackBufferMin,l):function(e,t,n,r){if(d)return 1;var i=t-n,a=i<0?Math.abs(e.min):e.max,o=5*i,s=1-a+2*a/(1+Math.pow(Math.E,-o));return c.getPlaybackStalled()&&r<=n/2&&i>0&&(s=1),s}(s,p,m,l);var v=n?.25:.02/(.5/s.max);e&&Math.abs(o-e)>=v&&(h.debug("[CatchupController]: Setting playback rate to ".concat(e)),r.setPlaybackRate(e))}}}()}function A(){return c.getCurrentLiveLatency()-c.getLiveDelay()}function I(){var e=i.get().streaming.liveCatchup.playbackBufferMin;return i.get().streaming.liveCatchup.mode!==a.Z.LIVE_CATCHUP_MODE_LOLP||null===e||isNaN(e)?a.Z.LIVE_CATCHUP_MODE_DEFAULT:a.Z.LIVE_CATCHUP_MODE_LOLP}function R(){f.getCatchupPlaybackRates(!0)}return e={reset:function(){p.off(E.Z.BUFFER_LEVEL_UPDATED,_,e),p.off(E.Z.BUFFER_LEVEL_STATE_CHANGED,T,e),p.off(E.Z.PLAYBACK_PROGRESS,S,e),p.off(E.Z.PLAYBACK_TIME_UPDATED,S,e),p.off(E.Z.PLAYBACK_SEEKED,y,e),p.off(u.Z.SETTING_UPDATED_CATCHUP_ENABLED,b,e),p.off(u.Z.SETTING_UPDATED_PLAYBACK_RATE_MIN,R,e),p.off(u.Z.SETTING_UPDATED_PLAYBACK_RATE_MAX,R,e),p.off(E.Z.STREAM_INITIALIZED,R,e),v(),r.setPlaybackRate(1,!0)},setConfig:function(e){e&&(e.settings&&(i=e.settings),e.videoModel&&(r=e.videoModel),e.streamController&&(o=e.streamController),e.playbackController&&(c=e.playbackController),e.mediaPlayerModel&&(f=e.mediaPlayerModel))},initialize:function(){p.on(E.Z.BUFFER_LEVEL_UPDATED,_,e),p.on(E.Z.BUFFER_LEVEL_STATE_CHANGED,T,e),p.on(E.Z.PLAYBACK_PROGRESS,S,e),p.on(E.Z.PLAYBACK_TIME_UPDATED,S,e),p.on(E.Z.PLAYBACK_SEEKED,y,e),p.on(u.Z.SETTING_UPDATED_CATCHUP_ENABLED,b,e),p.on(u.Z.SETTING_UPDATED_PLAYBACK_RATE_MIN,R,e),p.on(u.Z.SETTING_UPDATED_PLAYBACK_RATE_MAX,R,e),p.on(E.Z.STREAM_INITIALIZED,R,e),R()}},h=(0,m.Z)(g).getInstance().getLogger(e),v(),e}ur.__dashjs_factory_name="CatchupController";var cr=p.Z.getSingletonFactory(ur),fr=[a.Z.SERVICE_DESCRIPTION_DVB_LL_SCHEME],dr="video",hr="audio";function gr(){var e,t,n,r,i,s=this.context;function l(){t={liveDelay:NaN,liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN}},minBitrate:{},maxBitrate:{},initialBitrate:{},contentSteering:null},n=[]}function u(e,n,i){try{t[e][n]=i/1e3}catch(e){r.error(e)}}return e={getServiceDescriptionSettings:function(){return t},getProducerReferenceTimeOffsets:function(){return n},calculateProducerReferenceTimeOffsets:function(e){try{var t=[];if(e&&e.length>0){var s=[a.Z.VIDEO,a.Z.AUDIO,a.Z.TEXT],l=i.getAvailabilityStartTime()/1e3;I(e).call(e,(function(e){var n,r=K(n=K(s).call(s,(function(t,n){return d(t).call(t,i.getAllMediaInfoForType(e,n))}),[])).call(n,(function(t,n){var r;return I(r=i.getProducerReferenceTimes(e,n)).call(r,(function(r){var a=i.getVoRepresentations(n);if(a&&a.length>0&&a[0].adaptation&&a[0].segmentInfoType===o.Z.SEGMENT_TEMPLATE){var s=a[0],u=new Date(r[o.Z.WALL_CLOCK_TIME]).getTime()/1e3-(r[o.Z.PRESENTATION_TIME]/s[o.Z.TIMESCALE]-s[o.Z.PRESENTATION_TIME_OFFSET]+e.start),c=l-u;t.push({id:r[o.Z.ID],to:c})}})),t}),[]);t=d(t).call(t,r)}))}n=t}catch(e){r.error(e),n=[]}},applyServiceDescription:function(e){if(e&&e.serviceDescriptions){var i,o,s=w(i=e.serviceDescriptions).call(i,(function(e){return ne(fr).call(fr,e.schemeIdUri)})),l=w(o=e.serviceDescriptions).call(o,(function(e){return null==e.schemeIdUri})),c=s.length>0?s[s.length-1]:l[l.length-1];c&&(c.latency&&c.latency.target>0&&function(e,i){var o;if(e.schemeIdUri,a.Z.SERVICE_DESCRIPTION_DVB_LL_SCHEME,o=function(e){return{liveDelay:e.latency.target/1e3,maxDrift:!isNaN(e.latency.max)&&e.latency.max>e.latency.target?(e.latency.max-e.latency.target+500)/1e3:NaN,referenceId:e.latency.referenceId||NaN}}(e),n.length>0){var s,l,u,c=function(e){var t,r=0,i=w(n).call(n,(function(t){return t.id===e.referenceId}));return 0===i.length?(r=n.length>0?n[0].to:0,t=n[0].id||NaN):(r=i[0].to||0,t=i[0].id||NaN),{to:r,id:t}}(o),f=c.to,h=c.id;t.liveDelay=o.liveDelay-f,t.liveCatchup.maxDrift=o.maxDrift,r.debug(d(s=d(l=d(u="\n Found latency properties coming from service description. Applied time offset of ".concat(f," from ProducerReferenceTime element with id ")).call(u,h,".\n Live Delay: ")).call(l,o.liveDelay-f,", Live catchup max drift: ")).call(s,o.maxDrift,"\n "))}else t.liveDelay=o.liveDelay,t.liveCatchup.maxDrift=o.maxDrift,r.debug(d(i="Found latency properties coming from service description: Live Delay: ".concat(o.liveDelay,", Live catchup max drift: ")).call(i,o.maxDrift))}(c),c.playbackRate&&function(e){var n=e.playbackRate.min?Math.round(1e3*(e.playbackRate.min-1))/1e3:NaN,i=e.playbackRate.max?Math.round(1e3*(e.playbackRate.max-1))/1e3:NaN;t.liveCatchup.playbackRate.min=n,t.liveCatchup.playbackRate.max=i,r.debug("Found latency properties coming from service description: Live catchup min playback rate: ".concat(n)),r.debug("Found latency properties coming from service description: Live catchup max playback rate: ".concat(i))}(c),c.operatingQuality,c.operatingBandwidth&&function(e){if(e&&e.operatingBandwidth&&e.operatingBandwidth.mediaType&&"all"!==e.operatingBandwidth.mediaType){var t={};t.minBandwidth=e.operatingBandwidth.min,t.maxBandwidth=e.operatingBandwidth.max,t.targetBandwidth=e.operatingBandwidth.target;var n=[];e.operatingBandwidth.mediaType===dr||e.operatingBandwidth.mediaType===hr?n.push(e.operatingBandwidth.mediaType):"any"===e.operatingBandwidth.mediaType&&(n.push(hr),n.push(dr)),I(n).call(n,(function(e){isNaN(t.minBandwidth)||u("minBitrate",e,t.minBandwidth),isNaN(t.maxBandwidth)||u("maxBitrate",e,t.maxBandwidth),isNaN(t.targetBandwidth)||u("initialBitrate",e,t.targetBandwidth)}))}}(c),c.contentSteering&&function(e){t.contentSteering=e.contentSteering}(c))}},reset:function(){l()},setConfig:function(e){e&&e.adapter&&(i=e.adapter)}},r=(0,m.Z)(s).getInstance().getLogger(e),l(),e}gr.__dashjs_factory_name="ServiceDescriptionController";var pr=p.Z.getSingletonFactory(gr),mr=n(3973),vr=n.n(mr),yr=n(3039);function Er(){var e,t,n,r,i,o,s,c,f=this.context,d=(0,l.Z)(f).getInstance();function h(e,t){return e&&n[t]&&n[t][e]?n[t][e].list:[]}function g(e,t){return e&&n[t]&&n[t][e]?n[t][e].current:null}function p(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e&&e.streamInfo){var i=e.type,s=e.streamInfo,l=s.id,f=g(i,l);if(n[l]&&n[l][i]&&(n[l][i].current=e,n[l][i].current&&(i!==a.Z.TEXT&&!E(e,f)||i===a.Z.TEXT&&e.isFragmented)&&d.trigger(u.Z.CURRENT_TRACK_CHANGED,{oldMediaInfo:f,newMediaInfo:e,switchMode:r.get().streaming.trackSwitchMode[i]},{streamId:l}),!t)){var h=T(e);if(!h||!n[l][i].storeLastSettings)return;h.roles&&(h.role=h.roles[0],delete h.roles),h.accessibility&&(h.accessibility=h.accessibility[0]),h.audioChannelConfiguration&&(h.audioChannelConfiguration=h.audioChannelConfiguration[0]),o[i]=h,c.setSavedMediaSettings(i,h)}}}function v(e,t){e&&t&&(i[e]=t)}function y(e){return e?i[e]:null}function E(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;var n=e.id===t.id,r=e.viewpoint===t.viewpoint,i=b(e.viewpointsWithSchemeIdUri)===b(t.viewpointsWithSchemeIdUri),a=e.lang===t.lang,o=e.codec===t.codec,s=e.roles.toString()===t.roles.toString(),l=b(e.rolesWithSchemeIdUri)===b(t.rolesWithSchemeIdUri),u=e.accessibility.toString()===t.accessibility.toString(),c=b(e.accessibilitiesWithSchemeIdUri)===b(t.accessibilitiesWithSchemeIdUri),f=e.audioChannelConfiguration.toString()===t.audioChannelConfiguration.toString(),d=b(e.audioChannelConfigurationsWithSchemeIdUri)===b(t.audioChannelConfigurationsWithSchemeIdUri);return n&&o&&r&&i&&a&&s&&l&&u&&c&&f&&d}function _(){n={},o={},i={audio:null,video:null,text:null}}function T(e){var t={lang:e.lang,viewpoint:e.viewpoint,roles:e.roles,accessibility:e.accessibility,audioChannelConfiguration:e.audioChannelConfiguration,codec:e.codec};return t.lang||t.viewpoint||t.role&&t.role.length>0||t.accessibility&&t.accessibility.length>0||t.audioChannelConfiguration&&t.audioChannelConfiguration.length>0?t:null}function S(e,t,n){var r=[];return I(e).call(e,(function(e){t(n,e)&&r.push(e)})),0!==r.length?r:e}function A(e,t){try{return!e.lang||e.lang instanceof RegExp?t.lang.match(e.lang):""!==t.lang&&(0,yr.extendedFilter)(t.lang,vr()(e.lang)).length>0}catch(e){return!1}}function R(e,t){return void 0===e.index||null===e.index||t.index===e.index}function N(e,t){return!e.viewpoint||e.viewpoint===t.viewpoint}function C(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!e.role||!!w(n=t.roles).call(n,(function(t){return t===e.role}))[0];return i||t.type===a.Z.AUDIO&&r}function D(e,t){var n;return e.accessibility?!!w(n=t.accessibility).call(n,(function(t){return t===e.accessibility}))[0]:!t.accessibility.length}function M(e,t){var n;return!e.audioChannelConfiguration||!!w(n=t.audioChannelConfiguration).call(n,(function(t){return t===e.audioChannelConfiguration}))[0]}function L(e,t){return!e.codec||e.codec===t.codec}function O(e){var t,n=0,r=[];return I(e).call(e,(function(e){var i;(t=Math.max.apply(Math,ee(i=e.bitrateList).call(i,(function(e){return e.bandwidth}))))>n?(n=t,r=[e]):t===n&&r.push(e)})),r}function P(e){var t,n=1/0,r=[];return I(e).call(e,(function(e){var i,a=K(i=e.bitrateList).call(i,(function(e,t){var n=Math.max(1,t.width*t.height);return e+t.bandwidth/n}),0);(t=a/e.bitrateList.length)<n?(n=t,r=[e]):t===n&&r.push(e)})),r}function F(e){var t,n=0,r=[];return I(e).call(e,(function(e){(t=e.representationCount)>n?(n=t,r=[e]):t===n&&r.push(e)})),r}function x(e,n){if(e===a.Z.TEXT)return n[0];var i,o=r.get().streaming.selectionModeForInitialTrack,l=s.getCustomInitialTrackSelectionFunction();if(l&&"function"==typeof l)i=l(n);else switch(o){case a.Z.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY:i=function(e){var t,n,r=(t=0,n=[],I(e).call(e,(function(e){isNaN(e.selectionPriority)||(e.selectionPriority>t?(t=e.selectionPriority,n=[e]):e.selectionPriority===t&&n.push(e))})),n);return r.length>1&&(r=O(r)),r.length>1&&(r=F(r)),r}(n);break;case a.Z.TRACK_SELECTION_MODE_HIGHEST_BITRATE:i=function(e){var t=O(e);return t.length>1&&(t=F(t)),t}(n);break;case a.Z.TRACK_SELECTION_MODE_FIRST_TRACK:i=k(n);break;case a.Z.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:i=function(e){var t=P(e);return t.length>1&&(t=O(t)),t}(n);break;case a.Z.TRACK_SELECTION_MODE_WIDEST_RANGE:i=function(e){var t=F(e);return t.length>1&&(t=O(e)),t}(n);break;default:t.warn("Track selection mode ".concat(o," is not supported. Falling back to TRACK_SELECTION_MODE_FIRST_TRACK")),i=k(n)}return i.length>0?i[0]:n[0]}function k(e){return e[0]}return e={setInitialMediaSettingsForType:function(e,t){var n=o[e]||y(e),r=h(e,t.id),i=[];n||((n=c.getSavedMediaSettings(e))&&delete n.codec,v(e,n)),r&&0!==r.length&&(n&&(i=S(i=q(r),A,n),i=S(i,R,n),i=S(i,N,n),e===a.Z.AUDIO&&o[e]||(i=S(i,C,n)),i=S(i,D,n),i=S(i,M,n),i=S(i,L,n)),0===i.length?p(x(e,r),!0):i.length>1?p(x(e,i)):p(i[0]))},addTrack:function(e){if(e){var t=e.type;if((i=t)===a.Z.AUDIO||i===a.Z.VIDEO||i===a.Z.TEXT||i===a.Z.IMAGE){var i,o,s=e.streamInfo.id;n[s]||(n[s]={audio:{list:[],storeLastSettings:o=r.get().streaming.saveLastMediaSettingsForCurrentStreamingSession,current:null},video:{list:[],storeLastSettings:o,current:null},text:{list:[],storeLastSettings:o,current:null},image:{list:[],storeLastSettings:o,current:null}});for(var l=n[s][t].list,u=0,c=l.length;u<c;++u)if(E(l[u],e))return;l.push(e)}}},getTracksFor:h,getCurrentTrackFor:g,isCurrentTrack:function(e){if(!e)return!1;var t=e.type,r=e.streamInfo.id;return n[r]&&n[r][t]&&E(n[r][t].current,e)},setTrack:p,selectInitialTrack:x,setInitialSettings:v,getInitialSettings:y,getTracksWithHighestBitrate:O,getTracksWithHighestEfficiency:P,getTracksWithWidestRange:F,isTracksEqual:E,matchSettings:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{var r,i,o,s=!1;if(e.lang){if(e.lang instanceof RegExp)s=t.lang.match(e.lang);else if(""!==t.lang){var l=vr()(e.lang);l&&(s=(0,yr.extendedFilter)(t.lang,l).length>0)}}else s=!0;var u=void 0===e.index||null===e.index||t.index===e.index,c=!e.viewpoint||e.viewpoint===t.viewpoint,f=!e.role||!!w(r=t.roles).call(r,(function(t){return t===e.role}))[0],d=!e.accessibility||!!w(i=t.accessibility).call(i,(function(t){return t===e.accessibility}))[0],h=!e.audioChannelConfiguration||!!w(o=t.audioChannelConfiguration).call(o,(function(t){return t===e.audioChannelConfiguration}))[0];return s&&u&&c&&(f||t.type===a.Z.AUDIO&&n)&&d&&h}catch(e){return!1}},matchSettingsLang:A,matchSettingsIndex:R,matchSettingsViewPoint:N,matchSettingsRole:C,matchSettingsAccessibility:D,matchSettingsAudioChannelConfig:M,saveTextSettingsDisabled:function(){c.setSavedMediaSettings(a.Z.TEXT,null)},setConfig:function(e){e&&(e.domStorage&&(c=e.domStorage),e.settings&&(r=e.settings),e.customParametersModel&&(s=e.customParametersModel))},reset:_},t=(0,m.Z)(f).getInstance().getLogger(e),_(),e}Er.__dashjs_factory_name="MediaController";var _r=p.Z.getSingletonFactory(Er);p.Z.updateSingletonFactory(Er.__dashjs_factory_name,_r);var Tr=_r,br=NaN,Sr=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data={baseUrls:t||null,selectedIdx:n||br},this.children=[]};function Ar(){var e,t,n,r,i=this.context,a=Nt(i).getInstance();function o(e,t,n){var r=s(n);e[t]?a.areEqual(r,e[t].data.baseUrls)||(e[t].data.baseUrls=r,e[t].data.selectedIdx=br):e[t]=new Sr(r)}function s(e){var t=n.getBaseURLsFromElement(e),i=r.getSynthesizedBaseUrlElements(t);return i&&i.length>0&&(t=d(t).call(t,i)),t}function l(e,n){var r,i=n||t;e(i.data),i.children&&I(r=i.children).call(r,(function(t){return l(e,t)}))}function u(){t=new Sr}return e={reset:u,update:function(e){!function(e,r){!function(){if(!n||!n.hasOwnProperty("getBaseURLsFromElement")||!n.hasOwnProperty("getRepresentationSortFunction"))throw new Error("setConfig function has to be called previously")}();var i=s(e);a.areEqual(i,t.data.baseUrls)||(t.data.baseUrls=i,t.data.selectedIdx=br),e&&e.Period_asArray&&I(r=e.Period_asArray).call(r,(function(e,r){var i;o(t.children,r,e),e.AdaptationSet_asArray&&I(i=e.AdaptationSet_asArray).call(i,(function(e,i){var a,s;o(t.children[r].children,i,e),e.Representation_asArray&&I(a=Z(s=e.Representation_asArray).call(s,n.getRepresentationSortFunction())).call(a,(function(e,n){o(t.children[r].children[i].children,n,e)}))}))}))}(e)},getForPath:function(e){var n=t,r=[n.data];return e&&I(e).call(e,(function(e){(n=n.children[e])&&r.push(n.data)})),w(r).call(r,(function(e){return e.baseUrls.length}))},invalidateSelectedIndexes:function(e){l((function(t){isNaN(t.selectedIdx)||e===t.baseUrls[t.selectedIdx].serviceLocation&&(t.selectedIdx=br)}))},setConfig:function(e){e.adapter&&(n=e.adapter),e.contentSteeringController&&(r=e.contentSteeringController)},getBaseUrls:function(e){return s(e)}},u(),e}Ar.__dashjs_factory_name="BaseURLTreeModel";var Ir=p.Z.getClassFactory(Ar);function Rr(e){var t=(e=e||{}).blacklistController;return{select:function(e){var n,r;return e&&function(e,t){var n,r,i=0,a=[],o=0;if((r=w(t=Z(e).call(e,(function(e,t){var n=e.dvbPriority-t.dvbPriority;return isNaN(n)?0:n}))).call(t,(function(e,t,n){return!t||n[0].dvbPriority&&e.dvbPriority&&n[0].dvbPriority===e.dvbPriority}))).length)return r.length>1&&(I(r).call(r,(function(e){i+=e.dvbWeight,a.push(i)})),n=Math.floor(Math.random()*(i-1)),ce(a).call(a,(function(e,t){return o=t,!(n<e)}))),r[o]}((r=[],w(n=w(e).call(e,(function(e){return!t.contains(e.serviceLocation)||(e.dvbPriority&&r.push(e.dvbPriority),!1)}))).call(n,(function(e){return!r.length||!e.dvbPriority||-1===y(r).call(r,e.dvbPriority)}))))}}}Rr.__dashjs_factory_name="DVBSelector";var wr=p.Z.getClassFactory(Rr);function Nr(e){var t=(e=e||{}).blacklistController;return{select:function(e){var n,r=0;return e&&R(e).call(e,(function(e,n){return r=n,!t.contains(e.serviceLocation)}))&&(n=e[r]),n}}}Nr.__dashjs_factory_name="BasicSelector";var Cr=p.Z.getClassFactory(Nr);function Dr(){var e,t,n,r=this.context;function i(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=0,i=NaN,a=function(){var a=e[r],o=le(t).call(t,(function(e){return e.serviceLocation&&e.serviceLocation===a}));if(-1!==o&&!n.contains(t[o].serviceLocation))return i=o,"break";r+=1};r<e.length;){var o=a();if("break"===o)break}return i}return e={selectBaseUrlIndex:function(e){var n=NaN;if(isNaN(e.selectedIdx)){var r=t.getSteeringDataFromManifest();r&&r.defaultServiceLocationArray.length>0&&(n=i(r.defaultServiceLocationArray,e.baseUrls))}var a=t.getCurrentSteeringResponseData();return e.baseUrls&&e.baseUrls.length&&a&&a.pathwayPriority&&a.pathwayPriority.length&&(n=i(a.pathwayPriority,e.baseUrls)),n},setConfig:function(e){e.blacklistController&&(n=e.blacklistController),e.contentSteeringController&&(t=e.contentSteeringController)}},t=Hn(r).getInstance(),e}Dr.__dashjs_factory_name="ContentSteeringSelector";var Mr=p.Z.getClassFactory(Dr);function Lr(){var e,t,n,r,i,a,o=this.context,s=(0,l.Z)(o).getInstance(),c=(0,we.Z)(o).getInstance();function f(){t.reset()}return e={chooseSelector:function(e){(0,Ke.PS)(e,"boolean"),a=e?r:n},select:function(e){if(e){var t;if(c.get().streaming.applyContentSteering){var r=i.selectBaseUrlIndex(e);isNaN(r)||-1===r||(e.selectedIdx=r)}if(!isNaN(e.selectedIdx))return e.baseUrls[e.selectedIdx];var o=a.select(e.baseUrls);return o?(e.selectedIdx=y(t=e.baseUrls).call(t,o),o):(s.trigger(u.Z.URL_RESOLUTION_FAILED,{error:new Te.Z(Re.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE,Re.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE)}),void(a===n&&f()))}},reset:f,setConfig:function(e){e.selector&&(a=e.selector),e.contentSteeringSelector&&(i=e.contentSteeringSelector)}},t=Un(o).create({updateEventName:u.Z.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,addBlacklistEventName:u.Z.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD}),n=Cr(o).create({blacklistController:t}),r=wr(o).create({blacklistController:t}),(i=Mr(o).create()).setConfig({blacklistController:t}),a=n,e}Lr.__dashjs_factory_name="BaseURLSelector";var Or=p.Z.getClassFactory(Lr);function Pr(){var e,t,n,r,i,a=this.context,o=(0,l.Z)(a).getInstance(),s=(0,Xe.Z)(a).getInstance();function c(e){n.update(e),r.chooseSelector(t.getIsDVB(e)),o.trigger(E.Z.BASE_URLS_UPDATED,{baseUrls:f(e)})}function f(e){return n.getBaseUrls(e)}return e={reset:function(){n.reset(),r.reset()},initialize:function(e){n.setConfig({adapter:t,contentSteeringController:i}),c(e)},resolve:function(e){var t,i=K(t=n.getForPath(e)).call(t,(function(e,t){var n=r.select(t);return n?(s.isRelative(n.url)?e.url=s.resolve(n.url,e.url):(e.url=n.url,e.serviceLocation=n.serviceLocation),e.availabilityTimeOffset=n.availabilityTimeOffset,e.availabilityTimeComplete=n.availabilityTimeComplete,e.queryParams=n.queryParams,e):new _t}),new _t);if(!s.isRelative(i.url))return i},setConfig:function(e){e.baseURLTreeModel&&(n=e.baseURLTreeModel),e.baseURLSelector&&(r=e.baseURLSelector),e.adapter&&(t=e.adapter),e.contentSteeringController&&(i=e.contentSteeringController)},getBaseUrls:f,update:c},n=Ir(a).create(),r=Or(a).create(),o.on(u.Z.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,(function(e){n.invalidateSelectedIndexes(e.entry)}),e),e}Pr.__dashjs_factory_name="BaseURLController";var Fr=p.Z.getClassFactory(Pr);function xr(e){return xr="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},xr(e)}function kr(e,t){return kr=M||function(e,t){return e.__proto__=t,e},kr(e,t)}function Ur(e,t){return!t||"object"!==xr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Zr(e){return Zr=M?L:function(e){return e.__proto__||L(e)},Zr(e)}var Br=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=O(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&kr(e,t)}(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!P)return!1;if(P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Zr(t);if(n){var i=Zr(this).constructor;e=P(r,arguments,i)}else e=r.apply(this,arguments);return Ur(this,e)});function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=r.call(this)).url=e||null,n.type=t||null,n.mediaType=a.Z.STREAM,n.responseType="",n}return i}(ge.Z);function Gr(e){e=e||{};var t=this.context,n=(0,l.Z)(t).getInstance(),r=_n(t).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,errors:Re});return{load:function(e,t,i){var a=function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(r,a){t.resolved=!0,t.resolvedContent=r||null,n.trigger(u.Z.XLINK_ELEMENT_LOADED,{element:t,resolveObject:i,error:r||a?null:new Te.Z(Re.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE,Re.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE+e)})}));if("urn:mpeg:dash:resolve-to-zero:2013"===e)a(null,!0);else{var o=new Br(e,Ne.w.XLINK_EXPANSION_TYPE);r.load({request:o,success:function(e){a(e)},error:function(){a(null)}})}},reset:function(){r&&(r.abort(),r=null)}}}Gr.__dashjs_factory_name="XlinkLoader";var qr=p.Z.getClassFactory(Gr),Yr=function(e){function t(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function n(e){return"string"==typeof e?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):e}function r(e,t,n,r){for(var i=0;i<e.length;i++){var a=e[i];if("string"==typeof a){if(a==r)break}else if(a instanceof RegExp){if(a.test(r))break}else if("function"==typeof a&&a(t,n,r))break}return i!=e.length}function i(t,n,i){"property"===e.arrayAccessForm&&(t[n]instanceof Array?t[n+"_asArray"]=t[n]:t[n+"_asArray"]=[t[n]]),!(t[n]instanceof Array)&&e.arrayAccessFormPaths.length>0&&r(e.arrayAccessFormPaths,t,n,i)&&(t[n]=[t[n]])}function a(e){var t=e.split(/[-T:+Z]/g),n=new Date(t[0],t[1]-1,t[2]),r=t[5].split(".");if(n.setHours(t[3],t[4],r[0]),r.length>1&&n.setMilliseconds(r[1]),t[6]&&t[7]){var i=60*t[6]+Number(t[7]);i=0+("-"==(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*i:i),n.setMinutes(n.getMinutes()-i-n.getTimezoneOffset())}else-1!==y(e).call(e,"Z",e.length-1)&&(n=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())));return n}function o(t,n,i,a){return!(1==n&&e.xmlElementsFilter.length>0)||r(e.xmlElementsFilter,t,i,a)}function s(n,l){if(9==n.nodeType){for(var u=new Object,c=n.childNodes,f=0;f<c.length;f++)1==(p=c[f]).nodeType&&(e.ignoreRoot?u=s(p):(u={})[m=t(p)]=s(p));return u}if(1==n.nodeType){var d,h;(u=new Object).__cnt=0;var g=[];for(c=n.childNodes,f=0;f<c.length;f++){var p,m=t(p=c[f]);if(8!=p.nodeType){var v=l+"."+m;if(o(u,p.nodeType,m,v))if(u.__cnt++,null==u[m]){var y=s(p,v);("#text"!=m||/[^\s]/.test(y))&&((E={})[m]=y,g.push(E)),u[m]=y,i(u,m,v)}else{var E;null!=u[m]&&(u[m]instanceof Array||(u[m]=[u[m]],i(u,m,v))),y=s(p,v),("#text"!=m||/[^\s]/.test(y))&&((E={})[m]=y,g.push(E)),u[m][u[m].length]=y}}}u.__children=g;for(var _=t(n),b=0;b<n.attributes.length;b++){var S=n.attributes[b];u.__cnt++;for(var A=S.value,I=0,R=e.matchers.length;I<R;I++){var w=e.matchers[I];w.test(S,_)&&(A=w.converter(S.value))}u[e.attributePrefix+S.name]=A}var N=function(e){return e.prefix}(n);return null!=N&&""!=N&&(u.__cnt++,u.__prefix=N),null!=u["#text"]&&(u.__text=u["#text"],u.__text instanceof Array&&(u.__text=u.__text.join("\n")),e.stripWhitespaces&&(u.__text=T(d=u.__text).call(d)),delete u["#text"],"property"==e.arrayAccessForm&&delete u["#text_asArray"],u.__text=function(t,n,i){if(e.datetimeAccessFormPaths.length>0){var o=i.split(".#")[0];return r(e.datetimeAccessFormPaths,t,n,o)?a(t):t}return t}(u.__text,m,l+"."+m)),null!=u["#cdata-section"]&&(u.__cdata=u["#cdata-section"],delete u["#cdata-section"],"property"==e.arrayAccessForm&&delete u["#cdata-section_asArray"]),0==u.__cnt&&"text"==e.emptyNodeForm?u="":1==u.__cnt&&null!=u.__text?u=u.__text:1!=u.__cnt||null==u.__cdata||e.keepCData?u.__cnt>1&&null!=u.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""==u.__text||""==T(h=u.__text).call(h))&&delete u.__text:u=u.__cdata,delete u.__cnt,!e.enableToStringFunc||null==u.__text&&null==u.__cdata||(u.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),u}if(3==n.nodeType||4==n.nodeType)return n.nodeValue}function l(t,r,i,a){var o="<"+(null!=t&&null!=t.__prefix?t.__prefix+":":"")+r;if(null!=i)for(var s=0;s<i.length;s++){var l=i[s],u=t[l];e.escapeMode&&(u=n(u)),o+=" "+l.substr(e.attributePrefix.length)+"=",e.useDoubleQuotes?o+='"'+u+'"':o+="'"+u+"'"}return o+(a?"/>":">")}function u(e,t){return"</"+(null!=e.__prefix?e.__prefix+":":"")+t+">"}function c(t,n){var r,i,a,o,s;return"property"==e.arrayAccessForm&&(s="_asArray",-1!==y(r=o=n.toString()).call(r,s,o.length-s.length))||0==y(i=n.toString()).call(i,e.attributePrefix)||0==y(a=n.toString()).call(a,"__")||t[n]instanceof Function}function f(e){var t=0;if(e instanceof Object)for(var n in e)c(e,n)||t++;return t}function d(t,n,i){return 0==e.jsonPropertiesFilter.length||""==i||r(e.jsonPropertiesFilter,t,n,i)}function h(t){var n=[];if(t instanceof Object)for(var r in t){var i,a;-1==y(i=r.toString()).call(i,"__")&&0==y(a=r.toString()).call(a,e.attributePrefix)&&n.push(r)}return n}function g(t){var r="";return t instanceof Object?r+=function(t){var r="";return null!=t.__cdata&&(r+="<![CDATA["+t.__cdata+"]]>"),null!=t.__text&&(e.escapeMode?r+=n(t.__text):r+=t.__text),r}(t):null!=t&&(e.escapeMode?r+=n(t):r+=t),r}function p(e,t){return""===e?t:e+"."+t}function m(e,t,n,r){var i="";if(0==e.length)i+=l(e,t,n,!0);else for(var a=0;a<e.length;a++)i+=l(e[a],t,h(e[a]),!1),i+=v(e[a],p(r,t)),i+=u(e[a],t);return i}function v(e,t){var n="";if(f(e)>0)for(var r in e)if(!c(e,r)&&(""==t||d(e,r,p(t,r)))){var i=e[r],a=h(i);null==i||null==i?n+=l(i,r,a,!0):i instanceof Object?i instanceof Array?n+=m(i,r,a,t):i instanceof Date?(n+=l(i,r,a,!1),n+=i.toISOString(),n+=u(i,r)):f(i)>0||null!=i.__text||null!=i.__cdata?(n+=l(i,r,a,!1),n+=v(i,p(t,r)),n+=u(i,r)):n+=l(i,r,a,!0):(n+=l(i,r,a,!1),n+=g(i),n+=u(i,r))}return n+g(e)}void 0===(e=e||{}).escapeMode&&(e.escapeMode=!0),void 0===e.attributePrefix&&(e.attributePrefix="_"),e.arrayAccessForm=e.arrayAccessForm||"none",e.emptyNodeForm=e.emptyNodeForm||"text",void 0===e.enableToStringFunc&&(e.enableToStringFunc=!0),e.arrayAccessFormPaths=e.arrayAccessFormPaths||[],void 0===e.skipEmptyTextNodesForObj&&(e.skipEmptyTextNodesForObj=!0),void 0===e.stripWhitespaces&&(e.stripWhitespaces=!0),e.datetimeAccessFormPaths=e.datetimeAccessFormPaths||[],void 0===e.useDoubleQuotes&&(e.useDoubleQuotes=!1),e.xmlElementsFilter=e.xmlElementsFilter||[],e.jsonPropertiesFilter=e.jsonPropertiesFilter||[],void 0===e.keepCData&&(e.keepCData=!1),void 0===e.ignoreRoot&&(e.ignoreRoot=!1),this.parseXmlString=function(e){var t;if(void 0===e)return null;if(window.DOMParser){var n=new window.DOMParser;try{(t=n.parseFromString(e,"text/xml")).getElementsByTagNameNS("*","parsererror").length>0&&(t=null)}catch(e){t=null}}else 0==y(e).call(e,"<?")&&(e=e.substr(y(e).call(e,"?>")+2)),(t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e);return t},this.asArray=function(e){return void 0===e||null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?a(e):e},this.xml2json=function(e){return s(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return null!=t?this.xml2json(t):null},this.json2xml_str=function(e){return v(e,"")},this.json2xml=function(e){var t=this.json2xml_str(e);return this.parseXmlString(t)},this.getVersion=function(){return"1.2.0"}},jr="onLoad";function Hr(e){e=e||{};var t,n,r,i,a,s,c=this.context,f=(0,l.Z)(c).getInstance(),h=(0,Xe.Z)(c).getInstance();function g(e,t,n){var r,i,a={};a.elements=e,a.type=t,a.resolveType=n,0===a.elements.length&&m(a);for(var o=0;o<a.elements.length;o++)r=a.elements[o],i=h.isHTTPURL(r.url)?r.url:r.originalContent.BaseURL+r.url,s.load(i,r,a)}function p(e){var t,n,r="";if(t=e.element,n=e.resolveObject,t.resolvedContent){var i,o,s=0;0===y(i=t.resolvedContent).call(i,"<?xml")&&(s=y(o=t.resolvedContent).call(o,"?>")+2),r=t.resolvedContent.substr(0,s)+"<response>"+t.resolvedContent.substr(s)+"</response>",t.resolvedContent=a.xml_str2json(r)}(function(e){var t;for(t=0;t<e.elements.length;t++)if(!1===e.elements[t].resolved)return!1;return!0})(n)&&m(n)}function m(e){var t,n,a=[];if(function(e){var t,n,a,o,s,l,u=[];for(o=e.elements.length-1;o>=0;o--){if(n=(t=e.elements[o]).type+"_asArray",t.resolvedContent){if(t.resolvedContent)for(s=0;s<t.resolvedContent[n].length;s++)a=t.resolvedContent[n][s],u.push(a)}else delete t.originalContent["xlink:actuate"],delete t.originalContent["xlink:href"],u.push(t.originalContent);for(S(c=t.parentElement[n]).call(c,t.index,1),l=0;l<u.length;l++){var c,f;S(f=t.parentElement[n]).call(f,t.index+l,0,u[l])}u=[]}e.elements.length>0&&r.run(i)}(e),"onActuate"===e.resolveType&&f.trigger(u.Z.XLINK_READY,{manifest:i}),e.resolveType===jr)switch(e.type){case o.Z.PERIOD:for(t=0;t<i[o.Z.PERIOD+"_asArray"].length;t++)(n=i[o.Z.PERIOD+"_asArray"][t]).hasOwnProperty(o.Z.ADAPTATION_SET+"_asArray")&&(a=d(a).call(a,v(n[o.Z.ADAPTATION_SET+"_asArray"],n,o.Z.ADAPTATION_SET,jr))),n.hasOwnProperty(o.Z.EVENT_STREAM+"_asArray")&&(a=d(a).call(a,v(n[o.Z.EVENT_STREAM+"_asArray"],n,o.Z.EVENT_STREAM,jr)));g(a,o.Z.ADAPTATION_SET,jr);break;case o.Z.ADAPTATION_SET:f.trigger(u.Z.XLINK_READY,{manifest:i})}}function v(e,t,n,r){var i,a,o,s=[];for(a=e.length-1;a>=0;a--)(i=e[a]).hasOwnProperty("xlink:href")&&"urn:mpeg:dash:resolve-to-zero:2013"===i["xlink:href"]&&S(e).call(e,a,1);for(a=0;a<e.length;a++)(i=e[a]).hasOwnProperty("xlink:href")&&i.hasOwnProperty("xlink:actuate")&&i["xlink:actuate"]===r&&(o=E(i["xlink:href"],t,n,a,r,i),s.push(o));return s}function E(e,t,n,r,i,a){return{url:e,parentElement:t,type:n,index:r,resolveType:i,originalContent:a,resolvedContent:null,resolved:!1}}return t={resolveManifestOnLoad:function(e){a=new Yr({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!1,ignoreRoot:!0,matchers:n}),(i=e).Period_asArray?g(v(i.Period_asArray,i,o.Z.PERIOD,jr),o.Z.PERIOD,jr):f.trigger(u.Z.XLINK_READY,{manifest:i})},setMatchers:function(e){e&&(n=e)},setIron:function(e){e&&(r=e)},reset:function(){f.off(u.Z.XLINK_ELEMENT_LOADED,p,t),s&&(s.reset(),s=null)}},f.on(u.Z.XLINK_ELEMENT_LOADED,p,t),s=qr(c).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,settings:e.settings}),t}Hr.__dashjs_factory_name="XlinkController";var Vr=p.Z.getClassFactory(Hr);function Kr(e){return Kr="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},Kr(e)}function zr(e){function t(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function n(e,n,r){for(var i=0,a=e.length;i<a;++i){var o=e[i];if(n[o.name])if(r[o.name]){if(o.merge){var s=n[o.name],l=r[o.name];"object"===Kr(s)&&"object"===Kr(l)?t(s,l):r[o.name]=s+l}}else r[o.name]=n[o.name]}}function r(e,t){for(var i=0,a=e.children.length;i<a;++i){var o=e.children[i],s=t[o.name+"_asArray"];if(s)for(var l=0,u=s.length;l<u;++l){var c=s[l];n(e.properties,t,c),r(o,c)}}}return{run:function(t){if(null===t||"object"!==Kr(t))return t;if(t.Period_asArray&&"period"in e)for(var n=e.period,i=t.Period_asArray,a=0,o=i.length;a<o;++a){var s=i[a];if(r(n,s),"adaptationset"in e){var l=s.AdaptationSet_asArray;if(l)for(var u=e.adaptationset,c=0,f=l.length;c<f;++c)r(u,l[c])}}return t}}}zr.__dashjs_factory_name="ObjectIron";var Wr=p.Z.getClassFactory(zr),Xr=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._test=t,this._converter=n}var t;return(t=[{key:"test",get:function(){return this._test}},{key:"converter",get:function(){return this._converter}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e.prototype,t),e}();function Qr(e){return Qr="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},Qr(e)}function $r(e,t,n){return t in e?C(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jr(e,t){return Jr=M||function(e,t){return e.__proto__=t,e},Jr(e,t)}function ei(e,t){return!t||"object"!==Qr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ti(e){return ti=M?L:function(e){return e.__proto__||L(e)},ti(e)}var ni=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=O(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jr(e,t)}(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!P)return!1;if(P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ti(t);if(n){var i=ti(this).constructor;e=P(r,arguments,i)}else e=r.apply(this,arguments);return ei(this,e)});function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,(function(e,t){var n,r=($r(n={},o.Z.MPD,[o.Z.ID,o.Z.PROFILES]),$r(n,o.Z.PERIOD,[o.Z.ID]),$r(n,o.Z.BASE_URL,[o.Z.SERVICE_LOCATION,o.Z.BYTE_RANGE]),$r(n,o.Z.SEGMENT_BASE,[o.Z.INDEX_RANGE]),$r(n,o.Z.INITIALIZATION,[o.Z.RANGE]),$r(n,o.Z.REPRESENTATION_INDEX,[o.Z.RANGE]),$r(n,o.Z.SEGMENT_LIST,[o.Z.INDEX_RANGE]),$r(n,o.Z.BITSTREAM_SWITCHING,[o.Z.RANGE]),$r(n,o.Z.SEGMENT_URL,[o.Z.MEDIA_RANGE,o.Z.INDEX_RANGE]),$r(n,o.Z.SEGMENT_TEMPLATE,[o.Z.INDEX_RANGE,o.Z.MEDIA,o.Z.INDEX,o.Z.INITIALIZATION_MINUS,o.Z.BITSTREAM_SWITCHING_MINUS]),$r(n,o.Z.ASSET_IDENTIFIER,[o.Z.VALUE,o.Z.ID]),$r(n,o.Z.EVENT_STREAM,[o.Z.VALUE]),$r(n,o.Z.ADAPTATION_SET,[o.Z.PROFILES,o.Z.MIME_TYPE,o.Z.SEGMENT_PROFILES,o.Z.CODECS,o.Z.CONTENT_TYPE]),$r(n,o.Z.FRAME_PACKING,[o.Z.VALUE,o.Z.ID]),$r(n,o.Z.AUDIO_CHANNEL_CONFIGURATION,[o.Z.VALUE,o.Z.ID]),$r(n,o.Z.CONTENT_PROTECTION,[o.Z.VALUE,o.Z.ID]),$r(n,o.Z.ESSENTIAL_PROPERTY,[o.Z.VALUE,o.Z.ID]),$r(n,o.Z.SUPPLEMENTAL_PROPERTY,[o.Z.VALUE,o.Z.ID]),$r(n,o.Z.INBAND_EVENT_STREAM,[o.Z.VALUE,o.Z.ID]),$r(n,o.Z.ACCESSIBILITY,[o.Z.VALUE,o.Z.ID]),$r(n,o.Z.ROLE,[o.Z.VALUE,o.Z.ID]),$r(n,o.Z.RATING,[o.Z.VALUE,o.Z.ID]),$r(n,o.Z.VIEWPOINT,[o.Z.VALUE,o.Z.ID]),$r(n,o.Z.CONTENT_COMPONENT,[o.Z.CONTENT_TYPE]),$r(n,o.Z.REPRESENTATION,[o.Z.ID,o.Z.DEPENDENCY_ID,o.Z.MEDIA_STREAM_STRUCTURE_ID]),$r(n,o.Z.SUBSET,[o.Z.ID]),$r(n,o.Z.METRICS,[o.Z.METRICS_MINUS]),$r(n,o.Z.REPORTING,[o.Z.VALUE,o.Z.ID]),n);if(r.hasOwnProperty(t)){var i=r[t];return void 0!==i&&y(i).call(i,e.name)>=0}return!1}),(function(e){return String(e)}))}return i}(Xr);function ri(e){return ri="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},ri(e)}function ii(e,t){return ii=M||function(e,t){return e.__proto__=t,e},ii(e,t)}function ai(e,t){return!t||"object"!==ri(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function oi(e){return oi=M?L:function(e){return e.__proto__||L(e)},oi(e)}var si=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,li=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=O(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ii(e,t)}(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!P)return!1;if(P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=oi(t);if(n){var i=oi(this).constructor;e=P(r,arguments,i)}else e=r.apply(this,arguments);return ai(this,e)});function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,(function(e){for(var t=[o.Z.MIN_BUFFER_TIME,o.Z.MEDIA_PRESENTATION_DURATION,o.Z.MINIMUM_UPDATE_PERIOD,o.Z.TIMESHIFT_BUFFER_DEPTH,o.Z.MAX_SEGMENT_DURATION,o.Z.MAX_SUBSEGMENT_DURATION,o.Z.SUGGESTED_PRESENTATION_DELAY,o.Z.START,a.Z.START_TIME,o.Z.DURATION],n=t.length,r=0;r<n;r++)if(e.nodeName===t[r])return si.test(e.value);return!1}),(function(e){var t=si.exec(e),n=31536e3*x(t[3]||0)+2592e3*x(t[5]||0)+86400*x(t[7]||0)+3600*x(t[9]||0)+60*x(t[11]||0)+x(t[13]||0);return void 0!==t[1]&&(n=-n),n}))}return i}(Xr);function ui(e){return ui="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},ui(e)}function ci(e,t){return ci=M||function(e,t){return e.__proto__=t,e},ci(e,t)}function fi(e,t){return!t||"object"!==ui(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function di(e){return di=M?L:function(e){return e.__proto__||L(e)},di(e)}var hi=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+-])([0-9]{2})(?::?)([0-9]{2}))?/,gi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=O(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ci(e,t)}(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!P)return!1;if(P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=di(t);if(n){var i=di(this).constructor;e=P(r,arguments,i)}else e=r.apply(this,arguments);return fi(this,e)});function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,(function(e){return hi.test(e.value)}),(function(e){var t,n=hi.exec(e);if(t=Date.UTC(_(n[1],10),_(n[2],10)-1,_(n[3],10),_(n[4],10),_(n[5],10),n[6]&&_(n[6],10)||0,n[7]&&1e3*x(n[7])||0),n[9]&&n[10]){var r=60*_(n[9],10)+_(n[10],10);t+=("+"===n[8]?-1:1)*r*60*1e3}return new Date(t)}))}return i}(Xr);function pi(e){return pi="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},pi(e)}function mi(e,t){return mi=M||function(e,t){return e.__proto__=t,e},mi(e,t)}function vi(e,t){return!t||"object"!==pi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yi(e){return yi=M?L:function(e){return e.__proto__||L(e)},yi(e)}var Ei=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,_i=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=O(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mi(e,t)}(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!P)return!1;if(P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=yi(t);if(n){var i=yi(this).constructor;e=P(r,arguments,i)}else e=r.apply(this,arguments);return vi(this,e)});function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,(function(e){return Ei.test(e.value)}),(function(e){return x(e)}))}return i}(Xr);function Ti(e){return Ti="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},Ti(e)}function bi(e,t,n){return t in e?C(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Si(e,t){return Si=M||function(e,t){return e.__proto__=t,e},Si(e,t)}function Ai(e,t){return!t||"object"!==Ti(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ii(e){return Ii=M?L:function(e){return e.__proto__||L(e)},Ii(e)}var Ri=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=O(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Si(e,t)}(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!P)return!1;if(P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Ii(t);if(n){var i=Ii(this).constructor;e=P(r,arguments,i)}else e=r.apply(this,arguments);return Ai(this,e)});function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,(function(e,t){var n,r=(bi(n={},o.Z.ADAPTATION_SET,[o.Z.LANG]),bi(n,o.Z.REPRESENTATION,[o.Z.LANG]),bi(n,o.Z.CONTENT_COMPONENT,[o.Z.LANG]),bi(n,o.Z.LABEL,[o.Z.LANG]),bi(n,o.Z.GROUP_LABEL,[o.Z.LANG]),n);if(r.hasOwnProperty(t)){var i=r[t];return void 0!==i&&y(i).call(i,e.name)>=0}return!1}),(function(e){return vr()(e)||String(e)}))}return i}(Xr),wi=function(){function e(t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._name=t,this._merge=(n=t)&&n.length&&n.charAt(0)===n.charAt(0).toUpperCase()}var t;return(t=[{key:"name",get:function(){return this._name}},{key:"merge",get:function(){return this._merge}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e.prototype,t),e}(),Ni=function(){function e(t,n,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._name=t||"",this._properties=[],this._children=r||[],h(n)&&I(n).call(n,(function(e){i._properties.push(new wi(e))}))}var t;return(t=[{key:"name",get:function(){return this._name}},{key:"children",get:function(){return this._children}},{key:"properties",get:function(){return this._properties}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e.prototype,t),e}();function Ci(e){return Ci="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},Ci(e)}function Di(e,t){return Di=M||function(e,t){return e.__proto__=t,e},Di(e,t)}function Mi(e,t){return!t||"object"!==Ci(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Li(e){return Li=M?L:function(e){return e.__proto__||L(e)},Li(e)}var Oi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=O(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Di(e,t)}(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!P)return!1;if(P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Li(t);if(n){var i=Li(this).constructor;e=P(r,arguments,i)}else e=r.apply(this,arguments);return Mi(this,e)});function i(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var e=[o.Z.PROFILES,o.Z.WIDTH,o.Z.HEIGHT,o.Z.SAR,o.Z.FRAMERATE,o.Z.AUDIO_SAMPLING_RATE,o.Z.MIME_TYPE,o.Z.SEGMENT_PROFILES,o.Z.CODECS,o.Z.MAXIMUM_SAP_PERIOD,o.Z.START_WITH_SAP,o.Z.MAX_PLAYOUT_RATE,o.Z.CODING_DEPENDENCY,o.Z.SCAN_TYPE,o.Z.FRAME_PACKING,o.Z.AUDIO_CHANNEL_CONFIGURATION,o.Z.CONTENT_PROTECTION,o.Z.ESSENTIAL_PROPERTY,o.Z.ESSENTIAL_PROPERTY+"_asArray",o.Z.SUPPLEMENTAL_PROPERTY,o.Z.INBAND_EVENT_STREAM];return r.call(this,o.Z.ADAPTATION_SET,e,[new Ni(o.Z.REPRESENTATION,e,[new Ni(o.Z.SUB_REPRESENTATION,e)])])}return i}(Ni);function Pi(e){return Pi="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},Pi(e)}function Fi(e,t){return Fi=M||function(e,t){return e.__proto__=t,e},Fi(e,t)}function xi(e,t){return!t||"object"!==Pi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ki(e){return ki=M?L:function(e){return e.__proto__||L(e)},ki(e)}var Ui=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=O(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fi(e,t)}(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!P)return!1;if(P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ki(t);if(n){var i=ki(this).constructor;e=P(r,arguments,i)}else e=r.apply(this,arguments);return xi(this,e)});function i(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var e=[o.Z.SEGMENT_BASE,o.Z.SEGMENT_TEMPLATE,o.Z.SEGMENT_LIST];return r.call(this,o.Z.PERIOD,e,[new Ni(o.Z.ADAPTATION_SET,e,[new Ni(o.Z.REPRESENTATION,e)])])}return i}(Ni);function Zi(e){e=e||{};var t,n,r,i,a,o=this.context,s=e.debug;return t={parse:function(e){var t,r,o,s=window.performance.now();if(!(o=i.xml_str2json(e)))throw new Error("parsing the manifest failed");var l=window.performance.now();o.Patch?((o=o.Patch).add_asArray&&I(t=o.add_asArray).call(t,(function(e){return a.run(e)})),o.replace_asArray&&I(r=o.replace_asArray).call(r,(function(e){return a.run(e)}))):(o=o.MPD,a.run(o));var u=window.performance.now();return n.info("Parsing complete: ( xml2json: "+(l-s).toPrecision(3)+"ms, objectiron: "+(u-l).toPrecision(3)+"ms, total: "+((u-s)/1e3).toPrecision(3)+"s)"),o.protocol="DASH",o},getMatchers:function(){return r},getIron:function(){return a}},n=s.getLogger(t),r=[new li,new gi,new _i,new Ri,new ni],i=new Yr({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!0,ignoreRoot:!1,matchers:r}),a=Wr(o).create({adaptationset:new Oi,period:new Ui}),t}Zi.__dashjs_factory_name="DashParser";var Bi=p.Z.getClassFactory(Zi);function Gi(e){e=e||{};var t,n,r,i,s,c=this.context,f=e.debug,h=e.settings,g=(0,l.Z)(c).getInstance(),p=(0,Xe.Z)(c).getInstance(),m=e.mssHandler,v=e.errHandler;function E(e){g.trigger(u.Z.INTERNAL_MANIFEST_LOADED,{manifest:e.manifest})}function _(e){var t=null;return y(e).call(e,"SmoothStreamingMedia")>-1?(m&&(t=m.createMssParser(),m.createMssFragmentProcessor(),m.registerEvents()),t):y(e).call(e,"MPD")>-1||y(e).call(e,"Patch")>-1?Bi(c).create({debug:f}):t}return t={load:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=new Date,l=new Br(e,Ne.w.MPD_TYPE);t&&(l.serviceLocation=t),a&&(l.queryParams=a),l.requestStartDate||(l.requestStartDate=o),g.trigger(u.Z.MANIFEST_LOADING_STARTED,{request:l}),r.load({request:l,success:function(t,r,a){var o,l,c;if(i)if(a&&a!==e?(l=p.parseBaseUrl(a),o=a):(p.isRelative(e)&&(e=p.resolve(e,window.location.href)),l=p.parseBaseUrl(e)),"No Content"!=r)if(null===s&&(s=_(t)),null!==s){i.setMatchers(s.getMatchers()),i.setIron(s.getIron());try{c=s.parse(t)}catch(t){return void g.trigger(u.Z.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new Te.Z(Re.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,Re.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(e))})}if(c){if(c.url=o||e,c.originalUrl||(c.originalUrl=c.url),h&&h.get().streaming.enableManifestDurationMismatchFix&&c.mediaPresentationDuration&&c.Period_asArray.length>1){var f,d=K(f=c.Period_asArray).call(f,(function(e,t){return e+t.duration}),0);!isNaN(d)&&c.mediaPresentationDuration>d&&(n.warn("Media presentation duration greater than duration of all periods. Setting duration to total period duration"),c.mediaPresentationDuration=d)}c.baseUri=l,c.loadedTime=new Date,i.resolveManifestOnLoad(c),g.trigger(u.Z.ORIGINAL_MANIFEST_LOADED,{originalManifest:t})}else g.trigger(u.Z.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new Te.Z(Re.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,Re.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(e))})}else g.trigger(u.Z.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new Te.Z(Re.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,Re.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(e))});else g.trigger(u.Z.INTERNAL_MANIFEST_LOADED,{manifest:null})},error:function(t,n,r){var i;g.trigger(u.Z.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new Te.Z(Re.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE,Re.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE+d(i="".concat(e,", ")).call(i,r))})}})},reset:function(){g.off(u.Z.XLINK_READY,E,t),m&&m.reset(),i&&(i.reset(),i=null),r&&(r.abort(),r=null)}},n=f.getLogger(t),g.on(u.Z.XLINK_READY,E,t),r=_n(c).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,urlUtils:p,constants:a.Z,dashConstants:o.Z,errors:Re,requestTimeout:e.settings.get().streaming.manifestRequestTimeout}),i=Vr(c).create({errHandler:v,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,settings:e.settings}),s=null,t}Gi.__dashjs_factory_name="ManifestLoader";var qi=p.Z.getClassFactory(Gi);function Yi(){var e=this.context,t=(0,l.Z)(e).getInstance();return{error:function(e){t.trigger(u.Z.ERROR,{error:e})}}}Yi.__dashjs_factory_name="ErrorHandler";var ji=p.Z.getSingletonFactory(Yi),Hi=n(1715);function Vi(){var e,t,n,r,i,o,s=this.context,c=(0,l.Z)(s).getInstance();function f(e,r){var i;if(!r||!r.Period_asArray||0===r.Period_asArray.length)return F.resolve();var s=[];return I(i=r.Period_asArray).call(i,(function(r){s.push(function(e,r){return new F((function(i){if(e&&e.AdaptationSet_asArray&&0!==e.AdaptationSet_asArray.length){var s,l=[];I(s=e.AdaptationSet_asArray).call(s,(function(e){t.getIsTypeOf(e,r)&&l.push(function(e,r){return new F((function(i){if(e.Representation_asArray&&0!==e.Representation_asArray.length){var s,l=[],u=[];I(s=e.Representation_asArray).call(s,(function(i,o){var s=t.getCodec(e,o,!1),c=function(e,t,n){switch(e){case a.Z.VIDEO:return function(e,t){return{codec:t,width:e.width||null,height:e.height||null,framerate:e.frameRate||null,bitrate:e.bandwidth||null}}(t,n);case a.Z.AUDIO:return function(e,t){var n=e.audioSamplingRate||null;return{codec:t,bitrate:e.bandwidth||null,samplerate:n}}(t,n);default:return null}}(r,i,s);u.push(c),l.push(n.supportsCodec(c,r))})),F.all(l).then((function(t){var n;e.Representation_asArray=w(n=e.Representation_asArray).call(n,(function(e,n){return t[n]||o.debug("[Stream] Codec ".concat(u[n].codec," not supported ")),t[n]})),i()})).catch((function(){i()}))}else i()}))}(e,r))})),F.all(l).then((function(){var t;e.AdaptationSet_asArray=w(t=e.AdaptationSet_asArray).call(t,(function(e){var t=e.Representation_asArray&&e.Representation_asArray.length>0;return t||(c.trigger(u.Z.ADAPTATION_SET_REMOVED_NO_CAPABILITIES,{adaptationSet:e}),o.warn("AdaptationSet has been removed because of no supported Representation")),t})),i()})).catch((function(){i()}))}else i()}))}(r,e))})),F.all(s)}return e={setConfig:function(e){e&&(e.adapter&&(t=e.adapter),e.capabilities&&(n=e.capabilities),e.settings&&(r=e.settings),e.customParametersModel&&(i=e.customParametersModel))},filterUnsupportedFeatures:function(e){return new F((function(s){var l=[];l.push(f(a.Z.VIDEO,e)),l.push(f(a.Z.AUDIO,e)),F.all(l).then((function(){r.get().streaming.capabilities.filterUnsupportedEssentialProperties&&function(e,r){e&&e.Period_asArray&&0!==e.Period_asArray.length&&I(r=e.Period_asArray).call(r,(function(e){var r;e.AdaptationSet_asArray=w(r=e.AdaptationSet_asArray).call(r,(function(e){var r;return!e.Representation_asArray||0===e.Representation_asArray.length||(e.Representation_asArray=w(r=e.Representation_asArray).call(r,(function(e){var r=t.getEssentialPropertiesForRepresentation(e);if(r&&r.length>0)for(var i=0;i<r.length;){if(!n.supportsEssentialProperty(r[i]))return o.debug("[Stream] EssentialProperty not supported: "+r[i].schemeIdUri),!1;i+=1}return!0})),e.Representation_asArray&&e.Representation_asArray.length>0)}))}))}(e),function(e,t){var n=i.getCustomCapabilitiesFilters();n&&0!==n.length&&e&&e.Period_asArray&&0!==e.Period_asArray.length&&I(t=e.Period_asArray).call(t,(function(e){var t;e.AdaptationSet_asArray=w(t=e.AdaptationSet_asArray).call(t,(function(e){var t;return!e.Representation_asArray||0===e.Representation_asArray.length||(e.Representation_asArray=w(t=e.Representation_asArray).call(t,(function(e){return!R(n).call(n,(function(t){return!t(e)}))})),e.Representation_asArray&&e.Representation_asArray.length>0)}))}))}(e),s()})).catch((function(){s()}))}))}},o=(0,m.Z)(s).getInstance().getLogger(e),e}Vi.__dashjs_factory_name="CapabilitiesFilter";var Ki=p.Z.getSingletonFactory(Vi),zi=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null};function Wi(){var e;return{initialize:function(t){if(e=new zi,!t)return null;var n=y(t).call(t,"#");if(-1!==n)for(var r=t.substr(n+1).split("&"),i=0,a=r.length;i<a;++i){var o=r[i],s=y(o).call(o,"=");if(-1!==s){var l=o.substring(0,s);e.hasOwnProperty(l)&&(e[l]=o.substr(s+1))}}},getURIFragmentData:function(){return e}}}Wi.__dashjs_factory_name="URIFragmentModel";var Xi=p.Z.getSingletonFactory(Wi);function Qi(){var e,t=this.context,n=(0,l.Z)(t).getInstance();return{getValue:function(){return e},setValue:function(t){e=t,t&&n.trigger(u.Z.MANIFEST_LOADED,{data:t})}}}Qi.__dashjs_factory_name="ManifestModel";var $i=p.Z.getSingletonFactory(Qi),Ji=-.5;function ea(){var e,t,n,r,i=this.context,a=(0,we.Z)(i).getInstance();function o(e,n){return isNaN(e)?0:e>0?(n&&t.warn("Supplied minimum playback rate is a positive value when it should be negative or 0. The supplied rate will not be applied and set to 0: 100% playback speed."),0):e<Ji?(n&&t.warn("Supplied minimum playback rate is out of range and will be limited to ".concat(Ji,": ").concat(-50,"% playback speed.")),Ji):e}function s(e,n){return isNaN(e)?0:e<0?(n&&t.warn("Supplied maximum playback rate is a negative value when it should be negative or 0. The supplied rate will not be applied and set to 0: 100% playback speed."),0):e>1?(n&&t.warn("Supplied maximum playback rate is out of range and will be limited to ".concat(1,": ").concat(200,"% playback speed.")),1):e}function l(){var e=a.get().streaming.buffer.stableBufferTime>0?a.get().streaming.buffer.stableBufferTime:a.get().streaming.buffer.fastSwitchEnabled?20:12,t=n.getLiveDelay();return!isNaN(t)&&t>0?Math.min(e,t):e}return e={getCatchupMaxDrift:function(){if(!isNaN(a.get().streaming.liveCatchup.maxDrift)&&a.get().streaming.liveCatchup.maxDrift>0)return a.get().streaming.liveCatchup.maxDrift;var e=r.getServiceDescriptionSettings();return e&&e.liveCatchup&&!isNaN(e.liveCatchup.maxDrift)&&e.liveCatchup.maxDrift>0?e.liveCatchup.maxDrift:12},getCatchupModeEnabled:function(){return null!==a.get().streaming.liveCatchup.enabled?a.get().streaming.liveCatchup.enabled:n.getInitialCatchupModeActivated()},getStableBufferTime:l,getInitialBufferLevel:function(){var e=a.get().streaming.buffer.initialBufferLevel;return isNaN(e)||e<0?0:Math.min(l(),e)},getRetryAttemptsForType:function(e){var t=isNaN(a.get().streaming.retryAttempts.lowLatencyMultiplyFactor)?5:a.get().streaming.retryAttempts.lowLatencyMultiplyFactor;return n.getLowLatencyModeEnabled()?a.get().streaming.retryAttempts[e]*t:a.get().streaming.retryAttempts[e]},getRetryIntervalsForType:function(e){var t=isNaN(a.get().streaming.retryIntervals.lowLatencyReductionFactor)?10:a.get().streaming.retryIntervals.lowLatencyReductionFactor;return n.getLowLatencyModeEnabled()?a.get().streaming.retryIntervals[e]/t:a.get().streaming.retryIntervals[e]},getCatchupPlaybackRates:function(e){var t=a.get().streaming.liveCatchup.playbackRate;if(!isNaN(t.min)||!isNaN(t.max))return{min:o(t.min,e),max:s(t.max,e)};var n=r.getServiceDescriptionSettings();if(n&&n.liveCatchup&&(!isNaN(n.liveCatchup.playbackRate.min)||!isNaN(n.liveCatchup.playbackRate.max))){var i=n.liveCatchup.playbackRate;return{min:o(i.min,e),max:s(i.max,e)}}return{min:-.5,max:.5}},getAbrBitrateParameter:function(e,t){try{var n=a.get().streaming.abr[e][t];if(!isNaN(n)&&-1!==n)return n;var i=r.getServiceDescriptionSettings();return i&&i[e]&&!isNaN(i[e][t])?i[e][t]:-1}catch(e){return-1}},setConfig:function(e){e.playbackController&&(n=e.playbackController),e.serviceDescriptionController&&(r=e.serviceDescriptionController)},reset:function(){}},t=(0,m.Z)(i).getInstance().getLogger(e),e}ea.__dashjs_factory_name="MediaPlayerModel";var ta=p.Z.getSingletonFactory(ea),na=n(1767);function ra(e){var t=(e=e||{}).abrController,n=e.switchHistory,r=e.droppedFramesHistory,i=e.currentRequest,a=e.useBufferOccupancyABR,o=e.useL2AABR,s=e.useLoLPABR,l=e.streamProcessor?e.streamProcessor.getScheduleController():null,u=e.streamProcessor?e.streamProcessor.getRepresentationInfo():null,c=e.videoModel?e.videoModel:null;function f(){return u?u.mediaInfo:null}return{getMediaType:function(){var e=f();return e?e.type:null},getMediaInfo:f,getDroppedFramesHistory:function(){return r},getCurrentRequest:function(){return i},getSwitchHistory:function(){return n},getStreamInfo:function(){var e=f();return e?e.streamInfo:null},getScheduleController:function(){return l},getAbrController:function(){return t},getRepresentationInfo:function(){return u},useBufferOccupancyABR:function(){return a},useL2AABR:function(){return o},useLoLPABR:function(){return s},getVideoModel:function(){return c}}}ra.__dashjs_factory_name="RulesContext";var ia=p.Z.getClassFactory(ra),aa=n(2068);function oa(){var e=[],t=[];return{push:function(n){n.newValue===aa.Z.NO_CHANGE&&(n.newValue=n.oldValue),e[n.oldValue]||(e[n.oldValue]={noDrops:0,drops:0,dropSize:0});var r=n.newValue-n.oldValue,i=r<0?1:0,a=i?-r:0,o=i?0:1;if(e[n.oldValue].drops+=i,e[n.oldValue].dropSize+=a,e[n.oldValue].noDrops+=o,t.push({idx:n.oldValue,noDrop:o,drop:i,dropSize:a}),t.length>8){var s=t.shift();e[s.idx].drops-=s.drop,e[s.idx].dropSize-=s.dropSize,e[s.idx].noDrops-=s.noDrop}},getSwitchRequests:function(){return e},reset:function(){e=[],t=[]}}}oa.__dashjs_factory_name="SwitchRequestHistory";var sa=p.Z.getClassFactory(oa);function la(){var e={},t={},n={};return{push:function(r,i,a){if(i){e[r]||(e[r]=[],t[r]=0,n[r]=0);var o=a&&a.droppedVideoFrames?a.droppedVideoFrames:0,s=a&&a.totalVideoFrames?a.totalVideoFrames:0,l=o-t[r];t[r]=o;var u=s-n[r];n[r]=s;var c=e[r];isNaN(i)||(c[i]?(c[i].droppedVideoFrames+=l,c[i].totalVideoFrames+=u):c[i]={droppedVideoFrames:l,totalVideoFrames:u})}},getFrameHistory:function(t){return e[t]},clearForStream:function(r){try{delete e[r],delete t[r],delete n[r]}catch(e){}},reset:function(){e={},t={},n={}}}}la.__dashjs_factory_name="DroppedFramesHistory";var ua=p.Z.getClassFactory(la);function ca(e){var t,n,r,i,o,s=this.context,u=(e=e||{}).settings,c=(0,l.Z)(s).getInstance();function f(e,t,n,r){var i=Math.pow(.5,n/r.fast);e.fastEstimate=(1-i)*t+i*e.fastEstimate;var a=Math.pow(.5,n/r.slow);e.slowEstimate=(1-a)*t+a*e.slowEstimate,e.totalWeight+=n}function d(e,s,l){return u.get().streaming.abr.movingAverageMethod!==a.Z.MOVING_AVERAGE_SLIDING_WINDOW?function(e,t){var n=e?o.throughputHalfLife:o.latencyHalfLife,a=e?r[t]:i[t];if(!a||a.totalWeight<=0)return NaN;var s=a.fastEstimate/(1-Math.pow(.5,a.totalWeight/n.fast)),l=a.slowEstimate/(1-Math.pow(.5,a.totalWeight/n.slow));return e?Math.min(s,l):Math.max(s,l)}(e,s):function(e,r,i,a){var o=function(e,r,i){var a,o;if(e?(a=t[r],o=i?3:4):(a=n[r],o=4),a){if(o>=a.length)o=a.length;else if(e)for(var s=1;s<o;++s){var l=a[a.length-s]/a[a.length-s-1];if((l>=1.3||l<=1/1.3)&&(o+=1)===a.length)break}}else o=0;return o}(e,r,i),s=(e?t:n)[r];return 0!==o&&s&&0!==s.length?K(a=s=v(s).call(s,-o)).call(a,(function(e,t){return e+t}))/s.length:NaN}(e,s,l)}function h(e,t){return d(!0,e,t)}function g(e){t[e]=t[e]||[],n[e]=n[e]||[],r[e]=r[e]||{fastEstimate:0,slowEstimate:0,totalWeight:0},i[e]=i[e]||{fastEstimate:0,slowEstimate:0,totalWeight:0}}function p(){t={},n={},r={},i={}}var m={push:function(e,s,l){if(s.trace&&s.trace.length){var d,h,p,m=s.tresponse.getTime()-s.trequest.getTime()||1,v=s._tfinish.getTime()-s.tresponse.getTime()||1,y=K(d=s.trace).call(d,(function(e,t){return e+t.b[0]}),0),_=0;if(0!==(p=s._fileLoaderType&&s._fileLoaderType===a.Z.FILE_LOADER_TYPES.FETCH?K(h=s.trace).call(h,(function(e,t){return e+t.d}),0):l?v:m+v)&&(_=Math.round(8*y/p)),s.cmsd){var T=s.cmsd.dynamic&&s.cmsd.dynamic.etp?s.cmsd.dynamic.etp:null;if(T){var b=u.get().streaming.cmsd.abr.etpWeightRatio;b>0&&b<=1&&(_=_*(1-b)+T*b)}}if(g(e),function(e,t,n){return e===a.Z.VIDEO?n<u.get().streaming.cacheLoadThresholds[a.Z.VIDEO]:e===a.Z.AUDIO?n<u.get().streaming.cacheLoadThresholds[a.Z.AUDIO]:void 0}(e,0,v)){if(t[e].length>0&&!t[e].hasCachedEntries)return;t[e].hasCachedEntries=!0}else t[e]&&t[e].hasCachedEntries&&function(e){delete t[e],delete n[e],delete r[e],delete i[e],g(e)}(e);t[e].push(_),c.trigger(E.Z.THROUGHPUT_MEASUREMENT_STORED,{throughput:_,mediaType:e,httpRequest:s}),t[e].length>20&&t[e].shift(),n[e].push(m),n[e].length>20&&n[e].shift(),f(r[e],_,.001*v,o.throughputHalfLife),f(i[e],m,1,o.latencyHalfLife)}},getAverageThroughput:h,getSafeAverageThroughput:function(e,t){var n=h(e,t);return isNaN(n)||(n*=u.get().streaming.abr.bandwidthSafetyFactor),n},getAverageLatency:function(e){return d(!1,e)},reset:p};return o={throughputHalfLife:{fast:3,slow:8},latencyHalfLife:{fast:1,slow:2}},p(),m}ca.__dashjs_factory_name="ThroughputHistory";var fa=p.Z.getClassFactory(ca);function da(){var e,t,n,r,i,o,c,d,g,p,v,y,_,T,S,A,I,R,w,N,C,D,M,L,O,P,F,x=this.context,k=(0,m.Z)(x).getInstance(),U=(0,l.Z)(x).getInstance();function Z(){i={},o={},d={},c={},N={},M={},L={},O={},void 0===p&&(p=!1),C&&C.reset(),w=void 0,C=void 0,D=void 0,clearTimeout(g),g=null}function B(t){var i=t.request.mediaType,a=t.streamId;if(i&&a&&c[a]&&F.get().streaming.abr.autoSwitchBitrate[i]){var o=c[a][i];if(o){var l=ia(x).create({abrController:e,streamProcessor:o,currentRequest:t.request,useBufferOccupancyABR:M[i],useL2AABR:L[i],useLoLPABR:O[i],videoModel:T}),u=n.shouldAbandonFragment(l,a);u.quality>aa.Z.NO_CHANGE&&o.getFragmentModel().getRequests({state:_e.FRAGMENT_MODEL_LOADING,index:t.request.index})[0]&&(d[a][i].state=s.Z.ABANDON_LOAD,N[a][i].reset(),N[a][i].push({oldValue:H(i,a),newValue:u.quality,confidence:1,reason:u.reason}),V(i,r.getActiveStreamInfo(),u.quality,u.reason),clearTimeout(g),g=f((function(){d[a][i].state=s.Z.ALLOW_LOAD,g=null}),F.get().streaming.abandonLoadTimeout))}}}function G(e){e.mediaType===a.Z.VIDEO&&(void 0!==w&&C.push(e.streamId,w,T.getPlaybackQuality()),w=e.newQuality)}function q(e){var n,r;e.metric!==s.Z.HTTP_REQUEST||!e.value||e.value.type!==Ne.w.MEDIA_SEGMENT_TYPE||e.mediaType!==a.Z.AUDIO&&e.mediaType!==a.Z.VIDEO||D.push(e.mediaType,e.value,F.get().streaming.abr.useDeadTimeLatency),e.metric!==s.Z.BUFFER_LEVEL||e.mediaType!==a.Z.AUDIO&&e.mediaType!==a.Z.VIDEO||(n=e.mediaType,r=.001*e.value.level,F.get().streaming.abr.ABRStrategy===a.Z.ABR_STRATEGY_DYNAMIC&&function(e,n){try{var r=S.getStableBufferTime(),i=r,a=.5*r,o=M[e],s=n>(o?a:i);M[e]=s,s!==o&&(s?t.info("["+e+"] switching from throughput to buffer occupancy ABR rule (buffer: "+n.toFixed(3)+")."):t.info("["+e+"] switching from buffer occupancy to throughput ABR rule (buffer: "+n.toFixed(3)+")."))}catch(e){t.error(e)}}(n,r))}function Y(e,n){try{var r;return i[n]=i[n]||{},i[n].hasOwnProperty(e)||(i[n][e]=0),r=function(e,t){var n=i[t][e],r=n;if(!c[t]||!c[t][e])return r;var a=j(e,t);void 0!==a&&(r=Math.max(n,a));var o=function(e,t){try{var n=S.getAbrBitrateParameter("maxBitrate",e);return n>-1?W(c[t][e].getMediaInfo(),n,t):void 0}catch(e){return}}(e,t);return void 0!==o&&(r=Math.min(r,o)),r}(e,n),r=function(e,t,n){var r=i[n][t],a=F.get().streaming.abr.maxRepresentationRatio[t];return isNaN(a)||a>=1||a<0?e:Math.min(e,Math.round(r*a))}(r,e,n),r=function(e,t,n){if(t!==a.Z.VIDEO||!F.get().streaming.abr.limitBitrateByPortal||!c[n]||!c[n][t])return e;p||Q();var r=c[n][t].getStreamInfo(),i=_.getAdaptationForType(r.index,t,r).Representation_asArray,o=e;if(v>0&&y>0){for(;o>0&&i[o]&&v<i[o].width&&v-i[o-1].width<i[o].width-v;)o-=1;for(;o<i.length-1&&i[o].width===i[o+1].width;)o+=1}return o}(r,e,n),F.get().streaming.cmsd.enabled&&F.get().streaming.cmsd.abr.applyMb&&(r=function(e,n,r){if("video"!==n)return e;var i=I.getMaxBitrate(n);if(i<0)return e;var a=z(r,"audio",H("audio",r));i-=a?a.bitrate/1e3:0;var o=W(c[r][n].getMediaInfo(),i,r);return t.debug("Stream ID: "+r+" ["+n+"] Apply max bit rate from CMSD: "+i),Math.min(e,o)}(r,e,n)),r}catch(e){return}}function j(e,t){try{return function(e,t){try{var n=S.getAbrBitrateParameter("minBitrate",e);if(n>-1){var r=c[t][e].getMediaInfo(),i=X(r),a=W(r,n,t);return i[a]&&a<i.length-1&&i[a].bitrate<1e3*n&&a++,a}return}catch(e){return}}(e,t)}catch(e){return}}function H(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{return t||(t=r.getActiveStreamInfo().id),e&&c[t]&&c[t][e]&&t?(o[t]=o[t]||{},o[t].hasOwnProperty(e)||(o[t][e]=0),o[t][e]):0}catch(e){return 0}}function V(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(t&&t.id&&e){var i=t.id,a=H(e,i);(0,Ke.SE)(n);var o=Y(e,i);n!==a&&n>=0&&n<=o&&K(e,a,n,o,r,i)}}function K(e,n,r,i,a,s){if(e&&c[s]&&c[s][e]){var l=c[s][e].getStreamInfo(),f=l&&l.manifestInfo&&l.manifestInfo.isDynamic,d=P.getCurrentBufferLevel(e);t.info("Stream ID: "+s+" ["+e+"] switch from "+n+" to "+r+"/"+i+" (buffer: "+d+") "+(a?b(a):".")),o[s]=o[s]||{},o[s][e]=r;var h=z(s,e,r);U.trigger(u.Z.QUALITY_CHANGE_REQUESTED,{oldQuality:n,newQuality:r,reason:a,streamInfo:l,bitrateInfo:h,maxIdx:i,mediaType:e},{streamId:l.id,mediaType:e});var g=D.getAverageThroughput(e,f);isNaN(g)||R.setSavedBitrateSettings(e,g)}}function z(e,t,n){if(t&&c&&c[e]&&c[e][t]){var r=X(c[e][t].getMediaInfo());return r[n]?r[n]:null}return null}function W(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=e&&e.type?c[n][e.type].getRepresentationInfo():null;if(F.get().streaming.abr.useDeadTimeLatency&&r&&i&&i.fragmentDuration){r/=1e3;var a=i.fragmentDuration;if(r>a)return 0;var o=r/a;t*=1-o}for(var s=X(e),l=s.length-1;l>=0;l--){var u=s[l];if(1e3*t>=u.bitrate)return l}return 0}function X(e){var t=[];if(!e||!e.bitrateList)return t;for(var n,r=e.bitrateList,i=e.type,a=0,o=r.length;a<o;a++)(n=new On).mediaType=i,n.qualityIndex=a,n.bitrate=r[a].bandwidth,n.width=r[a].width,n.height=r[a].height,n.scanType=r[a].scanType,t.push(n);return t}function Q(){if(T){var e=F.get().streaming.abr.usePixelRatioInLimitBitrateByPortal&&window.hasOwnProperty("devicePixelRatio")?window.devicePixelRatio:1;v=T.getClientWidth()*e,y=T.getClientHeight()*e}}return e={initialize:function(){C=ua(x).create(),D=fa(x).create({settings:F}),(n=(0,na.Z)(x).create({dashMetrics:P,customParametersModel:A,mediaPlayerModel:S,settings:F})).initialize(),U.on(E.Z.QUALITY_CHANGE_RENDERED,G,e),U.on(E.Z.METRIC_ADDED,q,e),U.on(u.Z.LOADING_PROGRESS,B,e)},isPlayingAtTopQuality:function(e){var t=e?e.id:null,n=H(a.Z.AUDIO,t),r=H(a.Z.VIDEO,t);return n===Y(a.Z.AUDIO,t)&&r===Y(a.Z.VIDEO,t)},updateTopQualityIndex:function(e){var t=e.type,n=e.streamInfo.id,r=e.representationCount-1;return i[n]=i[n]||{},i[n][t]=r,r},clearDataForStream:function(e){C&&C.clearForStream(e),c[e]&&delete c[e],N[e]&&delete N[e],d[e]&&delete d[e]},getThroughputHistory:function(){return D},getBitrateList:X,getQualityForBitrate:W,getTopBitrateInfoFor:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t||(t=r.getActiveStreamInfo().id),e&&c&&c[t]&&c[t][e]){var n=Y(e,t),i=X(c[t][e].getMediaInfo());return i[n]?i[n]:null}return null},getMinAllowedIndexFor:j,getMaxAllowedIndexFor:Y,getInitialBitrateFor:function(e,t){if(function(){if(!R||!R.hasOwnProperty("getSavedBitrateSettings"))throw new Error(a.Z.MISSING_CONFIG_ERROR)}(),e===a.Z.TEXT)return NaN;var n=R.getSavedBitrateSettings(e),r=S.getAbrBitrateParameter("initialBitrate",e),i=F.get().streaming.abr.initialRepresentationRatio[e];if(-1===r)if(i>-1){var o=c[t][e].getStreamInfo(),s=_.getAdaptationForType(o.index,e,o).Representation_asArray;r=h(s)?s[Math.max(Math.round(s.length*i)-1,0)].bandwidth/1e3:0}else r=isNaN(n)?e===a.Z.VIDEO?1e3:100:n;return r},getQualityFor:H,getAbandonmentStateFor:function(e,t){return d[e]&&d[e][t]?d[e][t].state:null},setPlaybackQuality:V,checkPlaybackQuality:function(t,r){try{if(!(t&&c&&c[r]&&c[r][t]))return!1;if(C){var i=T.getPlaybackQuality();i&&C.push(r,w,i)}if(!F.get().streaming.abr.autoSwitchBitrate[t])return!1;var a=H(t,r),o=ia(x).create({abrController:e,switchHistory:N[r][t],droppedFramesHistory:C,streamProcessor:c[r][t],currentValue:a,useBufferOccupancyABR:M[t],useL2AABR:L[t],useLoLPABR:O[t],videoModel:T}),l=j(t,r),u=Y(t,r),f=n.getMaxQuality(o),h=f.quality;return void 0!==l&&(h>aa.Z.NO_CHANGE?h:a)<l&&(h=l),h>u&&(h=u),N[r][t].push({oldValue:a,newValue:h}),h>aa.Z.NO_CHANGE&&h!==a&&(d[r][t].state===s.Z.ALLOW_LOAD||h<a)&&(K(t,a,h,u,f.reason,r),!0)}catch(e){return!1}},setElementSize:Q,setWindowResizeEventCalled:function(e){p=e},registerStreamType:function(e,t){var n=t.getStreamInfo().id;c[n]||(c[n]={}),N[n]||(N[n]={}),d[n]||(d[n]={}),N[n][e]=sa(x).create(),c[n][e]=t,d[n][e]={},d[n][e].state=s.Z.ALLOW_LOAD,function(e){var t=F.get().streaming.abr.ABRStrategy;t===a.Z.ABR_STRATEGY_L2A?(M[e]=!1,O[e]=!1,L[e]=!0):t===a.Z.ABR_STRATEGY_LoLP?(M[e]=!1,O[e]=!0,L[e]=!1):t===a.Z.ABR_STRATEGY_BOLA?(M[e]=!0,O[e]=!1,L[e]=!1):t===a.Z.ABR_STRATEGY_THROUGHPUT?(M[e]=!1,O[e]=!1,L[e]=!1):t===a.Z.ABR_STRATEGY_DYNAMIC&&(M[e]=!(!M||!M[e])&&M[e],O[e]=!1,L[e]=!1)}(e),e===a.Z.VIDEO&&Q()},unRegisterStreamType:function(e,t){try{c[e]&&c[e][t]&&delete c[e][t],N[e]&&N[e][t]&&delete N[e][t],d[e]&&d[e][t]&&delete d[e][t]}catch(e){}},setConfig:function(e){e&&(e.streamController&&(r=e.streamController),e.domStorage&&(R=e.domStorage),e.mediaPlayerModel&&(S=e.mediaPlayerModel),e.customParametersModel&&(A=e.customParametersModel),e.cmsdModel&&(I=e.cmsdModel),e.dashMetrics&&(P=e.dashMetrics),e.adapter&&(_=e.adapter),e.videoModel&&(T=e.videoModel),e.settings&&(F=e.settings))},reset:function(){Z(),U.off(u.Z.LOADING_PROGRESS,B,e),U.off(E.Z.QUALITY_CHANGE_RENDERED,G,e),U.off(E.Z.METRIC_ADDED,q,e),n&&n.reset()}},t=k.getLogger(e),Z(),e}da.__dashjs_factory_name="AbrController";var ha=p.Z.getSingletonFactory(da);ha.QUALITY_DEFAULT=0,p.Z.updateSingletonFactory(da.__dashjs_factory_name,ha);var ga=ha,pa=new ae([[a.Z.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,"loadedmetadata"],[a.Z.VIDEO_ELEMENT_READY_STATES.HAVE_CURRENT_DATA,"loadeddata"],[a.Z.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,"canplay"],[a.Z.VIDEO_ELEMENT_READY_STATES.HAVE_ENOUGH_DATA,"canplaythrough"]]);function ma(){var e,t,n,r,i,o,s,c,d=this.context,h=(0,l.Z)(d).getInstance(),g=[];function p(){n&&(n.playbackRate=1,n.removeEventListener("canplay",p))}function v(){return g.length>0}function E(){if(n&&v()&&0===n.playbackRate){var e=document.createEvent("Event");e.initEvent("waiting",!0,!1),n.dispatchEvent(e)}}function _(e,t){n&&n.addEventListener(e,t)}function T(e,t){n&&n.removeEventListener(e,t)}function b(){return n?n.readyState:NaN}function A(){return n?n.buffered:null}function I(e,t,r,i,a){if(n)for(var o=0;o<n.textTracks.length;o++)if(n.textTracks[o].kind===e&&(!t||n.textTracks[o].label==t)&&n.textTracks[o].language===r&&n.textTracks[o].isTTML===i&&n.textTracks[o].isEmbedded===a)return n.textTracks[o];return null}function R(e,t){return e===a.Z.VIDEO_ELEMENT_READY_STATES.HAVE_NOTHING||b()>=e?(t(),null):function(e,t){var n=function n(){T(e,n),t(e)};return _(e,n),{func:n,event:e}}(pa.get(e),t)}return e={addEventListener:_,addTextTrack:function(e,t,r,i,a){if(!n)return null;var o=I(e,t,r,i,a);return o||((o=n.addTextTrack(e,t,r)).isEmbedded=a,o.isTTML=i),o},appendChild:function(e){n&&(n.appendChild(e),void 0!==e.isTTML&&(n.textTracks[n.textTracks.length-1].isTTML=e.isTTML,n.textTracks[n.textTracks.length-1].isEmbedded=e.isEmbedded))},getBufferRange:A,getClientHeight:function(){return n?n.clientHeight:NaN},getClientWidth:function(){return n?n.clientWidth:NaN},getElement:function(){return n},getEnded:function(){return n?n.ended:null},getPlaybackQuality:function(){if(!n)return null;var e="webkitDroppedFrameCount"in n&&"webkitDecodedFrameCount"in n,t=null;return"getVideoPlaybackQuality"in n?t=n.getVideoPlaybackQuality():e&&(t={droppedVideoFrames:n.webkitDroppedFrameCount,totalVideoFrames:n.webkitDroppedFrameCount+n.webkitDecodedFrameCount,creationTime:new Date}),t},getPlaybackRate:function(){return n?n.playbackRate:null},getPlayedRanges:function(){return n?n.played:null},getReadyState:b,getSource:function(){return n?n.src:null},getTTMLRenderingDiv:function(){return o},getTextTrack:I,getTextTracks:function(){return n?n.textTracks:[]},getTime:function(){return n?isNaN(r)?n.currentTime:r:null},getVideoHeight:function(){return n?n.videoHeight:NaN},getVideoRelativeOffsetLeft:function(){if(n){var e=n.parentNode.host||n.parentNode;return e?n.getBoundingClientRect().left-e.getBoundingClientRect().left:NaN}return NaN},getVideoRelativeOffsetTop:function(){if(n){var e=n.parentNode.host||n.parentNode;return e?n.getBoundingClientRect().top-e.getBoundingClientRect().top:NaN}return NaN},getVideoWidth:function(){return n?n.videoWidth:NaN},getVttRenderingDiv:function(){return s},initialize:function(){h.on(u.Z.PLAYBACK_PLAYING,E,this)},isPaused:function(){return n?n.paused:null},isSeeking:function(){return n?n.seeking||!isNaN(r):null},isStalled:v,pause:function(){n&&(n.pause(),n.autoplay=!1)},play:function(){if(n){n.autoplay=!0;var e=n.play();e&&e.catch&&void 0!==F&&e.catch((function(e){"NotAllowedError"===e.name&&h.trigger(u.Z.PLAYBACK_NOT_ALLOWED),t.warn("Caught pending play exception - continuing (".concat(e,")"))}))}},removeChild:function(e){n&&n.removeChild(e)},removeEventListener:T,reset:function(){clearTimeout(c),h.off(u.Z.PLAYBACK_PLAYING,E,this)},setCurrentTime:function(e,t){n&&(i&&i.func&&i.event&&T(i.event,i.func),r=e,i=R(a.Z.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,(function(){if(n)if(n.currentTime!==r)try{r=t?function(e){var t=A(),n=e,r=9999999999;if(t)for(var i=0;i<t.length;i++){var a=t.start(i),o=t.end(i),s=Math.abs(a-e),l=Math.abs(o-e);if(e>=a&&e<=o)return e;s<r&&(r=s,n=a),l<r&&(r=l,n=o)}return n}(r):r,isNaN(r)||(n.currentTime=r),r=NaN}catch(e){0===n.readyState&&e.code===e.INVALID_STATE_ERR&&(c=f((function(){n.currentTime=r,r=NaN}),400))}else r=NaN})))},setElement:function(e){if(!(null==e||e&&/^(VIDEO|AUDIO)$/i.test(e.nodeName)))throw"element is not video or audio DOM type!";(n=e)&&(n.preload="auto")},setPlaybackRate:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n&&(!t&&n.readyState<=2&&e>0?n.addEventListener("canplay",p):n.playbackRate=e)},setSource:function(e){n&&(e?n.src=e:(n.removeAttribute("src"),n.load()))},setStallState:function(e,t){!function(e,t){t?function(e){null!==e&&n&&!n.seeking&&-1===y(g).call(g,e)&&g.push(e)}(e):function(e){var t=y(g).call(g,e);null!==e&&-1!==t&&S(g).call(g,t,1)}(e)}(e,t)},setTTMLRenderingDiv:function(e){(o=e).style.position="absolute",o.style.display="flex",o.style.overflow="hidden",o.style.pointerEvents="none",o.style.top=0,o.style.left=0},setVttRenderingDiv:function(e){s=e},waitForReadyState:R,setDisableRemotePlayback:function(e){n&&(n.disableRemotePlayback=e)}},t=(0,m.Z)(d).getInstance().getLogger(e),r=NaN,e}ma.__dashjs_factory_name="VideoModel";var va=p.Z.getSingletonFactory(ma),ya=[{oldKey:"dashjs_vbitrate",newKey:"dashjs_video_bitrate"},{oldKey:"dashjs_abitrate",newKey:"dashjs_audio_bitrate"},{oldKey:"dashjs_vsettings",newKey:"dashjs_video_settings"},{oldKey:"dashjs_asettings",newKey:"dashjs_audio_settings"}],Ea="dashjs_?_bitrate",_a="dashjs_?_settings",Ta="localStorage",ba="lastBitrate",Sa="lastMediaSettings";function Aa(e){e=e||{};var t,n,r,i=this.context,o=e.settings;function s(e){if(void 0!==r)return r;var t;r=!1;try{"undefined"!=typeof window&&(t=window[e])}catch(e){return n.warn("DOMStorage access denied: "+e.message),r}if(!t||e!==Ta&&"sessionStorage"!==e)return r;try{t.setItem("1","1"),t.removeItem("1"),r=!0}catch(e){n.warn("DOMStorage is supported, but cannot be used: "+e.message)}return r}function l(){var e=6e5;return Math.round((new Date).getTime()/e)*e}function u(e,t){return s(e)&&o.get().streaming[t+"CachingInfo"].enabled}function c(){if(!o)throw new Error(a.Z.MISSING_CONFIG_ERROR)}return t={getSavedBitrateSettings:function(e){if(c(),!o.get().streaming.lastBitrateCachingInfo.enabled)return NaN;var t=NaN;if(u(Ta,ba)){var r=Ea.replace(/\?/,e);try{var i=JSON.parse(localStorage.getItem(r))||{},a=(new Date).getTime()-_(i.timestamp,10)>=o.get().streaming.lastBitrateCachingInfo.ttl||!1,s=x(i.bitrate);isNaN(s)||a?a&&localStorage.removeItem(r):(t=s,n.debug("Last saved bitrate for "+e+" was "+s))}catch(e){return null}}return t},setSavedBitrateSettings:function(e,t){if(u(Ta,ba)&&t){var r=Ea.replace(/\?/,e);try{localStorage.setItem(r,b({bitrate:t.toFixed(3),timestamp:l()}))}catch(e){n.error(e.message)}}},getSavedMediaSettings:function(e){if(c(),!o.get().streaming.lastMediaSettingsCachingInfo.enabled)return null;var t=null;if(u(Ta,Sa)){var n=_a.replace(/\?/,e);try{var r=JSON.parse(localStorage.getItem(n))||{},i=(new Date).getTime()-_(r.timestamp,10)>=o.get().streaming.lastMediaSettingsCachingInfo.ttl||!1;t=r.settings,i&&(localStorage.removeItem(n),t=null)}catch(e){return null}}return t},setSavedMediaSettings:function(e,t){if(u(Ta,Sa)){var r=_a.replace(/\?/,e);try{localStorage.setItem(r,b({settings:t,timestamp:l()}))}catch(e){n.error(e.message)}}}},n=(0,m.Z)(i).getInstance().getLogger(t),s(Ta)&&I(ya).call(ya,(function(e){var t=localStorage.getItem(e.oldKey);if(t){localStorage.removeItem(e.oldKey);try{localStorage.setItem(e.newKey,t)}catch(e){n.error(e.message)}}})),t}Aa.__dashjs_factory_name="DOMStorage";var Ia=p.Z.getSingletonFactory(Aa),Ra=n(2032),wa=n(2011);function Na(){var e,t,n,r,i,a,o,s,l,u,c,f,h,g=this.context;function p(e,n,i,a){var o=null,l=e?h.resolve(e.path):null,u=a||{init:!0,url:l?l.url:void 0,range:{start:0,end:1500},searching:!1,bytesLoaded:0,bytesToLoad:1500,mediaType:n};t.debug("Start searching for initialization.");var c=y(u);s.load({request:c,success:function(t){if(u.bytesLoaded=u.range.end,!(o=r.findInitRange(t)))return u.range.end=u.bytesLoaded+u.bytesToLoad,p(e,n,i,u);e.range=o,i(e)},error:function(){i(e)}}),t.debug("Perform init search: "+u.url)}function m(e,n,i,a,o,l){var u,c,f;if(i&&(void 0===i.start||void 0===i.end)){var g=i?i.toString().split("-"):null;i=g?{start:x(g[0]),end:x(g[1])}:null}o=o||v;var p=null,E=null,_=!!i,T=e?h.resolve(e.path):null,b={init:!1,url:T?T.url:void 0,range:_?i:{start:0,end:1500},searching:!_,bytesLoaded:l?l.bytesLoaded:0,bytesToLoad:1500,mediaType:n},S=y(b);s.load({request:S,success:function(i){var s=b.bytesToLoad,l=i.byteLength;if(b.bytesLoaded=b.range.end-b.range.start,p=r.parse(i),(E=p.getBox("sidx"))&&E.isComplete){var u,c,f=E.references;if(null!=f&&f.length>0&&(u=1===f[0].reference_type),u){var h,g,v,y;t.debug("Initiate multiple SIDX load."),b.range.end=b.range.start+E.size;var _=[],T=0,S=(E.offset||b.range.start)+E.size,A=function(t){t?(_=d(_).call(_,t),++T>=g&&(Z(_).call(_,(function(e,t){return e.startTime-t.startTime<0?-1:0})),o(_,e,a))):o(null,e,a)};for(h=0,g=f.length;h<g;h++)v=S,y=S+f[h].referenced_size-1,S+=f[h].referenced_size,m(e,n,{start:v,end:y},a,A,b)}else t.debug("Parsing segments from SIDX. representation "+n+" - id: "+e.id+" for range : "+b.range.start+" - "+b.range.end),c=function(e,t){for(var n,r,i,a,o=e.references,s=o.length,l=e.timescale,u=e.earliest_presentation_time,c=t.range.start+e.offset+e.first_offset+e.size,f=[],d=0;d<s;d++)i=o[d].subsegment_duration,a=o[d].referenced_size,(n=new wa.Z).duration=i,n.startTime=u,n.timescale=l,r=c+a-1,n.mediaRange=c+"-"+r,f.push(n),u+=i,c+=a;return f}(E,b),o(c,e,a)}else{if(E)b.range.start=E.offset||b.range.start,b.range.end=b.range.start+(E.size||s);else{if(l<b.bytesLoaded)return void o(null,e,a);var I=p.getLastBox();I&&I.size?(b.range.start=I.offset+I.size,b.range.end=b.range.start+s):b.range.end+=s}m(e,n,b.range,a,null,b)}},error:function(){o(null,e,a)}}),t.debug(d(u=d(c=d(f="Perform SIDX load for type ".concat(n," : ")).call(f,b.url," with range ")).call(c,b.range.start," - ")).call(u,b.range.end))}function v(e,t,n){n({segments:e,representation:t,error:e?void 0:new Te.Z(l.SEGMENT_BASE_LOADER_ERROR_CODE,l.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}function y(e){if(e.url){var t=new ge.Z;return t.setInfo(e),t}}return e={setConfig:function(s){s.baseURLController&&(h=s.baseURLController),s.dashMetrics&&(a=s.dashMetrics),s.mediaPlayerModel&&(o=s.mediaPlayerModel),s.errHandler&&(n=s.errHandler),s.boxParser&&(r=s.boxParser),s.debug&&(t=s.debug.getLogger(e)),s.requestModifier&&(i=s.requestModifier),s.errors&&(l=s.errors),s.urlUtils&&(f=s.urlUtils),s.constants&&(u=s.constants),s.dashConstants&&(c=s.dashConstants)},initialize:function(){s=_n(g).create({errHandler:n,dashMetrics:a,mediaPlayerModel:o,requestModifier:i,boxParser:r,errors:l,urlUtils:f,constants:u,dashConstants:c})},loadInitialization:function(e,t){return new F((function(n){p(e,t,n)}))},loadSegments:function(e,t,n){return new F((function(r){m(e,t,n,r)}))},reset:function(){s&&(s.abort(),s=null)}}}Na.__dashjs_factory_name="SegmentBaseLoader";var Ca=p.Z.getSingletonFactory(Na);function Da(e){var t;e=e||{};var n=new DataView(e.data),r=0;function i(e,t){var i=!0,a=0;if(void 0===t&&(t=!1),e.tag>16777215?(n.getUint32(r)!==e.tag&&(i=!1),a=4):e.tag>65535?(256*n.getUint16(r)+n.getUint8(r+2)!==e.tag&&(i=!1),a=3):e.tag>255?(n.getUint16(r)!==e.tag&&(i=!1),a=2):(n.getUint8(r)!==e.tag&&(i=!1),a=1),!i&&e.required&&!t)throw new Error("required tag not found");return i&&(r+=a),i}function a(e){var t=1,i=128,a=-1,o=0,s=n.getUint8(r),l=0;for(l=0;l<8;l+=1){if((s&i)===i){o=void 0===e?s&~i:s,a=l;break}i>>=1}for(l=0;l<a;l+=1,t+=1)o=o<<8|255&n.getUint8(r+t);return r+=t,o}return t={getPos:function(){return r},setPos:function(e){r=e},consumeTag:i,consumeTagAndSize:function(e,t){var n=i(e,t);return n&&a(),n},parseTag:function(e){var n;return i(e),n=a(),t[e.parse](n)},skipOverElement:function(e,t){var n,o=i(e,t);return o&&(n=a(),r+=n),o},getMatroskaCodedNum:a,getMatroskaFloat:function(e){var t;switch(e){case 4:t=n.getFloat32(r),r+=4;break;case 8:t=n.getFloat64(r),r+=8}return t},getMatroskaUint:function(e){if(e>4)return function(e){for(var t=Math.floor(te/256),i=0,a=0;a<e;a+=1){if(i>t)throw new Error("Value exceeds safe integer limit");i*=256;var o=n.getUint8(r+a);if(i>te-o)throw new Error("Value exceeds safe integer limit");i+=o}return r+=e,i}(e);for(var t=0,i=0;i<e;i+=1)t<<=8,t|=255&n.getUint8(r+i);return r+=e,t>>>0},moreData:function(){return r<n.byteLength}}}Da.__dashjs_factory_name="EBMLParser";var Ma=p.Z.getClassFactory(Da);function La(){var e,t,n,r,i,o,s,l,u,c,f=this.context;function d(e){var t=new ge.Z;return t.setInfo(e),t}return e={setConfig:function(n){if(!(n.baseURLController&&n.dashMetrics&&n.mediaPlayerModel&&n.errHandler))throw new Error(a.Z.MISSING_CONFIG_ERROR);c=n.baseURLController,o=n.dashMetrics,s=n.mediaPlayerModel,r=n.errHandler,u=n.errors,t=n.debug.getLogger(e),i=n.requestModifier},initialize:function(){l=_n(f).create({errHandler:r,dashMetrics:o,mediaPlayerModel:s,requestModifier:i,errors:u})},loadInitialization:function(e,n){return new F((function(r){var i=null,a=e?c.resolve(e.path):null,o=e?e.range.split("-"):null,s={range:{start:o?x(o[0]):null,end:o?x(o[1]):null},request:i,url:a?a.url:void 0,init:!0,mediaType:n};t.info("Start loading initialization."),i=d(s),l.load({request:i,success:function(){r(e)},error:function(){r(e)}}),t.debug("Perform init load: "+s.url)}))},loadSegments:function(e,r,i){return new F((function(a){var o=null,s=e?c.resolve(e.path):null,h=s?s.url:void 0;o=d({bytesLoaded:0,bytesToLoad:8192,range:{start:0,end:8192},request:o,url:h,init:!1,mediaType:r}),t.debug("Parsing ebml header"),l.load({request:o,success:function(r){!function(e,r,i,a){if(e&&0!==e.byteLength){var o,s,u,c,h=Ma(f).create({data:e}),g=i?i.split("-"):null,p=null,m={url:r,range:{start:g?x(g[0]):null,end:g?x(g[1]):null},request:p};for(t.debug("Parse EBML header: "+m.url),h.skipOverElement(n.EBML),h.consumeTag(n.Segment),u=h.getMatroskaCodedNum(),u+=h.getPos(),c=h.getPos();h.moreData()&&!h.consumeTagAndSize(n.Segment.Info,!0);)if(!(h.skipOverElement(n.Segment.SeekHead,!0)||h.skipOverElement(n.Segment.Tracks,!0)||h.skipOverElement(n.Segment.Cues,!0)||h.skipOverElement(n.Void,!0)))throw new Error("no valid top level element found");for(;void 0===o;){var v=h.getMatroskaCodedNum(!0),y=h.getMatroskaCodedNum();v===n.Segment.Info.Duration.tag?o=h[n.Segment.Info.Duration.parse](y):h.setPos(h.getPos()+y)}p=d(m),l.load({request:p,success:function(e){s=function(e,r,i,a){var o,s,l,u,c,d,h,g;for(l=[],c=0,d=(s=function(e){var t,r,i=[],a=Ma(f).create({data:e});for(a.consumeTagAndSize(n.Segment.Cues);a.moreData()&&a.consumeTagAndSize(n.Segment.Cues.CuePoint,!0);){for((t={}).CueTime=a.parseTag(n.Segment.Cues.CuePoint.CueTime),t.CueTracks=[];a.moreData()&&a.consumeTag(n.Segment.Cues.CuePoint.CueTrackPositions,!0);){var o=a.getMatroskaCodedNum(),s=a.getPos();if((r={}).Track=a.parseTag(n.Segment.Cues.CuePoint.CueTrackPositions.CueTrack),0===r.Track)throw new Error("Cue track cannot be 0");r.ClusterPosition=a.parseTag(n.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition),t.CueTracks.push(r),a.setPos(s+o)}if(0===t.CueTracks.length)throw new Error("Mandatory cuetrack not found");i.push(t)}if(0===i.length)throw new Error("mandatory cuepoint not found");return i}(e)).length;c<d;c+=1)u=new wa.Z,o=c<s.length-1?s[c+1].CueTime-s[c].CueTime:a-s[c].CueTime,u.duration=o,u.startTime=s[c].CueTime,u.timescale=1e3,h=s[c].CueTracks[0].ClusterPosition+r,g=c<s.length-1?s[c+1].CueTracks[0].ClusterPosition+r-1:i-1,u.mediaRange=h+"-"+g,l.push(u);return t.debug("Parsed cues: "+l.length+" cues."),l}(e,c,u,o),a(s)},error:function(){t.error("Download Error: Cues "+m.url),a(null)}}),t.debug("Perform cues load: "+m.url+" bytes="+m.range.start+"-"+m.range.end)}else a(null)}(r,h,i,(function(t){a({segments:t,representation:e,error:t?void 0:new Te.Z(u.SEGMENT_BASE_LOADER_ERROR_CODE,u.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}))},error:function(){a({representation:e,error:new Te.Z(u.SEGMENT_BASE_LOADER_ERROR_CODE,u.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}})}))},reset:function(){l&&(l.abort(),l=null)}},n={EBML:{tag:440786851,required:!0},Segment:{tag:408125543,required:!0,SeekHead:{tag:290298740,required:!0},Info:{tag:357149030,required:!0,TimecodeScale:{tag:2807729,required:!0,parse:"getMatroskaUint"},Duration:{tag:17545,required:!0,parse:"getMatroskaFloat"}},Tracks:{tag:374648427,required:!0},Cues:{tag:475249515,required:!0,CuePoint:{tag:187,required:!0,CueTime:{tag:179,required:!0,parse:"getMatroskaUint"},CueTrackPositions:{tag:183,required:!0,CueTrack:{tag:247,required:!0,parse:"getMatroskaUint"},CueClusterPosition:{tag:241,required:!0,parse:"getMatroskaUint"}}}}},Void:{tag:236,required:!0}},e}La.__dashjs_factory_name="WebmSegmentBaseLoader";var Oa=p.Z.getSingletonFactory(La);function Pa(e){e=e||{};var t,n,r,i=this.context,a=e.eventBus,o=e.events,s=e.dashMetrics,l=e.mediaPlayerModel,u=e.errHandler,c=e.baseURLController,f=e.debug,d=e.boxParser,h=e.requestModifier,g=e.errors;function p(e){return"webm"===(e?e.split("/")[1]:"").toLowerCase()}return t={initialize:function(){n.initialize(),r.initialize()},getSegmentBaseInitSegment:function(e){return p(e.representation.mimeType)?r.loadInitialization(e.representation,e.mediaType):n.loadInitialization(e.representation,e.mediaType)},getSegmentList:function(e){return p(e.mimeType)?r.loadSegments(e.representation,e.mediaType,e.representation?e.representation.indexRange:null):n.loadSegments(e.representation,e.mediaType,e.representation?e.representation.indexRange:null)},reset:function(){n.reset(),r.reset()}},n=Ca(i).getInstance(),r=Oa(i).getInstance(),n.setConfig({baseURLController:c,dashMetrics:s,mediaPlayerModel:l,errHandler:u,eventBus:a,events:o,errors:g,debug:f,boxParser:d,requestModifier:h}),r.setConfig({baseURLController:c,dashMetrics:s,mediaPlayerModel:l,errHandler:u,eventBus:a,events:o,errors:g,debug:f,requestModifier:h}),t}Pa.__dashjs_factory_name="SegmentBaseController";var Fa=p.Z.getSingletonFactory(Pa),xa=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.quality=null,this.fragmentDuration=null,this.mediaInfo=null,this.MSETimeOffset=null},ka=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.index=null,this.type=null,this.streamInfo=null,this.representationCount=0,this.labels=null,this.lang=null,this.viewpoint=null,this.viewpointsWithSchemeIdUri=null,this.accessibility=null,this.accessibilitiesWithSchemeIdUri=null,this.audioChannelConfiguration=null,this.audioChannelConfigurationsWithSchemeIdUri=null,this.roles=null,this.rolesWithSchemeIdUri=null,this.codec=null,this.mimeType=null,this.contentProtection=null,this.isText=!1,this.KID=null,this.bitrateList=null,this.isFragmented=null,this.isEmbedded=null,this.selectionPriority=1,this.supplementalProperties={},this.supplementalPropertiesAsArray=[],this.essentialProperties={},this.essentialPropertiesAsArray=[],this.segmentAlignment=!1,this.subSegmentAlignment=!1},Ua=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.index=null,this.start=NaN,this.duration=NaN,this.manifestInfo=null,this.isLast=!0},Za=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.dvrWindowSize=NaN,this.loadedTime=null,this.availableFrom=null,this.minBufferTime=NaN,this.duration=NaN,this.isDynamic=!1,this.maxFragmentDuration=null,this.serviceDescriptions=[],this.protocol=null},Ba=function(){function e(t){var n,r,i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.valid="/"==t[0],this.path=ee(n=w(r=t.split("/")).call(r,(function(e){return 0!==e.length}))).call(n,(function(e){var t={name:e},n=y(e).call(e,"[");if(-1!=n){var r;t.name=e.substring(0,n);var a=e.substring(n+1,e.length-1);i.valid=i.valid&&-1==y(a).call(a,"[");var o=y(a).call(a,"=");-1!=o?(t.attribute={name:a.substring(1,o),value:a.substring(o+1)},-1!=y(r=["'",'"']).call(r,t.attribute.value[0])&&(t.attribute.value=t.attribute.value.substring(1,t.attribute.value.length-1))):t.position=_(a,10)-1}return t}))}var t;return(t=[{key:"isValid",value:function(){return this.valid}},{key:"findsElement",value:function(){return!this.findsAttribute()}},{key:"findsAttribute",value:function(){var e;return se(e=this.path[this.path.length-1].name).call(e,"@")}},{key:"findsTextReplace",value:function(){return"text()"===this.path[this.path.length-1].name}},{key:"getMpdTarget",value:function(e,t){for(var n=null,r=e,i=1,a="MPD";i<this.path.length&&null!==r;){n=r;var o=this.path[i];if(a=o.name,i!==this.path.length-1||!se(a).call(a,"@")&&"text()"!==a){var s=n[a+"_asArray"]||[];0===s.length&&n[a]&&s.push(n[a]),o.position?r=s[o.position]||null:o.attribute?function(){var e=o.attribute;r=w(s).call(s,(function(t){return t[e.name]==e.value}))[0]||null}():r=s[0]||null}i++}return null===r?null:se(a).call(a,"@")?{name:a.substring(1),leaf:r,target:r}:"text()"===a?{name:"__text",leaf:r,target:r}:{name:a,leaf:r,target:t?n:r}}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e.prototype,t),e}(),Ga=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.action=t,this.xpath=n,this.value=r,this.position=null}var t;return(t=[{key:"getMpdTarget",value:function(e){var t="remove"===this.action||"replace"===this.action||"before"===this.position||"after"===this.position;return this.xpath.getMpdTarget(e,t)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e.prototype,t),e}();function qa(){var e,t,n=this.context;return e={getIsPatch:function(e){return e&&e.hasOwnProperty(o.Z.ORIGINAL_MPD_ID)||!1},getPublishTime:function(e){return e&&e.hasOwnProperty(o.Z.PUBLISH_TIME)?new Date(e[o.Z.PUBLISH_TIME]):null},getOriginalPublishTime:function(e){return e&&e.hasOwnProperty(o.Z.ORIGINAL_PUBLISH_TIME)?new Date(e[o.Z.ORIGINAL_PUBLISH_TIME]):null},getMpdId:function(e){return e&&e[o.Z.ORIGINAL_MPD_ID]||null},getPatchOperations:function(e){var n,r;return e?w(n=ee(r=e.__children||[]).call(r,(function(e){var n,r,i=z(e)[0];if("add"!==i&&"remove"!==i&&"replace"!==i)return t.warn("Ignoring node of invalid action: ".concat(i)),null;var a=e[i],o=a.sel;if("add"===i&&a.type){var s,l,u;if(!se(s=a.type).call(s,"@"))return t.warn(d(l="Ignoring add action for prefixed namespace declaration: ".concat(a.type,"=")).call(l,a.__text)),null;o=d(u="".concat(o,"/")).call(u,a.type)}var c=new Ba(o);if(!c.isValid())return t.warn(d(n="Ignoring action with invalid selector: ".concat(i," - ")).call(n,o)),null;var f=null;c.findsAttribute()||c.findsTextReplace()?f=a.__text||"":"remove"!==i&&(f=K(r=a.__children).call(r,(function(e,t){var n=z(t)[0];return"#text"!==n&&(e[n]=e[n]||[],e[n].push(t[n])),e}),{}));var h=new Ga(i,c,f);return"add"===i&&(h.position=a.pos),h}))).call(n,(function(e){return!!e})):[]}},t=(0,m.Z)(n).getInstance().getLogger(e),e}qa.__dashjs_factory_name="PatchManifestModel";var Ya=p.Z.getSingletonFactory(qa);function ja(){var e,t,n,r,i,a,s,l=this.context;function u(e,n,a){var s,l=t.getAdaptationsForType(r[0].mpd.manifest,e,n);if(!l||0===l.length)return null;if(l.length>1&&a){var u=g(a,n);if(i[a.id]&&i[a.id][n])for(var f=0,d=l.length;f<d;f++)if(c(i[a.id][n],u[f]))return l[f];for(var h=0,p=l.length;h<p;h++){var m;if(s=l[h],w(m=t.getRolesForAdaptation(s)).call(m,(function(e){return e.value===o.Z.MAIN}))[0])return l[h]}}return l[0]}function c(e,t){if(!e||!t)return!1;var n=e.id===t.id,r=e.codec===t.codec,i=e.viewpoint===t.viewpoint,a=b(e.viewpointsWithSchemeIdUri)===b(t.viewpointsWithSchemeIdUri),o=e.lang===t.lang,s=e.roles.toString()===t.roles.toString(),l=b(e.rolesWithSchemeIdUri)===b(t.rolesWithSchemeIdUri),u=e.accessibility.toString()===t.accessibility.toString(),c=b(e.accessibilitiesWithSchemeIdUri)===b(t.accessibilitiesWithSchemeIdUri),f=e.audioChannelConfiguration.toString()===t.audioChannelConfiguration.toString(),d=b(e.audioChannelConfigurationsWithSchemeIdUri)===b(t.audioChannelConfigurationsWithSchemeIdUri);return n&&r&&i&&a&&o&&s&&l&&u&&c&&f&&d}function f(e,n,r,i,o,s){var l,u,c,f,d,h,g=[];if(!i||0===i.length)return[];var p=t.getAdaptationsForPeriod(n);for(f=0,h=i.length;f<h;f++)if(l=i[f],u=R(p[c=t.getIndexForAdaptation(l,e,r.index)]),s){var m=u.accessibility.length;for(d=0;d<m;d++)if(u){var v=u.accessibility[d];if(0===y(v).call(v,"cea-608:")){var E=v.substring(8).split(";");if("CC"===E[0].substring(0,2))for(d=0;d<E.length;d++)u||(u=R.call(this,p[c])),N(u,E[d].substring(0,3),E[d].substring(4)),g.push(u),u=null;else for(d=0;d<E.length;d++)u||(u=R.call(this,p[c])),N(u,"CC"+(d+1),E[d]),g.push(u),u=null}else 0===y(v).call(v,"cea-608")&&(N(u,a.CC1,"eng"),g.push(u),u=null)}}else o===a.IMAGE?(u.type=a.IMAGE,g.push(u),u=null):u&&g.push(u);return g}function g(e,n,i){var o=r,s=i,l=[];if(s)D(),o=p(s);else{if(!(r.length>0))return l;s=r[0].mpd.manifest}var u=A(e,o),c=t.getAdaptationsForType(s,e?e.index:null,n);return l=f(s,u,e,c,n),n===a.TEXT&&(c=t.getAdaptationsForType(s,e?e.index:null,a.VIDEO),l=d(l).call(l,f(s,u,e,c,n,!0))),l}function p(e){var n=m(e);return t.getRegularPeriods(n)}function m(e){var n=E(e);return t.getMpd(n)}function v(){r=[],i={}}function E(e){return e||(r.length>0?r[0].mpd.manifest:null)}function T(e){try{var n=A(e.streamInfo,r),i=t.getAdaptationsForPeriod(n);return e&&e.streamInfo&&void 0!==e.streamInfo.id&&i?i[e.index]:null}catch(e){return null}}function A(e,t){for(var n=t.length,r=0;r<n;r++){var i=t[r];if(e&&e.id===i.id)return i}return null}function R(e){if(!e)return null;var n,r,i,a,o,l=new ka,u=e.period.mpd.manifest.Period_asArray[e.period.index].AdaptationSet_asArray[e.index];if(l.id=e.id,l.index=e.index,l.type=e.type,l.streamInfo=C(e.period),l.representationCount=t.getRepresentationCount(u),l.labels=t.getLabelsForAdaptation(u),l.lang=t.getLanguageForAdaptation(u),l.segmentAlignment=t.getSegmentAlignment(u),l.subSegmentAlignment=t.getSubSegmentAlignment(u),n=t.getViewpointForAdaptation(u),l.viewpoint=n.length?n[0].value:void 0,l.viewpointsWithSchemeIdUri=n,o=t.getAccessibilityForAdaptation(u),l.accessibility=ee(o).call(o,(function(e){var t=e.value,n=t;return e.schemeIdUri&&e.schemeIdUri.search("cea-608")>=0&&void 0!==s&&(n=t?"cea-608:"+t:"cea-608",l.embeddedCaptions=!0),n})),l.accessibilitiesWithSchemeIdUri=o,r=t.getAudioChannelConfigurationForAdaptation(u),l.audioChannelConfiguration=ee(r).call(r,(function(e){return e.value})),l.audioChannelConfigurationsWithSchemeIdUri=r,0===l.audioChannelConfiguration.length&&h(u.Representation_asArray)&&u.Representation_asArray.length>0&&(i=t.getAudioChannelConfigurationForRepresentation(u.Representation_asArray[0]),l.audioChannelConfiguration=ee(i).call(i,(function(e){return e.value})),l.audioChannelConfigurationsWithSchemeIdUri=i),a=t.getRolesForAdaptation(u),l.roles=ee(a).call(a,(function(e){return e.value})),l.rolesWithSchemeIdUri=a,l.codec=t.getCodec(u),l.mimeType=t.getMimeType(u),l.contentProtection=t.getContentProtectionData(u),l.bitrateList=t.getBitrateListForAdaptation(u),l.selectionPriority=t.getSelectionPriority(u),l.contentProtection){var c,f,d=w(c=ee(f=l.contentProtection).call(f,(function(e){return t.getKID(e)}))).call(c,(function(e){return null!==e}));if(d.length){var g,p=d[0];I(g=l.contentProtection).call(g,(function(e){e.keyId=p}))}}if(l.isText=t.getIsText(u),l.supplementalProperties=t.getSupplementalPropertiesForAdaptation(u),(!l.supplementalProperties||0===z(l.supplementalProperties).length)&&h(u.Representation_asArray)&&u.Representation_asArray.length>0){var m,v=ee(m=u.Representation_asArray).call(m,(function(e){return t.getSupplementalPropertiesForRepresentation(e)}));ce(v).call(v,(function(e){return b(e)===b(v[0])}))&&(l.supplementalProperties=v[0])}if(l.supplementalPropertiesAsArray=t.getSupplementalPropertiesAsArrayForAdaptation(u),(!l.supplementalPropertiesAsArray||0===l.supplementalPropertiesAsArray.length)&&h(u.Representation_asArray)&&u.Representation_asArray.length>0){var y,E=ee(y=u.Representation_asArray).call(y,(function(e){return t.getSupplementalPropertiesAsArrayForRepresentation(e)}));ce(E).call(E,(function(e){return b(e)===b(E[0])}))&&(l.supplementalPropertiesAsArray=E[0])}return l.essentialProperties=t.getEssentialPropertiesForAdaptation(u),l.essentialPropertiesAsArray=t.getEssentialPropertiesAsArrayForAdaptation(u),l.isFragmented=t.getIsFragmented(u),l.isEmbedded=!1,l}function N(e,t,n){e.id=t,e.index=100+_(t.substring(2,3)),e.type=a.TEXT,e.codec="cea-608-in-SEI",e.isEmbedded=!0,e.isFragmented=!1;var r=vr()(n);e.lang=r||n,e.roles=["caption"],e.rolesWithSchemeIdUri=[{schemeIdUri:"urn:mpeg:dash:role:2011",value:"caption"}]}function C(e){var n,r,i=new Ua;return i.id=e.id,i.index=e.index,i.start=e.start,i.duration=e.duration,i.manifestInfo=(n=e.mpd,(r=new Za).dvrWindowSize=n.timeShiftBufferDepth,r.loadedTime=n.manifest.loadedTime,r.availableFrom=n.availabilityStartTime,r.minBufferTime=n.manifest.minBufferTime,r.maxFragmentDuration=n.maxSegmentDuration,r.duration=t.getDuration(n.manifest),r.isDynamic=t.getIsDynamic(n.manifest),r.serviceDescriptions=t.getServiceDescriptions(n.manifest),r.protocol=n.manifest.protocol,r),i.isLast=1===e.mpd.manifest.Period_asArray.length||Math.abs(i.start+i.duration-i.manifestInfo.duration)<1,i}function D(){if(!a)throw new Error("setConfig function has to be called previously")}function M(e){return r.length>0?r[0].mpd.manifest.Period_asArray[e]:null}function L(e,t,n){var r,i,a,o,s;if(e)for(r=e.AdaptationSet_asArray,o=0;o<r.length;o+=1)for(a=r[o].Representation_asArray,s=0;s<a.length;s+=1)if(t===(i=a[s]).id)return n?s:i;return null}return e={getBandwidthForRepresentation:function(e,t){var n;return(n=L(M(t),e))?n.bandwidth:null},getIndexForRepresentation:function(e,t){return function(e,t){var n=L(e,t,!0);return null!==n?n:-1}(M(t),e)},getMaxIndexForBufferType:function(e,n){return function(e,n){var r,i,a,o;if(!e||!n)return-1;for(i=e.AdaptationSet_asArray,o=0;o<i.length;o+=1)if(a=(r=i[o]).Representation_asArray,t.getIsTypeOf(r,n))return a.length;return-1}(M(n),e)},convertRepresentationToRepresentationInfo:function(e){if(e){var n=new xa,r=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index],i=t.getRepresentationFor(e.index,r);return n.id=e.id,n.quality=e.index,n.bandwidth=t.getBandwidth(i),n.fragmentDuration=e.segmentDuration||(e.segments&&e.segments.length>0?e.segments[0].duration:NaN),n.MSETimeOffset=e.MSETimeOffset,n.mediaInfo=R(e.adaptation),n}return null},getStreamsInfo:function(e,t){var n=[],i=r;if(e&&(D(),i=p(e)),i.length>0){(!t||t>i.length)&&(t=i.length);for(var a=0;a<t;a++)n.push(C(i[a]))}return n},getMediaInfoForType:function(e,n){if(0===r.length||!e)return null;var i=A(e,r);if(!i)return null;var a=t.getAdaptationsForPeriod(i),o=u(e.index,n,e);return o?R(a[t.getIndexForAdaptation(o,r[0].mpd.manifest,e.index)]):null},getAllMediaInfoForType:g,getAdaptationForType:u,getRealAdaptation:function(e,n){var i,a,o=A(e,r);return i=n?n.id:null,r.length>0&&o&&(a=i?t.getAdaptationForId(i,r[0].mpd.manifest,o.index):t.getAdaptationForIndex(n?n.index:null,r[0].mpd.manifest,o.index)),a},getProducerReferenceTimes:function(e,n){var i,a,o=A(e,r);return i=n?n.id:null,r.length>0&&o&&(a=i?t.getAdaptationForId(i,r[0].mpd.manifest,o.index):t.getAdaptationForIndex(n?n.index:null,r[0].mpd.manifest,o.index)),a?t.getProducerReferenceTimesForAdaptation(a):[]},getRealPeriodByIndex:function(e){return t.getRealPeriodForIndex(e,r[0].mpd.manifest)},getEssentialPropertiesForRepresentation:function(e){try{return t.getEssentialPropertiesForRepresentation(e)}catch(e){return[]}},getVoRepresentations:function(e){var n=T(e);return t.getRepresentationsForAdaptation(n)},getEventsFor:function(e,n,i){var a=[];if(r.length>0){var o=r[0].mpd.manifest;if(e instanceof Ua){var s=A(e,r);a=t.getEventsForPeriod(s)}else if(e instanceof ka){var l=A(i,r);a=t.getEventStreamForAdaptationSet(o,T(e),l)}else if(e instanceof xa){var u=A(i,r);a=t.getEventStreamForRepresentation(o,n,u)}}return a},getEvent:function(e,t,n,r){try{if(!e||!t||isNaN(n)||!r)return null;var i=e.scheme_id_uri,a=e.value;if(!t[i+"/"+a])return null;var o,s=new yt,l=e.timescale||1,u=r.adaptation.period.start,c=t[i+"/"+a],f=isNaN(r.presentationTimeOffset)?isNaN(c.presentationTimeOffset)?0:c.presentationTimeOffset:r.presentationTimeOffset,d=e.presentation_time_delta/l;o=0===e.version?u+n-f+d:u-f+d;var h=e.event_duration/l,g=e.id,p=e.message_data;return s.eventStream=c,s.eventStream.value=a,s.eventStream.timescale=l,s.duration=h,s.id=g,s.calculatedPresentationTime=o,s.messageData=p,s.presentationTimeDelta=d,s}catch(e){return null}},getMpd:m,setConfig:function(e){e&&(e.constants&&(a=e.constants),e.cea608parser&&(s=e.cea608parser),e.errHandler&&t.setConfig({errHandler:e.errHandler}),e.BASE64&&t.setConfig({BASE64:e.BASE64}))},updatePeriods:function(e){if(!e)return null;D(),r=p(e)},getIsTextTrack:function(e){return t.getIsText(e)},getUTCTimingSources:function(){var e=E();return t.getUTCTimingSources(e)},getSuggestedPresentationDelay:function(){var e=r.length>0?r[0].mpd:null;return t.getSuggestedPresentationDelay(e)},getAvailabilityStartTime:function(e){var n=m(e);return t.getAvailabilityStartTime(n)},getIsTypeOf:function(e,n){return t.getIsTypeOf(e,n)},getIsDynamic:function(e){var n=E(e);return t.getIsDynamic(n)},getDuration:function(e){var n=E(e);return t.getDuration(n)},getRegularPeriods:p,getContentSteering:function(e){return t.getContentSteering(e)},getLocation:function(e){return t.getLocation(e)},getPatchLocation:function(e){var n=t.getPatchLocation(e),r=t.getPublishTime(e);return n&&0!==n.length&&r?w(n).call(n,(function(e){return isNaN(e.ttl)||r.getTime()+e.ttl>(new Date).getTime()})):[]},getManifestUpdatePeriod:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.getManifestUpdatePeriod(e,n)},getPublishTime:function(e){return t.getPublishTime(e)},getIsDVB:function(e){return t.hasProfile(e,"urn:dvb:dash:profile:dvb-dash:2014")},getIsPatch:function(e){return n.getIsPatch(e)},getBaseURLsFromElement:function(e){return t.getBaseURLsFromElement(e)},getRepresentationSortFunction:function(){return t.getRepresentationSortFunction()},getCodec:function(e,n,r){return t.getCodec(e,n,r)},getPeriodById:function(e){if(!e||0===r.length)return null;var t=w(r).call(r,(function(t){return t.id===e}));return t&&t.length>0?t[0]:null},setCurrentMediaInfo:function(e,t,n){i[e]=i[e]||{},i[e][t]=i[e][t]||{},i[e][t]=n},isPatchValid:function(e,r){var i=t.getId(e),a=n.getMpdId(r),o=t.getPublishTime(e),s=n.getPublishTime(r),l=n.getOriginalPublishTime(r);return!!(i&&a&&i==a&&o&&l&&o.getTime()==l.getTime()&&s&&o.getTime()<s.getTime())},applyPatchToManifest:function(e,t){var r;I(r=n.getPatchOperations(t)).call(r,(function(t){var n=t.getMpdTarget(e);if(null!==n){var r=n.name,i=n.target,a=n.leaf;if(t.xpath.findsAttribute()||"__text"===r)switch(t.action){case"add":case"replace":i[r]=t.value;break;case"remove":delete i[r]}else{var o,s,l=y(o=i[r+"_asArray"]||[]).call(o,a),u="prepend"===t.position||"before"===t.position;if(("remove"===t.action||"replace"===t.action)&&(delete i[r],-1!=l)){var c=i[r+"_asArray"];S(c).call(c,l,1),c.length>1?i[r]=c:1==c.length?i[r]=c[0]:delete i[r+"_asArray"]}"add"!==t.action&&"replace"!==t.action||I(s=z(t.value)).call(s,(function(e){var n=t.value[e],a=i[e+"_asArray"]||[];if(0===a.length&&i[e]&&a.push(i[e]),0===a.length)a=n;else{var o,s=a.length;s=e==r&&-1!=l?l+(u?0:1)+("replace"==t.action?-1:0):u?0:a.length,S(a).apply(a,d(o=[s,0]).call(o,n))}i[e+"_asArray"]=a,i[e]=1==a.length?a[0]:a}))}}}))},areMediaInfosEqual:c,reset:v},t=Zt(l).getInstance(),n=Ya(l).getInstance(),v(),e}ja.__dashjs_factory_name="DashAdapter";var Ha=p.Z.getSingletonFactory(ja),Va=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t;return t=[{key:"round10",value:function(e,t){return function(e,t,n){return void 0===n||0==+n?Math[e](t):(n=+n,null===(t=+t)||isNaN(t)||"number"!=typeof n||n%1!=0?NaN:(t=t.toString().split("e"),+((t=(t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n)))).toString().split("e"))[0]+"e"+(t[1]?+t[1]+n:n))))}("round",e,t)}}],t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e,t),e}(),Ka=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.TcpList=[],this.HttpList=[],this.RepSwitchList=[],this.BufferLevel=[],this.BufferState=[],this.PlayList=[],this.DroppedFrames=[],this.SchedulingInfo=[],this.DVRInfo=[],this.ManifestUpdate=[],this.RequestsQueue=null,this.DVBErrors=[]},za=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.t=null,this.mt=null,this.to=null,this.lto=null},Wa=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.t=null,this.level=null},Xa=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.target=null,this.state=s.Z.BUFFER_EMPTY},Qa=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.time=null,this.range=null,this.manifestInfo=null},$a=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.time=null,this.droppedFrames=null};function Ja(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var eo=function e(){Ja(this,e),this.mediaType=null,this.type=null,this.requestTime=null,this.fetchTime=null,this.availabilityStartTime=null,this.presentationStartTime=0,this.clientTimeOffset=0,this.currentTime=null,this.buffered=null,this.latency=0,this.streamInfo=[],this.representationInfo=[]},to=function e(){Ja(this,e),this.id=null,this.index=null,this.start=null,this.duration=null},no=function e(){Ja(this,e),this.id=null,this.index=null,this.mediaType=null,this.streamIndex=null,this.presentationTimeOffset=null,this.startNumber=null,this.fragmentInfoType=null},ro=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mediaType=null,this.t=null,this.type=null,this.startTime=null,this.availabilityStartTime=null,this.duration=null,this.quality=null,this.range=null,this.state=null},io=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.loadingRequests=[],this.executedRequests=[]};function ao(e){var t,n,r=(e=e||{}).settings,i=this.context,o=(0,l.Z)(i).getInstance();function c(){o.trigger(u.Z.METRICS_CHANGED)}function f(e){o.trigger(u.Z.METRIC_CHANGED,{mediaType:e}),c()}function d(e,t,n){o.trigger(u.Z.METRIC_UPDATED,{mediaType:e,metric:t,value:n}),f(e)}function g(e,t,n){o.trigger(u.Z.METRIC_ADDED,{mediaType:e,metric:t,value:n}),f(e)}function p(e,t){var r=null;return e?(n.hasOwnProperty(e)?r=n[e]:t||(r=new Ka,n[e]=r),r):r}function m(e,t,n){var i=p(e);null!==i&&(i[t].push(n),i[t].length>r.get().streaming.metrics.maxListDepth&&i[t].shift())}function v(e,t,n){m(e,t,n),g(e,t,n)}return t={clearCurrentMetricsForType:function(e){delete n[e],f(e)},clearAllCurrentMetrics:function(){n={},c()},getMetricsFor:p,addHttpRequest:function e(t,n,r,i,a,o,l,u,c,f,d,h,g,p,m,y,E){var _=new Ne.w;null!=o&&o!==i&&(e(t,null,r,i,a,null,null,u,c,null,null,null,g,null,null,y,E),_.actualurl=o),_.tcpid=n,_.type=r,_.url=i,_.range=u,_.trequest=c,_.tresponse=f,_.responsecode=h,_.cmsd=E,_._tfinish=d,_._stream=t,_._mediaduration=g,_._quality=a,_._responseHeaders=p,_._serviceLocation=l,_._fileLoaderType=y,m?I(m).call(m,(function(e){!function(e,t,n,r){var i=new Ne.O;i.s=t,i.d=n,i.b=r,e.trace.push(i),e.interval||(e.interval=0),e.interval+=n}(_,e.s,e.d,e.b)})):(delete _.interval,delete _.trace),v(t,s.Z.HTTP_REQUEST,_)},addRepresentationSwitch:function(e,t,n,r,i){var a=new za;a.t=t,a.mt=n,a.to=r,i?a.lto=i:delete a.lto,v(e,s.Z.TRACK_SWITCH,a)},addBufferLevel:function(e,t,n){var r=new Wa;r.t=t,r.level=n,v(e,s.Z.BUFFER_LEVEL,r)},addBufferState:function(e,t,n){var r=new Xa;r.target=n,r.state=t,v(e,s.Z.BUFFER_STATE,r)},addDVRInfo:function(e,t,n,r){var i=new Qa;i.time=t,i.range=r,i.manifestInfo=n,v(e,s.Z.DVR_INFO,i)},addDroppedFrames:function(e,t){var n=new $a,r=p(e).DroppedFrames;t&&(n.time=t.creationTime,n.droppedFrames=t.droppedVideoFrames,r.length>0&&r[r.length-1]==n||v(e,s.Z.DROPPED_FRAMES,n))},addSchedulingInfo:function(e,t,n,r,i,a,o,l,u){var c=new ro;c.mediaType=e,c.t=t,c.type=n,c.startTime=r,c.availabilityStartTime=i,c.duration=a,c.quality=o,c.range=l,c.state=u,v(e,s.Z.SCHEDULING_INFO,c)},addRequestsQueue:function(e,t,n){var r=new io;r.loadingRequests=t,r.executedRequests=n,p(e).RequestsQueue=r,g(e,s.Z.REQUESTS_QUEUE,r)},addManifestUpdate:function(e,t,n,r,i,o,l,u,c,f){var d=new eo;d.mediaType=e,d.type=t,d.requestTime=n,d.fetchTime=r,d.availabilityStartTime=i,d.presentationStartTime=o,d.clientTimeOffset=l,d.currentTime=u,d.buffered=c,d.latency=f,m(a.Z.STREAM,s.Z.MANIFEST_UPDATE,d),g(e,s.Z.MANIFEST_UPDATE,d)},updateManifestUpdateInfo:function(e,t){if(e){for(var n in t)e[n]=t[n];d(e.mediaType,s.Z.MANIFEST_UPDATE,e)}},addManifestUpdateStreamInfo:function(e,t,n,r,i){if(e){var a=new to;a.id=t,a.index=n,a.start=r,a.duration=i,e.streamInfo.push(a),d(e.mediaType,s.Z.MANIFEST_UPDATE_STREAM_INFO,e)}},addManifestUpdateRepresentationInfo:function(e,t,n,r,i,a,o,l){if(e&&e.representationInfo){var u=new no;u.id=t,u.index=n,u.streamIndex=r,u.mediaType=i,u.startNumber=o,u.fragmentInfoType=l,u.presentationTimeOffset=a,e.representationInfo.push(u),d(e.mediaType,s.Z.MANIFEST_UPDATE_TRACK_INFO,e)}},addPlayList:function(e){var t;e.trace&&h(e.trace)?I(t=e.trace).call(t,(function(e){e.hasOwnProperty("subreplevel")&&!e.subreplevel&&delete e.subreplevel})):delete e.trace,v(a.Z.STREAM,s.Z.PLAY_LIST,e)},addDVBErrors:function(e){v(a.Z.STREAM,s.Z.DVB_ERRORS,e)}},n={},t}ao.__dashjs_factory_name="MetricsModel";var oo=p.Z.getSingletonFactory(ao);function so(e){e=e||{};var t,n,r,i,o=this.context,l=e.metricsModel;function u(e){var t=l.getMetricsFor(e,!0);if(!t)return null;var n,r=t.HttpList,i=null;if(!r||r.length<=0)return null;for(n=r.length-1;n>=0;){if(r[n].responsecode){i=r[n];break}n--}return i}function c(e){var t=l.getMetricsFor(e,!0);return t&&t.HttpList?t.HttpList:[]}function f(e,t){if(!e)return null;var n=e[t];return n&&0!==n.length?n[n.length-1]:null}return t={getCurrentRepresentationSwitch:function(e){return f(l.getMetricsFor(e,!0),s.Z.TRACK_SWITCH)},getCurrentBufferState:function(e){return f(l.getMetricsFor(e,!0),s.Z.BUFFER_STATE)},getCurrentBufferLevel:function(e){var t=f(l.getMetricsFor(e,!0),s.Z.BUFFER_LEVEL);return t?Va.round10(t.level/1e3,-3):0},getCurrentHttpRequest:u,getHttpRequests:c,getCurrentDroppedFrames:function(){return f(l.getMetricsFor(a.Z.VIDEO,!0),s.Z.DROPPED_FRAMES)},getCurrentSchedulingInfo:function(e){return f(l.getMetricsFor(e,!0),s.Z.SCHEDULING_INFO)},getCurrentDVRInfo:function(e){return f(e?l.getMetricsFor(e,!0):l.getMetricsFor(a.Z.VIDEO,!0)||l.getMetricsFor(a.Z.AUDIO,!0),s.Z.DVR_INFO)},getCurrentManifestUpdate:function(){return f(l.getMetricsFor(a.Z.STREAM),s.Z.MANIFEST_UPDATE)},getLatestFragmentRequestHeaderValueByID:function(e,t){if(!t)return null;var n={},r=u(e);r&&(n=Bt.Z.parseHttpHeaders(r._responseHeaders));var i=n[t.toLowerCase()];return void 0===i?null:i},getLatestMPDRequestHeaderValueByID:function(e){if(!e)return null;var t,n,r,i={};for(r=(t=c(a.Z.STREAM)).length-1;r>=0;r--)if((n=t[r]).type===Ne.w.MPD_TYPE){i=Bt.Z.parseHttpHeaders(n._responseHeaders);break}var o=i[e.toLowerCase()];return void 0===o?null:o},addRepresentationSwitch:function(e,t,n,r,i){l.addRepresentationSwitch(e,t,n,r,i)},addDVRInfo:function(e,t,n,r){l.addDVRInfo(e,t,n,r)},updateManifestUpdateInfo:function(e){var t=this.getCurrentManifestUpdate();l.updateManifestUpdateInfo(t,e)},addManifestUpdateStreamInfo:function(e){if(e){var t=this.getCurrentManifestUpdate();l.addManifestUpdateStreamInfo(t,e.id,e.index,e.start,e.duration)}},addManifestUpdateRepresentationInfo:function(e,t){if(e){var n=this.getCurrentManifestUpdate();l.addManifestUpdateRepresentationInfo(n,e.id,e.index,e.streamIndex,t,e.presentationTimeOffset,e.startNumber,e.fragmentInfoType)}},addManifestUpdate:function(e){l.addManifestUpdate(a.Z.STREAM,e.type,e.requestStartDate,e.requestEndDate)},addHttpRequest:function(e,t,n,r,i,a){l.addHttpRequest(e.mediaType,null,e.type,e.url,e.quality,t,e.serviceLocation||null,e.range||null,e.requestStartDate,e.firstByteDate,e.requestEndDate,n,e.duration,r,i,e.fileLoaderType,a)},addSchedulingInfo:function(e,t){l.addSchedulingInfo(e.mediaType,new Date,e.type,e.startTime,e.availabilityStartTime,e.duration,e.quality,e.range,t)},addRequestsQueue:function(e,t,n){l.addRequestsQueue(e,t,n)},addBufferLevel:function(e,t,n){l.addBufferLevel(e,t,n)},addBufferState:function(e,t,n){l.addBufferState(e,t,n)},addDroppedFrames:function(e){l.addDroppedFrames(a.Z.VIDEO,e)},addPlayList:function(){i&&(l.addPlayList(i),i=null)},addDVBErrors:function(e){l.addDVBErrors(e)},createPlaylistMetrics:function(e,t){(i=new $e).start=new Date,i.mstart=e,i.starttype=t},createPlaylistTraceMetrics:function(e,t,i){!0===n&&(n=!1,(r=new Je).representationid=e,r.start=new Date,r.mstart=t,r.playbackspeed=null!==i?i.toString():null)},updatePlayListTraceMetrics:function(e){if(r)for(var t in r)r[t]=e[t]},pushPlayListTraceMetrics:function(e,t){if(!1===n&&i&&r&&r.start){var a=r.start,o=e.getTime()-a.getTime();r.duration=o,r.stopreason=t,i.trace.push(r),n=!0}},clearAllCurrentMetrics:function(){l.clearAllCurrentMetrics()}},l=l||oo(o).getInstance({settings:e.settings}),n=!0,r=null,i=null,t}so.__dashjs_factory_name="DashMetrics";var lo=p.Z.getSingletonFactory(so);function uo(){var e,t,n,r,i=this.context,s=(0,l.Z)(i).getInstance(),c=(0,we.Z)(i).getInstance();function f(e){r=e}function d(e,t,n,r){var i,a=t.adaptation.period.mpd,o=a.availabilityStartTime;if(r)i=n&&a.timeShiftBufferDepth!==Number.POSITIVE_INFINITY?new Date(o.getTime()+1e3*(e+a.timeShiftBufferDepth)):a.availabilityEndTime;else if(n){var s=t.availabilityTimeOffset;i=new Date(o.getTime()+1e3*(e-s))}else i=o;return i}function h(e,t){return(e.getTime()-t.mpd.availabilityStartTime.getTime()+1e3*r)/1e3}function g(e,t){return e+(t.adaptation.period.start-t.presentationTimeOffset)}function p(e){var n={start:NaN,end:NaN},r=e[0].getAdapter().getRegularPeriods()[0],i=h(new Date,r);if(!e||0===e.length)return{range:n,now:i};I(e).call(e,(function(e){var r=e.getAdapter(),s=r.getMediaInfoForType(e.getStreamInfo(),a.Z.VIDEO)||r.getMediaInfoForType(e.getStreamInfo(),a.Z.AUDIO),l=r.getVoRepresentations(s)[0],u={start:NaN,end:NaN};if(l)if(l.segmentInfoType===o.Z.SEGMENT_TIMELINE)u=function(e){var n,r,i,a,o=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index],s=t.getRepresentationFor(e.index,o),l=s.SegmentTemplate||s.SegmentList,u=l.SegmentTimeline,c=l.timescale,f=u.S_asArray,d={start:0,end:0},h=f[0].t,p=!isNaN(h),m=p?h:0,v=0;for(p&&(d.start=g(m/c,e)),i=0,a=f.length;i<a;i++)r=0,(n=f[i]).hasOwnProperty("r")&&(r=n.r),v+=n.d*(1+r);return d.end=g((m+v)/c,e),d}(l);else{var c=l.adaptation.period;u.start=c.start,u.end=Math.max(i,c.start+c.duration)}!isNaN(u.start)&&(isNaN(n.start)||n.start>u.start)&&(n.start=u.start),!isNaN(u.end)&&(isNaN(n.end)||n.end<u.end)&&(n.end=u.end)})),n.end=Math.min(i,n.end);var s=v(e,n.end,!0);return n.end=isNaN(s)?n.end:s,n.start=r&&r.mpd&&r.mpd.timeShiftBufferDepth&&!isNaN(r.mpd.timeShiftBufferDepth)&&!isNaN(n.end)?Math.max(n.end-r.mpd.timeShiftBufferDepth,n.start):n.start,n.start=v(e,n.start),{range:n,now:i}}function m(e,t){n=e-t.end}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{for(var r=0,i=!1,a=NaN;!i&&r<e.length;){var o=e[r].getStreamInfo();o.start<=t&&(!isFinite(o.duration)||o.start+o.duration>=t)?(a=t,i=!0):!n&&o.start>t&&(isNaN(a)||o.start<a)?a=o.start:n&&o.start+o.duration<t&&(isNaN(a)||o.start+o.duration>a)&&(a=o.start+o.duration),r+=1}return a}catch(e){return t}}function y(e){void 0===e.offset||isNaN(e.offset)||f(e.offset/1e3)}function _(){r=0,n=0}function T(){s.off(u.Z.UPDATE_TIME_SYNC_OFFSET,y,this),_()}return e={initialize:function(){_(),s.on(u.Z.UPDATE_TIME_SYNC_OFFSET,y,this)},getClientTimeOffset:function(){return r},setClientTimeOffset:f,getClientReferenceTime:function(){return U()-1e3*n+1e3*r},calcAvailabilityStartTimeFromPresentationTime:function(e,t,n){return d(e,t,n)},calcAvailabilityEndTimeFromPresentationTime:function(e,t,n){return d(e,t,n,!0)},calcPresentationTimeFromWallTime:h,calcPresentationTimeFromMediaTime:g,calcPeriodRelativeTimeFromMpdRelativeTime:function(e,t){return t-e.adaptation.period.start},calcMediaTimeFromPresentationTime:function(e,t){return e-t.adaptation.period.start+t.presentationTimeOffset},calcWallTimeForSegment:function(e,t){var n,r,i;return t&&(n=e.representation.adaptation.period.mpd.suggestedPresentationDelay,r=e.presentationStartTime+n,i=new Date(e.availabilityStartTime.getTime()+1e3*r)),i},calcTimeShiftBufferWindow:function(e,t){if(!t)return function(e){var t={start:NaN,end:NaN},n=0,r=NaN;return I(e).call(e,(function(e){var t=e.getStreamInfo();n+=t.duration,(isNaN(r)||t.start<r)&&(r=t.start)})),t.start=r,t.end=r+n,t}(e);if(c.get().streaming.timeShiftBuffer.calcFromSegmentTimeline){var n=p(e);return m(n.now,n.range),n.range}return function(e){var t={start:NaN,end:NaN};if(!e||0===e.length)return t;var n=e[0].getAdapter().getRegularPeriods()[0],r=h(new Date,n),i=n.mpd.timeShiftBufferDepth,a=isNaN(i)?0:r-i;if(t.start=v(e,a),t.end=!isNaN(t.start)&&r<t.start?r:v(e,r,!0),!isNaN(i)&&t.end<r-i&&(t.end=NaN),c.get().streaming.timeShiftBuffer.fallbackToSegmentTimeline){var o=p(e);if(o.range.end<t.start)return s.trigger(E.Z.CONFORMANCE_VIOLATION,{level:rr.LEVELS.WARNING,event:rr.EVENTS.INVALID_DVR_WINDOW}),m(o.now,o.range),o.range}return t}(e)},reset:T},t=Zt(i).getInstance(),T(),e}uo.__dashjs_factory_name="TimelineConverter";var co=p.Z.getSingletonFactory(uo),fo=n(4593),ho=n(6934);function go(e){return go="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},go(e)}function po(e,t){return po=M||function(e,t){return e.__proto__=t,e},po(e,t)}function mo(e,t){return!t||"object"!==go(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vo(e){return vo=M?L:function(e){return e.__proto__||L(e)},vo(e)}var yo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=O(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&po(e,t)}(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!P)return!1;if(P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=vo(t);if(n){var i=vo(this).constructor;e=P(r,arguments,i)}else e=r.apply(this,arguments);return mo(this,e)});function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this)).captionData=null,e.label=null,e.defaultTrack=!1,e.kind=null,e.isFragmented=!1,e.isEmbedded=!1,e.isTTML=null,e}return i}(ka),Eo=n(2295);function _o(){var e=0;function t(e){for(var t="",n=0;n<e.length;++n)t+=e[n].uchar;return t.length-t.replace(/^\s+/,"").length}function n(e){return"left: "+3.125*e.x+"%; top: "+6.66*e.y1+"%; width: "+(100-3.125*e.x)+"%; height: "+6.66*Math.max(e.y2-1-e.y1,1)+"%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;"}function r(e){return"red"===e?"rgb(255, 0, 0)":"green"===e?"rgb(0, 255, 0)":"blue"===e?"rgb(0, 0, 255)":"cyan"===e?"rgb(0, 255, 255)":"magenta"===e?"rgb(255, 0, 255)":"yellow"===e?"rgb(255, 255, 0)":"white"===e?"rgb(255, 255, 255)":"black"===e?"rgb(0, 0, 0)":e}function i(e,t){var n=e.videoHeight/15;return t?"font-size: "+n+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; color: "+(t.foreground?r(t.foreground):"rgb(255, 255, 255)")+"; font-style: "+(t.italics?"italic":"normal")+"; text-decoration: "+(t.underline?"underline":"none")+"; white-space: pre; background-color: "+(t.background?r(t.background):"transparent")+";":"font-size: "+n+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; justify-content: flex-start; text-align: left; color: rgb(255, 255, 255); font-style: normal; white-space: pre; line-height: normal; font-weight: normal; text-decoration: none; width: 100%; display: flex;"}function a(e){return e.replace(/^\s+/g,"")}function o(e){return e.replace(/\s+$/g,"")}return{createHTMLCaptionsFromScreen:function(r,s,l,u){var c,f,d=null,h=!1,g=-1,p={start:s,end:l,spans:[]},m="style_cea608_white_black",v={},y={},E=[];for(c=0;c<15;++c){var _=u.rows[c],S="",A=null;if(!1===_.isEmpty()){var I=t(_.chars);null===d&&(d={x:I,y1:c,y2:c+1,p:[]}),I!==g&&h&&(d.p.push(p),p={start:s,end:l,spans:[]},d.y2=c,d.name="region_"+d.x+"_"+d.y1+"_"+d.y2,!1===v.hasOwnProperty(d.name)?(E.push(d),v[d.name]=d):v[d.name].p.contat(d.p),d={x:I,y1:c,y2:c+1,p:[]});for(var R=0;R<_.chars.length;++R){var w=_.chars[R],N=w.penState;if(null===A||!N.equals(A)){T(S).call(S).length>0&&(p.spans.push({name:m,line:S,row:c}),S="");var C="style_cea608_"+N.foreground+"_"+N.background;N.underline&&(C+="_underline"),N.italics&&(C+="_italics"),y.hasOwnProperty(C)||(y[C]=JSON.parse(b(N))),A=N,m=C}S+=w.uchar}T(S).call(S).length>0&&p.spans.push({name:m,line:S,row:c}),h=!0,g=I}else h=!1,g=-1,d&&(d.p.push(p),p={start:s,end:l,spans:[]},d.y2=c,d.name="region_"+d.x+"_"+d.y1+"_"+d.y2,!1===v.hasOwnProperty(d.name)?(E.push(d),v[d.name]=d):v[d.name].p.contat(d.p),d=null)}d&&(d.p.push(p),d.y2=c+1,d.name="region_"+d.x+"_"+d.y1+"_"+d.y2,!1===v.hasOwnProperty(d.name)?(E.push(d),v[d.name]=d):v[d.name].p.contat(d.p),d=null);var D=[];for(c=0;c<E.length;++c){var M=E[c],L="sub_cea608_"+e++,O=document.createElement("div");O.id=L;var P=n(M);O.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+P;var F=document.createElement("div");F.className="paragraph bodyStyle",F.style.cssText=i(r);var x=document.createElement("div");x.className="cueUniWrapper",x.style.cssText="unicode-bidi: normal; direction: ltr;";for(var k=0;k<M.p.length;++k){var U=M.p[k],Z=0;for(f=0;f<U.spans.length;++f){var B=U.spans[f];if(B.line.length>0){var G;if(0!==f&&Z!=B.row){var q=document.createElement("br");q.className="lineBreak",x.appendChild(q)}var Y=!1;Z===B.row&&(Y=!0),Z=B.row;var j=y[B.name],H=document.createElement("span");H.className="spanPadding "+B.name+" customSpanColor",H.style.cssText=i(r,j),0!==f&&Y?f===U.spans.length-1?H.textContent=o(B.line):H.textContent=B.line:U.spans.length>1&&f<U.spans.length-1&&B.row===U.spans[f+1].row?H.textContent=a(B.line):H.textContent=T(G=B.line).call(G),x.appendChild(H)}}}F.appendChild(x),O.appendChild(F);var V={bodyStyle:["%",90]};for(var K in y)y.hasOwnProperty(K)&&(V[K]=["%",90]);D.push({type:"html",start:s,end:l,cueHTMLElement:O,cueID:L,cellResolution:[32,15],isFromCEA608:!0,fontSize:V,lineHeight:{},linePadding:{}})}return D}}}_o.__dashjs_factory_name="EmbeddedTextHtmlRender";var To=p.Z.getSingletonFactory(_o);function bo(e){var t,n,r,o,s,c,f,h,g,p,E,_,T,b,S,A,R,N=e.errHandler,C=e.manifestModel,D=e.mediaController,M=e.videoModel,L=e.textTracks,O=e.vttParser,P=e.vttCustomRenderingParser,F=e.ttmlParser,x=e.streamInfo,k=e.settings,U=this.context,B=(0,l.Z)(U).getInstance(),G=!1;function q(){c=null,h=NaN,g=[],p=null,f=!1,s=[],o=null}function Y(e){var t=new yo;for(var n in e)t[n]=e[n];t.labels=e.labels,t.defaultTrack=function(e){var t=!1;return _.length>1&&e.isEmbedded?t=e.id&&e.id===a.Z.CC1:1===_.length?e.id&&"string"==typeof e.id&&"CC"===e.id.substring(0,2)&&(t=!0):0===_.length&&(t=e.index===s[0].index),t}(e),t.isFragmented=e.isFragmented,t.isEmbedded=!!e.isEmbedded,t.isTTML=function(e){return e.codec&&e.codec.search(a.Z.STPP)>=0||e.mimeType&&e.mimeType.search(a.Z.TTML)>=0}(e),t.kind=function(e,t){var n=e.roles&&e.roles.length>0?t[e.roles[0]]:t.caption;return n===t.caption||n===t.subtitle?n:t.caption}(e,{subtitle:"subtitles",caption:"captions"}),L.addTextTrack(t)}function j(e){var t=e.chunk;t.mediaInfo.embeddedCaptions&&V(t.bytes,t)}function H(e){E=e}function V(e,s){var l,u=s.mediaInfo,g=u.type,m=u.mimeType,R=u.codec||m;R?-1!==y(l=u.codec).call(l,"application/mp4")?function(e,i,s){var l;if("InitializationSegment"===i.segmentType)f=!0,h=r.getMediaTimescaleFromMoov(e);else{if(!f)return;(l=r.getSamplesInfo(e).sampleList).length>0&&(p=l[0].cts-i.start*h),s.search(a.Z.STPP)>=0?function(e,r,i){var s,l;for(o=null!==o?o:W(i),s=0;s<r.length;s++){var u=r[s],f=u.cts,d=z(),g=d+f/h,p=g+u.duration/h;t.buffered.add(g,p);var m=new DataView(e,u.offset,u.subSizes[0]),v=ho.Utils.dataViewToString(m,a.Z.UTF8),y=[],_=u.offset+u.subSizes[0];for(l=1;l<u.subSizes.length;l++){var T=new Uint8Array(e,_,u.subSizes[l]),b=String.fromCharCode.apply(null,T);y.push(b),_+=u.subSizes[l]}try{var S=C.getValue().ttmlTimeIsRelative?f/h:0,A=o.parse(v,S,f/h,(f+u.duration)/h,y);L.addCaptions(E,d,A)}catch(e){c.removeExecutedRequestsBeforeTime(),this.remove(),n.error("TTML parser error: "+e.message)}}}(e,l,s):function(e,r){var i,a,o,s=[];for(i=0;i<r.length;i++){var l=r[i];l.cts-=p;var u=z()+l.cts/h,c=u+l.duration/h;t.buffered.add(u,c);var f=v(e).call(e,l.offset,l.offset+l.size),g=ho.parseBuffer(f);for(a=0;a<g.boxes.length;a++){var m=g.boxes[a];if(n.debug("VTT box1: "+m.type),"vtte"!==m.type&&"vttc"===m.type){var y,_;n.debug("VTT vttc boxes.length = "+m.boxes.length);var T={styles:{}};for(o=0;o<m.boxes.length;o++){var b=m.boxes[o];if(n.debug("VTT box2: "+b.type),"payl"===b.type)T.start=l.cts/h,T.end=(l.cts+l.duration)/h,T.data=b.cue_text;else if("sttg"===b.type&&b.settings&&""!==b.settings)try{var S=b.settings.split(" ");T.styles=O.getCaptionStyles(S)}catch(e){}}T&&T.data&&(s.push(T),n.debug(d(y=d(_="VTT ".concat(T.start," - ")).call(_,T.end," : ")).call(y,T.data)))}}}s.length>0&&L.addCaptions(E,0,s)}(e,l)}}(e,s,R):g===a.Z.VIDEO?function(e,t){var a,o;if(t.segmentType===Ne.w.INIT_SEGMENT_TYPE)0===T&&(T=r.getMediaTimescaleFromMoov(e));else if(t.segmentType===Ne.w.MEDIA_SEGMENT_TYPE){if(0===T)return void n.warn("CEA-608: No timescale for embeddedTextTrack yet");var s=(o=r.getSamplesInfo(e)).lastSequenceNumber,l=fe(t.start),u=fe(t.end);if(A[0]||A[1]||function(){for(var e,t=0;t<_.length;t++){if(-1===(e=L.getTrackIdxForId(_[t].id)))return void n.warn("CEA-608: data before track is ready.");var r=K(e);A[t]=new(i().Cea608Parser)(t+1,{newCue:r},null)}}(),T){if(function(e,t,n,r,i){return null!==e&&null!==t&&null!==r&&null!==i&&(t===e?r!==i:t!==e+n)}(b,s,o.numSequences,S,l))for(a=0;a<A.length;a++)A[a]&&A[a].reset();for(var c=function(e,t,n){if(0===t.length)return null;for(var r={splits:[],fields:[[],[]]},a=new DataView(e),o=0;o<t.length;o++)for(var s=t[o],l=i().findCea608Nalus(a,s.offset,s.size),u=null,c=0,f=0;f<l.length;f++)for(var d=i().extractCea608DataFromRange(a,l[f]),h=0;h<2;h++)if(d[h].length>0){s.cts!==u?c=0:c+=1;var g=z();r.fields[h].push([s.cts+g*T,d[h],c]),u=s.cts}return I(n=r.fields).call(n,(function(e){Z(e).call(e,(function(e,t){return e[0]===t[0]?e[2]-t[2]:e[0]-t[0]}))})),r}(e,o.sampleList),f=0;f<A.length;f++){var d=c.fields[f],h=A[f];if(h)for(a=0;a<d.length;a++)h.addData(d[a][0]/T,d[a][1])}b=s,S=u}}}(e,s):function(e,n,r){var i,o,s=new DataView(e,0,e.byteLength);o=ho.Utils.dataViewToString(s,a.Z.UTF8);try{i=W(r).parse(o,0),L.addCaptions(L.getCurrentTrackIdx(),0,i),t.buffered&&t.buffered.add(n.start,n.end)}catch(e){N.error(new Te.Z(Re.TIMED_TEXT_ERROR_ID_PARSE_CODE,Re.TIMED_TEXT_ERROR_MESSAGE_PARSE+e.message,o))}}(e,s,R):n.error("No text type defined")}function K(e){return function(t,n,r){var i;(i=M.getTTMLRenderingDiv()?R.createHTMLCaptionsFromScreen(M.getElement(),t,n,r):[{start:t,end:n,data:r.getDisplayText(),styles:{}}])&&L.addCaptions(e,0,i)}}function z(){return isNaN(t.timestampOffset)?0:t.timestampOffset}function W(e){var t;return e.search(a.Z.VTT)>=0?t=k.get().streaming.text.webvtt.customRenderingEnabled&&P?P:O:(e.search(a.Z.TTML)>=0||e.search(a.Z.STPP)>=0)&&(t=F),t}function X(e){I(_).call(_,(function(t){var n=L.getTrackIdxForId(t.id);n>=0&&L.deleteCuesFromTrackIdx(n,e.from,e.to)}))}return t={initialize:function(){G||(_=[],E=null,T=0,A=[],b=null,S=null,G=!0,R=To(U).getInstance(),B.on(u.Z.VIDEO_CHUNK_RECEIVED,j,t),B.on(u.Z.BUFFER_CLEARED,X,t))},addMediaInfos:function(e,n,r){if(s=d(s).call(s,n),e===a.Z.TEXT&&n[0].isFragmented&&!n[0].isEmbedded){var i;c=r,t.buffered=(0,Eo.Z)(U).create(),g=w(i=D.getTracksFor(a.Z.TEXT,x.id)).call(i,(function(e){return e.isFragmented}));for(var o=D.getCurrentTrackFor(a.Z.TEXT,x.id),l=0;l<g.length;l++)if(g[l]===o){H(l);break}}for(var u=0;u<n.length;u++)Y(n[u])},resetMediaInfos:function(){s=[]},getStreamId:function(){return x.id},append:V,abort:function(){},addEmbeddedTrack:function(e){if(G&&e)if(e.id===a.Z.CC1||e.id===a.Z.CC3){for(var t=0;t<_.length;t++)if(_[t].id===e.id)return;_.push(e)}else n.warn("Embedded track "+e.id+" not supported!")},resetEmbedded:function(){B.off(u.Z.VIDEO_CHUNK_RECEIVED,j,t),B.off(u.Z.BUFFER_CLEARED,X,t),L&&L.deleteAllTextTracks(),G=!1,_=[],A=[null,null],b=null,S=null},getConfig:function(){return{fragmentModel:c,fragmentedTracks:g,videoModel:M}},setCurrentFragmentedTrackIdx:H,remove:function(e,n){void 0===e&&e===n&&(e=t.buffered.start(0),n=t.buffered.end(t.buffered.length-1)),t.buffered.remove(e,n),L.deleteCuesFromTrackIdx(E,e,n)},reset:function(){q(),s=[],r=null}},n=(0,m.Z)(U).getInstance().getLogger(t),r=(0,xn.Z)(U).getInstance(),q(),t}bo.__dashjs_factory_name="TextSourceBuffer";var So=p.Z.getClassFactory(bo),Ao=n(4403);function Io(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ro=["text","align","fontSize","id","isd","line","lineAlign","lineHeight","linePadding","position","positionAlign","region","size","snapToLines","vertical"];function wo(e){var t,n,r,i,o,s,c,f,p,y,T,S,R,w,N,C,D,M,L,O,P=this.context,F=(0,l.Z)(P).getInstance(),x=e.videoModel,U=e.streamInfo,B=e.settings;function G(e,t,n,r,i,a){var o=0,s=0;e/t>n/r?o=(s=t)/r*n:s=(o=e)/n*r;var l,u,c=0,f=0;return o/s>i?(f=s,c=s*i):(c=o,f=o/i),l=(e-c)/2,u=(t-f)/2,a?{x:l+.1*c,y:u+.1*f,w:.8*c,h:.8*f}:{x:l,y:u,w:c,h:f}}function H(e,t){var n=x.getClientWidth(),r=x.getClientHeight(),i=x.getVideoWidth(),a=x.getVideoHeight(),o=x.getVideoRelativeOffsetTop(),s=x.getVideoRelativeOffsetLeft();if(0!==i&&0!==a){var l=i/a,u=!1;e.isFromCEA608&&(l=3.5/3,u=!0);var d=G.call(this,n,r,i,a,l,u),h=d.w,g=d.h,m=d.x,v=d.y;if(h!=p||g!=y||m!=c||v!=f||t){if(c=m+s,f=v+o,p=h,y=g,T){var _=T.style;_&&(_.left=c+"px",_.top=f+"px",_.width=p+"px",_.height=y+"px",_.zIndex=w&&document[w]||N?D:null,F.trigger(E.Z.CAPTION_CONTAINER_RESIZE))}var b=e.activeCues;if(b)for(var S=b.length,A=0;A<S;++A){var I=b[A];I.scaleCue(I)}}}}function V(e){var t,n,r,i,a,o=p,s=y;if(e.cellResolution){var l=[o/e.cellResolution[0],s/e.cellResolution[1]];if(e.linePadding)for(t in e.linePadding)if(e.linePadding.hasOwnProperty(t)){n=(e.linePadding[t]*l[0]).toString();for(var u=document.getElementsByClassName("spanPadding"),c=0;c<u.length;c++)u[c].style.cssText=u[c].style.cssText.replace(/(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n),u[c].style.cssText=u[c].style.cssText.replace(/(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n)}if(e.fontSize){for(t in e.fontSize)if(e.fontSize.hasOwnProperty(t)){"%"===e.fontSize[t][0]?r=e.fontSize[t][1]/100:"c"===e.fontSize[t][0]&&(r=e.fontSize[t][1]),n=(r*l[1]).toString(),a="defaultFontSize"!==t?document.getElementsByClassName(t):document.getElementsByClassName("paragraph");for(var f=0;f<a.length;f++)a[f].style.cssText=a[f].style.cssText.replace(/(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n)}if(e.lineHeight)for(t in e.lineHeight)if(e.lineHeight.hasOwnProperty(t)){"%"===e.lineHeight[t][0]?i=e.lineHeight[t][1]/100:"c"===e.fontSize[t][0]&&(i=e.lineHeight[t][1]),n=(i*l[1]).toString(),a=document.getElementsByClassName(t);for(var d=0;d<a.length;d++)a[d].style.cssText=a[d].style.cssText.replace(/(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n)}}}if(e.isd){var h=document.getElementById(e.cueID);h&&T.removeChild(h),z(e)}}function K(e,t){var n=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/,r=/^#(.*)$/;if(n.test(t)){var i=n.exec(t),a=_(i[4],10)-1;return"data:image/png;base64,"+btoa(e.images[a])}if(r.test(t)){var o=r.exec(t)[1];return"data:image/png;base64,"+e.embeddedImages[o]}return t}function z(e){if(T){ve.call(this);var t=document.createElement("div");T.appendChild(t),C=(0,Ao.renderHTML)(e.isd,t,(function(t){return K(e,t)}),T.clientHeight,T.clientWidth,B.get().streaming.text.imsc.displayForcedOnlyMode,(function(e){n.info("renderCaption :",e)}),C,B.get().streaming.text.imsc.enableRollUp),t.id=e.cueID,F.trigger(E.Z.CAPTION_RENDERED,{captionDiv:t,currentTrackIdx:s})}}function W(e,t){return!!t&&t.endTime>=e.startTime}function X(e,t){return!!B.get().streaming.text.extendSegmentedCues&&!!function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];if(b(e[i])!==b(t[i]))return!1}return!0}(t,e,Ro)&&(t.endTime=Math.max(t.endTime,e.endTime),!0)}function Q(e,t){t&&I(t).call(t,(function(t){t.kind&&"image"===t.kind&&(t.src=K(e,t.src)),Q(e,t.contents)}))}function $(e,t,r){var i=le(e),o=B.get().streaming.text.dispatchForManualRendering;if(i&&h(r)&&0!==r.length)for(var s=0;s<r.length;s++){var l=null,u=r[s];i.cellResolution=u.cellResolution,i.isFromCEA608=u.isFromCEA608,isNaN(u.start)||isNaN(u.end)||(o?l=J(u,t):ie(u)&&T?l=ne(u,t,i):u.data&&(l=re(u,t,i)));try{if(l){if(!fe(i,l))if(B.get().streaming.text.webvtt.customRenderingEnabled)i.manualCueList||(i.manualCueList=[]),i.manualCueList.push(l);else{var c=void 0;i.cues&&0!==i.cues.length&&(c=i.cues[i.cues.length-1]),W(l,c)?X(l,c)||(c.isd&&(c.onexit=function(){}),i.mode!==a.Z.TEXT_DISABLED&&i.addCue(l)):i.mode!==a.Z.TEXT_DISABLED&&i.addCue(l)}var f=B.get().streaming.buffer.bufferToKeep;he(i,0,x.getTime()-f)}else n.error("Impossible to display subtitles. You might have missed setting a TTML rendering div via player.attachTTMLRenderingDiv(TTMLRenderingDiv)")}catch(e){throw ge(i),i.addCue(l),e}}}function J(e,t){var n=ae(e,t);return n.onenter=function(){ie(e)&&O&&O.cueID!==n.cueID&&te(O),delete n.type,O=n,ee(n)},n.onexit=function(){te(n),O=null},n}function ee(e){F.trigger(E.Z.CUE_ENTER,e)}function te(e){F.trigger(E.Z.CUE_EXIT,{cueID:e.cueID})}function ne(e,t,r){var i=this,o=ae(e,t);return T.style.left=c+"px",T.style.top=f+"px",T.style.width=p+"px",T.style.height=y+"px",o.onenter=function(){var e=this;r.mode===a.Z.TEXT_SHOWING&&(this.isd?(L?requestAnimationFrame((function(){return z(e)})):z(this),n.debug("Cue enter id:"+this.cueID)):(T.appendChild(this.cueHTMLElement),V.call(i,this),F.trigger(E.Z.CAPTION_RENDERED,{captionDiv:this.cueHTMLElement,currentTrackIdx:s})))},o.onexit=function(){if(T)for(var e=T.childNodes,t=0;t<e.length;++t)e[t].id===this.cueID&&(n.debug("Cue exit id:"+e[t].id),T.removeChild(e[t]),--t)},o}function re(e,t,r){var i=ae(e,t);if(i.isActive=!1,e.styles)try{void 0!==e.styles.align&&"align"in i&&(i.align=e.styles.align),void 0!==e.styles.line&&"line"in i&&(i.line=e.styles.line),void 0!==e.styles.snapToLines&&"snapToLines"in i&&(i.snapToLines=e.styles.snapToLines),void 0!==e.styles.position&&"position"in i&&(i.position=e.styles.position),void 0!==e.styles.size&&"size"in i&&(i.size=e.styles.size)}catch(e){n.error(e)}return i.onenter=function(){r.mode===a.Z.TEXT_SHOWING&&F.trigger(E.Z.CAPTION_RENDERED,{currentTrackIdx:s})},i}function ie(e){return"html"===e.type}function ae(e,t){return ie(e)?function(e,t){var n=new r(e.start+t,e.end+t,"");return n.cueHTMLElement=e.cueHTMLElement,n.isd=e.isd,n.images=e.images,n.embeddedImages=e.embeddedImages,n.cueID=e.cueID,n.scaleCue=A(V).call(V,self),n.cellResolution=e.cellResolution,n.lineHeight=e.lineHeight,n.linePadding=e.linePadding,n.fontSize=e.fontSize,n.isd&&Q(n,n.isd.contents),n}(e,t):function(e,t,n){var i=new r(e.start-t,e.end-t,e.data);return i.cueID=d(n="".concat(i.startTime,"_")).call(n,i.endTime),i}(e,t)}function oe(e){if(S)for(var t=S.childNodes,n=0;n<t.length;++n)t[n].id===e.cueID&&(S.removeChild(t[n]),--n)}function se(){var e,t=[],n=function(e,t){var n;if(void 0===g||null==Y(e)){if(h(e)||(n=function(e,t){if(e){var n;if("string"==typeof e)return Io(e,t);var r=v(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?q(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Io(e,t):void 0}}(e))){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=j(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(x.getTextTracks());try{for(n.s();!(e=n.n()).done;){var r=e.value;r.manualMode===a.Z.TEXT_SHOWING&&t.push(r)}}catch(e){n.e(e)}finally{n.f()}return t}function le(e){return e>=0&&i[e]?x.getTextTrack(i[e].kind,i[e].id,i[e].lang,i[e].isTTML,i[e].isEmbedded):null}function ue(e){var t=this;if(e!==s){var n=le(s=e);ce.call(this,n),R&&(clearInterval(R),R=null),n&&"html"===n.renderingType&&(H.call(this,n,!0),window.ResizeObserver?(M=new window.ResizeObserver((function(){H.call(t,n,!0)}))).observe(x.getElement()):R=k(A(H).call(H,this,n),500))}}function ce(e){ve.call(this),e&&"html"===e.renderingType?pe.call(this):me.call(this)}function fe(e,t){if(!e.cues)return!1;for(var n=0;n<e.cues.length;n++)if(e.cues[n].startTime===t.startTime&&e.cues[n].endTime===t.endTime)return!0;return!1}function de(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return!!e&&(isNaN(t)||(r?e.startTime:e.endTime)>=t)&&(isNaN(n)||(r?e.endTime:e.startTime)<=n)}function he(e,t,n){var r,i;if(!(n<t)&&e&&(e.cues||e.manualCueList)){var a=e.cues&&e.cues.length>0?"native":"custom",o="native"===a?e.cues:e.manualCueList;if(!o||0===o.length)return;for(var s=o.length-1;s>=0;s--)!de(o[s],t,n,!0)||(r=o[s],i=x.getTime(),r.startTime>=i&&r.endTime<=i)||("native"===a?e.removeCue(o[s]):(oe(o[s]),delete e.manualCueList[s]))}}function ge(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e&&(e.cues||e.manualCueList)){var i=e.cues&&e.cues.length>0?"native":"custom",a="native"===i?e.cues:e.manualCueList;if(!a||0===a.length)return;for(var o=a.length-1,s=o;s>=0;s--)de(a[s],t,n,r)&&("native"===i?(a[s].onexit&&a[s].onexit(),e.removeCue(a[s])):(oe(a[s]),delete e.manualCueList[s]))}}function pe(){var e=document.getElementById("native-cue-style");if(!e){(e=document.createElement("style")).id="native-cue-style",document.head.appendChild(e);var t=e.sheet,r=x.getElement();try{r&&(r.id?t.insertRule("#"+r.id+"::cue {background: transparent}",0):0!==r.classList.length?t.insertRule("."+r.className+"::cue {background: transparent}",0):t.insertRule("video::cue {background: transparent}",0))}catch(e){n.info(""+e.message)}}}function me(){var e=document.getElementById("native-cue-style");e&&document.head.removeChild(e)}function ve(){if(T)for(;T.firstChild;)T.removeChild(T.firstChild)}return t={initialize:function(){"undefined"!=typeof window&&"undefined"!=typeof navigator&&(r=window.VTTCue||window.TextTrackCue,i=[],o=[],s=-1,c=0,f=0,p=0,y=0,T=null,S=null,R=null,N=!1,D=2147483647,C=null,L="requestAnimationFrame"in window,void 0!==document.fullscreenElement?w="fullscreenElement":void 0!==document.webkitIsFullScreen?w="webkitIsFullScreen":document.msFullscreenElement?w="msFullscreenElement":document.mozFullScreen&&(w="mozFullScreen"))},getStreamId:function(){return U.id},addTextTrack:function(e){i.push(e)},addCaptions:$,createTracks:function(){var e=B.get().streaming.text.dispatchForManualRendering;Z(i).call(i,(function(e,t){return e.index-t.index})),T=x.getTTMLRenderingDiv(),S=x.getVttRenderingDiv();for(var t,n,r,l,c,f,d=-1,h=0;h<i.length;h++){var g=(n=(t=i[h]).kind,r=void 0!==t.id?t.id:t.lang,l=t.lang,c=t.isTTML,f=t.isEmbedded,x.addTextTrack(n,r,l,c,f));o.push(g),i[h].defaultTrack&&(g.default=!0,d=h);var p=le(h);p&&(p.mode=a.Z.TEXT_SHOWING,T&&(i[h].isTTML||i[h].isEmbedded)?p.renderingType="html":p.renderingType="default"),$(h,0,i[h].captionData),F.trigger(E.Z.TEXT_TRACK_ADDED)}if(ue.call(this,d),d>=0){F.on(E.Z.PLAYBACK_METADATA_LOADED,(function e(){var t=le(d);t&&"html"===t.renderingType&&H.call(this,t,!0),F.off(E.Z.PLAYBACK_METADATA_LOADED,e,this)}),this);for(var m=0;m<i.length;m++){var v=le(m);v&&(v.mode=m!==d||e?a.Z.TEXT_HIDDEN:a.Z.TEXT_SHOWING,v.manualMode=m===d?a.Z.TEXT_SHOWING:a.Z.TEXT_HIDDEN)}}F.trigger(u.Z.TEXT_TRACKS_QUEUE_INITIALIZED,{index:s,tracks:i,streamId:U.id})},getCurrentTrackIdx:function(){return s},setCurrentTrackIdx:ue,getTrackIdxForId:function(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].id===e){t=n;break}return t},getCurrentTrackInfo:function(){return i[s]},setModeForTrackIdx:function(e,t){var n=le(e);n&&n.mode!==t&&(n.mode=t),n&&n.manualMode!==t&&(n.manualMode=t)},deleteCuesFromTrackIdx:function(e,t,n){var r=le(e);r&&ge(r,t,n)},deleteAllTextTracks:function(){for(var e=o?o.length:0,t=0;t<e;t++){var n=le(t);n&&ge.call(this,n,U.start,U.start+U.duration,!1)}o=[],i=[],R&&(clearInterval(R),R=null),M&&x&&(M.unobserve(x.getElement()),M=null),s=-1,ve.call(this)},manualCueProcessing:function(e){var t=se();if(t&&t.length>0){var n=t[0].manualCueList;n&&n.length>0&&I(n).call(n,(function(t){t.startTime<=e&&t.endTime>=e&&!t.isActive?(t.isActive=!0,B.get().streaming.text.dispatchForManualRendering?ee(t):WebVTT.processCues(window,[t],S,t.cueID)):t.isActive&&(t.startTime>e||t.endTime<e)&&(t.isActive=!1,B.get().streaming.text.dispatchForManualRendering?te(t):oe(t))}))}},disableManualTracks:function(){var e=se();if(e&&e.length>0){var t=e[0].manualCueList;t&&t.length>0&&I(t).call(t,(function(e){if(e.isActive)if(e.isActive=!1,B.get().streaming.text.dispatchForManualRendering)te(e);else if(S)for(var t=S.childNodes,n=0;n<t.length;++n)t[n].id===e.cueID&&(S.removeChild(t[n]),--n)}))}}},n=(0,m.Z)(P).getInstance().getLogger(t),t}wo.__dashjs_factory_name="TextTracks";var No=p.Z.getClassFactory(wo);function Co(){var e,t,n,r,i,a,o=this.context;function s(e){var t=e.split(":"),n=t.length-1;return e=60*_(t[n-1],10)+x(t[n]),2===n&&(e+=3600*_(t[0],10)),e}function l(e){var t=e.split(r),n=t[1].split(a);return n.shift(),t[1]=n[0],n.shift(),{cuePoints:t,styles:u(n)}}function u(e){var t={};return I(e).call(e,(function(e){if(e.split(/:/).length>1){var n=e.split(/:/)[1],r=!1;n&&-1!=n.search(/%/)&&(r=!0,n=_(n.replace(/%/,""),10)),(e.match(/align/)||e.match(/A/))&&(t.align=n),(e.match(/line/)||e.match(/L/))&&(t.line="auto"===n?n:_(n,10),r&&(t.snapToLines=!1)),(e.match(/position/)||e.match(/P/))&&(t.position=n),(e.match(/size/)||e.match(/S/))&&(t.size=n)}})),t}function c(e,t){for(var n,i=t,a="",o="";""!==e[i]&&i<e.length;)i++;if((n=i-t)>1)for(var s=0;s<n;s++){if((o=e[t+s]).match(r)){a="";break}a+=o,s!==n-1&&(a+="\n")}else(o=e[t]).match(r)||(a=o);return a}return e={parse:function(e){var a,o,u=[];if(!e)return u;a=(e=e.split(n)).length,o=-1;for(var f=0;f<a;f++){var d=e[f];if(d.length>0&&"WEBVTT"!==d&&d.match(r)){var h=l(d),g=h.cuePoints,p=h.styles,m=c(e,f+1),v=s(g[0].replace(i,"")),y=s(g[1].replace(i,""));!isNaN(v)&&!isNaN(y)&&v>=o&&y>v?""!==m?(o=v,u.push({start:v,end:y,data:m,styles:p})):t.error("Skipping cue due to empty/malformed cue text"):t.error("Skipping cue due to incorrect cue timing")}}return u},getCaptionStyles:u},t=(0,m.Z)(o).getInstance().getLogger(e),n=/(?:\r\n|\r|\n)/gm,r=/-->/,i=/(^[\s]+|[\s]+$)/g,a=/\s\b/g,e}Co.__dashjs_factory_name="VTTParser";var Do=p.Z.getSingletonFactory(Co);function Mo(){var e,t;return e={parse:function(e){var n=[];return t.oncue=function(e){e.start=e.startTime,e.end=e.endTime,e.data=e.text,e.styles={align:e.align,line:e.line,position:e.position,size:e.size},n.push(e)},t.parse(e),n}},function(){try{window&&window.WebVTT&&window.WebVTT.Parser&&(t=new window.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder()))}catch(e){}}(),e}Mo.__dashjs_factory_name="VttCustomRenderingParser";var Lo=p.Z.getSingletonFactory(Mo);function Oo(){var e,t,n=this.context,r=(0,l.Z)(n).getInstance(),i=0;return e={parse:function(e,n,a,o,s){var l,c,f,d="",h=[],g={},p={},m="",v="",y={onOpenTag:function(e,n,i){if(i[" imagetype"]&&!i[" imageType"]&&(r.trigger(E.Z.CONFORMANCE_VIOLATION,{level:rr.LEVELS.ERROR,event:rr.EVENTS.NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE}),i[" imageType"]=i[" imagetype"]),"image"===n&&("http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt"===e||"http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"===e)){if(!i[" imageType"]||"PNG"!==i[" imageType"].value)return void t.warn("smpte-tt imageType != PNG. Discarded");m=i["http://www.w3.org/XML/1998/namespace id"].value}},onCloseTag:function(){m&&(p[m]=T(v).call(v)),v="",m=""},onText:function(e){m&&(v+=e)}};if(!e)throw d="no ttml data to parse",new Error(d);g.data=e,r.trigger(u.Z.TTML_TO_PARSE,g);var _=(0,Ao.fromXML)(g.data,(function(e){d=e}),y);r.trigger(u.Z.TTML_PARSED,{ttmlString:g.data,ttmlDoc:_});var b,S=_.getMediaTimeEvents();for(f=0;f<S.length;f++){var A,I=(0,Ao.generateISD)(_,S[f],(function(e){d=e}));R(A=I.contents).call(A,(function(e){return e.contents.length}))&&(l=S[f]+n)<(c=S[f+1]+n)&&h.push({start:l,end:c,type:"html",cueID:(b="cue_TTML_"+i,i++,b),isd:I,images:s,embeddedImages:p})}if(""!==d)throw t.error(d),new Error(d);return h}},t=(0,m.Z)(n).getInstance().getLogger(e),e}Oo.__dashjs_factory_name="TTMLParser";var Po=p.Z.getSingletonFactory(Oo);function Fo(e,t){var n=z(e);if(W){var r=W(e);t&&(r=w(r).call(r,(function(t){return X(e,t).enumerable}))),n.push.apply(n,r)}return n}function xo(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?I(n=Fo(Object(i),!0)).call(n,(function(t){ko(e,t,i[t])})):Q?$(e,Q(i)):I(r=Fo(Object(i))).call(r,(function(t){C(e,t,X(i,t))}))}return e}function ko(e,t,n){return t in e?C(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zo(e){var t,n,r,i=this.context,o=(0,l.Z)(i).getInstance(),s=(0,Xe.Z)(i).getInstance(),u=e.adapter,c=e.baseURLController;function f(e,t){var n,i,o,l,f=!1;if(c.resolve()){var d=u.getVoRepresentations(e);d&&d.length>0&&(o=c.resolve(d[0].path).url)}var h=w(n=e.essentialPropertiesAsArray).call(n,(function(e){return e.schemeIdUri&&e.schemeIdUri===a.Z.FONT_DOWNLOAD_DVB_SCHEME})),g=w(i=e.supplementalPropertiesAsArray).call(i,(function(e){return e.schemeIdUri&&e.schemeIdUri===a.Z.FONT_DOWNLOAD_DVB_SCHEME}));h.length>0?(f=!0,l=h):l=g,I(l).call(l,(function(n){if(function(e){return!(!(e.value&&"1"===e.value&&e.dvbUrl&&e.dvbUrl.length>0&&e.dvbFontFamily&&e.dvbFontFamily.length>0&&e.dvbMimeType)||e.dvbMimeType!==a.Z.OFF_MIMETYPE&&e.dvbMimeType!==a.Z.WOFF_MIMETYPE)}(n)){var i=(l=n.dvbUrl,u=o,s.isPathAbsolute(l)?l:s.isRelative(l)?u?s.resolve(l,u):s.resolve(l):l);r.push({fontFamily:n.dvbFontFamily,url:i,mimeType:n.dvbMimeType,trackId:e.id,streamId:t,isEssential:f,status:"unloaded",fontFace:new FontFace(n.dvbFontFamily,"url(".concat(i,")"),{display:"swap"})})}var l,u}))}function p(e,t){var n=r[e];r[e]=xo(xo({},n),{},{status:t})}function y(){r=[]}return t={addFontsFromTracks:function(e,t){if(e&&h(e)&&t)for(var n=0;n<e.length;n++)f(e[n],t)},downloadFonts:function(){for(var e=function(e){var t=r[e];document.fonts.add(t.fontFace),o.trigger(E.Z.DVB_FONT_DOWNLOAD_ADDED,t),t.fontFace.load().then((function(){p(e,"loaded"),o.trigger(E.Z.DVB_FONT_DOWNLOAD_COMPLETE,t)}),(function(r){p(e,"error"),n.debug("Font download error: ",r),o.trigger(E.Z.DVB_FONT_DOWNLOAD_FAILED,t)}))},t=0;t<r.length;t++)e(t)},getFonts:function(){return r},getFontsForTrackId:function(e){return w(r).call(r,(function(t){return t.trackId&&t.trackId===e}))},reset:function(){!function(){var e,t=function(e,t){var n;if(void 0===g||null==Y(e)){if(h(e)||(n=function(e,t){if(e){var n;if("string"==typeof e)return Uo(e,t);var r=v(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?q(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Uo(e,t):void 0}}(e))){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=j(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(r);try{for(t.s();!(e=t.n()).done;){var i,a=e.value,o=document.fonts.delete(a.fontFace);n.debug(d(i="Removal of fontFamily: ".concat(a.fontFamily," was ")).call(i,o?"successful":"unsuccessful"))}}catch(e){t.e(e)}finally{t.f()}}(),y()}},n=(0,m.Z)(i).getInstance().getLogger(t),y(),t}Zo.__dashjs_factory_name="DVBFonts";var Bo=p.Z.getClassFactory(Zo);function Go(e){var t,n,r,i,o,s,c,f,h,g,p,v,y,_,T=this.context,b=e.adapter,S=e.errHandler,A=e.manifestModel,w=e.mediaController,N=e.baseURLController,C=e.videoModel,D=e.settings;function M(e){var t,n;if(_.error(d(t=d(n="Could not download ".concat(e.isEssential?"an essential":"a"," font - fontFamily: ")).call(n,e.fontFamily,", url: ")).call(t,e.url)),e.isEssential){var r=i[e.streamId].getTrackIdxForId(e.trackId);i[e.streamId].setModeForTrackIdx(r,a.Z.TEXT_DISABLED)}}function L(e){var t,n;if(_.debug(d(t=d(n="Successfully downloaded ".concat(e.isEssential?"an essential":"a"," font - fontFamily: ")).call(n,e.fontFamily,", url: ")).call(t,e.url)),e.isEssential){var r=i[e.streamId].getTrackIdxForId(e.trackId);r===i[e.streamId].getCurrentTrackIdx()?i[e.streamId].setModeForTrackIdx(r,a.Z.TEXT_SHOWING):i[e.streamId].setModeForTrackIdx(r,a.Z.TEXT_HIDDEN)}}function O(e){var t,r=e.tracks,o=e.index,s=e.streamId;if(!1===D.get().streaming.text.defaultEnabled&&!x()||v)k(s,-1);else{var l=w.getCurrentTrackFor(a.Z.TEXT,s);if(l){var u={lang:l.lang,role:l.roles[0],index:l.index,codec:l.codec,accessibility:l.accessibility[0]};R(r).call(r,(function(e,t){if(w.matchSettings(u,e))return k(s,t),o=t,!0}))}h=!1}n[s].lastEnabledIndex=o,f.trigger(E.Z.TEXT_TRACKS_ADDED,{enabled:x(),index:o,tracks:r,streamId:s}),p=!0,y.addFontsFromTracks(r,s),I(t=y.getFonts()).call(t,(function(e){if(e.isEssential){var t=i[e.streamId].getTrackIdxForId(e.trackId);i[e.streamId].setModeForTrackIdx(t,a.Z.TEXT_DISABLED)}})),y.downloadFonts()}function P(e){try{var t=e.streamId;if(!i[t]||isNaN(e.time))return;i[t].manualCueProcessing(e.time)}catch(e){}}function F(e){try{var t=e.streamId;if(!i[t])return;i[t].disableManualTracks()}catch(e){}}function x(){var e=!0;return h&&!g&&(e=!1),e}function k(e,t){(h=-1===t)&&w&&w.saveTextSettingsDisabled();var n=U(e);if(n!==t&&i[e]){i[e].disableManualTracks();var o=i[e].getCurrentTrackInfo(),s=o?C.getTextTrack(o.kind,o.id,o.lang,o.isTTML,o.isEmbedded):null;s&&s.mode!==a.Z.TEXT_DISABLED&&i[e].setModeForTrackIdx(n,a.Z.TEXT_HIDDEN),i[e].setCurrentTrackIdx(t),o=i[e].getCurrentTrackInfo();var l=D.get().streaming.text.dispatchForManualRendering;o&&!l&&o.mode!==a.Z.TEXT_DISABLED&&i[e].setModeForTrackIdx(t,a.Z.TEXT_SHOWING),o&&o.isFragmented&&!o.isEmbedded?function(e,t,n){if(r[e])for(var o=r[e].getConfig().fragmentedTracks,s=0;s<o.length;s++){var l=o[s];if(t.lang===l.lang&&(l.id?t.id===l.id:t.index===l.index)){var c=w.getCurrentTrackFor(a.Z.TEXT,e);(l.id?c.id!==l.id:c.index!==l.index)?(i[e].deleteCuesFromTrackIdx(n),r[e].setCurrentFragmentedTrackIdx(s)):-1===n&&f.trigger(u.Z.SET_FRAGMENTED_TEXT_AFTER_DISABLED,{},{streamId:e,mediaType:a.Z.TEXT})}}}(e,o,n):o&&!o.isFragmented&&function(e,t){f.trigger(u.Z.SET_NON_FRAGMENTED_TEXT,{currentTrackInfo:t},{streamId:e,mediaType:a.Z.TEXT})}(e,o),w.setTrack(o)}}function U(e){return i[e].getCurrentTrackIdx()}function Z(){r={},i={},n={},h=!0,p=!1,v=!1}return t={deactivateStream:function(e){if(e){var t=e.id;r[t]&&r[t].resetMediaInfos(),i[t]&&i[t].deleteAllTextTracks()}},initialize:function(){y=Bo(T).create({adapter:b,baseURLController:N}),f.on(u.Z.TEXT_TRACKS_QUEUE_INITIALIZED,O,t),f.on(u.Z.DVB_FONT_DOWNLOAD_FAILED,M,t),f.on(u.Z.DVB_FONT_DOWNLOAD_COMPLETE,L,t),D.get().streaming.text.webvtt.customRenderingEnabled&&(f.on(u.Z.PLAYBACK_TIME_UPDATED,P,t),f.on(u.Z.PLAYBACK_SEEKING,F,t))},initializeForStream:function(e){var t=e.id,a=No(T).create({videoModel:C,settings:D,streamInfo:e});a.initialize(),i[t]=a;var l=So(T).create({errHandler:S,adapter:b,dvbFonts:y,manifestModel:A,mediaController:w,videoModel:C,textTracks:a,vttParser:o,vttCustomRenderingParser:s,ttmlParser:c,streamInfo:e,settings:D});l.initialize(),r[t]=l,n[t]={},n[t].lastEnabledIndex=-1},createTracks:function(e){var t=e.id;i[t]&&i[t].createTracks()},getTextSourceBuffer:function(e){var t=e.id;if(r&&r[t])return r[t]},getAllTracksAreDisabled:function(){return h},addEmbeddedTrack:function(e,t){var n=e.id;r[n]&&r[n].addEmbeddedTrack(t)},enableText:function(e,t){return(0,Ke.PS)(t,"boolean"),x()!==t&&(t&&k(e,n[e].lastEnabledIndex),t||(n[e].lastEnabledIndex=U(e),p?k(e,-1):v=!0)),!0},isTextEnabled:x,setTextTrack:k,getCurrentTrackIdx:U,enableForcedTextStreaming:function(e){return(0,Ke.PS)(e,"boolean"),g=e,!0},addMediaInfosToBuffer:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=e.id;r[a]&&r[a].addMediaInfos(t,n,i)},reset:function(){var e;y.reset(),Z(),f.off(u.Z.TEXT_TRACKS_QUEUE_INITIALIZED,O,t),f.off(u.Z.DVB_FONT_DOWNLOAD_FAILED,M,t),f.off(u.Z.DVB_FONT_DOWNLOAD_COMPLETE,L,t),D.get().streaming.text.webvtt.customRenderingEnabled&&(f.off(u.Z.PLAYBACK_TIME_UPDATED,P,t),f.off(u.Z.PLAYBACK_SEEKING,F,t)),I(e=z(r)).call(e,(function(e){r[e].resetEmbedded(),r[e].reset()}))}},g=!1,p=!1,v=!1,o=Do(T).getInstance(),s=Lo(T).getInstance(),c=Po(T).getInstance(),f=(0,l.Z)(T).getInstance(),_=(0,m.Z)(T).getInstance().getLogger(t),Z(),t}Go.__dashjs_factory_name="TextController";var qo=p.Z.getClassFactory(Go);function Yo(){var e,t,n,r,c,f,h,g,v,_,T,b,S,A,I,R,w,N,C,D,M,L,O,P,F,x,k,U,Z,B,G,q,Y,j,H,V,z,W,X,Q="You must first call initialize() and set a source before calling this method",$="You must first call initialize() and set a valid source and view before calling this method",J="You must first call attachView() to set the video element before calling this method",te="You must first call attachSource() with a valid source before calling this method",ne="MediaPlayer not initialized!",re=this.context,ie=(0,l.Z)(re).getInstance(),ae=(0,we.Z)(re).getInstance(),oe=(0,m.Z)(re).getInstance({settings:ae});function se(){Se(null),_e(null),r=null,A&&(A.reset(),A=null),I&&(I.reset(),I=null),D&&D.reset(),ae.reset(),w&&(w.reset(),w=null)}function le(){return!!n&&!!V.getElement()}function ue(){return(0,Ra.e)()}function ce(){if(!h)throw $;return U.isPaused()}function fe(){if(!h)throw $;return U.getIsDynamic()}function de(e){var t=F&&F.hasVideoTrack()?a.Z.VIDEO:a.Z.AUDIO,n=q.getCurrentDVRInfo(t);if(!n)return 0;var r=U.getOriginalLiveDelay(),i=n.range.start+e;return i>n.range.end-r&&(i=n.range.end-r),i}function ge(e){if(!h)throw $;var t=Ee().currentTime;if(void 0!==e)t=F.getTimeRelativeToStreamId(t,e);else if(U.getIsDynamic()){var n=F&&F.hasVideoTrack()?a.Z.VIDEO:a.Z.AUDIO,r=q.getCurrentDVRInfo(n);t=null===r||0===t?0:Math.max(0,t-r.range.start)}return t}function pe(){if(!h)throw $;var e=Ee().duration;if(U.getIsDynamic()){var t=F&&F.hasVideoTrack()?a.Z.VIDEO:a.Z.AUDIO,n=q.getCurrentDVRInfo(t);e=n?n.range.end-n.range.start:0}return e}function me(e){(0,Ke.PS)(e,"boolean"),g=e}function ve(){D.restoreDefaultUTCTimingSources()}function ye(){return q}function Ee(){if(!V.getElement())throw J;return V.getElement()}function _e(e){if(!c)throw ne;V.setElement(e),e&&(Me(),function(){if(!I){var e=dashjs.MetricsReporting;if("function"==typeof e){var t=e(re).create();I=t.createMetricsReporting({debug:oe,eventBus:ie,mediaElement:Ee(),adapter:N,dashMetrics:q,mediaPlayerModel:C,events:u.Z,constants:a.Z,metricsConstants:s.Z})}}}(),function(){if(!R){var e=dashjs.MssHandler;"function"==typeof e&&(Re.extend(e.errors),R=e(re).create({eventBus:ie,mediaPlayerModel:C,dashMetrics:q,manifestModel:Y,playbackController:U,streamController:F,protectionController:A,baseURLController:L,errHandler:M,events:u.Z,constants:a.Z,debug:oe,initSegmentType:Ne.w.INIT_SEGMENT_TYPE,BASE64:fo,ISOBoxer:ho,settings:ae}))}}(),F&&F.switchToVideoElement(v)),h&&Ie(),Pe(v)}function be(e){if(!f)throw Q;var t=F.getActiveStreamInfo();return t?S.getTracksFor(e,t.id):[]}function Se(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN;if(!c)throw ne;"string"==typeof e&&z.initialize(e),null==t&&(t=NaN),isNaN(t)||(t=Math.max(0,t)),v=t,n=e,(f||h)&&Ie(),le()&&Pe(v)}function Ae(){if(!f)throw Q;var e=F.getActiveStreamInfo();return e?F.getStreamById(e.id):null}function Ie(){h=!1,f=!1,N.reset(),F.reset(),k.reset(),G.reset(),U.reset(),Z.reset(),B.reset(),_.reset(),S.reset(),X.reset(),A&&(ae.get().streaming.protection.keepProtectionMediaKeys?A.stop():(A.reset(),A=null,Me())),x.reset(),j.reset(),H.reset()}function Ce(){var e=De();F||(F=or(re).getInstance()),x||(x=qo(re).create({errHandler:M,manifestModel:Y,adapter:N,mediaController:S,baseURLController:L,videoModel:V,settings:ae})),P.setConfig({capabilities:O,customParametersModel:D,adapter:N,settings:ae,manifestModel:Y,errHandler:M}),F.setConfig({capabilities:O,capabilitiesFilter:P,manifestLoader:e,manifestModel:Y,mediaPlayerModel:C,customParametersModel:D,protectionController:A,textController:x,adapter:N,dashMetrics:q,errHandler:M,timelineConverter:b,videoModel:V,playbackController:U,serviceDescriptionController:Z,contentSteeringController:B,abrController:_,mediaController:S,settings:ae,baseURLController:L,uriFragmentModel:z,segmentBaseController:X}),k.setConfig({settings:ae,playbackController:U,streamController:F,videoModel:V,timelineConverter:b,adapter:N}),U.setConfig({streamController:F,serviceDescriptionController:Z,dashMetrics:q,adapter:N,videoModel:V,timelineConverter:b,settings:ae}),G.setConfig({streamController:F,playbackController:U,mediaPlayerModel:C,videoModel:V,settings:ae}),_.setConfig({streamController:F,domStorage:W,mediaPlayerModel:C,customParametersModel:D,cmsdModel:H,dashMetrics:q,adapter:N,videoModel:V,settings:ae}),j.setConfig({abrController:_,dashMetrics:q,playbackController:U}),H.setConfig({}),_.initialize(),F.initialize(g,r),x.initialize(),k.initialize(),G.initialize(),j.initialize(),H.initialize(),B.initialize(),X.initialize()}function De(){return qi(re).create({debug:oe,errHandler:M,dashMetrics:q,mediaPlayerModel:C,requestModifier:(0,We.Z)(re).getInstance(),mssHandler:R,settings:ae})}function Me(){if(A)return A;var e=dashjs.Protection;if("function"==typeof e){var t=e(re).create();return u.Z.extend(e.events),E.Z.extend(e.events,{publicOnly:!0}),Re.extend(e.errors),O||(O=(0,Hi.Z)(re).getInstance()),A=t.createProtectionSystem({debug:oe,errHandler:M,videoModel:V,customParametersModel:D,capabilities:O,eventBus:ie,events:u.Z,BASE64:fo,constants:a.Z,cmcdModel:j,settings:ae})}return null}function Le(){if(!c)throw ne;if(w)return w;var e=dashjs.OfflineController;if("function"==typeof e){u.Z.extend(e.events),E.Z.extend(e.events,{publicOnly:!0}),Re.extend(e.errors);var t=De(),n=Wn(re).create();return n.setConfig({manifestModel:Y,adapter:N,manifestLoader:t,errHandler:M,contentSteeringController:B}),w=e(re).create({debug:oe,manifestUpdater:n,baseURLController:L,manifestLoader:t,manifestModel:Y,mediaPlayerModel:C,abrController:_,playbackController:U,adapter:N,errHandler:M,dashMetrics:q,timelineConverter:b,segmentBaseController:X,schemeLoaderFactory:T,eventBus:ie,events:u.Z,errors:Re,constants:a.Z,settings:ae,dashConstants:o.Z,urlUtils:(0,Xe.Z)(re).getInstance()})}return null}function Oe(e){var t=F&&F.hasVideoTrack()?a.Z.VIDEO:a.Z.AUDIO,n=q.getCurrentDVRInfo(t);return n?e+(n.manifestInfo.availableFrom.getTime()/1e3+n.range.start):0}function Pe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:NaN;w&&w.resetRecords(),!f&&n&&(f=!0,t.info("Streaming Initialized"),Ce(),"string"==typeof n?F.load(n,e):F.loadWithManifest(n,e)),!h&&le()&&(h=!0,t.info("Playback Initialized"))}return e={initialize:function(e,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:NaN;O||(O=(0,Hi.Z)(re).getInstance()).setConfig({settings:ae}),M||(M=ji(re).getInstance()),O.supportsMediaSource()?(c||(c=!0,b=co(re).getInstance(),_||(_=ga(re).getInstance()).setConfig({settings:ae}),T||(T=yn(re).getInstance()),U||(U=he(re).getInstance()),S||(S=Tr(re).getInstance()),F||(F=or(re).getInstance()),k||(k=lr(re).getInstance()),G||(G=cr(re).getInstance()),Z||(Z=pr(re).getInstance()),B||(B=Hn(re).getInstance()),P||(P=Ki(re).getInstance()),N=Ha(re).getInstance(),Y=$i(re).getInstance(),j=jt(re).getInstance(),H=cn(re).getInstance(),q=lo(re).getInstance({settings:ae}),W=Ia(re).getInstance({settings:ae}),N.setConfig({constants:a.Z,cea608parser:i(),errHandler:M,BASE64:fo}),L||(L=Fr(re).create()),L.setConfig({adapter:N,contentSteeringController:B}),Z.setConfig({adapter:N}),X||(X=Fa(re).getInstance({dashMetrics:q,mediaPlayerModel:C,errHandler:M,baseURLController:L,events:u.Z,eventBus:ie,debug:oe,boxParser:(0,xn.Z)(re).getInstance(),requestModifier:(0,We.Z)(re).getInstance(),errors:Re})),S.setConfig({domStorage:W,settings:ae,customParametersModel:D}),C.setConfig({playbackController:U,serviceDescriptionController:Z}),B.setConfig({adapter:N,errHandler:M,dashMetrics:q,mediaPlayerModel:C,manifestModel:Y,serviceDescriptionController:Z,eventBus:ie,requestModifier:(0,We.Z)(re).getInstance()}),ve(),me(void 0===r||r),Le()),e&&_e(e),n&&Se(n,o),t.info("[dash.js "+ue()+"] MediaPlayer has been initialized")):M.error(new Te.Z(Re.CAPABILITY_MEDIASOURCE_ERROR_CODE,Re.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE))},setConfig:function(e){e&&(e.capabilities&&(O=e.capabilities),e.capabilitiesFilter&&(P=e.capabilitiesFilter),e.streamController&&(F=e.streamController),e.textController&&(x=e.textController),e.gapController&&(k=e.gapController),e.playbackController&&(U=e.playbackController),e.serviceDescriptionController&&(Z=e.serviceDescriptionController),e.contentSteeringController&&(B=e.contentSteeringController),e.catchupController&&(G=e.catchupController),e.mediaPlayerModel&&(C=e.mediaPlayerModel),e.customParametersModel&&(D=e.customParametersModel),e.abrController&&(_=e.abrController),e.schemeLoaderFactory&&(T=e.schemeLoaderFactory),e.mediaController&&(S=e.mediaController),e.settings&&(ae=e.settings))},on:function(e,t,n,r){ie.on(e,t,n,r)},off:function(e,t,n){ie.off(e,t,n)},extend:function(e,t,n){p.Z.extend(e,t,n,re)},attachView:_e,attachSource:Se,refreshManifest:function(e){if(!c)throw ne;if(!le())return e(null,te);var t=this;"function"==typeof e&&ie.on(u.Z.INTERNAL_MANIFEST_LOADED,(function n(r){ie.off(u.Z.INTERNAL_MANIFEST_LOADED,n,t),r.error?e(null,r.error):e(r.manifest)}),t),F.refreshManifest()},isReady:le,preload:function(){if(!V.getElement()&&!f){if(!n)throw te;Pe(v)}},play:function(){if(!h)throw $;(!g||ce()&&h)&&U.play(!0)},isPaused:ce,pause:function(){if(!h)throw $;U.pause()},isSeeking:function(){if(!h)throw $;return U.isSeeking()},isDynamic:fe,getLowLatencyModeEnabled:function(){if(!h)throw $;return U.getLowLatencyModeEnabled()},seek:function(e){if(!h)throw $;if((0,Ke.PS)(e,"number"),isNaN(e))throw a.Z.BAD_ARGUMENT_ERROR;e<0&&(e=0);var t=U.getIsDynamic()?de(e):e,n=Ee();!U.getIsDynamic()&&n.duration&&(t=Math.min(n.duration,t)),U.seek(t,!1,!1,!0)},seekToOriginalLive:function(){h&&fe()&&U.seekToOriginalLive()},setPlaybackRate:function(e){Ee().playbackRate=e},getPlaybackRate:function(){return Ee().playbackRate},setMute:function(e){(0,Ke.PS)(e,"boolean"),Ee().muted=e},isMuted:function(){return Ee().muted},setVolume:function(e){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw a.Z.BAD_ARGUMENT_ERROR;Ee().volume=e},getVolume:function(){return Ee().volume},time:ge,duration:pe,timeAsUTC:function(){if(!h)throw $;return ge()<0?NaN:Oe(ge())},durationAsUTC:function(){if(!h)throw $;return Oe(pe())},getActiveStream:Ae,getDVRWindowSize:function(){var e=F&&F.hasVideoTrack()?a.Z.VIDEO:a.Z.AUDIO,t=q.getCurrentDVRInfo(e);return t?t.manifestInfo.dvrWindowSize:0},getDVRSeekOffset:de,getAvailableBaseUrls:function(){var e=Y.getValue();return e?L.getBaseUrls(e):[]},getAvailableLocations:function(){var e=Y.getValue();if(!e)return[];var t=N.getLocation(e),n=B.getSynthesizedLocationElements(t);return d(t).call(t,n)},getTargetLiveDelay:function(){if(!h)throw $;return U.getOriginalLiveDelay()},convertToTimeCode:function(e){e=Math.max(e,0);var t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%3600%60);return(0===t?"":t<10?"0"+t.toString()+":":t.toString()+":")+(n<10?"0"+n.toString():n.toString())+":"+(r<10?"0"+r.toString():r.toString())},formatUTC:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=new Date(1e3*e),a=i.toLocaleDateString(t),o=i.toLocaleTimeString(t,{hour12:n});return r?o+" "+a:o},getVersion:ue,getDebug:function(){return oe},getBufferLength:function(e){var n,r=[a.Z.VIDEO,a.Z.AUDIO,a.Z.TEXT];if(e)return-1!==y(r).call(r,e)?ye().getCurrentBufferLevel(e)||NaN:(t.warn("getBufferLength requested for invalid type"),NaN);var i=K(n=ee(r).call(r,(function(e){return be(e).length>0?ye().getCurrentBufferLevel(e):Number.MAX_VALUE}))).call(n,(function(e,t){return Math.min(e,t)}));return i===Number.MAX_VALUE?NaN:i},getTTMLRenderingDiv:function(){return V?V.getTTMLRenderingDiv():null},getVideoElement:Ee,getSource:function(){if(!n)throw te;return n},updateSource:function(e){n=e,F.load(n)},getCurrentLiveLatency:function(){if(!c)throw ne;return h?U.getCurrentLiveLatency():NaN},getTopBitrateInfoFor:function(e){if(!f)throw Q;return _.getTopBitrateInfoFor(e)},setAutoPlay:me,getAutoPlay:function(){return g},getDashMetrics:ye,getQualityFor:function(e){if(!f)throw Q;if(e===a.Z.IMAGE){var t=Ae();if(!t)return-1;var n=t.getThumbnailController();return n?n.getCurrentTrackIndex():-1}return _.getQualityFor(e)},setQualityFor:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!f)throw Q;if(e===a.Z.IMAGE){var r=Ae();if(!r)return;var i=r.getThumbnailController();i&&i.setTrackByIndex(t)}_.setPlaybackQuality(e,F.getActiveStreamInfo(),t,{forceReplace:n})},updatePortalSize:function(){_.setElementSize(),_.setWindowResizeEventCalled(!0)},enableText:function(e){var t=F.getActiveStreamInfo();return!(!t||!x)&&x.enableText(t.id,e)},enableForcedTextStreaming:function(e){return!(!F.getActiveStreamInfo()||!x)&&x.enableForcedTextStreaming(e)},isTextEnabled:function(){var e=F.getActiveStreamInfo();return!(!e||!x)&&x.isTextEnabled(e)},setTextTrack:function(e){if(!h)throw $;var t=F.getActiveStreamInfo();t&&x&&x.setTextTrack(t.id,e)},getBitrateInfoListFor:function(e){if(!f)throw Q;var t=Ae();return t?t.getBitrateListFor(e):[]},getStreamsFromManifest:function(e){if(!f)throw Q;return N.getStreamsInfo(e)},getTracksFor:be,getTracksForTypeFromManifest:function(e,t,n){if(!f)throw Q;return(n=n||N.getStreamsInfo(t,1)[0])?N.getAllMediaInfoForType(n,e,t):[]},getCurrentTrackFor:function(e){if(!f)throw Q;var t=F.getActiveStreamInfo();return S.getCurrentTrackFor(e,t.id)},setInitialMediaSettingsFor:function(e,t){if(!c)throw ne;S.setInitialSettings(e,t)},getInitialMediaSettingsFor:function(e){if(!c)throw ne;return S.getInitialSettings(e)},setCurrentTrack:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!f)throw Q;S.setTrack(e,t)},addABRCustomRule:function(e,t,n){D.addAbrCustomRule(e,t,n)},removeABRCustomRule:function(e){D.removeAbrCustomRule(e)},removeAllABRCustomRule:function(){D.removeAllAbrCustomRule()},getABRCustomRules:function(){return D.getAbrCustomRules()},getAverageThroughput:function(e){var t=_.getThroughputHistory(),n=U.getIsDynamic();return t?t.getAverageThroughput(e,n):0},retrieveManifest:function(e,t){var n=De(),r=this;ie.on(u.Z.INTERNAL_MANIFEST_LOADED,(function e(i){i.error?t(null,i.error):t(i.manifest),ie.off(u.Z.INTERNAL_MANIFEST_LOADED,e,r),n.reset()}),r),z.initialize(e),n.load(e)},addUTCTimingSource:function(e,t){D.addUTCTimingSource(e,t)},removeUTCTimingSource:function(e,t){D.removeUTCTimingSource(e,t)},clearDefaultUTCTimingSources:function(){D.clearDefaultUTCTimingSources()},restoreDefaultUTCTimingSources:ve,setXHRWithCredentialsForType:function(e,t){D.setXHRWithCredentialsForType(e,t)},getXHRWithCredentialsForType:function(e){return D.getXHRWithCredentialsForType(e)},getProtectionController:function(){return Me()},attachProtectionController:function(e){A=e},setProtectionData:function(e){r=e,F&&F.setProtectionData(r)},registerLicenseRequestFilter:function(e){D.registerLicenseRequestFilter(e)},registerLicenseResponseFilter:function(e){D.registerLicenseResponseFilter(e)},unregisterLicenseRequestFilter:function(e){D.unregisterLicenseRequestFilter(e)},unregisterLicenseResponseFilter:function(e){D.unregisterLicenseResponseFilter(e)},registerCustomCapabilitiesFilter:function(e){D.registerCustomCapabilitiesFilter(e)},unregisterCustomCapabilitiesFilter:function(e){D.unregisterCustomCapabilitiesFilter(e)},setCustomInitialTrackSelectionFunction:function(e){D.setCustomInitialTrackSelectionFunction(e)},resetCustomInitialTrackSelectionFunction:function(){D.resetCustomInitialTrackSelectionFunction(null)},attachTTMLRenderingDiv:function(e){if(!V.getElement())throw J;V.setTTMLRenderingDiv(e)},attachVttRenderingDiv:function(e){if(!V.getElement())throw J;V.setVttRenderingDiv(e)},getCurrentTextTrackIndex:function(){var e=F.getActiveStreamInfo();if(e&&x)return x.getCurrentTrackIdx(e.id)},provideThumbnail:function(e,t){if("function"==typeof t)if(e<0)t(null);else{var n=U.getIsDynamic()?de(e):e,r=F.getStreamForTime(n);if(null!==r){var i=r.getThumbnailController();if(i)return i.provide(n,t);t(null)}else t(null)}},getDashAdapter:function(){return N},getOfflineController:function(){return Le()},triggerSteeringRequest:function(){if(B)return B.loadSteeringData()},getCurrentSteeringResponseData:function(){if(B)return B.getCurrentSteeringResponseData()},getSettings:function(){return ae.get()},updateSettings:function(e){ae.update(e)},resetSettings:function(){ae.reset()},reset:se,destroy:function(){se(),p.Z.deleteSingletonInstances(re)}},t=oe.getLogger(e),c=!1,h=!1,f=!1,g=!0,v=NaN,A=null,w=null,r=null,N=null,X=null,u.Z.extend(E.Z),C=ta(re).getInstance(),D=(0,hn.Z)(re).getInstance(),V=va(re).getInstance(),z=Xi(re).getInstance(),e}Yo.__dashjs_factory_name="MediaPlayer";var jo=p.Z.getClassFactory(Yo);jo.events=E.Z,jo.errors=Re,p.Z.updateClassFactory(Yo.__dashjs_factory_name,jo);var Ho=jo},8825:function(e,t,n){function r(e){return r="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},r(e)}function i(e,t){return i=M||function(e,t){return e.__proto__=t,e},i(e,t)}function a(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return o=M?L:function(e){return e.__proto__||L(e)},o(e)}var s=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=O(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!P)return!1;if(P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=o(t);if(n){var i=o(this).constructor;e=P(r,arguments,i)}else e=r.apply(this,arguments);return a(this,e)});function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=r.call(this)).AST_IN_FUTURE="astInFuture",e.BASE_URLS_UPDATED="baseUrlsUpdated",e.BUFFER_EMPTY="bufferStalled",e.BUFFER_LOADED="bufferLoaded",e.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",e.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",e.DVB_FONT_DOWNLOAD_ADDED="dvbFontDownloadAdded",e.DVB_FONT_DOWNLOAD_COMPLETE="dvbFontDownloadComplete",e.DVB_FONT_DOWNLOAD_FAILED="dvbFontDownloadFailed",e.DYNAMIC_TO_STATIC="dynamicToStatic",e.ERROR="error",e.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",e.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",e.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",e.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",e.LOG="log",e.MANIFEST_LOADING_STARTED="manifestLoadingStarted",e.MANIFEST_LOADING_FINISHED="manifestLoadingFinished",e.MANIFEST_LOADED="manifestLoaded",e.METRICS_CHANGED="metricsChanged",e.METRIC_CHANGED="metricChanged",e.METRIC_ADDED="metricAdded",e.METRIC_UPDATED="metricUpdated",e.PERIOD_SWITCH_STARTED="periodSwitchStarted",e.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",e.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",e.QUALITY_CHANGE_RENDERED="qualityChangeRendered",e.TRACK_CHANGE_RENDERED="trackChangeRendered",e.STREAM_INITIALIZING="streamInitializing",e.STREAM_UPDATED="streamUpdated",e.STREAM_ACTIVATED="streamActivated",e.STREAM_DEACTIVATED="streamDeactivated",e.STREAM_INITIALIZED="streamInitialized",e.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",e.TEXT_TRACKS_ADDED="allTextTracksAdded",e.TEXT_TRACK_ADDED="textTrackAdded",e.CUE_ENTER="cueEnter",e.CUE_EXIT="cueExit",e.THROUGHPUT_MEASUREMENT_STORED="throughputMeasurementStored",e.TTML_PARSED="ttmlParsed",e.TTML_TO_PARSE="ttmlToParse",e.CAPTION_RENDERED="captionRendered",e.CAPTION_CONTAINER_RESIZE="captionContainerResize",e.CAN_PLAY="canPlay",e.CAN_PLAY_THROUGH="canPlayThrough",e.PLAYBACK_ENDED="playbackEnded",e.PLAYBACK_ERROR="playbackError",e.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",e.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",e.PLAYBACK_LOADED_DATA="playbackLoadedData",e.PLAYBACK_PAUSED="playbackPaused",e.PLAYBACK_PLAYING="playbackPlaying",e.PLAYBACK_PROGRESS="playbackProgress",e.PLAYBACK_RATE_CHANGED="playbackRateChanged",e.PLAYBACK_SEEKED="playbackSeeked",e.PLAYBACK_SEEKING="playbackSeeking",e.PLAYBACK_STALLED="playbackStalled",e.PLAYBACK_STARTED="playbackStarted",e.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",e.PLAYBACK_VOLUME_CHANGED="playbackVolumeChanged",e.PLAYBACK_WAITING="playbackWaiting",e.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged",e.EVENT_MODE_ON_START="eventModeOnStart",e.EVENT_MODE_ON_RECEIVE="eventModeOnReceive",e.CONFORMANCE_VIOLATION="conformanceViolation",e.REPRESENTATION_SWITCH="representationSwitch",e.ADAPTATION_SET_REMOVED_NO_CAPABILITIES="adaptationSetRemovedNoCapabilities",e.CONTENT_STEERING_REQUEST_COMPLETED="contentSteeringRequestCompleted",e.INBAND_PRFT="inbandPrft",e.MANAGED_MEDIA_SOURCE_START_STREAMING="managedMediaSourceStartStreaming",e.MANAGED_MEDIA_SOURCE_END_STREAMING="managedMediaSourceEndStreaming",e}return s}(n(8342).Z));t.Z=s},3393:function(e,t){var n=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var t;return(t=[{key:"init",value:function(){this.STREAM="stream",this.VIDEO="video",this.AUDIO="audio",this.TEXT="text",this.MUXED="muxed",this.IMAGE="image",this.STPP="stpp",this.TTML="ttml",this.VTT="vtt",this.WVTT="wvtt",this.CONTENT_STEERING="contentSteering",this.ABR_STRATEGY_DYNAMIC="abrDynamic",this.ABR_STRATEGY_BOLA="abrBola",this.ABR_STRATEGY_L2A="abrL2A",this.ABR_STRATEGY_LoLP="abrLoLP",this.ABR_STRATEGY_THROUGHPUT="abrThroughput",this.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA="abrFetchThroughputCalculationDownloadedData",this.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING="abrFetchThroughputCalculationMoofParsing",this.ABR_FETCH_THROUGHPUT_CALCULATION_AAST="abrFetchThroughputCalculationAAST",this.LIVE_CATCHUP_MODE_DEFAULT="liveCatchupModeDefault",this.LIVE_CATCHUP_MODE_LOLP="liveCatchupModeLoLP",this.MOVING_AVERAGE_SLIDING_WINDOW="slidingWindow",this.MOVING_AVERAGE_EWMA="ewma",this.BAD_ARGUMENT_ERROR="Invalid Arguments",this.MISSING_CONFIG_ERROR="Missing config parameter(s)",this.TRACK_SWITCH_MODE_ALWAYS_REPLACE="alwaysReplace",this.TRACK_SWITCH_MODE_NEVER_REPLACE="neverReplace",this.TRACK_SELECTION_MODE_FIRST_TRACK="firstTrack",this.TRACK_SELECTION_MODE_HIGHEST_BITRATE="highestBitrate",this.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY="highestEfficiency",this.TRACK_SELECTION_MODE_WIDEST_RANGE="widestRange",this.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY="highestSelectionPriority",this.CMCD_MODE_QUERY="query",this.CMCD_MODE_HEADER="header",this.INITIALIZE="initialize",this.TEXT_SHOWING="showing",this.TEXT_HIDDEN="hidden",this.TEXT_DISABLED="disabled",this.CC1="CC1",this.CC3="CC3",this.UTF8="utf-8",this.SCHEME_ID_URI="schemeIdUri",this.START_TIME="starttime",this.SERVICE_DESCRIPTION_DVB_LL_SCHEME="urn:dvb:dash:lowlatency:scope:2019",this.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME="urn:dvb:dash:lowlatency:critical:2019",this.FONT_DOWNLOAD_DVB_SCHEME="urn:dvb:dash:fontdownload:2014",this.XML="XML",this.ARRAY_BUFFER="ArrayBuffer",this.DVB_REPORTING_URL="dvb:reportingUrl",this.DVB_PROBABILITY="dvb:probability",this.OFF_MIMETYPE="application/font-sfnt",this.WOFF_MIMETYPE="application/font-woff",this.VIDEO_ELEMENT_READY_STATES={HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4},this.FILE_LOADER_TYPES={FETCH:"fetch_loader",XHR:"xhr_loader"}}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e.prototype,t),e}());t.Z=n},3860:function(e,t){var n=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var t;return(t=[{key:"init",value:function(){this.TCP_CONNECTION="TcpList",this.HTTP_REQUEST="HttpList",this.TRACK_SWITCH="RepSwitchList",this.BUFFER_LEVEL="BufferLevel",this.BUFFER_LOADED="bufferLoaded",this.ABANDON_LOAD="abandonload",this.ALLOW_LOAD="allowload",this.BUFFER_EMPTY="bufferStalled",this.BUFFER_STATE="BufferState",this.DVR_INFO="DVRInfo",this.DROPPED_FRAMES="DroppedFrames",this.SCHEDULING_INFO="SchedulingInfo",this.REQUESTS_QUEUE="RequestsQueue",this.MANIFEST_UPDATE="ManifestUpdate",this.MANIFEST_UPDATE_STREAM_INFO="ManifestUpdatePeriodInfo",this.MANIFEST_UPDATE_TRACK_INFO="ManifestUpdateRepresentationInfo",this.PLAY_LIST="PlayList",this.DVB_ERRORS="DVBErrors",this.HTTP_REQUEST_DVB_REPORTING_TYPE="DVBReporting"}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e.prototype,t),e}());t.Z=n},8080:function(e,t,n){n.d(t,{default:function(){return ie}});var r=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mpdurl=null,this.errorcode=null,this.terror=null,this.url=null,this.ipaddress=null,this.servicelocation=null};r.SSL_CONNECTION_FAILED_PREFIX="SSL",r.DNS_RESOLUTION_FAILED="C00",r.HOST_UNREACHABLE="C01",r.CONNECTION_REFUSED="C02",r.CONNECTION_ERROR="C03",r.CORRUPT_MEDIA_ISOBMFF="M00",r.CORRUPT_MEDIA_OTHER="M01",r.BASE_URL_CHANGED="F00",r.BECAME_REPORTER="S00";var i=r,a=n(1180);function o(e){var t,n,r=(e=e||{}).eventBus,o=e.dashMetrics,s=e.metricsConstants,l=e.events;function u(e){var t=new i;if(n){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.mpdurl||(t.mpdurl=n.originalUrl||n.url),t.terror||(t.terror=new Date),o.addDVBErrors(t)}}function c(e){e.error||(n=e.manifest)}function f(e){u({errorcode:i.BASE_URL_CHANGED,servicelocation:e.entry})}function d(){u({errorcode:i.BECAME_REPORTER})}function h(e){var t;e.metric===s.HTTP_REQUEST&&(0===(t=e.value).responsecode||null==t.responsecode||t.responsecode>=400||t.responsecode<100||t.responsecode>=600)&&u({errorcode:t.responsecode||i.CONNECTION_ERROR,url:t.url,terror:t.tresponse,servicelocation:t._serviceLocation})}function g(e){var t;switch(e.error?e.error.code:0){case MediaError.MEDIA_ERR_NETWORK:t=i.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:t=i.CORRUPT_MEDIA_OTHER;break;default:return}u({errorcode:t})}return t={initialize:function(){r.on(l.MANIFEST_UPDATED,c,t),r.on(l.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,f,t),r.on(l.METRIC_ADDED,h,t),r.on(l.METRIC_UPDATED,h,t),r.on(l.PLAYBACK_ERROR,g,t),r.on(a.Z.BECAME_REPORTING_PLAYER,d,t)},reset:function(){r.off(l.MANIFEST_UPDATED,c,t),r.off(l.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,f,t),r.off(l.METRIC_ADDED,h,t),r.off(l.METRIC_UPDATED,h,t),r.off(l.PLAYBACK_ERROR,g,t),r.off(a.Z.BECAME_REPORTING_PLAYER,d,t)}}}o.__dashjs_factory_name="DVBErrorsTranslator";var s=dashjs.FactoryMaker.getSingletonFactory(o),l=n(2295);function u(e){e=e||{};var t,n,r=!1,i=this.context,a=e.mediaElement;return t={initialize:function(e){e&&e.length&&(I(e).call(e,(function(e){var t=e.starttime,r=t+e.duration;n.add(t,r)})),r=!!e[0]._useWallClockTime)},reset:function(){n.clear()},isEnabled:function(){var e,t=n.length;if(!t)return!0;e=r?(new Date).getTime()/1e3:a.currentTime;for(var i=0;i<t;i+=1){var o=n.start(i),s=n.end(i);if(o<=e&&e<s)return!0}return!1}},n=(0,l.Z)(i).create(),t}u.__dashjs_factory_name="RangeController";var c=dashjs.FactoryMaker.getClassFactory(u);function f(){return{serialise:function e(t){var n,r,i=[],a=[];for(n in t)if(t.hasOwnProperty(n)&&0!==y(n).call(n,"_")){if(null==(r=t[n])&&(r=""),h(r)){if(!r.length)continue;a=[],I(r).call(r,(function(t){var n,r="Object"!==v(n=Object.prototype.toString.call(t)).call(n,8,-1);a.push(r?t:e(t))})),r=ee(a).call(a,encodeURIComponent).join(",")}else"string"==typeof r?r=encodeURIComponent(r):r instanceof Date?r=r.toISOString():"number"==typeof r&&(r=Math.round(r));i.push(n+"="+r)}return i.join("&")}}}f.__dashjs_factory_name="MetricSerialiser";var g=dashjs.FactoryMaker.getSingletonFactory(f);function p(){var e,t,n,r=window.crypto||window.msCrypto,i=Uint32Array,a=Math.pow(2,8*i.BYTES_PER_ELEMENT)-1;function o(){r&&(e||(e=new i(10)),r.getRandomValues(e),t=0)}return n={random:function(n,i){var s;return n||(n=0),i||(i=1),r?(t===e.length&&o(),s=e[t]/a,t+=1):s=Math.random(),s*(i-n)+n}},o(),n}p.__dashjs_factory_name="RNG";var m=dashjs.FactoryMaker.getSingletonFactory(p),E=n(5717);function _(e){var t;e=e||{};var n,r,i,a,o,s,l,u=this.context,c=[],f=e.metricsConstants;function p(){a=!1,o=!1,s=null,l=null}return t={report:function(e,t){h(t)||(t=[t]),o&&l.isEnabled()&&I(t).call(t,(function(t){var i,a,l=n.serialise(t);e!==f.DVB_ERRORS&&(l=d(i="metricname=".concat(e,"&")).call(i,l)),function(e,t,n){var i=new XMLHttpRequest;i.withCredentials=r.getXHRWithCredentialsForType(f.HTTP_REQUEST_DVB_REPORTING_TYPE);var a=function(){var e=y(c).call(c,i);-1!==e&&(S(c).call(c,e,1),!(i.status>=200&&i.status<300)&&n&&n())};c.push(i);try{i.open("GET",e),i.onloadend=a,i.onerror=a,i.send()}catch(e){i.onerror()}}(l=d(a="".concat(s,"?")).call(a,l),0,(function(){o=!1}))}))},initialize:function(e,t){var n;if(l=t,!(s=e.dvbReportingUrl))throw new Error("required parameter missing (dvb:reportingUrl)");a||((n=e.dvbProbability)&&(1e3===n||n/1e3>=i.random())&&(o=!0),a=!0)},reset:function(){p()}},n=g(u).getInstance(),i=m(u).getInstance(),r=(0,E.Z)(u).getInstance(),p(),t}_.__dashjs_factory_name="DVBReporting";var T=dashjs.FactoryMaker.getClassFactory(_);function A(e){e=e||{};var t={"urn:dvb:dash:reporting:2014":T},n=this.context,r=e.debug?e.debug.getLogger(void 0):{},i=e.metricsConstants,a=e.mediaPlayerModel||{};return{create:function(e,o){var s;try{(s=t[e.schemeIdUri](n).create({metricsConstants:i,mediaPlayerModel:a})).initialize(e,o)}catch(o){var l;s=null,r.error(d(l="ReportingFactory: could not create Reporting with schemeIdUri ".concat(e.schemeIdUri," (")).call(l,o.message,")"))}return s},register:function(e,n){t[e]=n},unregister:function(e){delete t[e]}}}A.__dashjs_factory_name="ReportingFactory";var w=dashjs.FactoryMaker.getSingletonFactory(A);function N(e){var t=[],n=w(this.context).getInstance(e);return{initialize:function(e,r){R(e).call(e,(function(e){var i=n.create(e,r);if(i)return t.push(i),!0}))},reset:function(){I(t).call(t,(function(e){return e.reset()})),t=[]},report:function(e,n){I(t).call(t,(function(t){return t.report(e,n)}))}}}N.__dashjs_factory_name="ReportingController";var C=dashjs.FactoryMaker.getClassFactory(N);function D(){return{reconstructFullMetricName:function(e,t,n){var r=e;return t&&(r+="("+t,n&&n.length&&(r+=","+n),r+=")"),r},validateN:function(e){if(!e)throw new Error("missing n");if(isNaN(e))throw new Error("n is NaN");if(e<0)throw new Error("n must be positive");return e}}}D.__dashjs_factory_name="HandlerHelpers";var M=dashjs.FactoryMaker.getSingletonFactory(D);function L(e){var t,n,r,i,a;e=e||{};var o=this.context,s=M(o).getInstance(),l=[],u=e.metricsConstants;function c(){var e=function(){try{var e,t;return K(e=ee(t=z(l)).call(t,(function(e){return l[e]}))).call(e,(function(e,t){return e.level<t.level?e:t}))}catch(e){return}}();e&&a!==e.t&&(a=e.t,t.report(r,e))}return{initialize:function(e,a,o){a&&(n=s.validateN(o),t=a,r=s.reconstructFullMetricName(e,o),i=k(c,n))},reset:function(){clearInterval(i),i=null,n=0,t=null,a=null},handleNewMetric:function(e,t,n){e===u.BUFFER_LEVEL&&(l[n]=t)}}}L.__dashjs_factory_name="BufferLevelHandler";var O=dashjs.FactoryMaker.getClassFactory(L),P=dashjs.FactoryMaker.getClassFactory((function(e){var t,n=(e=e||{}).eventBus,r=e.metricsConstants;function i(){n.off(a.Z.METRICS_INITIALISATION_COMPLETE,i,this),n.trigger(a.Z.BECAME_REPORTING_PLAYER)}return{initialize:function(e,r){r&&(t=r,n.on(a.Z.METRICS_INITIALISATION_COMPLETE,i,this))},reset:function(){t=null},handleNewMetric:function(e,n){e===r.DVB_ERRORS&&t&&t.report(e,n)}}}));function F(e){var t,n,r,i,a;e=e||{};var o=[],s=M(this.context).getInstance(),l=e.metricsConstants;function u(){var e=o;e.length&&t&&t.report(i,e),o=[]}return{initialize:function(e,o,l,c){o&&(n=s.validateN(l),t=o,c&&c.length&&(r=c),i=s.reconstructFullMetricName(e,l,c),a=k(u,n))},reset:function(){clearInterval(a),a=null,n=null,r=null,o=[],t=null},handleNewMetric:function(e,t){e===l.HTTP_REQUEST&&(r&&r!==t.type||o.push(t))}}}F.__dashjs_factory_name="HttpListHandler";var x=dashjs.FactoryMaker.getClassFactory(F);function U(){var e,t;return{initialize:function(n,r){e=n,t=r},reset:function(){t=null,e=void 0},handleNewMetric:function(n,r){n===e&&t&&t.report(e,r)}}}U.__dashjs_factory_name="GenericMetricHandler";var Z=dashjs.FactoryMaker.getClassFactory(U);function B(e){var t=(e=e||{}).debug?e.debug.getLogger(void 0):{},n=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/,r=this.context,i={BufferLevel:O,DVBErrors:P,HttpList:x,PlayList:Z,RepSwitchList:Z,TcpList:Z};return{create:function(a,o){var s,l=a.match(n);if(l){try{(s=i[l[1]](r).create({eventBus:e.eventBus,metricsConstants:e.metricsConstants})).initialize(l[1],o,l[3],l[5])}catch(e){var u,c,f;s=null,t.error(d(u=d(c=d(f="MetricsHandlerFactory: Could not create handler for type ".concat(l[1]," with args ")).call(f,l[3],", ")).call(c,l[5]," (")).call(u,e.message,")"))}return s}},register:function(e,t){i[e]=t},unregister:function(e){delete i[e]}}}B.__dashjs_factory_name="MetricsHandlerFactory";var G=dashjs.FactoryMaker.getSingletonFactory(B);function q(e){e=e||{};var t,n=[],r=this.context,i=e.eventBus,a=e.events,o=G(r).getInstance({debug:e.debug,eventBus:e.eventBus,metricsConstants:e.metricsConstants});function s(e){I(n).call(n,(function(t){t.handleNewMetric(e.metric,e.value,e.mediaType)}))}return t={initialize:function(e,r){var l;I(l=e.split(",")).call(l,(function(e,t,i){var a;if(-1!==y(e).call(e,"(")&&-1===y(e).call(e,")")){var s=i[t+1];s&&-1===y(s).call(s,"(")&&-1!==y(s).call(s,")")&&(e+=","+s,delete i[t+1])}(a=o.create(e,r))&&n.push(a)})),i.on(a.METRIC_ADDED,s,t),i.on(a.METRIC_UPDATED,s,t)},reset:function(){i.off(a.METRIC_ADDED,s,t),i.off(a.METRIC_UPDATED,s,t),I(n).call(n,(function(e){return e.reset()})),n=[]}}}q.__dashjs_factory_name="MetricsHandlersController";var Y=dashjs.FactoryMaker.getClassFactory(q);function j(e){var t,n,r;e=e||{};var i=this.context;function a(){t&&t.reset(),n&&n.reset(),r&&r.reset()}return{initialize:function(o){try{(r=c(i).create({mediaElement:e.mediaElement})).initialize(o.Range),(n=C(i).create({debug:e.debug,metricsConstants:e.metricsConstants,mediaPlayerModel:e.mediaPlayerModel})).initialize(o.Reporting,r),(t=Y(i).create({debug:e.debug,eventBus:e.eventBus,metricsConstants:e.metricsConstants,events:e.events})).initialize(o.metrics,n)}catch(e){throw a(),e}},reset:a}}j.__dashjs_factory_name="MetricsController";var H=dashjs.FactoryMaker.getClassFactory(j),V=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metrics="",this.Range=[],this.Reporting=[]},W=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.starttime=0,this.duration=1/0,this._useWallClockTime=!1},X=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.schemeIdUri="",this.value="",this.dvbReportingUrl="",this.dvbProbability=1e3};function Q(e){var t=(e=e||{}).adapter,n=e.constants;return{getMetrics:function(e){var r,i=[];return e&&e.Metrics_asArray&&I(r=e.Metrics_asArray).call(r,(function(r){var a,o,s=new V,l=t.getIsDynamic(e);r.hasOwnProperty("metrics")&&(s.metrics=r.metrics,r.Range_asArray&&I(a=r.Range_asArray).call(a,(function(r){var i=new W;i.starttime=function(e,r,i){var a,o,s=0;return r?s=t.getAvailabilityStartTime(e)/1e3:(a=t.getRegularPeriods(e)).length&&(s=a[0].start),o=s,i&&i.hasOwnProperty(n.START_TIME)&&(o+=i.starttime),o}(e,l,r),r.hasOwnProperty("duration")?i.duration=r.duration:i.duration=t.getDuration(e),i._useWallClockTime=l,s.Range.push(i)})),r.Reporting_asArray&&(I(o=r.Reporting_asArray).call(o,(function(e){var t=new X;e.hasOwnProperty(n.SCHEME_ID_URI)&&(t.schemeIdUri=e.schemeIdUri,e.hasOwnProperty("value")&&(t.value=e.value),e.hasOwnProperty(n.DVB_REPORTING_URL)&&(t.dvbReportingUrl=e[n.DVB_REPORTING_URL]),e.hasOwnProperty(n.DVB_PROBABILITY)&&(t.dvbProbability=e[n.DVB_PROBABILITY]),s.Reporting.push(t))})),i.push(s)))})),i}}}Q.__dashjs_factory_name="ManifestParsing";var $=dashjs.FactoryMaker.getSingletonFactory(Q);function J(e){var t;e=e||{};var n={},r=this.context,i=e.eventBus,o=e.events;function s(t){if(!t.error){var o,s=z(n);I(o=$(r).getInstance({adapter:e.adapter,constants:e.constants}).getMetrics(t.manifest)).call(o,(function(t){var i=b(t);if(n.hasOwnProperty(i))S(s).call(s,i,1);else try{var a=H(r).create(e);a.initialize(t),n[i]=a}catch(e){}})),I(s).call(s,(function(e){n[e].reset(),delete n[e]})),i.trigger(a.Z.METRICS_INITIALISATION_COMPLETE)}}function l(){var e;I(e=z(n)).call(e,(function(e){n[e].reset()})),n={}}return t={reset:function(){i.off(o.MANIFEST_UPDATED,s,t),i.off(o.STREAM_TEARDOWN_COMPLETE,l,t)}},i.on(o.MANIFEST_UPDATED,s,t),i.on(o.STREAM_TEARDOWN_COMPLETE,l,t),t}J.__dashjs_factory_name="MetricsCollectionController";var te=dashjs.FactoryMaker.getClassFactory(J);function ne(){var e=this.context;return{createMetricsReporting:function(t){return s(e).getInstance({eventBus:t.eventBus,dashMetrics:t.dashMetrics,metricsConstants:t.metricsConstants,events:t.events}).initialize(),te(e).create(t)},getReportingFactory:function(){return w(e).getInstance()},getMetricsHandlerFactory:function(){return G(e).getInstance()}}}ne.__dashjs_factory_name="MetricsReporting";var re=dashjs.FactoryMaker.getClassFactory(ne);re.events=a.Z,dashjs.FactoryMaker.updateClassFactory(ne.__dashjs_factory_name,re);var ie=re},1180:function(e,t,n){function r(e){return r="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},r(e)}function i(e,t){return i=M||function(e,t){return e.__proto__=t,e},i(e,t)}function a(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return o=M?L:function(e){return e.__proto__||L(e)},o(e)}var s=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=O(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!P)return!1;if(P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=o(t);if(n){var i=o(this).constructor;e=P(r,arguments,i)}else e=r.apply(this,arguments);return a(this,e)});function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=r.call(this)).METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",e.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer",e.CMCD_DATA_GENERATED="cmcdDataGenerated",e}return s}(n(8342).Z));t.Z=s},5717:function(e,t,n){var r=n(2610),i=n(5448),a=n(1264),o=n(3106),s=n(1767),l=n(3393);function u(){var e,t,n,i,u,c,f,d,h=this.context,g=(0,a.Z)(h).getInstance();function p(){i=[],u=[],c=[],d=[],f=null,t=[]}function m(e,t){var n=-1;R(e).call(e,(function(e,r){if(e===t)return n=r,!0})),n<0||S(e).call(e,n,1)}function v(e){var t;for(t=0;t<d.length;t++)if(d[t].rulename===e)return t;return-1}function y(e,n){E(e,n);var i=new r.Z;i.schemeIdUri=e,i.value=n,t.push(i)}function E(e,n){(0,o.PS)(e,"string"),(0,o.PS)(n,"string"),I(t).call(t,(function(r,i){r.schemeIdUri===e&&r.value===n&&S(t).call(t,i,1)}))}return e={getCustomInitialTrackSelectionFunction:function(){return f},setCustomInitialTrackSelectionFunction:function(e){f=e},resetCustomInitialTrackSelectionFunction:function(){f=null},getLicenseResponseFilters:function(){return u},getLicenseRequestFilters:function(){return i},getCustomCapabilitiesFilters:function(){return c},registerCustomCapabilitiesFilter:function(e){c.push(e)},registerLicenseResponseFilter:function(e){u.push(e)},registerLicenseRequestFilter:function(e){i.push(e)},unregisterCustomCapabilitiesFilter:function(e){m(c,e)},unregisterLicenseResponseFilter:function(e){m(u,e)},unregisterLicenseRequestFilter:function(e){m(i,e)},addAbrCustomRule:function(e,t,n){if("string"!=typeof e||e!==s.Z.ABANDON_FRAGMENT_RULES&&e!==s.Z.QUALITY_SWITCH_RULES||"string"!=typeof t)throw l.Z.BAD_ARGUMENT_ERROR;var r=v(t);-1===r?d.push({type:e,rulename:t,rule:n}):(d[r].type=e,d[r].rule=n)},removeAllAbrCustomRule:function(){d=[]},removeAbrCustomRule:function(e){if(e){var t=v(e);-1!==t&&S(d).call(d,t,1)}else d=[]},getAbrCustomRules:function(){return d},addUTCTimingSource:y,removeUTCTimingSource:E,getUTCTimingSources:function(){return t},clearDefaultUTCTimingSources:function(){t=[]},restoreDefaultUTCTimingSources:function(){var e=g.get().streaming.utcSynchronization.defaultTimingSource;y(e.scheme,e.value)},setXHRWithCredentialsForType:function e(t,r){var i;t?n[t]=!!r:I(i=z(n)).call(i,(function(t){e(t,r)}))},getXHRWithCredentialsForType:function(e){var t=n[e];return void 0===t?n.default:t},setConfig:function(){},reset:function(){p()}},n={default:!1},p(),e}u.__dashjs_factory_name="CustomParametersModel",t.Z=i.Z.getSingletonFactory(u)},9032:function(e,t,n){var r=n(5448),i=n(7473);function a(e){var t=(e=e||{}).requestModifier;function n(e){var n=new Date,r=e.request,i=new XMLHttpRequest;if(i.open(e.method,e.url,!0),r.responseType&&(i.responseType=r.responseType),r.range&&i.setRequestHeader("Range","bytes="+r.range),r.requestStartDate||(r.requestStartDate=n),t&&t.modifyRequestHeader&&(i=t.modifyRequestHeader(i,{url:e.url})),e.headers)for(var a in e.headers){var o=e.headers[a];o&&i.setRequestHeader(a,o)}i.withCredentials=e.withCredentials,i.onload=e.onload,i.onloadend=e.onend,i.onerror=e.onerror,i.onprogress=e.progress,i.onabort=e.onabort,i.ontimeout=e.ontimeout,i.timeout=e.timeout,i.send(),e.response=i}return{load:function(e){t&&t.modifyRequest?(0,i.k)(e,t).then((function(){return n(e)})):n(e)},abort:function(e){var t=e.response;t.onloadend=t.onerror=t.onprogress=void 0,t.abort()}}}a.__dashjs_factory_name="XHRLoader";var o=r.Z.getClassFactory(a);t.Z=o},1737:function(e,t,n){n.d(t,{default:function(){return He}});var r={attributes:["Laurl","laurl"],prefixes:["clearkey","dashif"]},i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t;return t=[{key:"findCencContentProtection",value:function(e){for(var t=null,n=0;n<e.length;++n){var r=e[n];"urn:mpeg:dash:mp4protection:2011"!==r.schemeIdUri.toLowerCase()||"cenc"!==r.value.toLowerCase()&&"cbcs"!==r.value.toLowerCase()||(t=r)}return t}},{key:"getPSSHData",value:function(e){var t=8,n=new DataView(e),r=n.getUint8(t);return t+=20,r>0&&(t+=4+16*n.getUint32(t)),t+=4,v(e).call(e,t)}},{key:"getPSSHForKeySystem",value:function(t,n){var r=e.parsePSSHList(n);return t&&r.hasOwnProperty(t.uuid.toLowerCase())?r[t.uuid.toLowerCase()]:null}},{key:"parseInitDataFromContentProtection",value:function(e,t){return"pssh"in e?(e.pssh.__text=e.pssh.__text.replace(/\r?\n|\r/g,"").replace(/\s+/g,""),t.decodeArray(e.pssh.__text).buffer):null}},{key:"parsePSSHList",value:function(e){if(null==e)return[];for(var t=new DataView(e.buffer||e),n={},r=0;;){var i,a,o=void 0,s=r;if(r>=t.buffer.byteLength)break;if(i=r+t.getUint32(r),r+=4,1886614376===t.getUint32(r))if(r+=4,0===(a=t.getUint8(r))||1===a){var l;r++,r+=3,o="";var u=void 0,c=void 0;for(u=0;u<4;u++)o+=1===(c=t.getUint8(r+u).toString(16)).length?"0"+c:c;for(r+=4,o+="-",u=0;u<2;u++)o+=1===(c=t.getUint8(r+u).toString(16)).length?"0"+c:c;for(r+=2,o+="-",u=0;u<2;u++)o+=1===(c=t.getUint8(r+u).toString(16)).length?"0"+c:c;for(r+=2,o+="-",u=0;u<2;u++)o+=1===(c=t.getUint8(r+u).toString(16)).length?"0"+c:c;for(r+=2,o+="-",u=0;u<6;u++)o+=1===(c=t.getUint8(r+u).toString(16)).length?"0"+c:c;r+=6,r+=4,n[o=o.toLowerCase()]=v(l=t.buffer).call(l,s,i),r=i}else r=i;else r=i}return n}},{key:"getLicenseServerUrlFromMediaInfo",value:function(e,t){try{if(!e||0===e.length)return null;for(var n=0,i=null;n<e.length&&!i;){var a=e[n];if(a&&a.contentProtection&&a.contentProtection.length>0){var o,s=w(o=a.contentProtection).call(o,(function(e){return e.schemeIdUri&&e.schemeIdUri===t}));if(s&&s.length>0)for(var l=0;l<s.length&&!i;){for(var u=s[l],c=0;c<r.attributes.length&&!i;){for(var f=0,d=r.attributes[c];f<r.prefixes.length&&!i;){var h=r.prefixes[f];u[d]&&u[d].__prefix&&u[d].__prefix===h&&u[d].__text&&(i=u[d].__text),f+=1}c+=1}l+=1}}n+=1}return i}catch(e){return null}}}],t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e,t),e}(),a=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.contentType=t,this.robustness=n},o=function e(t,n,r,i,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.initDataTypes=["cenc"],t&&t.length&&(this.audioCapabilities=t),n&&n.length&&(this.videoCapabilities=n),this.distinctiveIdentifier=r,this.persistentState=i,this.sessionTypes=a};function s(e){return s="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},s(e)}function l(e,t){return l=M||function(e,t){return e.__proto__=t,e},l(e,t)}function u(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return h=M?L:function(e){return e.__proto__||L(e)},h(e)}var p=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=O(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!P)return!1;if(P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=h(t);if(n){var i=h(this).constructor;e=P(r,arguments,i)}else e=r.apply(this,arguments);return u(this,e)});function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this)).MEDIA_KEYERR_CODE=100,e.MEDIA_KEYERR_UNKNOWN_CODE=101,e.MEDIA_KEYERR_CLIENT_CODE=102,e.MEDIA_KEYERR_SERVICE_CODE=103,e.MEDIA_KEYERR_OUTPUT_CODE=104,e.MEDIA_KEYERR_HARDWARECHANGE_CODE=105,e.MEDIA_KEYERR_DOMAIN_CODE=106,e.MEDIA_KEY_MESSAGE_ERROR_CODE=107,e.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE=108,e.SERVER_CERTIFICATE_UPDATED_ERROR_CODE=109,e.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE=110,e.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE=111,e.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE=112,e.KEY_SESSION_CREATED_ERROR_CODE=113,e.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE=114,e.MEDIA_KEYERR_UNKNOWN_MESSAGE="An unspecified error occurred. This value is used for errors that don't match any of the other codes.",e.MEDIA_KEYERR_CLIENT_MESSAGE="The Key System could not be installed or updated.",e.MEDIA_KEYERR_SERVICE_MESSAGE="The message passed into update indicated an error from the license service.",e.MEDIA_KEYERR_OUTPUT_MESSAGE="There is no available output device with the required characteristics for the content protection system.",e.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE="A hardware configuration change caused a content protection error.",e.MEDIA_KEYERR_DOMAIN_MESSAGE="An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain.",e.MEDIA_KEY_MESSAGE_ERROR_MESSAGE="Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!",e.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE="DRM: Empty key message from CDM",e.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE="Error updating server certificate -- ",e.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE="DRM: KeyStatusChange error! -- License has expired",e.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE="DRM: No license server URL specified!",e.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE="DRM: KeySystem Access Denied! -- ",e.KEY_SESSION_CREATED_ERROR_MESSAGE="DRM: unable to create session! --",e.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE="DRM: licenser error! --",e}return i}(n(2230).Z)),m=n(5459),T=function e(t,n,r,i,a,o,s,l){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=t,this.method=n,this.responseType=r,this.headers=i,this.withCredentials=a,this.messageType=o,this.sessionId=s,this.data=l},R=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=t,this.headers=n,this.data=r},D=n(7855),x=n(703),k=n(3393),U=n(5448);function B(e){return B="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},B(e)}function G(e){var t,n,r,s,l,u,c,d,h,g,v,y=(e=e||{}).protectionKeyController,E=e.protectionModel,_=e.eventBus,S=e.events,A=e.debug,w=e.BASE64,N=e.constants,C=[],M=e.cmcdModel,L=e.settings,O=e.customParametersModel;function P(){if(!(_&&_.hasOwnProperty("on")&&y&&y.hasOwnProperty("getSupportedKeySystemsFromContentProtection")))throw new Error("Missing config parameter(s)")}function U(e,t){d||h?d&&G():function(e,t){if(!h){h=!0;var r,i=[];e=Z(e).call(e,(function(t,n){return(l&&l[t.ks.systemString]&&l[t.ks.systemString].priority>=0?l[t.ks.systemString].priority:e.length)-(l&&l[n.ks.systemString]&&l[n.ks.systemString].priority>=0?l[n.ks.systemString].priority:e.length)}));for(var a=0;a<e.length;a++){var o=X(e[a]);i.push({ks:e[a].ks,configs:[o],protData:e[a].protData})}E.requestKeySystemAccess(i).then((function(e){var t=(r=e.data).mksa&&r.mksa.selectedSystemString?r.mksa.selectedSystemString:r.keySystem.systemString;return n.info("DRM: KeySystem Access Granted for system string ("+t+")! Selecting key system..."),E.selectKeySystem(r)})).then((function(e){if(d=e,h=!1,E){_.trigger(S.KEY_SYSTEM_SELECTED,{data:r});var t=H(d);t&&t.serverCertificate&&t.serverCertificate.length>0&&E.setServerCertificate(w.decodeArray(t.serverCertificate).buffer),G()}})).catch((function(e){d=null,h=!1,t||_.trigger(S.KEY_SYSTEM_SELECTED,{data:null,error:new m.Z(p.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,p.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+"Error selecting key system! -- "+e.error)})}))}}(e,t)}function G(){for(var e,t=0;t<r.length;t++)for(e=0;e<r[t].length;e++)if(d===r[t][e].ks){q(r[t][e]);break}r=[]}function q(e){if(y.isClearKey(d)&&e.protData&&e.protData.hasOwnProperty("clearkeys")&&0!==z(e.protData.clearkeys).length){var t={kids:z(e.protData.clearkeys)};e.initData=(new TextEncoder).encode(b(t))}e.sessionId?Y(e):null!==e.initData&&j(e)}function Y(e){P(),E.loadKeySession(e)}function j(e){var t=i.getPSSHForKeySystem(d,e?e.initData:null);if(t){if(function(e){if(!e)return!1;try{for(var t=E.getSessions(),n=0;n<t.length;n++)if(t[n].getKeyId()===e)return!0;return!1}catch(e){return!1}}(e.keyId))return;if(V(t))return;try{e.initData=t,E.createKeySession(e)}catch(e){_.trigger(S.KEY_SESSION_CREATED,{data:null,error:new m.Z(p.KEY_SESSION_CREATED_ERROR_CODE,p.KEY_SESSION_CREATED_ERROR_MESSAGE+e.message)})}}else e&&e.initData?E.createKeySession(e):_.trigger(S.KEY_SESSION_CREATED,{data:null,error:new m.Z(p.KEY_SESSION_CREATED_ERROR_CODE,p.KEY_SESSION_CREATED_ERROR_MESSAGE+"Selected key system is "+(d?d.systemString:null)+". needkey/encrypted event contains no initData corresponding to that key system!")})}function H(e){if(e){var t=e.systemString;if(l)return t in l?l[t]:null}return null}function V(e){if(!e)return!1;try{for(var t=E.getAllInitData(),r=0;r<t.length;r++)if(y.initDataEquals(e,t[r]))return n.debug("DRM: Ignoring initData because we have already seen it!"),!0;return!1}catch(e){return!1}}function W(e){P(),e?(E.setMediaElement(e),_.on(S.NEED_KEY,ae,t)):null===e&&(E.setMediaElement(e),_.off(S.NEED_KEY,ae,t))}function X(e){var t=e.protData,n=[],r=[],i=t&&t.audioRobustness&&t.audioRobustness.length>0?t.audioRobustness:c,l=t&&t.videoRobustness&&t.videoRobustness.length>0?t.videoRobustness:c,u=e.sessionType,f=t&&t.distinctiveIdentifier?t.distinctiveIdentifier:"optional",d=t&&t.persistentState?t.persistentState:"temporary"===u?"optional":"required";return I(s).call(s,(function(e){e.type===N.AUDIO?n.push(new a(e.codec,i)):e.type===N.VIDEO&&r.push(new a(e.codec,l))})),new o(n,r,f,d,[u])}function Q(e){e.error?_.trigger(S.KEY_STATUSES_CHANGED,{data:null,error:e.error}):n.debug("DRM: key status = "+e.status)}function $(e){n.debug("DRM: onKeyMessage");var t=e.data;_.trigger(S.KEY_MESSAGE,{data:t});var r=t.messageType?t.messageType:"license-request",a=t.message,o=t.sessionToken,l=H(d),u=y.getLicenseServerModelInstance(d,l,r),c={sessionToken:o,messageType:r};if(a&&0!==a.byteLength){if(!u)return n.debug("DRM: License server request not required for this message (type = "+e.data.messageType+"). Session ID = "+o.getSessionId()),void J(c);if(y.isClearKey(d)){var f=y.processClearKeyLicenseRequest(d,l,a);if(f&&f.keyPairs&&f.keyPairs.length>0)return n.debug("DRM: ClearKey license request handled by application!"),J(c),void E.updateKeySession(o,f)}!function(e,t,n){var r=e.sessionToken,a=e.messageType?e.messageType:"license-request",o={sessionToken:r,messageType:a},l=d?d.systemString:null,u=function(e,t,n,r,a){var o=null,l=r.message;if(e&&e.serverURL){var u=e.serverURL;"string"==typeof u&&""!==u?o=u:"object"===B(u)&&u.hasOwnProperty(t)&&(o=u[t])}else if(e&&e.laURL&&""!==e.laURL)o=e.laURL;else if(!(o=i.getLicenseServerUrlFromMediaInfo(s,d.schemeIdURI))&&!y.isClearKey(d)){var c=i.getPSSHData(n.initData);(o=d.getLicenseServerURLFromInitData(c))||(o=r.laURL)}return a.getServerURLFromMessage(o,l,t)}(n,a,r,e,t);if(u){var c,f={},h=!1;n&&ne(f,n.httpRequestHeaders);var g=e.message;ne(f,d.getRequestHeadersFromMessage(g)),I(c=z(f)).call(c,(function(e){"authorization"===e.toLowerCase()&&(h=!0)})),n&&"boolean"==typeof n.withCredentials&&(h=n.withCredentials);var v=function(e){if(E)if(e.status>=200&&e.status<=299){var n=x.Z.parseHttpHeaders(e.getAllResponseHeaders?e.getAllResponseHeaders():null),i=new R(e.responseURL,n,e.response);ie(O.getLicenseResponseFilters(),i).then((function(){var n=t.getLicenseMessage(i.data,l,a);null!==n?(J(o),E.updateKeySession(r,n)):re(e,o,l,a,t)}))}else re(e,o,l,a,t)},_=function(e){J(o,new m.Z(p.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,p.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+l+' update, XHR aborted. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState))},b=function(e){J(o,new m.Z(p.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,p.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+l+' update, XHR error. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState))},S=d.getLicenseRequestFromMessage(g),A=t.getHTTPMethod(a),w=t.getResponseType(l,a),N=n&&!isNaN(n.httpTimeout)?n.httpTimeout:8e3,C=r.getSessionId()||null,M=new T(u,A,w,f,h,a,C,S),P=isNaN(L.get().streaming.retryAttempts[D.w.LICENSE])?3:L.get().streaming.retryAttempts[D.w.LICENSE];ie(O.getLicenseRequestFilters(),M).then((function(){ee(M,P,N,v,_,b)}))}else J(o,new m.Z(p.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,p.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE))}(t,u,l)}else J(c,new m.Z(p.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,p.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE))}function J(e,t){_.trigger(S.LICENSE_REQUEST_COMPLETE,{data:e,error:t})}function ee(e,t,r,i,a,o){var s=new XMLHttpRequest;if(L.get().streaming.cmcd&&L.get().streaming.cmcd.enabled&&L.get().streaming.cmcd.mode===k.Z.CMCD_MODE_QUERY){var l=M.getQueryParameter({url:e.url,type:D.w.LICENSE});l&&(e.url=x.Z.addAditionalQueryParameterToUrl(e.url,[l]))}for(var u in s.open(e.method,e.url,!0),s.responseType=e.responseType,s.withCredentials=e.withCredentials,r>0&&(s.timeout=r),e.headers)s.setRequestHeader(u,e.headers[u]);if(L.get().streaming.cmcd&&L.get().streaming.cmcd.enabled&&L.get().streaming.cmcd.mode===k.Z.CMCD_MODE_HEADER){var c=M.getHeaderParameters({url:e.url,type:D.w.LICENSE});if(c)for(var d in c){var h=c[d];h&&s.setRequestHeader(d,h)}}var p=function(){t--;var n=isNaN(L.get().streaming.retryIntervals[D.w.LICENSE])?1e3:L.get().streaming.retryIntervals[D.w.LICENSE];v=f((function(){ee(e,t,r,i,a,o)}),n)};s.onload=function(){g=null,this.status>=200&&this.status<=299||t<=0?i(this):(n.warn("License request failed ("+this.status+"). Retrying it... Pending retries: "+t),p())},s.ontimeout=s.onerror=function(){g=null,t<=0?o(this):(n.warn("License request network request failed . Retrying it... Pending retries: "+t),p())},s.onabort=function(){a(this)},_.trigger(S.LICENSE_REQUEST_SENDING,{url:e.url,headers:e.headers,payload:e.data,sessionId:e.sessionId}),g=s,s.send(e.data)}function te(){g&&(g.onloadend=g.onerror=g.onprogress=void 0,g.abort(),g=null),v&&(clearTimeout(v),v=null)}function ne(e,t){if(t)for(var n in t)e[n]=t[n]}function re(e,t,n,r,i){var a="NONE",o=null;e.response&&(a=i.getErrorResponse(e.response,n,r),o={serverResponse:e.response||null,responseCode:e.status||null,responseText:e.statusText||null}),J(t,new m.Z(p.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,p.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+n+' update, XHR complete. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState+". Response is "+a,o))}function ie(e,t){return e?K(e).call(e,(function(e,n){return e.then((function(){return n(t)}))}),F.resolve()):F.resolve()}function ae(e,t){if(!L.get().streaming.protection.ignoreEmeEncryptedEvent){if(n.debug("DRM: onNeedKey"),"cenc"!==e.key.initDataType)return void n.warn("DRM: Only 'cenc' initData is supported! Ignoring initData of type: "+e.key.initDataType);if(0===s.length&&(n.warn("DRM: onNeedKey called before initializeForMedia, wait until initialized"),(t=void 0===t?1:t+1)<5))return void C.push(f((function(){ae(e,t)}),500));var a=e.key.initData;if(ArrayBuffer.isView(a)&&(a=a.buffer),d){var o=i.getPSSHForKeySystem(d,a);if(o&&V(o))return}n.debug("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(a)));var c=y.getSupportedKeySystemsFromSegmentPssh(a,l,u);if(0===c.length)return void n.debug("DRM: Received needkey event with initData, but we don't support any of the key systems!");!function(e){r.push(e),U(e,!1)}(c)}}return t={initializeForMedia:function(e){if(!e)throw new Error("mediaInfo can not be null or undefined");P(),s.push(e)},clearMediaInfoArray:function(){s=[]},handleKeySystemFromManifest:function(){if(s&&0!==s.length){var e=[];I(s).call(s,(function(t){var n=y.getSupportedKeySystemsFromContentProtection(t.contentProtection,l,u);n.length>0&&(0===e.length&&(e=n),r.push(n))})),e&&e.length>0&&U(e,!0)}},createKeySession:j,loadKeySession:Y,removeKeySession:function(e){P(),E.removeKeySession(e)},closeKeySession:function(e){P(),E.closeKeySession(e)},setServerCertificate:function(e){P(),E.setServerCertificate(e)},setMediaElement:W,setSessionType:function(e){u=e},setRobustnessLevel:function(e){c=e},setProtectionData:function(e){l=e,y.setProtectionData(e)},getSupportedKeySystemsFromContentProtection:function(e){return P(),y.getSupportedKeySystemsFromContentProtection(e,l,u)},getKeySystems:function(){return y?y.getKeySystems():[]},setKeySystems:function(e){y&&y.setKeySystems(e)},stop:function(){te(),E&&E.stop()},reset:function(){_.off(S.INTERNAL_KEY_MESSAGE,$,t),_.off(S.INTERNAL_KEY_STATUS_CHANGED,Q,t),P(),te(),W(null),d=null,h=!1,E&&(E.reset(),E=null),I(C).call(C,(function(e){return clearTimeout(e)})),C=[],s=[],r=[]}},n=A.getLogger(t),r=[],s=[],u="temporary",c="",g=null,v=null,_.on(S.INTERNAL_KEY_MESSAGE,$,t),_.on(S.INTERNAL_KEY_STATUS_CHANGED,Q,t),t}G.__dashjs_factory_name="ProtectionController";var q=U.Z.getClassFactory(G),Y=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.keyID=t,this.key=n},j=function(){function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n&&"persistent"!==n&&"temporary"!==n)throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=t,this.type=n}var t;return(t=[{key:"toJWK",value:function(){var e,t=this.keyPairs.length,n={keys:[]};for(e=0;e<t;e++){var r={kty:"oct",alg:"A128KW",kid:this.keyPairs[e].keyID,k:this.keyPairs[e].key};H(n).push(r)}this.type&&(n.type=this.type);var i=b(n),a=i.length,o=new ArrayBuffer(a),s=new Uint8Array(o);for(e=0;e<a;e++)s[e]=i.charCodeAt(e);return o}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e.prototype,t),e}(),V=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var t;return(t=[{key:"init",value:function(){this.CLEARKEY_KEYSTEM_STRING="org.w3.clearkey",this.WIDEVINE_KEYSTEM_STRING="com.widevine.alpha",this.PLAYREADY_KEYSTEM_STRING="com.microsoft.playready",this.PLAYREADY_RECOMMENDATION_KEYSTEM_STRING="com.microsoft.playready.recommendation",this.INITIALIZATION_DATA_TYPE_CENC="cenc",this.INITIALIZATION_DATA_TYPE_KEYIDS="keyids",this.INITIALIZATION_DATA_TYPE_WEBM="webm"}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e.prototype,t),e}()),W="e2719d58-a985-b3c9-781a-b030af78d30e",X=V.CLEARKEY_KEYSTEM_STRING,Q="urn:uuid:"+W;function $(e){var t=(e=e||{}).BASE64;return{uuid:W,schemeIdURI:Q,systemString:X,getInitData:function(e,n){try{var r=i.parseInitDataFromContentProtection(e,t);if(!r&&n){var a={kids:[function(e){try{var t,n=e.replace(/-/g,"");return(n=btoa(ee(t=n.match(/\w{2}/g)).call(t,(function(e){return String.fromCharCode(_(e,16))})).join(""))).replace(/=/g,"").replace(/\//g,"_").replace(/\+/g,"-")}catch(e){return null}}(n["cenc:default_KID"])]};r=(new TextEncoder).encode(b(a))}return r}catch(e){return null}},getRequestHeadersFromMessage:function(){return{"Content-Type":"application/json"}},getLicenseRequestFromMessage:function(e){return b(JSON.parse(String.fromCharCode.apply(null,new Uint8Array(e))))},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(e,t){var n=null;if(e){for(var r=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t))),i=[],a=0;a<r.kids.length;a++){var o=r.kids[a],s=e.clearkeys&&e.clearkeys.hasOwnProperty(o)?e.clearkeys[o]:null;if(!s)throw new Error("DRM: ClearKey keyID ("+o+") is not known!");i.push(new Y(o,s))}n=new j(i)}return n}}}$.__dashjs_factory_name="KeySystemClearKey";var J=dashjs.FactoryMaker.getSingletonFactory($),te="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",ne=V.CLEARKEY_KEYSTEM_STRING,re="urn:uuid:"+te;function ie(e){var t=e.BASE64,n=e.debug.getLogger(void 0);return{uuid:te,schemeIdURI:re,systemString:ne,getInitData:function(e){return i.parseInitDataFromContentProtection(e,t)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(e){return new Uint8Array(e)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(e,t){var r=null;if(e){for(var i=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t))),a=[],o=0;o<i.kids.length;o++){var s=i.kids[o],l=e.clearkeys&&e.clearkeys.hasOwnProperty(s)?e.clearkeys[s]:null;if(!l)throw new Error("DRM: ClearKey keyID ("+s+") is not known!");a.push(new Y(s,l))}r=new j(a),n.warn("ClearKey schemeIdURI is using W3C Common PSSH systemID (1077efec-c0b2-4d02-ace3-3c1e52e2fb4b) in Content Protection. See DASH-IF IOP v4.1 section 7.6.2.4")}return r}}}ie.__dashjs_factory_name="KeySystemW3CClearKey";var ae=dashjs.FactoryMaker.getSingletonFactory(ie),oe="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",se=V.WIDEVINE_KEYSTEM_STRING,le="urn:uuid:"+oe;function ue(e){var t=(e=e||{}).BASE64;return{uuid:oe,schemeIdURI:le,systemString:se,getInitData:function(e){return i.parseInitDataFromContentProtection(e,t)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(e){return new Uint8Array(e)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null}}}ue.__dashjs_factory_name="KeySystemWidevine";var ce=dashjs.FactoryMaker.getSingletonFactory(ue),fe="9a04f079-9840-4286-ab92-e65be0885f95",de=V.PLAYREADY_KEYSTEM_STRING,he="urn:uuid:"+fe;function ge(e){var t="utf-16",n=(e=e||{}).BASE64,r=e.settings;function a(){if(!n||!n.hasOwnProperty("decodeArray")||!n.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}return{uuid:fe,schemeIdURI:he,systemString:de,getInitData:function(e){var t,r,o,s,l,u=new Uint8Array([112,115,115,104,0,0,0,0]),c=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),f=0,d=null;if(a(),!e)return null;if("pssh"in e)return i.parseInitDataFromContentProtection(e,n);if("pro"in e)d=n.decodeArray(e.pro.__text);else{if(!("prheader"in e))return null;d=n.decodeArray(e.prheader.__text)}return t=d.length,r=4+u.length+c.length+4+t,o=new ArrayBuffer(r),s=new Uint8Array(o),(l=new DataView(o)).setUint32(f,r),f+=4,s.set(u,f),f+=u.length,s.set(c,f),f+=c.length,l.setUint32(f,t),f+=4,s.set(d,f),f+=t,s.buffer},getRequestHeadersFromMessage:function(e){var n,i,a={},o=new DOMParser;if(r&&r.get().streaming.protection.detectPlayreadyMessageFormat&&"utf-16"===t&&e&&e.byteLength%2==1)return a["Content-Type"]="text/xml; charset=utf-8",a;var s="utf-16"===t?new Uint16Array(e):new Uint8Array(e);n=String.fromCharCode.apply(null,s);for(var l=(i=o.parseFromString(n,"application/xml")).getElementsByTagName("name"),u=i.getElementsByTagName("value"),c=0;c<l.length;c++)a[l[c].childNodes[0].nodeValue]=u[c].childNodes[0].nodeValue;return a.hasOwnProperty("Content")&&(a["Content-Type"]=a.Content,delete a.Content),a.hasOwnProperty("Content-Type")||(a["Content-Type"]="text/xml; charset=utf-8"),a},getLicenseRequestFromMessage:function(e){var i=null,o=new DOMParser;if(r&&r.get().streaming.protection.detectPlayreadyMessageFormat&&"utf-16"===t&&e&&e.byteLength%2==1)return e;var s="utf-16"===t?new Uint16Array(e):new Uint8Array(e);a();var l=String.fromCharCode.apply(null,s),u=o.parseFromString(l,"application/xml");if(!u.getElementsByTagName("PlayReadyKeyMessage")[0])return e;var c=u.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;return c&&(i=n.decode(c)),i},getLicenseServerURLFromInitData:function(e){if(e)for(var t=new DataView(e),n=t.getUint16(4,!0),r=6,i=new DOMParser,a=0;a<n;a++){var o=t.getUint16(r,!0);r+=2;var s=t.getUint16(r,!0);if(r+=2,1===o){var l=v(e).call(e,r,r+s),u=String.fromCharCode.apply(null,new Uint16Array(l)),c=i.parseFromString(u,"application/xml");if(c.getElementsByTagName("LA_URL")[0]){var f=c.getElementsByTagName("LA_URL")[0].childNodes[0].nodeValue;if(f)return f}if(c.getElementsByTagName("LUI_URL")[0]){var d=c.getElementsByTagName("LUI_URL")[0].childNodes[0].nodeValue;if(d)return d}}else r+=s}return null},getCDMData:function(e){var t,r,i,o;if(a(),!e)return null;for(t=[],o=0;o<e.length;++o)t.push(e.charCodeAt(o)),t.push(0);for(t=String.fromCharCode.apply(null,t),t=n.encode(t),r='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="false"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>'.replace("%CUSTOMDATA%",t),i=[],o=0;o<r.length;++o)i.push(r.charCodeAt(o)),i.push(0);return new Uint8Array(i).buffer},setPlayReadyMessageFormat:function(e){if("utf-8"!==e&&"utf-16"!==e)throw new Error('Specified message format is not one of "utf-8" or "utf-16"');t=e}}}ge.__dashjs_factory_name="KeySystemPlayReady";var pe=dashjs.FactoryMaker.getSingletonFactory(ge);function me(e){var t=(e=e||{}).BASE64,n={};return n[V.WIDEVINE_KEYSTEM_STRING]={responseType:"json",getLicenseMessage:function(e){return t.decodeArray(e.license)},getErrorResponse:function(e){return e}},n[V.PLAYREADY_KEYSTEM_STRING]={responseType:"arraybuffer",getLicenseMessage:function(e){return e},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}},{getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(e){return n[e].responseType},getLicenseMessage:function(e,r){return function(){if(!t||!t.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}(),n[r].getLicenseMessage(e)},getErrorResponse:function(e,t){return n[t].getErrorResponse(e)}}}me.__dashjs_factory_name="DRMToday";var ve=dashjs.FactoryMaker.getSingletonFactory(me);function ye(){var e="http://schemas.xmlsoap.org/soap/envelope/";function t(e){var t=String.fromCharCode.apply(null,new Uint8Array(e));return decodeURIComponent(escape(t))}function n(n){if(window.DOMParser){var r=t(n),i=(new window.DOMParser).parseFromString(r,"text/xml"),a=i?i.getElementsByTagNameNS(e,"Envelope")[0]:null,o=a?a.getElementsByTagNameNS(e,"Body")[0]:null;if(o&&o.getElementsByTagNameNS(e,"Fault")[0])return null}return n}function r(n){var r,i="",a="",o="",s=-1,l=-1;if(window.DOMParser){var u=t(n),c=(new window.DOMParser).parseFromString(u,"text/xml"),f=c?c.getElementsByTagNameNS(e,"Envelope")[0]:null,h=f?f.getElementsByTagNameNS(e,"Body")[0]:null,g=h?h.getElementsByTagNameNS(e,"Fault")[0]:null,p=g?g.getElementsByTagName("detail")[0]:null,m=p?p.getElementsByTagName("Exception")[0]:null,v=null;if(null===g)return u;i=(v=g.getElementsByTagName("faultstring")[0].firstChild)?v.nodeValue:null,null!==m&&(a=(v=m.getElementsByTagName("StatusCode")[0])?v.firstChild.nodeValue:null,s=(o=(v=m.getElementsByTagName("Message")[0])?v.firstChild.nodeValue:null)?E(o).call(o,"[")+1:-1,l=o?y(o).call(o,"]"):-1,o=o?o.substring(s,l):"")}var _=d(r="code: ".concat(a,", name: ")).call(r,i);return o&&(_+=", message: ".concat(o)),_}return{getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(e){return n.call(this,e)},getErrorResponse:function(e){return r.call(this,e)}}}ye.__dashjs_factory_name="PlayReady";var Ee=U.Z.getSingletonFactory(ye);function _e(){return{getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(e){return e},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}}}_e.__dashjs_factory_name="Widevine";var Te=dashjs.FactoryMaker.getSingletonFactory(_e);function be(){return{getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"json"},getLicenseMessage:function(e){if(!e.hasOwnProperty("keys"))return null;for(var t=[],n=0;n<H(e).length;n++){var r=H(e)[n],i=r.kid.replace(/=/g,""),a=r.k.replace(/=/g,"");t.push(new Y(i,a))}return new j(t)},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}}}be.__dashjs_factory_name="ClearKey";var Se=dashjs.FactoryMaker.getSingletonFactory(be);function Ae(){var e,t,n,r,a,o,s,l,u=this.context;function c(e,t){return t&&e in t?t[e]:null}function f(e,t){return e&&e.sessionId?e.sessionId:t&&t.sessionId?t.sessionId:null}function d(e,t){return e&&e.sessionType?e.sessionType:t}return e={initialize:function(){var e;r=[],e=pe(u).getInstance({BASE64:a,settings:o}),r.push(e),e=ce(u).getInstance({BASE64:a}),r.push(e),e=J(u).getInstance({BASE64:a}),r.push(e),s=e,e=ae(u).getInstance({BASE64:a,debug:t}),r.push(e),l=e},setProtectionData:function(e){for(var t,n,i=0;i<r.length;i++){var a=r[i];a.hasOwnProperty("init")&&a.init((t=a.systemString,n=void 0,n=null,e&&(n=t in e?e[t]:null),n))}},isClearKey:function(e){return e===s||e===l},initDataEquals:function(e,t){if(e.byteLength===t.byteLength){for(var n=new Uint8Array(e),r=new Uint8Array(t),i=0;i<n.length;i++)if(n[i]!==r[i])return!1;return!0}return!1},getKeySystems:function(){return r},setKeySystems:function(e){r=e},getKeySystemBySystemString:function(e){for(var t=0;t<r.length;t++)if(r[t].systemString===e)return r[t];return null},getSupportedKeySystemsFromContentProtection:function(e,t,n){var a,o,s,l,u=[];if(e){var h=i.findCencContentProtection(e);for(s=0;s<r.length;++s){var g=c((o=r[s]).systemString,t);for(l=0;l<e.length;++l)if((a=e[l]).schemeIdUri.toLowerCase()===o.schemeIdURI){var p=o.getInitData(a,h);u.push({ks:r[s],keyId:a.keyId,initData:p,protData:g,cdmData:o.getCDMData(g?g.cdmData:null),sessionId:f(g,a),sessionType:d(g,n)})}}}return u},getSupportedKeySystemsFromSegmentPssh:function(e,t,n){for(var a,o=[],s=i.parsePSSHList(e),l=0;l<r.length;++l){var u=c((a=r[l]).systemString,t);a.uuid in s&&o.push({ks:a,initData:s[a.uuid],protData:u,cdmData:a.getCDMData(u?u.cdmData:null),sessionId:f(u),sessionType:d(u,n)})}return o},getLicenseServerModelInstance:function(e,t,n){if("license-release"===n||"individualization-request"===n)return null;var r=null;return t&&t.hasOwnProperty("drmtoday")?r=ve(u).getInstance({BASE64:a}):e.systemString===V.WIDEVINE_KEYSTEM_STRING?r=Te(u).getInstance():e.systemString===V.PLAYREADY_KEYSTEM_STRING?r=Ee(u).getInstance():e.systemString===V.CLEARKEY_KEYSTEM_STRING&&(r=Se(u).getInstance()),r},processClearKeyLicenseRequest:function(e,t,r){try{return e.getClearKeysFromProtectionData(t,r)}catch(e){return n.error("Failed to retrieve clearkeys from ProtectionData"),null}},setConfig:function(r){r&&(r.debug&&(t=r.debug,n=t.getLogger(e)),r.BASE64&&(a=r.BASE64),r.settings&&(o=r.settings))}},e}Ae.__dashjs_factory_name="ProtectionKeyController";var Ie=dashjs.FactoryMaker.getSingletonFactory(Ae);function Re(e){return Re="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},Re(e)}function we(e,t){return we=M||function(e,t){return e.__proto__=t,e},we(e,t)}function Ne(e,t){return!t||"object"!==Re(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ce(e){return Ce=M?L:function(e){return e.__proto__||L(e)},Ce(e)}var De=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=O(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&we(e,t)}(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!P)return!1;if(P.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Ce(t);if(n){var i=Ce(this).constructor;e=P(r,arguments,i)}else e=r.apply(this,arguments);return Ne(this,e)});function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this)).INTERNAL_KEY_MESSAGE="internalKeyMessage",e.INTERNAL_KEY_STATUS_CHANGED="internalkeyStatusChanged",e.KEY_ADDED="public_keyAdded",e.KEY_ERROR="public_keyError",e.KEY_MESSAGE="public_keyMessage",e.KEY_SESSION_CLOSED="public_keySessionClosed",e.KEY_SESSION_CREATED="public_keySessionCreated",e.KEY_SESSION_REMOVED="public_keySessionRemoved",e.KEY_STATUSES_CHANGED="public_keyStatusesChanged",e.KEY_SYSTEM_ACCESS_COMPLETE="public_keySystemAccessComplete",e.KEY_SYSTEM_SELECTED="public_keySystemSelected",e.LICENSE_REQUEST_COMPLETE="public_licenseRequestComplete",e.LICENSE_REQUEST_SENDING="public_licenseRequestSending",e.NEED_KEY="needkey",e.PROTECTION_CREATED="public_protectioncreated",e.PROTECTION_DESTROYED="public_protectiondestroyed",e.SERVER_CERTIFICATE_UPDATED="serverCertificateUpdated",e.TEARDOWN_COMPLETE="protectionTeardownComplete",e.VIDEO_ELEMENT_SELECTED="videoElementSelected",e.KEY_SESSION_UPDATED="public_keySessionUpdated",e}return i}(n(8342).Z)),Me=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.initData=t,this.initDataType=n},Le=function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sessionToken=t,this.message=n,this.defaultURL=r,this.messageType=i||"license-request"},Oe=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.keySystem=t,this.ksConfiguration=n},Pe={};function Fe(e){e=e||{};var t,n,r,i,a,o,s,l,u=this.context,c=e.eventBus,f=e.events,d=e.debug;function h(e,t,n,r){if(void 0===navigator.requestMediaKeySystemAccess||"function"!=typeof navigator.requestMediaKeySystemAccess){var i="Insecure origins are not allowed";return c.trigger(f.KEY_SYSTEM_ACCESS_COMPLETE,{error:i}),void r({error:i})}var a=e[t].protData&&e[t].protData.systemStringPriority?e[t].protData.systemStringPriority:null,o=e[t].configs,s=e[t].ks,l=s.systemString;(function(e,t){return new F((function(n,r){g(e,t,0,n,r)}))})(a||(Pe[l]?Pe[l]:[l]),o).then((function(e){var t="function"==typeof e.getConfiguration?e.getConfiguration():null,r=new Oe(s,t);r.mksa=e,c.trigger(f.KEY_SYSTEM_ACCESS_COMPLETE,{data:r}),n({data:r})})).catch((function(i){if(t+1<e.length)h(e,t+1,n,r);else{var a="Key system access denied! ";c.trigger(f.KEY_SYSTEM_ACCESS_COMPLETE,{error:a+i.message}),r({error:a+i.message})}}))}function g(e,t,r,i,a){var o=e[r];n.debug("Requesting key system access for system string ".concat(o)),navigator.requestMediaKeySystemAccess(o,t).then((function(e){e.selectedSystemString=o,i(e)})).catch((function(n){r+1<e.length?g(e,t,r+1,i,a):a(n)}))}function v(e){if(!e||!e.session)return F.resolve;var t=e.session;return t.removeEventListener("keystatuseschange",e),t.removeEventListener("message",e),t.close()}function y(e){for(var t=0;t<o.length;t++)if(o[t]===e){S(o).call(o,t,1);break}}function E(e){var t,n;return e&&e.length>0&&(e[0]&&("string"==typeof e[0]?t=e[0]:n=e[0]),e[1]&&("string"==typeof e[1]?t=e[1]:n=e[1])),{status:t,keyId:n}}function _(e,t){var r={session:e,keyId:t.keyId,initData:t.initData,sessionId:t.sessionId,sessionType:t.sessionType,handleEvent:function(e){var t;switch(e.type){case"keystatuseschange":c.trigger(f.KEY_STATUSES_CHANGED,{data:this}),I(t=e.target.keyStatuses).call(t,(function(){var e=E(arguments);"expired"===e.status?c.trigger(f.INTERNAL_KEY_STATUS_CHANGED,{error:new m.Z(p.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE,p.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE)}):c.trigger(f.INTERNAL_KEY_STATUS_CHANGED,e)}));break;case"message":var n=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;c.trigger(f.INTERNAL_KEY_MESSAGE,{data:new Le(this,n,void 0,e.messageType)})}},getKeyId:function(){return this.keyId},getSessionId:function(){return e.sessionId},getSessionType:function(){return this.sessionType},getExpirationTime:function(){return e.expiration},getKeyStatuses:function(){return e.keyStatuses},getUsable:function(){var t,n=!1;return I(t=e.keyStatuses).call(t,(function(){var e=E(arguments);"usable"===e.status&&(n=!0)})),n}};return e.addEventListener("keystatuseschange",r),e.addEventListener("message",r),e.closed.then((function(){y(r),n.debug("DRM: Session closed. SessionID = "+r.getSessionId()),c.trigger(f.KEY_SESSION_CLOSED,{data:r.getSessionId()})})),o.push(r),r}return t={getAllInitData:function(){for(var e=[],t=0;t<o.length;t++)o[t].initData&&e.push(o[t].initData);return e},getSessions:function(){return o},requestKeySystemAccess:function(e){return new F((function(t,n){h(e,0,t,n)}))},selectKeySystem:function(e){return new F((function(t,n){e.mksa.createMediaKeys().then((function(t){return r=e.keySystem,a=t,i?i.setMediaKeys(a):F.resolve()})).then((function(){t(r)})).catch((function(){n({error:"Error selecting keys system ("+e.keySystem.systemString+")! Could not create MediaKeys -- TODO"})}))}))},setMediaElement:function(e){i!==e&&(i&&(i.removeEventListener("encrypted",s),i.setMediaKeys&&i.setMediaKeys(null)),(i=e)&&(i.addEventListener("encrypted",s),i.setMediaKeys&&a&&i.setMediaKeys(a)))},setServerCertificate:function(e){if(!r||!a)throw new Error("Can not set server certificate until you have selected a key system");a.setServerCertificate(e).then((function(){n.info("DRM: License server certificate successfully updated."),c.trigger(f.SERVER_CERTIFICATE_UPDATED)})).catch((function(e){c.trigger(f.SERVER_CERTIFICATE_UPDATED,{error:new m.Z(p.SERVER_CERTIFICATE_UPDATED_ERROR_CODE,p.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE+e.name)})}))},createKeySession:function(e){if(!r||!a)throw new Error("Can not create sessions until you have selected a key system");var t=a.createSession(e.sessionType),i=_(t,e),o=r.systemString===V.CLEARKEY_KEYSTEM_STRING&&(e.initData||e.protData&&e.protData.clearkeys)?V.INITIALIZATION_DATA_TYPE_KEYIDS:V.INITIALIZATION_DATA_TYPE_CENC;t.generateRequest(o,e.initData).then((function(){n.debug("DRM: Session created. SessionID = "+i.getSessionId()),c.trigger(f.KEY_SESSION_CREATED,{data:i})})).catch((function(e){y(i),c.trigger(f.KEY_SESSION_CREATED,{data:null,error:new m.Z(p.KEY_SESSION_CREATED_ERROR_CODE,p.KEY_SESSION_CREATED_ERROR_MESSAGE+"Error generating key request -- "+e.name)})}))},updateKeySession:function(e,t){var n=e.session;l.isClearKey(r)&&(t=t.toJWK()),n.update(t).then((function(){c.trigger(f.KEY_SESSION_UPDATED)})).catch((function(t){c.trigger(f.KEY_ERROR,{error:new m.Z(p.MEDIA_KEYERR_CODE,"Error sending update() message! "+t.name,e)})}))},loadKeySession:function(e){if(!r||!a)throw new Error("Can not load sessions until you have selected a key system");for(var t=e.sessionId,i=0;i<o.length;i++)if(t===o[i].sessionId)return void n.warn("DRM: Ignoring session ID because we have already seen it!");var s=a.createSession(e.sessionType),l=_(s,e);s.load(t).then((function(e){e?(n.debug("DRM: Session loaded. SessionID = "+l.getSessionId()),c.trigger(f.KEY_SESSION_CREATED,{data:l})):(y(l),c.trigger(f.KEY_SESSION_CREATED,{data:null,error:new m.Z(p.KEY_SESSION_CREATED_ERROR_CODE,p.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session! Invalid Session ID ("+t+")")}))})).catch((function(e){y(l),c.trigger(f.KEY_SESSION_CREATED,{data:null,error:new m.Z(p.KEY_SESSION_CREATED_ERROR_CODE,p.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session ("+t+")! "+e.name)})}))},removeKeySession:function(e){e.session.remove().then((function(){n.debug("DRM: Session removed. SessionID = "+e.getSessionId()),c.trigger(f.KEY_SESSION_REMOVED,{data:e.getSessionId()})}),(function(t){c.trigger(f.KEY_SESSION_REMOVED,{data:null,error:"Error removing session ("+e.getSessionId()+"). "+t.name})}))},closeKeySession:function(e){v(e).catch((function(t){y(e),c.trigger(f.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+e.getSessionId()+") "+t.name})}))},stop:function(){for(var e,t=0;t<o.length;t++)(e=o[t]).getUsable()||(v(e),y(e))},reset:function(){var e,t=o.length;0!==t?function(){for(var n=function(e){y(e),0===o.length&&(i?(i.removeEventListener("encrypted",s),i.setMediaKeys(null).then((function(){c.trigger(f.TEARDOWN_COMPLETE)}))):c.trigger(f.TEARDOWN_COMPLETE))},r=0;r<t;r++)!function(t){v(e),n(t)}(e=o[r])}():c.trigger(f.TEARDOWN_COMPLETE)}},n=d.getLogger(t),r=null,i=null,a=null,o=[],l=Ie(u).getInstance(),s={handleEvent:function(e){if("encrypted"===e.type&&e.initData){var t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;c.trigger(f.NEED_KEY,{key:new Me(t,e.initDataType)})}}},t}Pe[V.PLAYREADY_KEYSTEM_STRING]=[V.PLAYREADY_KEYSTEM_STRING,V.PLAYREADY_RECOMMENDATION_KEYSTEM_STRING],Pe[V.WIDEVINE_KEYSTEM_STRING]=[V.WIDEVINE_KEYSTEM_STRING],Pe[V.CLEARKEY_KEYSTEM_STRING]=[V.CLEARKEY_KEYSTEM_STRING],Fe.__dashjs_factory_name="ProtectionModel_21Jan2015";var xe=dashjs.FactoryMaker.getClassFactory(Fe);function ke(e){e=e||{};var t,n,r,i,a,s,l,u,c,f=this.context,d=e.eventBus,h=e.events,g=e.debug,v=e.api;function y(){try{for(var e=0;e<l.length;e++)E(l[e]);r&&r.removeEventListener(v.needkey,u),d.trigger(h.TEARDOWN_COMPLETE)}catch(e){d.trigger(h.TEARDOWN_COMPLETE,{error:"Error tearing down key sessions and MediaKeys! -- "+e.message})}}function E(e){var t=e.session;t.removeEventListener(v.error,e),t.removeEventListener(v.message,e),t.removeEventListener(v.ready,e),t.removeEventListener(v.close,e);for(var n=0;n<l.length;n++)if(l[n]===e){S(l).call(l,n,1);break}t[v.release]()}function _(){var e=null,t=function(){r.removeEventListener("loadedmetadata",e),r[v.setMediaKeys](a),d.trigger(h.VIDEO_ELEMENT_SELECTED)};r.readyState>=1?t():(e=A(t).call(t,this),r.addEventListener("loadedmetadata",e))}return t={getAllInitData:function(){for(var e=[],t=0;t<l.length;t++)e.push(l[t].initData);return e},getSessions:function(){return l},requestKeySystemAccess:function(e){return new F((function(t,n){for(var r=!1,i=0;i<e.length;i++)for(var a=e[i].ks.systemString,s=e[i].configs,l=null,u=null,f=0;f<s.length;f++){var g=s[f].audioCapabilities,p=s[f].videoCapabilities;if(g&&0!==g.length){l=[];for(var m=0;m<g.length;m++)window[v.MediaKeys].isTypeSupported(a,g[m].contentType)&&l.push(g[m])}if(p&&0!==p.length){u=[];for(var y=0;y<p.length;y++)window[v.MediaKeys].isTypeSupported(a,p[y].contentType)&&u.push(p[y])}if(!(!l&&!u||l&&0===l.length||u&&0===u.length)){r=!0;var E=new o(l,u),_=c.getKeySystemBySystemString(a),T=new Oe(_,E);d.trigger(h.KEY_SYSTEM_ACCESS_COMPLETE,{data:T}),t({data:T});break}}if(!r){var b="Key system access denied! -- No valid audio/video content configurations detected!";d.trigger(h.KEY_SYSTEM_ACCESS_COMPLETE,{error:b}),n({error:b})}}))},selectKeySystem:function(e){return new F((function(t,n){try{a=e.mediaKeys=new window[v.MediaKeys](e.keySystem.systemString),i=e.keySystem,s=e,r&&_(),t(i)}catch(e){n({error:"Error selecting keys system ("+i.systemString+")! Could not create MediaKeys -- TODO"})}}))},setMediaElement:function(e){r!==e&&(r&&r.removeEventListener(v.needkey,u),(r=e)&&(r.addEventListener(v.needkey,u),a&&_()))},createKeySession:function(e){if(!i||!a||!s)throw new Error("Can not create sessions until you have selected a key system");var t=null;if(s.ksConfiguration.videoCapabilities&&s.ksConfiguration.videoCapabilities.length>0&&(t=s.ksConfiguration.videoCapabilities[0]),null===t&&s.ksConfiguration.audioCapabilities&&s.ksConfiguration.audioCapabilities.length>0&&(t=s.ksConfiguration.audioCapabilities[0]),null===t)throw new Error("Can not create sessions for unknown content types.");var r=t.contentType,o=a.createSession(r,new Uint8Array(e.initData),e.cdmData?new Uint8Array(e.cdmData):null),u=function(e,t){return{session:e,keyId:t.keyId,initData:t.initData,getKeyId:function(){return this.keyId},getSessionId:function(){return this.session.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},handleEvent:function(e){switch(e.type){case v.error:d.trigger(h.KEY_ERROR,{error:new m.Z(p.MEDIA_KEYERR_CODE,"KeyError",this)});break;case v.message:var t=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;d.trigger(h.INTERNAL_KEY_MESSAGE,{data:new Le(this,t,e.destinationURL)});break;case v.ready:n.debug("DRM: Key added."),d.trigger(h.KEY_ADDED);break;case v.close:n.debug("DRM: Session closed. SessionID = "+this.getSessionId()),d.trigger(h.KEY_SESSION_CLOSED,{data:this.getSessionId()})}}}}(o,e);o.addEventListener(v.error,u),o.addEventListener(v.message,u),o.addEventListener(v.ready,u),o.addEventListener(v.close,u),l.push(u),n.debug("DRM: Session created. SessionID = "+u.getSessionId()),d.trigger(h.KEY_SESSION_CREATED,{data:u})},updateKeySession:function(e,t){var n=e.session;c.isClearKey(i)?n.update(new Uint8Array(t.toJWK())):n.update(new Uint8Array(t)),d.trigger(h.KEY_SESSION_UPDATED)},closeKeySession:E,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:y,reset:y},n=g.getLogger(t),r=null,i=null,a=null,s=null,l=[],c=Ie(f).getInstance(),u={handleEvent:function(e){if(e.type===v.needkey&&e.initData){var t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;d.trigger(h.NEED_KEY,{key:new Me(t,"cenc")})}}},t}ke.__dashjs_factory_name="ProtectionModel_3Feb2014";var Ue=dashjs.FactoryMaker.getClassFactory(ke);function Ze(e){e=e||{};var t,n,r,i,a,s,l,u,c,f=this.context,h=e.eventBus,g=e.events,v=e.debug,y=e.api,E=e.errHandler;function _(){r&&S();for(var e=0;e<l.length;e++)T(l[e]);h.trigger(g.TEARDOWN_COMPLETE)}function T(e){try{r[y.cancelKeyRequest](i.systemString,e.sessionId)}catch(t){h.trigger(g.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+e.sessionId+") "+t.message})}}function b(e,t){if(t&&e){for(var n=e.length,r=0;r<n;r++)if(e[r].sessionId==t)return e[r];return null}return null}function S(){r.removeEventListener(y.keyerror,c),r.removeEventListener(y.needkey,c),r.removeEventListener(y.keymessage,c),r.removeEventListener(y.keyadded,c)}return t={getAllInitData:function(){for(var e=[],t=0;t<s.length;t++)e.push(s[t].initData);for(var n=0;n<l.length;n++)e.push(l[n].initData);return e},getSessions:function(){return d(l).call(l,s)},requestKeySystemAccess:function(e){return new F((function(t,n){var i=r;i||(i=document.createElement("video"));for(var s=!1,l=0;l<e.length;l++)for(var u=e[l].ks.systemString,c=e[l].configs,f=null,d=0;d<c.length;d++){var p=c[d].videoCapabilities;if(p&&0!==p.length){f=[];for(var m=0;m<p.length;m++)""!==i.canPlayType(p[m].contentType,u)&&f.push(p[m])}if(f&&(!f||0!==f.length)){s=!0;var v=new o(null,f),y=a.getKeySystemBySystemString(u),E=new Oe(y,v);h.trigger(g.KEY_SYSTEM_ACCESS_COMPLETE,{data:E}),t({data:E});break}}if(!s){var _="Key system access denied! -- No valid audio/video content configurations detected!";h.trigger(g.KEY_SYSTEM_ACCESS_COMPLETE,{error:_}),n({error:_})}}))},selectKeySystem:function(e){return i=e.keySystem,F.resolve(i)},setMediaElement:function(e){if(r!==e){if(r){S();for(var t=0;t<l.length;t++)T(l[t]);l=[]}(r=e)&&(r.addEventListener(y.keyerror,c),r.addEventListener(y.needkey,c),r.addEventListener(y.keymessage,c),r.addEventListener(y.keyadded,c),h.trigger(g.VIDEO_ELEMENT_SELECTED))}},createKeySession:function(e){if(!i)throw new Error("Can not create sessions until you have selected a key system");if(u||0===l.length){var t={sessionId:null,keyId:e.keyId,initData:e.initData,getKeyId:function(){return this.keyId},getSessionId:function(){return this.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"}};return s.push(t),r[y.generateKeyRequest](i.systemString,new Uint8Array(e.initData)),t}throw new Error("Multiple sessions not allowed!")},updateKeySession:function(e,t){var n=e.sessionId;if(a.isClearKey(i))for(var o=0;o<t.keyPairs.length;o++)r[y.addKey](i.systemString,t.keyPairs[o].key,t.keyPairs[o].keyID,n);else r[y.addKey](i.systemString,new Uint8Array(t),new Uint8Array(e.initData),n);h.trigger(g.KEY_SESSION_UPDATED)},closeKeySession:T,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:_,reset:_},n=v.getLogger(t),r=null,i=null,s=[],l=[],a=Ie(f).getInstance(),c={handleEvent:function(e){var t=null;switch(e.type){case y.needkey:var r=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;h.trigger(g.NEED_KEY,{key:new Me(r,"cenc")});break;case y.keyerror:if((t=b(l,e.sessionId))||(t=b(s,e.sessionId)),t){var i=p.MEDIA_KEYERR_CODE,a="";switch(e.errorCode.code){case 1:i=p.MEDIA_KEYERR_UNKNOWN_CODE,a+="MEDIA_KEYERR_UNKNOWN - "+p.MEDIA_KEYERR_UNKNOWN_MESSAGE;break;case 2:i=p.MEDIA_KEYERR_CLIENT_CODE,a+="MEDIA_KEYERR_CLIENT - "+p.MEDIA_KEYERR_CLIENT_MESSAGE;break;case 3:i=p.MEDIA_KEYERR_SERVICE_CODE,a+="MEDIA_KEYERR_SERVICE - "+p.MEDIA_KEYERR_SERVICE_MESSAGE;break;case 4:i=p.MEDIA_KEYERR_OUTPUT_CODE,a+="MEDIA_KEYERR_OUTPUT - "+p.MEDIA_KEYERR_OUTPUT_MESSAGE;break;case 5:i=p.MEDIA_KEYERR_HARDWARECHANGE_CODE,a+="MEDIA_KEYERR_HARDWARECHANGE - "+p.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE;break;case 6:i=p.MEDIA_KEYERR_DOMAIN_CODE,a+="MEDIA_KEYERR_DOMAIN - "+p.MEDIA_KEYERR_DOMAIN_MESSAGE}a+=" System Code = "+e.systemCode,h.trigger(g.KEY_ERROR,{error:new m.Z(i,a,t)})}else n.error("No session token found for key error");break;case y.keyadded:(t=b(l,e.sessionId))||(t=b(s,e.sessionId)),t?(n.debug("DRM: Key added."),h.trigger(g.KEY_ADDED,{data:t})):n.debug("No session token found for key added");break;case y.keymessage:if((u=null!==e.sessionId&&void 0!==e.sessionId)?!(t=b(l,e.sessionId))&&s.length>0&&(t=s.shift(),l.push(t),t.sessionId=e.sessionId,h.trigger(g.KEY_SESSION_CREATED,{data:t})):s.length>0&&(t=s.shift(),l.push(t),0!==s.length&&E.error(new m.Z(p.MEDIA_KEY_MESSAGE_ERROR_CODE,p.MEDIA_KEY_MESSAGE_ERROR_MESSAGE))),t){var o=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;t.keyMessage=o,h.trigger(g.INTERNAL_KEY_MESSAGE,{data:new Le(t,o,e.defaultURL)})}else n.warn("No session token found for key message")}}},t}Ze.__dashjs_factory_name="ProtectionModel_01b";var Be=dashjs.FactoryMaker.getClassFactory(Ze),Ge=[{generateKeyRequest:"generateKeyRequest",addKey:"addKey",cancelKeyRequest:"cancelKeyRequest",needkey:"needkey",keyerror:"keyerror",keyadded:"keyadded",keymessage:"keymessage"},{generateKeyRequest:"webkitGenerateKeyRequest",addKey:"webkitAddKey",cancelKeyRequest:"webkitCancelKeyRequest",needkey:"webkitneedkey",keyerror:"webkitkeyerror",keyadded:"webkitkeyadded",keymessage:"webkitkeymessage"}],qe=[{setMediaKeys:"setMediaKeys",MediaKeys:"MediaKeys",release:"close",needkey:"needkey",error:"keyerror",message:"keymessage",ready:"keyadded",close:"keyclose"},{setMediaKeys:"msSetMediaKeys",MediaKeys:"MSMediaKeys",release:"close",needkey:"msneedkey",error:"mskeyerror",message:"mskeymessage",ready:"mskeyadded",close:"mskeyclose"}];function Ye(){var e,t=this.context;function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("function"==typeof e[r[z(r)[0]]])return r}return null}return e={createProtectionSystem:function(r){var i=null,a=Ie(t).getInstance();a.setConfig({debug:r.debug,BASE64:r.BASE64,settings:r.settings}),a.initialize();var o=function(r){var i=r.debug,a=i.getLogger(e),o=r.eventBus,s=r.errHandler,l=r.videoModel?r.videoModel.getElement():null;return l&&void 0===l.onencrypted||l&&void 0===l.mediaKeys?n(l,qe)?(a.info("EME detected on this user agent! (ProtectionModel_3Feb2014)"),Ue(t).create({debug:i,eventBus:o,events:r.events,api:n(l,qe)})):n(l,Ge)?(a.info("EME detected on this user agent! (ProtectionModel_01b)"),Be(t).create({debug:i,eventBus:o,errHandler:s,events:r.events,api:n(l,Ge)})):(a.warn("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null):(a.info("EME detected on this user agent! (ProtectionModel_21Jan2015)"),xe(t).create({debug:i,eventBus:o,events:r.events}))}(r);return!i&&o&&(i=q(t).create({protectionModel:o,protectionKeyController:a,eventBus:r.eventBus,debug:r.debug,events:r.events,BASE64:r.BASE64,constants:r.constants,cmcdModel:r.cmcdModel,customParametersModel:r.customParametersModel,settings:r.settings}),r.capabilities.setEncryptedMediaSupported(!0)),i}}}Ye.__dashjs_factory_name="Protection";var je=dashjs.FactoryMaker.getClassFactory(Ye);je.events=De,je.errors=p,dashjs.FactoryMaker.updateClassFactory(Ye.__dashjs_factory_name,je);var He=je},2068:function(e,t,n){var r=n(5448),i={DEFAULT:.5,STRONG:1,WEAK:0};function a(e,t,n){var r,a;return r=void 0===e?-1:e,a=function(e){var t=i.DEFAULT;return e!==i.DEFAULT&&e!==i.STRONG&&e!==i.WEAK||(t=e),t}(n),{quality:r,reason:void 0===t?null:t,priority:a}}a.__dashjs_factory_name="SwitchRequest";var o=r.Z.getClassFactory(a);o.NO_CHANGE=-1,o.PRIORITY=i,r.Z.updateClassFactory(a.__dashjs_factory_name,o),t.Z=o},1767:function(e,t,n){var r=n(5628),i=n(6535),a=n(7423),o=n(895),s=n(6070),l=n(3112),u=n(1914),c=n(5435),f=n(5448),d=n(2068),h=n(3393),g="qualitySwitchRules",p="abandonFragmentRules";function m(e){e=e||{};var t,n,f=this.context,m=e.mediaPlayerModel,v=e.customParametersModel,y=e.dashMetrics,E=e.settings;function _(e){return w(e).call(e,(function(e){return e.quality>d.Z.NO_CHANGE}))}function T(e){var t,n,r,i,a,o={},s=null;if(0!==e.length){for(o[d.Z.PRIORITY.STRONG]={quality:d.Z.NO_CHANGE,reason:null},o[d.Z.PRIORITY.WEAK]={quality:d.Z.NO_CHANGE,reason:null},o[d.Z.PRIORITY.DEFAULT]={quality:d.Z.NO_CHANGE,reason:null},t=0,n=e.length;t<n;t+=1)(r=e[t]).quality!==d.Z.NO_CHANGE&&(o[r.priority].quality===d.Z.NO_CHANGE||o[r.priority].quality>r.quality)&&(o[r.priority].quality=r.quality,o[r.priority].reason=r.reason||null);return o[d.Z.PRIORITY.WEAK].quality!==d.Z.NO_CHANGE&&(s=o[d.Z.PRIORITY.WEAK]),o[d.Z.PRIORITY.DEFAULT].quality!==d.Z.NO_CHANGE&&(s=o[d.Z.PRIORITY.DEFAULT]),o[d.Z.PRIORITY.STRONG].quality!==d.Z.NO_CHANGE&&(s=o[d.Z.PRIORITY.STRONG]),s&&(i=s.quality,a=s.reason),(0,d.Z)(f).create(i,a)}}return{initialize:function(){var e;t=[],n=[],E.get().streaming.abr.useDefaultABRRules&&(E.get().streaming.abr.ABRStrategy===h.Z.ABR_STRATEGY_L2A?t.push((0,u.Z)(f).create({dashMetrics:y,settings:E})):E.get().streaming.abr.ABRStrategy===h.Z.ABR_STRATEGY_LoLP?t.push((0,c.Z)(f).create({dashMetrics:y})):(t.push((0,l.Z)(f).create({dashMetrics:y,mediaPlayerModel:m,settings:E})),t.push((0,r.Z)(f).create({dashMetrics:y})),E.get().streaming.abr.additionalAbrRules.insufficientBufferRule&&t.push((0,i.Z)(f).create({dashMetrics:y,settings:E})),E.get().streaming.abr.additionalAbrRules.switchHistoryRule&&t.push((0,s.Z)(f).create()),E.get().streaming.abr.additionalAbrRules.droppedFramesRule&&t.push((0,o.Z)(f).create()),E.get().streaming.abr.additionalAbrRules.abandonRequestsRule&&n.push((0,a.Z)(f).create({dashMetrics:y,mediaPlayerModel:m,settings:E})))),I(e=v.getAbrCustomRules()).call(e,(function(e){e.type===g&&t.push(e.rule(f).create()),e.type===p&&n.push(e.rule(f).create())}))},reset:function(){var e;I(e=[t,n]).call(e,(function(e){e&&e.length&&I(e).call(e,(function(e){return e.reset&&e.reset()}))})),t=[],n=[]},getMaxQuality:function(e){return T(_(ee(t).call(t,(function(t){return t.getMaxIndex(e)}))))||(0,d.Z)(f).create()},getMinSwitchRequest:T,shouldAbandonFragment:function(e,t){var r=T(_(ee(n).call(n,(function(n){return n.shouldAbandon(e,t)}))));return r&&(r.reason.forceAbandon=!0),r||(0,d.Z)(f).create()},getQualitySwitchRules:function(){return t}}}m.__dashjs_factory_name="ABRRulesCollection";var v=f.Z.getClassFactory(m);v.QUALITY_SWITCH_RULES=g,v.ABANDON_FRAGMENT_RULES=p,f.Z.updateSingletonFactory(m.__dashjs_factory_name,v),t.Z=v},7423:function(e,t,n){var r=n(2068),i=n(5448),a=n(6398);function o(e){e=e||{};var t,n,i,s,l,u=this.context,c=e.mediaPlayerModel,f=e.dashMetrics,d=e.settings;function h(){i={},s={},l=[]}return t={shouldAbandon:function(e){var t=(0,r.Z)(u).create(r.Z.NO_CHANGE,{name:o.__dashjs_factory_name});if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getCurrentRequest")&&e.hasOwnProperty("getRepresentationInfo")&&e.hasOwnProperty("getAbrController")))return t;var a,h,g=e.getMediaInfo(),p=e.getMediaType(),m=e.getStreamInfo(),v=m?m.id:null,y=e.getCurrentRequest();if(!isNaN(y.index)){a=p,h=y.index,i[a]=i[a]||{},i[a][h]=i[a][h]||{};var E=c.getStableBufferTime();if(f.getCurrentBufferLevel(p)>E)return t;var _=i[p][y.index];if(null===_||null===y.firstByteDate||s.hasOwnProperty(_.id))return t;if(void 0===_.firstByteTime&&(l[p]=[],_.firstByteTime=y.firstByteDate.getTime(),_.segmentDuration=y.duration,_.bytesTotal=y.bytesTotal,_.id=y.index),_.bytesLoaded=y.bytesLoaded,_.elapsedTime=(new Date).getTime()-_.firstByteTime,_.bytesLoaded>0&&_.elapsedTime>0&&function(e,t){l[e]=l[e]||[],l[e].push(t)}(p,Math.round(8*_.bytesLoaded/_.elapsedTime)),l[p].length>=d.get().streaming.abr.abrRulesParameters.abandonRequestsRule.minLengthToAverage&&_.elapsedTime>d.get().streaming.abr.abrRulesParameters.abandonRequestsRule.graceTimeThreshold&&_.bytesLoaded<_.bytesTotal){var T,b=K(T=l[p]).call(T,(function(e,t){return e+t}),0);if(_.measuredBandwidthInKbps=Math.round(b/l[p].length),_.estimatedTimeOfDownload=+(8*_.bytesTotal/_.measuredBandwidthInKbps/1e3).toFixed(2),_.estimatedTimeOfDownload<_.segmentDuration*d.get().streaming.abr.abrRulesParameters.abandonRequestsRule.abandonMultiplier||0===e.getRepresentationInfo().quality)return t;if(!s.hasOwnProperty(_.id)){var S=e.getAbrController(),A=_.bytesTotal-_.bytesLoaded,I=S.getBitrateList(g),R=S.getQualityForBitrate(g,_.measuredBandwidthInKbps*d.get().streaming.abr.bandwidthSafetyFactor,v),w=S.getMinAllowedIndexFor(p,v),N=void 0!==w?Math.max(w,R):R;A>_.bytesTotal*I[N].bitrate/I[S.getQualityFor(p,v)].bitrate&&(t.quality=N,t.reason.throughput=_.measuredBandwidthInKbps,t.reason.fragmentID=_.id,t.reason.rule=this.getClassName(),s[_.id]=_,n.debug("["+p+"] frag id",_.id," is asking to abandon and switch to quality to ",N," measured bandwidth was",_.measuredBandwidthInKbps),delete i[p][_.id])}}else _.bytesLoaded===_.bytesTotal&&delete i[p][_.id]}return t},reset:h},n=(0,a.Z)(u).getInstance().getLogger(t),h(),t}o.__dashjs_factory_name="AbandonRequestsRule",t.Z=i.Z.getClassFactory(o)},3112:function(e,t,n){var r=n(3860),i=n(2068),a=n(5448),o=n(7855),s=n(5595),l=n(8512),u=n(6398),c=n(8825),f=n(3393),d=10;function h(e){e=e||{};var t,n,a,h=this.context,g=e.dashMetrics,p=e.mediaPlayerModel,m=(0,s.Z)(h).getInstance();function v(e,t,n){var r=K(n).call(n,(function(e,t,r){return t>n[e]?r:e}),0);if(0===r)return null;var i=Math.max(e,d+2*t.length),a=(n[r]-1)/(i/d-1);return{gp:a,Vp:d/a}}function y(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN}function E(e,t){var n=p.getStableBufferTime();if(e.stableBufferTime!==n){var r=v(n,e.bitrates,e.utilities);if(r.Vp!==e.Vp||r.gp!==e.gp){var i=g.getCurrentBufferLevel(t),a=i+e.placeholderBuffer;a-=d,a*=r.Vp/e.Vp,a+=d,e.stableBufferTime=n,e.Vp=r.Vp,e.gp=r.gp,e.placeholderBuffer=Math.max(0,a-i)}}}function _(e,t){return e.Vp*(e.utilities[t]+e.gp)}function T(e,t){for(var n=e.bitrates[t],r=e.utilities[t],i=0,a=t-1;a>=0;--a)if(e.utilities[a]<e.utilities[t]){var o=e.bitrates[a],s=e.utilities[a],l=e.Vp*(e.gp+(n*s-o*r)/(n-o));i=Math.max(i,l)}return i}function b(e){var t=e.mediaType===f.Z.AUDIO?[f.Z.AUDIO]:a;for(var n in t)a.hasOwnProperty(n)&&2===a[n].state&&(a[n].placeholderBuffer=0)}function S(){for(var e in a)if(a.hasOwnProperty(e)){var t=a[e];0!==t.state&&(t.state=1,y(t))}}function A(e){if(e&&e.chunk&&e.chunk.mediaInfo){var t=a[e.chunk.mediaInfo.type];if(t&&0!==t.state){var n=e.chunk.start;isNaN(t.mostAdvancedSegmentStart)||n>t.mostAdvancedSegmentStart?(t.mostAdvancedSegmentStart=n,t.lastSegmentWasReplacement=!1):t.lastSegmentWasReplacement=!0,t.lastSegmentStart=n,t.lastSegmentDurationS=e.chunk.duration,t.lastQuality=e.chunk.quality,R(t,e.chunk.mediaInfo.type)}}}function I(e){if(e&&e.metric===r.Z.HTTP_REQUEST&&e.value&&e.value.type===o.w.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var t=a[e.mediaType];t&&0!==t.state&&(t.lastSegmentRequestTimeMs=e.value.trequest.getTime(),t.lastSegmentFinishTimeMs=e.value._tfinish.getTime(),R(t,e.mediaType))}}function R(e,t){if(!isNaN(e.lastSegmentStart)&&!isNaN(e.lastSegmentRequestTimeMs)&&!isNaN(e.placeholderBuffer)){if(e.placeholderBuffer*=.99,!isNaN(e.lastSegmentFinishTimeMs)){var n=g.getCurrentBufferLevel(t)+.001*(e.lastSegmentFinishTimeMs-e.lastSegmentRequestTimeMs),r=_(e,e.lastQuality),i=Math.max(0,r-n);e.placeholderBuffer=Math.min(i,e.placeholderBuffer)}e.lastSegmentWasReplacement&&!isNaN(e.lastSegmentDurationS)&&(e.placeholderBuffer+=e.lastSegmentDurationS),e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN}}function w(e){if(e){var t=a[e.mediaType];t&&0!==t.state&&(t.abrQuality=e.newQuality)}}function N(e){if(e){var t=a[e.mediaType];if(t&&0!==t.state){var n,r=g.getCurrentBufferLevel(e.mediaType);n=t.abrQuality>0?T(t,t.abrQuality):d;var i=Math.max(0,n-r);t.placeholderBuffer=Math.min(t.placeholderBuffer,i)}}}function C(){a={}}return t={getMaxIndex:function(e){var t=(0,i.Z)(h).create();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getScheduleController")&&e.hasOwnProperty("getStreamInfo")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("useBufferOccupancyABR")))return t;var r=e.getMediaInfo(),o=e.getMediaType(),s=e.getScheduleController(),l=e.getStreamInfo(),u=e.getAbrController(),c=u.getThroughputHistory(),f=l?l.id:null,d=l&&l.manifestInfo&&l.manifestInfo.isDynamic,m=e.useBufferOccupancyABR();if(t.reason=t.reason||{},!m)return t;s.setTimeToLoadDelay(0);var b=function(e){var t=e.getMediaType(),n=a[t];return n?0!==n.state&&E(n,t):(n=function(e,t){var n={},r=ee(t=e.getMediaInfo().bitrateList).call(t,(function(e){return e.bandwidth})),i=function(e){return ee(e).call(e,(function(e){return Math.log(e)}))}(r);i=ee(i).call(i,(function(e){return e-i[0]+1}));var a=p.getStableBufferTime(),o=v(a,r,i);return o?(n.state=1,n.bitrates=r,n.utilities=i,n.stableBufferTime=a,n.Vp=o.Vp,n.gp=o.gp,n.lastQuality=0,y(n)):n.state=0,n}(e),a[t]=n),n}(e);if(0===b.state)return t;var S,A=g.getCurrentBufferLevel(o),I=c.getAverageThroughput(o,d),R=c.getSafeAverageThroughput(o,d),w=c.getAverageLatency(o);if(t.reason.state=b.state,t.reason.throughput=I,t.reason.latency=w,isNaN(I))return t;switch(b.state){case 1:S=u.getQualityForBitrate(r,R,f,w),t.quality=S,t.reason.throughput=R,b.placeholderBuffer=Math.max(0,T(b,S)-A),b.lastQuality=S,!isNaN(b.lastSegmentDurationS)&&A>=b.lastSegmentDurationS&&(b.state=2);break;case 2:!function(e,t){var n=U();if(isNaN(e.lastSegmentFinishTimeMs)){if(!isNaN(e.lastCallTimeMs)){var r=.001*(n-e.lastCallTimeMs);e.placeholderBuffer+=Math.max(0,r)}}else{var i=.001*(n-e.lastSegmentFinishTimeMs);e.placeholderBuffer+=Math.max(0,i)}e.lastCallTimeMs=n,e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN,E(e,t)}(b,o),S=function(e,t){for(var n=e.bitrates.length,r=NaN,i=NaN,a=0;a<n;++a){var o=(e.Vp*(e.utilities[a]+e.gp)-t)/e.bitrates[a];(isNaN(i)||o>=i)&&(i=o,r=a)}return r}(b,A+b.placeholderBuffer);var N=u.getQualityForBitrate(r,R,f,w);S>b.lastQuality&&S>N&&(S=Math.max(N,b.lastQuality));var C=Math.max(0,A+b.placeholderBuffer-_(b,S));C<=b.placeholderBuffer?(b.placeholderBuffer-=C,C=0):(C-=b.placeholderBuffer,b.placeholderBuffer=0,S<u.getMaxAllowedIndexFor(o,f)?s.setTimeToLoadDelay(1e3*C):C=0),t.quality=S,t.reason.throughput=I,t.reason.latency=w,t.reason.bufferLevel=A,t.reason.placeholderBuffer=b.placeholderBuffer,t.reason.delay=C,b.lastQuality=S;break;default:n.debug("BOLA ABR rule invoked in bad state."),t.quality=u.getQualityForBitrate(r,R,f,w),t.reason.state=b.state,t.reason.throughput=R,t.reason.latency=w,b.state=1,y(b)}return t},reset:function(){C(),m.off(c.Z.BUFFER_EMPTY,b,t),m.off(c.Z.PLAYBACK_SEEKING,S,t),m.off(c.Z.METRIC_ADDED,I,t),m.off(c.Z.QUALITY_CHANGE_REQUESTED,w,t),m.off(c.Z.FRAGMENT_LOADING_ABANDONED,N,t),m.off(l.Z.MEDIA_FRAGMENT_LOADED,A,t)}},n=(0,u.Z)(h).getInstance().getLogger(t),C(),m.on(c.Z.BUFFER_EMPTY,b,t),m.on(c.Z.PLAYBACK_SEEKING,S,t),m.on(c.Z.METRIC_ADDED,I,t),m.on(c.Z.QUALITY_CHANGE_REQUESTED,w,t),m.on(c.Z.FRAGMENT_LOADING_ABANDONED,N,t),m.on(l.Z.MEDIA_FRAGMENT_LOADED,A,t),t}h.__dashjs_factory_name="BolaRule",t.Z=a.Z.getClassFactory(h)},895:function(e,t,n){var r=n(5448),i=n(2068),a=n(6398);function o(){var e,t,n=this.context;return e={getMaxIndex:function(e){var r=(0,i.Z)(n).create();if(!e||!e.hasOwnProperty("getDroppedFramesHistory"))return r;var a=e.getDroppedFramesHistory(),o=e.getStreamInfo().id;if(a){var s=a.getFrameHistory(o);if(!s||0===s.length)return r;for(var l=0,u=0,c=i.Z.NO_CHANGE,f=1;f<s.length;f++)if(s[f]&&(l=s[f].droppedVideoFrames,(u=s[f].totalVideoFrames)>375&&l/u>.15)){c=f-1,t.debug("index: "+c+" Dropped Frames: "+l+" Total Frames: "+u);break}return(0,i.Z)(n).create(c,{droppedFrames:l})}return r}},t=(0,a.Z)(n).getInstance().getLogger(e),e}o.__dashjs_factory_name="DroppedFramesRule",t.Z=r.Z.getClassFactory(o)},6535:function(e,t,n){var r=n(5595),i=n(8512),a=n(5448),o=n(6398),s=n(2068),l=n(3393),u=n(3860),c=n(8825);function f(e){e=e||{};var t,n,a,f=this.context,d=(0,r.Z)(f).getInstance(),h=e.dashMetrics;function g(){(a={})[l.Z.VIDEO]={ignoreCount:2},a[l.Z.AUDIO]={ignoreCount:2}}function p(){g()}function m(e){isNaN(e.startTime)||e.mediaType!==l.Z.AUDIO&&e.mediaType!==l.Z.VIDEO||a[e.mediaType].ignoreCount>0&&a[e.mediaType].ignoreCount--}return t={getMaxIndex:function(e){var t=(0,s.Z)(f).create();if(!e||!e.hasOwnProperty("getMediaType"))return t;!function(){if(!h||!h.hasOwnProperty("getCurrentBufferLevel")||!h.hasOwnProperty("getCurrentBufferState"))throw new Error(l.Z.MISSING_CONFIG_ERROR)}();var r=e.getMediaType(),i=h.getCurrentBufferState(r),o=e.getRepresentationInfo().fragmentDuration,c=e.getStreamInfo(),d=c?c.id:null,g=e.getScheduleController(),p=c&&c.manifestInfo&&c.manifestInfo.isDynamic;if(function(e,t){return!e&&a[t].ignoreCount>0}(g.getPlaybackController().getLowLatencyModeEnabled(),r)||!o)return t;if(i&&i.state===u.Z.BUFFER_EMPTY)n.debug("["+r+"] Switch to index 0; buffer is empty."),t.quality=0,t.reason="InsufficientBufferRule: Buffer is empty";else{var m=e.getMediaInfo(),v=e.getAbrController(),y=v.getThroughputHistory(),E=h.getCurrentBufferLevel(r),_=y.getAverageThroughput(r,p),T=y.getAverageLatency(r),b=_*(E/o)*.5;t.quality=v.getQualityForBitrate(m,b,d,T),t.reason="InsufficientBufferRule: being conservative to avoid immediate rebuffering"}return t},reset:function(){g(),d.off(c.Z.PLAYBACK_SEEKING,p,t),d.off(i.Z.BYTES_APPENDED_END_FRAGMENT,m,t)}},n=(0,o.Z)(f).getInstance().getLogger(t),g(),d.on(c.Z.PLAYBACK_SEEKING,p,t),d.on(i.Z.BYTES_APPENDED_END_FRAGMENT,m,t),t}f.__dashjs_factory_name="InsufficientBufferRule",t.Z=a.Z.getClassFactory(f)},1914:function(e,t,n){var r=n(3860),i=n(2068),a=n(5448),o=n(7855),s=n(5595),l=n(8512),u=n(6398),c=n(3393);function f(e){e=e||{};var t,n,a,f,d=this.context,h=e.dashMetrics,g=(0,s.Z)(d).getInstance();function p(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN,e.lastSegmentUrl=""}function m(){for(var e in n)if(n.hasOwnProperty(e)){var t=n[e];0!==t.state&&(t.state=1,p(t))}}function v(e){if(e&&e.chunk&&e.chunk.mediaInfo){var t=n[e.chunk.mediaInfo.type],r=a[e.chunk.mediaInfo.type];if(t&&0!==t.state){var i=e.chunk.start;isNaN(t.mostAdvancedSegmentStart)||i>t.mostAdvancedSegmentStart?(t.mostAdvancedSegmentStart=i,t.lastSegmentWasReplacement=!1):t.lastSegmentWasReplacement=!0,t.lastSegmentStart=i,t.lastSegmentDurationS=e.chunk.duration,t.lastQuality=e.chunk.quality,_(t,r)}}}function E(e){if(e&&e.metric===r.Z.HTTP_REQUEST&&e.value&&e.value.type===o.w.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var t=n[e.mediaType],i=a[e.mediaType];t&&0!==t.state&&(t.lastSegmentRequestTimeMs=e.value.trequest.getTime(),t.lastSegmentFinishTimeMs=e.value._tfinish.getTime(),_(t,i))}}function _(e,t){isNaN(e.lastSegmentStart)||isNaN(e.lastSegmentRequestTimeMs)||(t.segment_request_start_s=.001*e.lastSegmentRequestTimeMs,t.segment_download_finish_s=.001*e.lastSegmentFinishTimeMs,e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN)}function T(e){if(e&&e.mediaType){var t=n[e.mediaType];t&&0!==t.state&&(t.abrQuality=e.newQuality)}}function b(e,t){if(e.length!==t.length)return-1;for(var n=0,r=0;r<e.length;r++)n+=e[r]*t[r];return n}function S(){n={},a={}}return t={getMaxIndex:function(e){var t,r,s,l,u=(0,i.Z)(d).create(),g=Math.pow(4,.99),m=Math.max(Math.pow(4,1),g*Math.sqrt(4)),v=e.getMediaInfo(),E=e.getMediaType(),_=ee(t=v.bitrateList).call(t,(function(e){return e.bandwidth})),T=_.length,S=e.getScheduleController(),A=e.getStreamInfo(),I=e.getAbrController(),R=I.getThroughputHistory(),w=A&&A.manifestInfo&&A.manifestInfo.isDynamic,N=e.useL2AABR(),C=h.getCurrentBufferLevel(E,!0),D=R.getSafeAverageThroughput(E,w),M=R.getAverageThroughput(E,w),L=R.getAverageLatency(E),O=e.getVideoModel().getPlaybackRate();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getScheduleController")&&e.hasOwnProperty("getStreamInfo")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("useL2AABR")))return u;if(u.reason=u.reason||{},!N||E===c.Z.AUDIO)return u;S.setTimeToLoadDelay(0);var P=function(e){var t=e.getMediaType(),r=n[t];return r||(r=function(e,t){var n={},r=e.getMediaInfo(),i=ee(t=r.bitrateList).call(t,(function(e){return e.bandwidth/1e3}));return n.state=1,n.bitrates=i,n.lastQuality=0,function(e){e&&e.type&&(a[e.type]={},a[e.type].w=[],a[e.type].prev_w=[],a[e.type].Q=0,a[e.type].segment_request_start_s=0,a[e.type].segment_download_finish_s=0,a[e.type].B_target=1.5)}(r),p(n),n}(e),n[t]=r),r}(e);if(0===P.state)return u;var F=a[E];if(!F)return u;if(u.reason.state=P.state,u.reason.throughput=M,u.reason.latency=L,isNaN(M))return u;switch(P.state){case 1:if(l=I.getQualityForBitrate(v,D,A.id,L),u.quality=l,u.reason.throughput=D,P.lastQuality=l,!isNaN(P.lastSegmentDurationS)&&C>=F.B_target){P.state=2,F.Q=g;for(var x=0;x<T;++x)x===P.lastQuality?F.prev_w[x]=1:F.prev_w[x]=0}break;case 2:var k=[],U=K(r=h.getCurrentHttpRequest(E).trace).call(r,(function(e,t){return e+t.d}),0),B=K(s=h.getCurrentHttpRequest(E).trace).call(s,(function(e,t){return e+t.b[0]}),0),G=Math.round(8*B/U),q=h.getCurrentHttpRequest(E);if(G<1&&(G=1),q.url===P.lastSegmentUrl||q.type===o.w.INIT_SEGMENT_TYPE)l=P.lastQuality;else{for(var Y=P.lastSegmentDurationS,j=1,H=0;H<T;++H)_[H]=_[H]/1e3,O*_[H]>G&&(j=-1),F.w[H]=F.prev_w[H]+j*(Y/(2*m))*((F.Q+g)*(O*_[H]/G));F.w=function(e){for(var t=e.length,n=!1,r=[],i=0;i<t;++i)r[i]=e[i];for(var a=Z(e).call(e,(function(e,t){return t-e})),o=0,s=0,l=[],u=0;u<t-1;++u)if((s=((o+=a[u])-1)/(u+1))>=a[u+1]){n=!0;break}n||(s=(o+a[t-1]-1)/t);for(var c=0;c<t;++c)l[c]=Math.max(r[c]-s,0);return l}(F.w);for(var V=0;V<T;++V)k[V]=F.w[V]-F.prev_w[V],F.prev_w[V]=F.w[V];F.Q=Math.max(0,F.Q-Y+Y*O*((b(_,F.prev_w)+b(_,k))/G));for(var z=[],W=0;W<T;++W)z[W]=Math.abs(_[W]-b(F.w,_));(l=y(z).call(z,Math.min.apply(Math,z)))>P.lastQuality&&_[P.lastQuality+1]<=G&&(l=P.lastQuality+1),_[l]>=G&&(F.Q=2*Math.max(g,F.Q)),P.lastSegmentUrl=q.url}u.quality=l,u.reason.throughput=M,u.reason.latency=L,u.reason.bufferLevel=C,P.lastQuality=u.quality;break;default:f.debug("L2A ABR rule invoked in bad state."),u.quality=I.getQualityForBitrate(v,D,A.id,L),u.reason.state=P.state,u.reason.throughput=D,u.reason.latency=L,P.state=1,p(P)}return u},reset:function(){S(),g.off(l.Z.PLAYBACK_SEEKING,m,t),g.off(l.Z.MEDIA_FRAGMENT_LOADED,v,t),g.off(l.Z.METRIC_ADDED,E,t),g.off(l.Z.QUALITY_CHANGE_REQUESTED,T,t)}},f=(0,u.Z)(d).getInstance().getLogger(t),S(),g.on(l.Z.PLAYBACK_SEEKING,m,t),g.on(l.Z.MEDIA_FRAGMENT_LOADED,v,t),g.on(l.Z.METRIC_ADDED,E,t),g.on(l.Z.QUALITY_CHANGE_REQUESTED,T,t),t}f.__dashjs_factory_name="L2ARule",t.Z=a.Z.getClassFactory(f)},6070:function(e,t,n){var r=n(5448),i=n(6398),a=n(2068);function o(){var e,t,n=this.context;return e={getMaxIndex:function(e){for(var r=e?e.getSwitchHistory():null,i=r?r.getSwitchRequests():[],o=0,s=0,l=0,u=(0,a.Z)(n).create(),c=0;c<i.length;c++)if(void 0!==i[c]&&(o+=i[c].drops,s+=i[c].noDrops,l+=i[c].dropSize,o+s>=6&&o/s>.075)){u.quality=c>0&&i[c].drops>0?c-1:c,u.reason={index:u.quality,drops:o,noDrops:s,dropSize:l},t.debug("Switch history rule index: "+u.quality+" samples: "+(o+s)+" drops: "+o);break}return u}},t=(0,i.Z)(n).getInstance().getLogger(e),e}o.__dashjs_factory_name="SwitchHistoryRule",t.Z=r.Z.getClassFactory(o)},5628:function(e,t,n){var r=n(5448),i=n(2068),a=n(3393),o=n(3860);function s(e){e=e||{};var t=this.context,n=e.dashMetrics;return{getMaxIndex:function(e){var r=(0,i.Z)(t).create();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("useBufferOccupancyABR")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("getScheduleController")))return r;!function(){if(!n||!n.hasOwnProperty("getCurrentBufferState"))throw new Error(a.Z.MISSING_CONFIG_ERROR)}();var s=e.getMediaInfo(),l=e.getMediaType(),u=n.getCurrentBufferState(l),c=e.getScheduleController(),f=e.getAbrController(),d=e.getStreamInfo(),h=d?d.id:null,g=d&&d.manifestInfo?d.manifestInfo.isDynamic:null,p=f.getThroughputHistory(),m=p.getSafeAverageThroughput(l,g),v=p.getAverageLatency(l),y=e.useBufferOccupancyABR();return isNaN(m)||!u||y||f.getAbandonmentStateFor(h,l)!==o.Z.ABANDON_LOAD&&(u.state===o.Z.BUFFER_LOADED||g)&&(r.quality=f.getQualityForBitrate(s,m,h,v),c.setTimeToLoadDelay(0),r.reason={throughput:m,latency:v}),r},reset:function(){}}}s.__dashjs_factory_name="ThroughputRule",t.Z=r.Z.getClassFactory(s)},4722:function(e,t,n){var r=n(5448),i=n(6398);function a(){var e,t,n,r,a,o,s,l,u,c=this.context;function f(){n=null,r=1,a=100,o=0,s=null,l=null,u="dynamic_weight_selection"}function h(){var e=0;if(n)for(var t=0;t<n.length;t++){var r=n[t];r.state.throughput>e&&(e=r.state.throughput)}return e}function g(e,t,n){var r,i=K(r=ee(e).call(e,(function(e,r){return n[r]*Math.pow(e-t[r],2)}))).call(r,(function(e,t){return e+t}));return(i<0?-1:1)*Math.sqrt(Math.abs(i))}function p(e,t){return g([e.state.throughput,e.state.latency,e.state.rebuffer,e.state.switch],[t.state.throughput,t.state.latency,t.state.rebuffer,t.state.switch],[1,1,1,1])}function m(e,t,n){for(var r=0;r<t.length;r++){var i=t[r],a=p(i,e);y(i,n,Math.exp(-1*Math.pow(a,2)/(2*Math.pow(.1,2))))}}function y(e,t,n){var r=e.state,i=[.01,.01,.01,.01];r.throughput=r.throughput+(t[0]-r.throughput)*i[0]*n,r.latency=r.latency+(t[1]-r.latency)*i[1]*n,r.rebuffer=r.rebuffer+(t[2]-r.rebuffer)*i[2]*n,r.switch=r.switch+(t[3]-r.switch)*i[3]*n}return e={getNextQuality:function(e,i,c,f,p,y,E){var _,T,b,A,R,w,N,C=c,D=f,M=i,L=function(e){if(!n){var t;n=[];var i=e.bitrateList,a=[];o=i[0].bandwidth,I(i).call(i,(function(e){a.push(e.bandwidth),e.bandwidth<o&&(o=e.bandwidth)})),c=K(t=ee(a).call(a,(function(e){return Math.pow(e,2)}))).call(t,(function(e,t){return e+t})),r=Math.sqrt(c);for(var s=0;s<i.length;s++){var u={qualityIndex:s,bitrate:i[s].bandwidth,state:{throughput:i[s].bandwidth/r,latency:0,rebuffer:0,switch:0}};n.push(u)}l=function(e){var t=[],n=function(e){for(var t=[],n=0;n<e;n++){var r=[Math.random()*h(),Math.random(),Math.random(),Math.random()];t.push(r)}return t}(Math.pow(e.length,2));t.push(n[0]);for(var r=[1,1,1,1],i=1;i<e.length;i++){for(var a=null,o=null,s=0;s<n.length;s++){for(var l=n[s],u=null,c=0;c<t.length;c++){var f=g(l,t[c],r);(null===u||f<u)&&(u=f)}(null===o||u>o)&&(a=l,o=u)}t.push(a)}for(var d=null,p=null,m=0;m<t.length;m++){for(var v=0,y=0;y<t.length;y++)m!==y&&(v+=g(t[m],t[y],r));(null===d||v>d)&&(d=v,p=m)}var E=[];for(E.push(t[p]),S(t).call(t,p,1);t.length>0;){for(var _=null,T=null,b=0;b<t.length;b++){var A=g(E[0],t[b],r);(null===_||A<_)&&(_=A,T=b)}E.push(t[T]),S(t).call(t,T,1)}return E}(n)}var c;return n}(e),O=i/r;O>1&&(O=h()),c/=a,t.debug(d(_=d(T=d(b=d(A="getNextQuality called throughput:".concat(O," latency:")).call(A,c," bufferSize:")).call(b,f," currentQualityIndex:")).call(T,y," playbackRate:")).call(_,p));var P=L[y],F=P.bitrate*E.getSegmentDuration()/M,x=Math.max(0,F-D);if(D-F<E.getMinBuffer())return t.debug(d(R=d(w=d(N="Buffer is low for bitrate= ".concat(P.bitrate," downloadTime=")).call(N,F," currentBuffer=")).call(w,D," rebuffer=")).call(R,x)),function(e,t){var r=0,i=e;if(n)for(var a=0;a<n.length;a++){var o=n[a];o.bitrate<e.bitrate&&o.bitrate>r&&t>o.bitrate&&(r=o.bitrate,i=o)}return i}(P,M).qualityIndex;switch(u){case"manual_weight_selection":s=[.4,.4,.4,.4];break;case"random_weight_selection":!function(e){s=function(e,t){for(var n=[],r=Math.sqrt(2/e),i=0;i<4;i++)n.push(Math.random()*r);return s=n}(e.length)}(L);break;default:!function(e,t,n,r,i,a,o){s||(s=l[l.length-1]);var u=e.findWeightVector(t,n,r,i,a,o);null!==u&&-1!==u&&(s=u)}(E,L,C,D,x,M,p)}for(var k=null,U=null,Z=null,B=0;B<L.length;B++){var G,q,Y,j=L[B],H=j.state,V=[H.throughput,H.latency,H.rebuffer,H.switch],z=v(s).call(s),W=E.getNextBufferWithBitrate(j.bitrate,D,M),X=W<E.getMinBuffer();X&&t.debug(d(G=d(q=d(Y="Buffer is low for bitrate=".concat(j.bitrate," downloadTime=")).call(Y,F," currentBuffer=")).call(q,D," nextBuffer=")).call(G,W)),(j.bitrate>i-1e4||X)&&j.bitrate!==o&&(z[0]=100);var Q=g(V,[O,0,0,0],z);(null===k||Q<k)&&(k=Q,U=j.qualityIndex,Z=j)}var $=Math.abs(P.bitrate-Z.bitrate)/r;return m(P,L,[O,c,x,$]),m(Z,L,[O,0,0,$]),U},reset:function(){f()}},t=(0,i.Z)(c).getInstance().getLogger(e),f(),e}a.__dashjs_factory_name="LearningAbrController",t.Z=r.Z.getClassFactory(a)},5317:function(e,t,n){var r=n(5448),i=n(2298);function a(){var e,t,n,r,a;function o(){t=null,n=null,r=null,a=null}function s(e,t,n,r){var a=new i.Z;return a.type=e,a.weights.bitrateReward=t||1,a.weights.bitrateSwitchPenalty=1,a.weights.rebufferPenalty=n||1e3,a.weights.latencyPenalty=[],a.weights.latencyPenalty.push({threshold:1.1,penalty:.05*r}),a.weights.latencyPenalty.push({threshold:1e8,penalty:.1*n}),a.weights.playbackSpeedPenalty=r||200,a}function l(e,t,n,r,i){i.bitrateWSum+=i.weights.bitrateReward*e,i.lastBitrate&&(i.bitrateSwitchWSum+=i.weights.bitrateSwitchPenalty*Math.abs(e-i.lastBitrate)),i.lastBitrate=e,i.rebufferWSum+=i.weights.rebufferPenalty*t;for(var a=0;a<i.weights.latencyPenalty.length;a++){var o=i.weights.latencyPenalty[a];if(n<=o.threshold){i.latencyWSum+=o.penalty*n;break}}i.playbackSpeedWSum+=i.weights.playbackSpeedPenalty*Math.abs(1-r),i.totalQoe=i.bitrateWSum-i.bitrateSwitchWSum-i.rebufferWSum-i.latencyWSum-i.playbackSpeedWSum}return e={setupPerSegmentQoe:function(e,i,o){t=s("segment",e,i,o),n=e,r=i,a=o},logSegmentMetrics:function(e,n,r,i){t&&l(e,n,r,i,t)},getPerSegmentQoe:function(){return t},calculateSingleUseQoe:function(e,t,i,o){var u=null;return n&&r&&a&&(u=s("segment",n,r,a)),u?(l(e,t,i,o,u),u.totalQoe):0},reset:function(){o()}},o(),e}a.__dashjs_factory_name="LoLpQoeEvaluator",t.Z=r.Z.getClassFactory(a)},5435:function(e,t,n){var r=n(6398),i=n(5448),a=n(4722),o=n(5317),s=n(2068),l=n(3860),u=n(6523),c=n(3393);function f(e){var t,n,i,f,d=(e=e||{}).dashMetrics,h=this.context;return n={getMaxIndex:function(e){try{var n=(0,s.Z)(h).create(),r=e.getMediaInfo().type,a=e.getAbrController(),o=e.getStreamInfo(),g=a.getQualityFor(r,o.id),p=e.getMediaInfo(),m=d.getCurrentBufferState(r),v=e.getScheduleController(),y=d.getCurrentBufferLevel(r,!0),E=o&&o.manifestInfo?o.manifestInfo.isDynamic:null,_=v.getPlaybackController(),T=_.getCurrentLiveLatency();if(!e.useLoLPABR()||r===c.Z.AUDIO)return n;T||(T=0);var b=_.getPlaybackRate(),S=a.getThroughputHistory().getSafeAverageThroughput(r,E);if(t.debug("Throughput ".concat(Math.round(S)," kbps")),isNaN(S)||!m)return n;if(a.getAbandonmentStateFor(o.id,r)===l.Z.ABANDON_LOAD)return n;for(var A=p.bitrateList,I=e.getRepresentationInfo().fragmentDuration,R=A[0].bandwidth/1e3,w=A[A.length-1].bandwidth/1e3,N=0;N<A.length;N++){var C=A[N].bandwidth/1e3;C>w?w=C:C<R&&(R=C)}var D=A[g].bandwidth/1e3,M=d.getCurrentHttpRequest(r,!0),L=(M.tresponse.getTime()-M.trequest.getTime())/1e3,O=L>I?L-I:0;f.setupPerSegmentQoe(I,w,R),f.logSegmentMetrics(D,O,T,b);var P=(0,u.Z)(h).create({targetLatency:1.5,bufferMin:.3,segmentDuration:I,qoeEvaluator:f});return n.quality=i.getNextQuality(p,1e3*S,T,y,b,g,P),n.reason={throughput:S,latency:T},n.priority=s.Z.PRIORITY.STRONG,v.setTimeToLoadDelay(0),n.quality!==g&&t.debug("[TgcLearningRule]["+r+"] requesting switch to index: ",n.quality,"Average throughput",Math.round(S),"kbps"),n}catch(e){throw e}},reset:function(){i.reset(),f.reset()}},t=(0,r.Z)(h).getInstance().getLogger(n),i=(0,a.Z)(h).create(),f=(0,o.Z)(h).create(),n}f.__dashjs_factory_name="LoLPRule",t.Z=i.Z.getClassFactory(f)},6523:function(e,t,n){var r=n(5448);function i(e){var t,n,r,i,a,o=e.targetLatency,s=e.bufferMin,l=e.segmentDuration,u=e.qoeEvaluator;function c(){return l}function f(e,t){var n=c();return t>n?e-n:e+n-t}return n={getMinBuffer:function(){return s},getSegmentDuration:c,getNextBufferWithBitrate:function(e,t,n){return f(t,e*l/n)},getNextBuffer:f,findWeightVector:function(e,t,n,a,c,d){var h=null,g=null,p=null,m=Math.abs(t-i);return I(e).call(e,(function(e){I(r).call(r,(function(r){r[0];var i=r[1],a=r[2],v=(r[3],e.bitrate*l/c),y=f(n,v),E=(0===a?10:1/a)*Math.max(1e-5,v-y),_=(0===i?10:1/i)*e.state.latency,T=u.calculateSingleUseQoe(e.bitrate,E,_,d);(null===h||T>h)&&function(e,t,n){return!(e>o+n)&&t>=s}(t,y,m)&&(h=T,g=r,p=e.bitrate)}))})),null===g&&null===p&&(g=-1),i=t,g}},r=function e(t,n,r){if(r===n)return t;for(var i=t.length,o=0;o<i;o++)for(var s=t.shift(),l=0;l<a.length;l++)t.push(d(s).call(s,a[l]));return e(t,n,r+1)}(ee(t=a=[.2,.4,.6,.8,1]).call(t,(function(e){return[e]})),4,1),i=0,n}i.__dashjs_factory_name="LoLpWeightSelector",t.Z=r.Z.getClassFactory(i)},2298:function(e,t){t.Z=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=null,this.lastBitrate=null,this.weights={},this.weights.bitrateReward=null,this.weights.bitrateSwitchPenalty=null,this.weights.rebufferPenalty=null,this.weights.latencyPenalty=null,this.weights.playbackSpeedPenalty=null,this.bitrateWSum=0,this.bitrateSwitchWSum=0,this.rebufferWSum=0,this.latencyWSum=0,this.playbackSpeedWSum=0,this.totalQoe=0}},7803:function(e,t,n){n.d(t,{Y:function(){return h}});var r=n(3393),i=n(1553),a=n(5448),o=n(2128),s=n(2594),l=n(7387),u=n(7417),c=n(9032),f=n(9326),d=n(7802),h=["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"];function g(e){var t,n,a,g,p,m,E,T,b=this.context,S=e.adapter,A=e.baseURLController,w=e.streamInfo,N=e.timelineConverter,C=e.debug,M=e.eventBus,L=e.events,O=e.dashConstants,P=(0,s.Z)(b).getInstance();function F(e,t){var r,i=new o.Z;i.id=e.id,i.bitrate=e.bandwidth,i.width=e.width,i.height=e.height,i.tilesHor=1,i.tilesVert=1,e.essentialProperties&&I(r=e.essentialProperties).call(r,(function(e){if(y(h).call(h,e.schemeIdUri)>=0&&e.value){var t=e.value.split("x");2!==t.length||isNaN(t[0])||isNaN(t[1])||(i.tilesHor=_(t[0],10),i.tilesVert=_(t[1],10))}})),t?m.updateSegmentData(e).then((function(t){!function(e,t,n){var r=[],i=function(e,t){var n,r,i,a,o=[],s=0;for(n=0,r=e.segments.length;n<r;n++)i=e.segments[n],(a=(0,l.TJ)(N,S.getIsDynamic(),t,i.startTime,i.duration,i.timescale,i.media,i.mediaRange,s))&&(o.push(a),a=null,s++);return o}(n,t);t.segments=i,e.segmentDuration=t.segments[0].duration,e.readThumbnail=function(e,n){var i,a=null;R(r).call(r,(function(t){if(t.start<=e&&t.end>e)return a=t.url,!0})),a?n(a):R(i=t.segments).call(i,(function(i){if(i.mediaStartTime<=e&&i.mediaStartTime+i.duration>e){var a=A.resolve(t.path);return E.load({method:"get",url:a.url,request:{range:i.mediaRange,responseType:"arraybuffer"},onload:function(e){var t,a=T.getSamplesInfo(e.target.response),o=new Blob([v(t=e.target.response).call(t,a.sampleList[0].offset,a.sampleList[0].offset+a.sampleList[0].size)],{type:"image/jpeg"}),s=D.createObjectURL(o);r.push({start:i.mediaStartTime,end:i.mediaStartTime+i.duration,url:s}),n&&n(s)}}),!0}}))}}(i,e,t)})):(i.startNumber=e.startNumber,i.segmentDuration=e.segmentDuration,i.timescale=e.timescale,i.templateUrl=function(e){var t=P.isRelative(e.media)?P.resolve(e.media,A.resolve(e.path).url):e.media;return t?(0,l.Aj)(t,e.id):""}(e)),i.tilesHor>0&&i.tilesVert>0&&(i.widthPerTile=i.width/i.tilesHor,i.heightPerTile=i.height/i.tilesVert,n.push(i))}function x(){n=[],g=-1,p=null}return t={getTracks:function(){return n},addTracks:function(){if(w&&S&&(p=S.getMediaInfoForType(w,r.Z.IMAGE))){var e=S.getVoRepresentations(p);e&&e.length>0&&I(e).call(e,(function(e){(e.segmentInfoType===i.Z.SEGMENT_TEMPLATE&&e.segmentDuration>0&&e.media||e.segmentInfoType===i.Z.SEGMENT_TIMELINE)&&F(e),e.segmentInfoType===i.Z.SEGMENT_BASE&&F(e,!0)})),n.length>0&&Z(n).call(n,(function(e,t){return e.bitrate-t.bitrate}))}},reset:x,setTrackByIndex:function(e){n&&0!==n.length&&(e>=n.length&&(e=n.length-1),g=e)},getCurrentTrack:function(){return g<0?null:n[g]},getCurrentTrackIndex:function(){return g},getThumbnailRequestForTime:function(e){for(var t,r=S.getVoRepresentations(p),i=0;i<r.length;i++)if(n[g].id===r[i].id){t=r[i];break}return a.getSegmentRequestForTime(p,t,e)}},x(),E=(0,c.Z)(b).create({}),T=(0,u.Z)(b).getInstance(),m=(0,d.Z)(b).create({events:L,eventBus:M,streamInfo:w,timelineConverter:N,dashConstants:O,dashMetrics:e.dashMetrics,segmentBaseController:e.segmentBaseController,type:r.Z.IMAGE}),(a=(0,f.Z)(b).create({streamInfo:w,type:r.Z.IMAGE,timelineConverter:N,segmentsController:m,baseURLController:A,debug:C,eventBus:M,events:L,dashConstants:O,urlUtils:P})).initialize(!!S&&S.getIsDynamic()),t}g.__dashjs_factory_name="ThumbnailTracks",t.Z=a.Z.getClassFactory(g)},7417:function(e,t,n){var r=n(6398),i=n(8260),a=n(5448),o=n(6934),s=n(9597);function l(){var e,t,n=this.context;function a(e){if(!e)return null;void 0===e.fileStart&&(e.fileStart=0);var t=o.parseBuffer(e),r=(0,i.Z)(n).create();return r.setData(t),r}function l(e,t){return e[t+3]>>>0|e[t+2]<<8>>>0|e[t+1]<<16>>>0|e[t]<<24>>>0}function u(e,t){return String.fromCharCode(e[t++])+String.fromCharCode(e[t++])+String.fromCharCode(e[t++])+String.fromCharCode(e[t])}return t={parse:a,findLastTopIsoBoxCompleted:function(e,t,n){if(void 0===n&&(n=0),!t||n+8>=t.byteLength)return new s.Z(0,!1);for(var r,i=t instanceof ArrayBuffer?new Uint8Array(t):t,a=0;n<i.byteLength;){var o=l(i,n),c=u(i,n+4);if(0===o)break;n+o<=i.byteLength&&(y(e).call(e,c)>=0?r=new s.Z(n,!0,o):a=n+o),n+=o}return r||new s.Z(a,!1)},getMediaTimescaleFromMoov:function(e){var t=a(e),n=t?t.getBox("mdhd"):void 0;return n?n.timescale:NaN},getSamplesInfo:function(e){if(!e||0===e.byteLength)return{sampleList:[],lastSequenceNumber:NaN,totalDuration:NaN,numSequences:NaN};var t,n,r,i,o,s,l,u,c,f,d,h,g,p,m,v,y=a(e),E=y.getBoxes("moof"),_=y.getBoxes("mfhd");m=y.getBoxes("moof").length,p=_[_.length-1].sequence_number,n=0,o=[];var T=-1,b=-1;for(f=0;f<E.length;f++){var S=E[f],A=S.getChildBoxes("traf");for(u=0;u<A.length;u++){var I=A[u],R=I.getChildBox("tfhd"),w=I.getChildBox("tfdt");i=w.baseMediaDecodeTime;var N=I.getChildBoxes("trun"),C=I.getChildBoxes("subs");for(c=0;c<N.length;c++){var D=N[c];for(n=D.sample_count,g=(R.base_data_offset||0)+(D.data_offset||0),l=0;l<n;l++){t=void 0!==(s=D.samples[l]).sample_duration?s.sample_duration:R.default_sample_duration,r=void 0!==s.sample_size?s.sample_size:R.default_sample_size;var M={dts:i,cts:i+(void 0!==s.sample_composition_time_offset?s.sample_composition_time_offset:0),duration:t,offset:S.offset+g,size:r,subSizes:[r]};if(C)for(d=0;d<C.length;d++){var L=C[d];if(T<L.entry_count-1&&l>b&&(T++,b+=de(L)[T].sample_delta),l==b){M.subSizes=[];var O=de(L)[T];for(h=0;h<O.subsample_count;h++)M.subSizes.push(O.subsamples[h].subsample_size)}}o.push(M),g+=r,i+=t}}v=i-w.baseMediaDecodeTime}}return{sampleList:o,lastSequenceNumber:p,totalDuration:v,numSequences:m}},findInitRange:function(t){var n=null,r=a(t);if(!r)return n;var i=r.getBox("ftyp"),o=r.getBox("moov");return e.debug("Searching for initialization."),o&&o.isComplete&&(n=(i?i.offset:o.offset)+"-"+(o.offset+o.size-1),e.debug("Found the initialization. Range: "+n)),n},parsePayload:function(e,t,n){if(void 0===n&&(n=0),!t||n+8>=t.byteLength)return new s.Z(0,!1);for(var r,i=t instanceof ArrayBuffer?new Uint8Array(t):t,a=0;n<i.byteLength;){var o=l(i,n),c=u(i,n+4);if(0===o)break;n+o<=i.byteLength&&(y(e).call(e,c)>=0?r=new s.Z(n,!0,o,c):a=n+o),n+=o}return r||new s.Z(a,!1)}},e=(0,r.Z)(n).getInstance().getLogger(t),t}l.__dashjs_factory_name="BoxParser",t.Z=a.Z.getSingletonFactory(l)},1715:function(e,t,n){n.d(t,{B:function(){return s}});var r=n(5448),i=n(7803),a=n(3393),o=[{codec:"avc1",compatibleCodecs:["avc3"]},{codec:"avc3",compatibleCodecs:["avc1"]}];function s(){var e="ManagedMediaSource"in window,t="WebKitMediaSource"in window,n="MediaSource"in window;return e||t||n}function l(){var e,t,n;return e={setConfig:function(e){e&&e.settings&&(t=e.settings)},supportsMediaSource:s,supportsEncryptedMedia:function(){return n},supportsCodec:function(e,n){return n!==a.Z.AUDIO&&n!==a.Z.VIDEO?F.resolve(!0):function(e,n){return t.get().streaming.capabilities.useMediaCapabilitiesApi&&navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo&&(e.codec&&n===a.Z.AUDIO||n===a.Z.VIDEO&&e.codec&&e.width&&e.height&&e.bitrate&&e.framerate)}(e,n)?function(e,t){return new F((function(n){if(e&&e.codec){var r={type:"media-source"};r[t]={},r[t].contentType=e.codec,r[t].width=e.width,r[t].height=e.height,r[t].bitrate=_(e.bitrate),r[t].framerate=x(e.framerate),navigator.mediaCapabilities.decodingInfo(r).then((function(e){n(e.supported)})).catch((function(){n(!1)}))}else n(!1)}))}(e,n):function(e){return new F((function(t){if(e&&e.codec){var n=e.codec;e.width&&e.height&&(n+=';width="'+e.width+'";height="'+e.height+'"'),"ManagedMediaSource"in window&&ManagedMediaSource.isTypeSupported(n)||"MediaSource"in window&&MediaSource.isTypeSupported(n)||"WebKitMediaSource"in window&&WebKitMediaSource.isTypeSupported(n)?t(!0):t(!1)}else t(!1)}))}(e)},setEncryptedMediaSupported:function(e){n=e},supportsEssentialProperty:function(e){try{var t;return-1!==y(t=i.Y).call(t,e.schemeIdUri)||a.Z.FONT_DOWNLOAD_DVB_SCHEME===e.schemeIdUri}catch(e){return!0}},codecRootCompatibleWithCodec:function(e,t){for(var n,r,i=e.split(".")[0],a=0===y(t).call(t,i),s=0;s<o.length;s++)if(o[s].codec===i){r=o[s];break}return r?a||R(n=r.compatibleCodecs).call(n,(function(e){return 0===y(t).call(t,e)})):a}},n=!1,e}l.__dashjs_factory_name="Capabilities",t.Z=r.Z.getSingletonFactory(l)},2295:function(e,t,n){var r=n(5448),i=n(3106);function a(){return{customTimeRangeArray:[],length:0,add:function(e,t){var n;for(n=0;n<this.customTimeRangeArray.length&&e>this.customTimeRangeArray[n].start;n++);for(S(r=this.customTimeRangeArray).call(r,n,0,{start:e,end:t}),n=0;n<this.customTimeRangeArray.length-1;n++){var r;this.mergeRanges(n,n+1)&&n--}this.length=this.customTimeRangeArray.length},clear:function(){this.customTimeRangeArray=[],this.length=0},remove:function(e,t){for(var n=0;n<this.customTimeRangeArray.length;n++){var r;if(e<=this.customTimeRangeArray[n].start&&t>=this.customTimeRangeArray[n].end)S(r=this.customTimeRangeArray).call(r,n,1),n--;else{if(e>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end){var i;S(i=this.customTimeRangeArray).call(i,n+1,0,{start:t,end:this.customTimeRangeArray[n].end}),this.customTimeRangeArray[n].end=e;break}e>this.customTimeRangeArray[n].start&&e<this.customTimeRangeArray[n].end?this.customTimeRangeArray[n].end=e:t>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end&&(this.customTimeRangeArray[n].start=t)}}this.length=this.customTimeRangeArray.length},mergeRanges:function(e,t){var n,r,i,a,o=this.customTimeRangeArray[e],s=this.customTimeRangeArray[t];return o.start<=s.start&&s.start<=o.end&&o.end<=s.end?(o.end=s.end,S(n=this.customTimeRangeArray).call(n,t,1),!0):s.start<=o.start&&o.start<=s.end&&s.end<=o.end?(o.start=s.start,S(r=this.customTimeRangeArray).call(r,t,1),!0):s.start<=o.start&&o.start<=s.end&&o.end<=s.end?(S(i=this.customTimeRangeArray).call(i,e,1),!0):o.start<=s.start&&s.start<=o.end&&s.end<=o.end&&(S(a=this.customTimeRangeArray).call(a,t,1),!0)},start:function(e){return(0,i.SE)(e),e>=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].start},end:function(e){return(0,i.SE)(e),e>=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].end}}}a.__dashjs_factory_name="CustomTimeRanges",t.Z=r.Z.getClassFactory(a)},5:function(e,t,n){var r=n(5448);function i(){var e,t=/^[a-z][a-z0-9+\-_.]*:/i,n=/^https?:\/\//i,r=/^https:\/\//i,i=/^([a-z][a-z0-9+\-_.]*:\/\/[^\/]+)\/?/i,a=function(e,t){try{return new D(e,t).toString()}catch(t){return e}},o=function(e,t){var n=s;if(!t)return e;if(!c(e))return e;f(e)&&(n=l),d(e)&&(n=u);var r=n(t),i="/"!==r.charAt(r.length-1)&&"/"!==e.charAt(0)?"/":"";return[r,e].join(i)};function s(e){var t=y(e).call(e,"/"),n=E(e).call(e,"/");return-1!==t?n===t+1?e:(-1!==y(e).call(e,"?")&&(e=e.substring(0,y(e).call(e,"?"))),e.substring(0,n+1)):""}function l(e){var t=e.match(i);return t?t[1]:""}function u(e){var n=e.match(t);return n?n[0]:""}function c(e){return!t.test(e)}function f(e){return c(e)&&"/"===e.charAt(0)}function d(e){return 0===y(e).call(e,"//")}return function(){try{new D("x","http://y"),e=a}catch(e){}finally{e=e||o}}(),{parseBaseUrl:s,parseOrigin:l,parseScheme:u,isRelative:c,isPathAbsolute:f,isSchemeRelative:d,isHTTPURL:function(e){return n.test(e)},isHTTPS:function(e){return r.test(e)},removeHostname:function(e){return/^(?:\w+\:\/\/)?([^\/]+)(.*)$/.exec(e)[2].substring(1)},resolve:function(t,n){return e(t,n)}}}i.__dashjs_factory_name="DefaultURLUtils",t.Z=r.Z.getSingletonFactory(i)},8260:function(e,t,n){var r=n(2839),i=n(5448);function a(){var e;function t(t){var r=[];if(!t||!e||"function"!=typeof e.fetchAll)return r;for(var i,a=e.fetchAll(t),o=0,s=a.length;o<s;o++)(i=n(a[o]))&&r.push(i);return r}function n(e){if(!e)return null;var t=new r.Z(e);return e.hasOwnProperty("_incomplete")&&(t.isComplete=!e._incomplete),t}return{getBox:function(t){return t&&e&&e.boxes&&0!==e.boxes.length&&"function"==typeof e.fetch?n(e.fetch(t)):null},getBoxes:t,setData:function(t){e=t},getLastBox:function(){if(!e||!e.boxes||!e.boxes.length)return null;var n=t(e.boxes[e.boxes.length-1].type);return n.length>0?n[n.length-1]:null}}}a.__dashjs_factory_name="IsoFile",t.Z=i.Z.getClassFactory(a)},7473:function(e,t,n){n.d(t,{k:function(){return i}});var r=n(5448);function i(e,t){var n={url:e.url,method:e.method,headers:oe({},e.headers),credentials:e.withCredentials?"include":void 0,range:e.request.range};return F.resolve(t.modifyRequest(n)).then((function(){return oe(e,n,{withCredentials:"include"===n.credentials})}))}function a(){return{modifyRequest:null,modifyRequestURL:function(e){return e},modifyRequestHeader:function(e,t){return t.url,e}}}a.__dashjs_factory_name="RequestModifier",t.Z=r.Z.getSingletonFactory(a)},3106:function(e,t,n){n.d(t,{PS:function(){return a},SE:function(){return o}});var r=n(3393);function i(e){return i="function"==typeof g&&"symbol"==c(N)?function(e){return c(e)}:function(e){return e&&"function"==typeof g&&e.constructor===g&&e!==g.prototype?"symbol":c(e)},i(e)}function a(e,t){if(i(e)!==t)throw r.Z.BAD_ARGUMENT_ERROR}function o(e){if(null===e||isNaN(e)||e%1!=0)throw r.Z.BAD_ARGUMENT_ERROR+" : argument is not an integer"}},2594:function(e,t,n){var r=n(5448),i=n(5);function a(){var e,t=[],n=this.context;function r(n,r,i){var a=function(n){var r;for(r=0;r<t.length;r++)if(t[r].regex.test(n))return t[r].utils;return e}(i||r);return a&&"function"==typeof a[n]?a[n](r,i):e[n](r,i)}return e=(0,i.Z)(n).getInstance(),{registerUrlRegex:function(e,n){t.push({regex:e,utils:n})},parseBaseUrl:function(e){return r("parseBaseUrl",e)},parseOrigin:function(e){return r("parseOrigin",e)},parseScheme:function(e){return r("parseScheme",e)},isRelative:function(e){return r("isRelative",e)},isPathAbsolute:function(e){return r("isPathAbsolute",e)},isSchemeRelative:function(e){return r("isSchemeRelative",e)},isHTTPURL:function(e){return r("isHTTPURL",e)},isHTTPS:function(e){return r("isHTTPS",e)},removeHostname:function(e){return r("removeHostname",e)},resolve:function(e,t){return r("resolve",e,t)}}}a.__dashjs_factory_name="URLUtils";var o=r.Z.getSingletonFactory(a);t.Z=o},5459:function(e,t){t.Z=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.code=t||null,this.message=n||null,this.data=r||null}},3186:function(e,t,n){var r=n(7855),i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.action=e.ACTION_DOWNLOAD,this.startTime=NaN,this.mediaStartTime=NaN,this.mediaType=null,this.mediaInfo=null,this.type=null,this.duration=NaN,this.timescale=NaN,this.range=null,this.url=t||null,this.serviceLocation=null,this.requestStartDate=null,this.firstByteDate=null,this.requestEndDate=null,this.quality=NaN,this.index=NaN,this.availabilityStartTime=null,this.availabilityEndTime=null,this.wallStartTime=null,this.bytesLoaded=NaN,this.bytesTotal=NaN,this.delayLoadingTime=NaN,this.responseType="arraybuffer",this.representationId=null}var t;return(t=[{key:"isInitializationRequest",value:function(){return this.type&&this.type===r.w.INIT_SEGMENT_TYPE}},{key:"setInfo",value:function(e){this.type=e&&e.init?r.w.INIT_SEGMENT_TYPE:r.w.MEDIA_SEGMENT_TYPE,this.url=e&&e.url?e.url:null,this.range=e&&e.range?e.range.start+"-"+e.range.end:null,this.mediaType=e&&e.mediaType?e.mediaType:null}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e.prototype,t),e}();i.ACTION_DOWNLOAD="download",i.ACTION_COMPLETE="complete",t.Z=i},2839:function(e,t){var n=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.offset=t._offset,this.type=t.type,this.size=t.size,this.boxes=[],t.boxes)for(var n=0;n<t.boxes.length;n++)this.boxes.push(new e(t.boxes[n]));switch(this.isComplete=!0,t.type){case"sidx":if(this.timescale=t.timescale,this.earliest_presentation_time=t.earliest_presentation_time,this.first_offset=t.first_offset,this.references=t.references,t.references){this.references=[];for(var r=0;r<t.references.length;r++){var i={reference_type:t.references[r].reference_type,referenced_size:t.references[r].referenced_size,subsegment_duration:t.references[r].subsegment_duration};this.references.push(i)}}break;case"emsg":this.id=t.id,this.version=1===t.version?1:0,this.value=t.value,this.timescale=t.timescale,this.scheme_id_uri=t.scheme_id_uri,this.presentation_time_delta=1===t.version?t.presentation_time:t.presentation_time_delta,this.event_duration=t.event_duration,this.message_data=t.message_data;break;case"mdhd":this.timescale=t.timescale;break;case"mfhd":this.sequence_number=t.sequence_number;break;case"subs":this.entry_count=t.entry_count,this.entries=de(t);break;case"tfhd":this.base_data_offset=t.base_data_offset,this.sample_description_index=t.sample_description_index,this.default_sample_duration=t.default_sample_duration,this.default_sample_size=t.default_sample_size,this.default_sample_flags=t.default_sample_flags,this.flags=G(t);break;case"tfdt":this.version=t.version,this.baseMediaDecodeTime=t.baseMediaDecodeTime,this.flags=G(t);break;case"trun":if(this.sample_count=t.sample_count,this.first_sample_flags=t.first_sample_flags,this.data_offset=t.data_offset,this.flags=G(t),this.samples=t.samples,t.samples){this.samples=[];for(var a=0,o=t.samples.length;a<o;a++){var s={sample_size:t.samples[a].sample_size,sample_duration:t.samples[a].sample_duration,sample_composition_time_offset:t.samples[a].sample_composition_time_offset};this.samples.push(s)}}break;case"prft":this.version=t.version,this.reference_track_ID=t.reference_track_ID,this.ntp_timestamp_sec=t.ntp_timestamp_sec,this.ntp_timestamp_frac=t.ntp_timestamp_frac,this.media_time=t.media_time,this.flags=G(t)}}var t;return(t=[{key:"getChildBox",value:function(e){for(var t=0;t<this.boxes.length;t++)if(this.boxes[t].type===e)return this.boxes[t]}},{key:"getChildBoxes",value:function(e){for(var t=[],n=0;n<this.boxes.length;n++)this.boxes[n].type===e&&t.push(this.boxes[n]);return t}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e.prototype,t),e}();t.Z=n},9597:function(e,t){t.Z=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.lastCompletedOffset=t,this.found=n,this.size=r}},2128:function(e,t){t.Z=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bitrate=0,this.width=0,this.height=0,this.tilesHor=0,this.tilesVert=0,this.widthPerTile=0,this.heightPerTile=0,this.startNumber=0,this.segmentDuration=0,this.timescale=0,this.templateUrl="",this.id=""}},7855:function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{O:function(){return a},w:function(){return i}});var i=function e(){r(this,e),this.tcpid=null,this.type=null,this.url=null,this.actualurl=null,this.range=null,this.trequest=null,this.tresponse=null,this.responsecode=null,this.interval=null,this.trace=[],this.cmsd=null,this._stream=null,this._tfinish=null,this._mediaduration=null,this._quality=null,this._responseHeaders=null,this._serviceLocation=null,this._fileLoaderType=null},a=function e(){r(this,e),this.s=null,this.d=null,this.b=[]};i.GET="GET",i.HEAD="HEAD",i.MPD_TYPE="MPD",i.XLINK_EXPANSION_TYPE="XLinkExpansion",i.INIT_SEGMENT_TYPE="InitializationSegment",i.INDEX_SEGMENT_TYPE="IndexSegment",i.MEDIA_SEGMENT_TYPE="MediaSegment",i.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",i.MSS_FRAGMENT_INFO_SEGMENT_TYPE="FragmentInfoSegment",i.DVB_REPORTING_TYPE="DVBReporting",i.LICENSE="license",i.CONTENT_STEERING_TYPE="ContentSteering",i.OTHER_TYPE="other"},3039:function(e,t){function n(e,t){return function(n,i){for(var a,o,s,l=r(n,"tag"),u=r(null==i?"*":i,"range"),c=[],f=-1;++f<u.length;)if(a=u[f].toLowerCase(),t||"*"!==a){for(o=-1,s=[];++o<l.length;)if(e(l[o].toLowerCase(),a)){if(!t)return l[o];c.push(l[o])}else s.push(l[o]);l=s}return t?c:void 0}}function r(e,t){var n=e&&"string"==typeof e?[e]:e;if(!n||"object"!=c(n)||!("length"in n))throw new Error("Invalid "+t+" `"+n+"`, expected non-empty string");return n}t.basicFilter=n((function(e,t){return"*"===t||e===t||y(e).call(e,t+"-")>-1}),!0),t.extendedFilter=n((function(e,t){var n=e.split("-"),r=t.split("-"),i=0,a=0;if("*"!==r[a]&&n[i]!==r[a])return!1;for(i++,a++;a<r.length;)if("*"!==r[a]){if(!n[i])return!1;if(n[i]!==r[a]){if(1===n[i].length)return!1;i++}else i++,a++}else a++;return!0}),!0),t.lookup=n((function(e,t){for(var n,r=t;;){if("*"===r||e===r)return!0;if((n=E(r).call(r,"-"))<0)return!1;"-"===r.charAt(n-2)&&(n-=2),r=v(r).call(r,0,n)}}))},3973:function(e,t,n){e.exports=n(3854)},3854:function(e,t,n){var r=n(2415),i=n(3039),a=n(7778),o=n(5813),s=n(3165),l=n(9460);e.exports=function(e,t){var n,c,f,d=t||{},y=r.parse(String(e||"").toLowerCase(),d),_=r.stringify(y),T=-1;if(!_)return _;for(;++T<a.length;)i.extendedFilter(_,a[T].from).length&&(g(y,a[T].from,a[T].to),_=r.stringify(y));for(T=-1;++T<o.length;)p(y,o[T].from.field,o[T].from.value)&&m(y,o[T].to.field,o[T].to.value);for(_=r.stringify(oe({},y,h)),T=-1;++T<s.length;){var b;_===s[T]&&(g(y,s[T],v(b=s[T].split("-")).call(b,0,-1).join("-")),_=r.stringify(oe({},y,h)))}if(Z(n=y.extensions).call(n,E),d.warning)for(f in l)u.call(l[f],y[f])&&d.warning("Deprecated "+f+" `"+y[f]+"`, expected one of `"+l[f][y[f]].join("`, `")+"`",null,7);return y.script&&(y.script=y.script.charAt(0).toUpperCase()+v(c=y.script).call(c,1)),y.region&&(y.region=y.region.toUpperCase()),r.stringify(y)};var u={}.hasOwnProperty,f=new Intl.Collator,h={variants:[],extensions:[],privateuse:[],irregular:null,regular:null};function g(e,t,n){var i,a=r.parse(t),o=r.parse(n),s=[];for(i in a)a[i]&&a[i].length&&p(e,i,a[i])&&s.push(i);for(i in o)o[i]&&o[i].length&&(y(s).call(s,i)>-1||!e[i]||!e[i].length)&&m(e,i,o[i])}function p(e,t,n){var r,i,a,o,s=!1;if(n){if(i=r=e[t],r&&"object"==c(r))for(i=[],a=-1;++a<r.length;)o=r[a],y(n).call(n,o)<0?i.push(o):s=!0;else r===n&&(i=null,s=!0);e[t]=i}return s}function m(e,t,n){var r,i,a,o=e[t];if(o&&"object"==c(o))for(r=d(s=[]).call(s,n),i=-1;++i<r.length;){var s;a=r[i],y(o).call(o,a)<0&&o.push(a)}else e[t]=n}function E(e,t){return f.compare(e.singleton,t.singleton)}},2415:function(e,t,n){t.parse=n(6903),t.stringify=n(6713)},6903:function(e,t,n){var r=n(2219),i=n(3516),a=n(395),o=n(858),s=n(8589);e.exports=function e(t,n){var u,c,f,d=n||{},h={language:null,extendedLanguageSubtags:[],script:null,region:null,variants:[],extensions:[],privateuse:[],irregular:null,regular:null},g=String(t),p=g.toLowerCase(),m=0;if(null==t)throw new Error("Expected string, got `"+t+"`");if(l.call(s,p))return(null==d.normalize||d.normalize)&&s[p]?e(s[p]):(h[-1===y(o).call(o,p)?"irregular":"regular"]=g,h);for(;i(p.charCodeAt(m))&&m<9;)m++;if(m>1&&m<9){if(h.language=v(g).call(g,0,m),m<4)for(c=0;45===p.charCodeAt(m)&&i(p.charCodeAt(m+1))&&i(p.charCodeAt(m+2))&&i(p.charCodeAt(m+3))&&!i(p.charCodeAt(m+4));){if(c>2)return E(m,3,"Too many extended language subtags, expected at most 3 subtags");h.extendedLanguageSubtags.push(v(g).call(g,m+1,m+4)),m+=4,c++}for(45===p.charCodeAt(m)&&i(p.charCodeAt(m+1))&&i(p.charCodeAt(m+2))&&i(p.charCodeAt(m+3))&&i(p.charCodeAt(m+4))&&!i(p.charCodeAt(m+5))&&(h.script=v(g).call(g,m+1,m+5),m+=5),45===p.charCodeAt(m)&&(i(p.charCodeAt(m+1))&&i(p.charCodeAt(m+2))&&!i(p.charCodeAt(m+3))?(h.region=v(g).call(g,m+1,m+3),m+=3):a(p.charCodeAt(m+1))&&a(p.charCodeAt(m+2))&&a(p.charCodeAt(m+3))&&!a(p.charCodeAt(m+4))&&(h.region=v(g).call(g,m+1,m+4),m+=4));45===p.charCodeAt(m);){for(f=u=m+1;r(p.charCodeAt(f));){if(f-u>7)return E(f,1,"Too long variant, expected at most 8 characters");f++}if(!(f-u>4||f-u>3&&a(p.charCodeAt(u))))break;h.variants.push(v(g).call(g,u,f)),m=f}for(;45===p.charCodeAt(m)&&120!==p.charCodeAt(m+1)&&r(p.charCodeAt(m+1))&&45===p.charCodeAt(m+2)&&r(p.charCodeAt(m+3));){for(f=m+2,c=0;45===p.charCodeAt(f)&&r(p.charCodeAt(f+1))&&r(p.charCodeAt(f+2));)for(f=(u=f+1)+2,c++;r(p.charCodeAt(f));){if(f-u>7)return E(f,2,"Too long extension, expected at most 8 characters");f++}if(!c)return E(f,4,"Empty extension, extensions must have at least 2 characters of content");h.extensions.push({singleton:g.charAt(m+1),extensions:v(g).call(g,m+3,f).split("-")}),m=f}}else m=0;if(0===m&&120===p.charCodeAt(m)||45===p.charCodeAt(m)&&120===p.charCodeAt(m+1))for(f=m=m?m+2:1;45===p.charCodeAt(f)&&r(p.charCodeAt(f+1));){for(f=u=m+1;r(p.charCodeAt(f));){if(f-u>7)return E(f,5,"Too long private-use area, expected at most 8 characters");f++}h.privateuse.push(v(g).call(g,m+1,f)),m=f}return m!==g.length?E(m,6,"Found superfluous content after tag"):h;function E(e,t,n){return d.warning&&d.warning(n,t,e),d.forgiving?h:{language:null,extendedLanguageSubtags:[],script:null,region:null,variants:[],extensions:[],privateuse:[],irregular:null,regular:null}}};var l={}.hasOwnProperty},6713:function(e){e.exports=function(e){var t,n,r,i=e||{},a=[];if(i.irregular||i.regular)return i.irregular||i.regular;if(i.language)for(a=d(a).call(a,i.language,i.extendedLanguageSubtags||[],i.script||[],i.region||[],i.variants||[]),t=i.extensions||[],n=-1;++n<t.length;)(r=t[n]).singleton&&r.extensions&&r.extensions.length&&(a=d(a).call(a,r.singleton,r.extensions));return i.privateuse&&i.privateuse.length&&(a=d(a).call(a,"x",i.privateuse)),a.join("-")}},1549:function(e,t,n){var r=n(6693),i=n(2165),a="function"==typeof g&&"function"==typeof he?he("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50;var o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return M(t,l.prototype),t}function l(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|A(e,t),r=s(n),i=r.write(e,t);return i!==n&&(r=v(r).call(r,0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if($(e,Uint8Array)){var t=new Uint8Array(e);return b(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+c(e));if($(e,ArrayBuffer)||e&&$(e.buffer,ArrayBuffer))return b(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&($(e,SharedArrayBuffer)||e&&$(e.buffer,SharedArrayBuffer)))return b(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return l.from(r,t,n);var i=function(e){if(l.isBuffer(e)){var t=0|S(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?s(0):p(e):"Buffer"===e.type&&h(e.data)?p(e.data):void 0}(e);if(i)return i;if(void 0!==g&&null!=ge&&"function"==typeof e[ge])return l.from(e[ge]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+c(e))}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return f(e),s(e<0?0:0|S(e))}function p(e){for(var t=e.length<0?0:0|S(e.length),n=s(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function b(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),M(r,l.prototype),r}function S(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function A(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||$(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+c(e));var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(e).length;default:if(i)return r?-1:W(e).length;t=(""+t).toLowerCase(),i=!0}}function I(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return G(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return Z(this,t,n);case"latin1":case"binary":return B(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function R(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function w(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),J(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:N(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof y(Uint8Array.prototype)?i?y(Uint8Array.prototype).call(e,t,n):E(Uint8Array.prototype).call(e,t,n):N(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function N(e,t,n,r,i){var a,o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=n;a<s;a++)if(u(e,a)===u(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===l)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(n+l>s&&(n=s-l),a=n;a>=0;a--){for(var f=!0,d=0;d<l;d++)if(u(e,a+d)!==u(t,d)){f=!1;break}if(f)return a}return-1}function D(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=_(t.substr(2*o,2),16);if(J(s))return o;e[n+o]=s}return o}function L(e,t,n,r){return Q(W(t,e.length-n),e,n,r)}function O(e,t,n,r){return Q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function P(e,t,n,r){return Q(X(t),e,n,r)}function F(e,t,n,r){return Q(function(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function x(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(v(e).call(e,t,n))}function k(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,o,s,l,u=e[i],c=null,f=u>239?4:u>223?3:u>191?2:1;if(i+f<=n)switch(f){case 1:u<128&&(c=u);break;case 2:128==(192&(a=e[i+1]))&&(l=(31&u)<<6|63&a)>127&&(c=l);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(l=(15&u)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return function(e){var t=e.length;if(t<=U)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,v(e).call(e,r,r+=U));return n}(r)}t.kMaxLength=o,l.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return M(t,Uint8Array.prototype),M(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),C(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),C(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,n){return u(e,t,n)},M(l.prototype,Uint8Array.prototype),M(l,Uint8Array),l.alloc=function(e,t,n){return function(e,t,n,r,i){return f(e),e<=0?s(e):void 0!==t?"string"==typeof n?m(r=s(e)).call(r,t,n):m(i=s(e)).call(i,t):s(e)}(e,t,n)},l.allocUnsafe=function(e){return d(e)},l.allocUnsafeSlow=function(e){return d(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if($(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),$(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!h(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if($(a,Uint8Array))i+a.length>r.length?l.from(a).copy(r,i):Uint8Array.prototype.set.call(r,a,i);else{if(!l.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i)}i+=a.length}return r},l.byteLength=A,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)R(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)R(this,t,t+3),R(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)R(this,t,t+7),R(this,t+1,t+6),R(this,t+2,t+5),R(this,t+3,t+4);return this},l.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):I.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e,n="",r=t.INSPECT_MAX_BYTES;return n=T(e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ")).call(e),this.length>r&&(n+=" ... "),"<Buffer "+n+">"},a&&(l.prototype[a]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if($(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+c(e));if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),u=v(this).call(this,r,i),f=v(e).call(e,t,n),d=0;d<s;++d)if(u[d]!==f[d]){a=u[d],o=f[d];break}return a<o?-1:o<a?1:0},l.prototype.includes=function(e,t,n){return-1!==y(this).call(this,e,t,n)},l.prototype.indexOf=function(e,t,n){return w(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return w(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return D(this,e,t,n);case"utf8":case"utf-8":return L(this,e,t,n);case"ascii":case"latin1":case"binary":return O(this,e,t,n);case"base64":return P(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:v(Array.prototype).call(this._arr||this,0)}};var U=4096;function Z(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function B(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function G(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=ee[e[a]];return i}function q(e,t,n){for(var r=v(e).call(e,t,n),i="",a=0;a<r.length-1;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function Y(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,n,r,i,a){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function H(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function V(e,t,n,r,a){return t=+t,n>>>=0,a||H(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function K(e,t,n,r,a){return t=+t,n>>>=0,a||H(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return M(r,l.prototype),r},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||Y(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||Y(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||Y(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||Y(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||Y(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||Y(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||Y(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||Y(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||Y(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},l.prototype.readInt8=function(e,t){return e>>>=0,t||Y(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||Y(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||Y(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||Y(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||Y(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return e>>>=0,t||Y(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||Y(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||Y(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||Y(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||j(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||j(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);j(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);j(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeFloatLE=function(e,t,n){return V(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return V(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return K(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return K(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;return this===e&&"function"==typeof pe(Uint8Array.prototype)?pe(this).call(this,t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var i=e.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var o=l.isBuffer(e)?e:l.from(e,r),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<n-t;++a)this[a+t]=o[a%s]}return this};var z=/[^+/0-9A-Za-z-_]/g;function W(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function X(e){return r.toByteArray(function(e,t){if((e=T(t=e=e.split("=")[0]).call(t).replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Q(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function $(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}var ee=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}()},6693:function(e,t){t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,a=l(e),o=a[0],s=a[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,o,s)),c=0,f=s>0?o-4:o;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[c++]=255&t),1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=16383,s=0,l=r-i;s<l;s+=o)a.push(u(e,s,s+o>l?l:s+o));return 1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),a.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=a.length;o<s;++o)n[o]=a[o],r[a.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=y(e).call(e,"=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,r){for(var i,a,o=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},2165:function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<<s)-1,u=l>>1,c=-7,f=n?i-1:0,d=n?-1:1,h=e[t+f];for(f+=d,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=d,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+f],f+=d,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),a-=u}return(h?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,l,u=8*a-i-1,c=(1<<u)-1,f=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,g=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+f>=1?d/l:d*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=255&s,h+=g,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[n+h]=255&o,h+=g,o/=256,u-=8);e[n+h-g]|=128*p}},6934:function(e,t){var n={parseBuffer:function(e){return new r(e).parse()},addBoxProcessor:function(e,t){"string"==typeof e&&"function"==typeof t&&(i.prototype._boxProcessors[e]=t)},createFile:function(){return new r},createBox:function(e,t,n){var r=i.create(e);return t&&t.append(r,n),r},createFullBox:function(e,t,r){var i=n.createBox(e,t,r);return i.version=0,i.flags=0,i},Utils:{}};n.Utils.dataViewToString=function(e,t){var n=t||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(n).decode(e);var r=[],i=0;if("utf-8"===n)for(;i<e.byteLength;){var a=e.getUint8(i++);a<128||(a<224?(a=(31&a)<<6,a|=63&e.getUint8(i++)):a<240?(a=(15&a)<<12,a|=(63&e.getUint8(i++))<<6,a|=63&e.getUint8(i++)):(a=(7&a)<<18,a|=(63&e.getUint8(i++))<<12,a|=(63&e.getUint8(i++))<<6,a|=63&e.getUint8(i++))),r.push(String.fromCharCode(a))}else for(;i<e.byteLength;)r.push(String.fromCharCode(e.getUint8(i++)));return r.join("")},n.Utils.utf8ToByteArray=function(e){var t,n;if("undefined"!=typeof TextEncoder)t=(new TextEncoder).encode(e);else for(t=[],n=0;n<e.length;++n){var r=e.charCodeAt(n);r<128?t.push(r):r<2048?(t.push(192|r>>6),t.push(128|63&r)):r<65536?(t.push(224|r>>12),t.push(128|63&r>>6),t.push(128|63&r)):(t.push(240|r>>18),t.push(128|63&r>>12),t.push(128|63&r>>6),t.push(128|63&r))}return t},n.Utils.appendBox=function(e,t,n){if(t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,-1!==n)if(null!=n){var r,i,a=-1;if("number"==typeof n)a=n;else{if("string"==typeof n)i=n;else{if("object"!=c(n)||!n.type)return void e.boxes.push(t);i=n.type}for(var o=0;o<e.boxes.length;o++)if(i===e.boxes[o].type){a=o+1;break}}S(r=e.boxes).call(r,a,0,t)}else e.boxes.push(t)},t.parseBuffer=n.parseBuffer,t.addBoxProcessor=n.addBoxProcessor,t.createFile=n.createFile,t.createBox=n.createBox,t.createFullBox=n.createFullBox,t.Utils=n.Utils,n.Cursor=function(e){this.offset=void 0===e?0:e};var r=function(e){this._cursor=new n.Cursor,this.boxes=[],e&&(this._raw=new DataView(e))};r.prototype.fetch=function(e){var t=this.fetchAll(e,!0);return t.length?t[0]:null},r.prototype.fetchAll=function(e,t){var n=[];return r._sweep.call(this,e,n,t),n},r.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var e=i.parse(this);if(void 0===e.type)break;this.boxes.push(e)}return this},r._sweep=function(e,t,n){for(var i in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&n)return;r._sweep.call(this.boxes[i],e,t,n)}},r.prototype.write=function(){var e,t=0;for(e=0;e<this.boxes.length;e++)t+=this.boxes[e].getLength(!1);var n=new Uint8Array(t);for(this._rawo=new DataView(n.buffer),this.bytes=n,this._cursor.offset=0,e=0;e<this.boxes.length;e++)this.boxes[e].write();return n.buffer},r.prototype.append=function(e,t){n.Utils.appendBox(this,e,t)};var i=function(){this._cursor=new n.Cursor};i.parse=function(e){var t=new i;return t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,t._parseBox(),e._cursor.offset=t._raw.byteOffset+t._raw.byteLength,t},i.create=function(e){var t=new i;return t.type=e,t.boxes=[],t},i.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","stbl","strk","traf","trak","tref","udta","vttc","sinf","schi","encv","enca"],i.prototype._boxProcessors={},i.prototype._procField=function(e,t,n){this._parsing?this[e]=this._readField(t,n):this._writeField(t,n,this[e])},i.prototype._procFieldArray=function(e,t,n,r){var i;if(this._parsing)for(this[e]=[],i=0;i<t;i++)this[e][i]=this._readField(n,r);else for(i=0;i<this[e].length;i++)this._writeField(n,r,this[e][i])},i.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},i.prototype._procEntries=function(e,t,n){var r;if(this._parsing)for(this[e]=[],r=0;r<t;r++)this[e].push({}),n.call(this,this[e][r]);else for(r=0;r<t;r++)n.call(this,this[e][r])},i.prototype._procSubEntries=function(e,t,n,r){var i;if(this._parsing)for(e[t]=[],i=0;i<n;i++)e[t].push({}),r.call(this,e[t][i]);else for(i=0;i<n;i++)r.call(this,e[t][i])},i.prototype._procEntryField=function(e,t,n,r){this._parsing?e[t]=this._readField(n,r):this._writeField(n,r,e[t])},i.prototype._procSubBoxes=function(e,t){var n;if(this._parsing)for(this[e]=[],n=0;n<t;n++)this[e].push(i.parse(this));else for(n=0;n<t;n++)this._rawo?this[e][n].write():this.size+=this[e][n].getLength()},i.prototype._readField=function(e,t){switch(e){case"uint":return this._readUint(t);case"int":return this._readInt(t);case"template":return this._readTemplate(t);case"string":return-1===t?this._readTerminatedString():this._readString(t);case"data":return this._readData(t);case"utf8":return this._readUTF8String();default:return-1}},i.prototype._readInt=function(e){var t=null,n=this._cursor.offset-this._raw.byteOffset;switch(e){case 8:t=this._raw.getInt8(n);break;case 16:t=this._raw.getInt16(n);break;case 32:t=this._raw.getInt32(n);break;case 64:var r=this._raw.getInt32(n),i=this._raw.getInt32(n+4);t=r*Math.pow(2,32)+i}return this._cursor.offset+=e>>3,t},i.prototype._readUint=function(e){var t,n,r=null,i=this._cursor.offset-this._raw.byteOffset;switch(e){case 8:r=this._raw.getUint8(i);break;case 16:r=this._raw.getUint16(i);break;case 24:r=((t=this._raw.getUint16(i))<<8)+(n=this._raw.getUint8(i+2));break;case 32:r=this._raw.getUint32(i);break;case 64:t=this._raw.getUint32(i),n=this._raw.getUint32(i+4),r=t*Math.pow(2,32)+n}return this._cursor.offset+=e>>3,r},i.prototype._readString=function(e){for(var t="",n=0;n<e;n++){var r=this._readUint(8);t+=String.fromCharCode(r)}return t},i.prototype._readTemplate=function(e){return this._readUint(e/2)+this._readUint(e/2)/Math.pow(2,e/2)},i.prototype._readTerminatedString=function(){for(var e="";this._cursor.offset-this._offset<this._raw.byteLength;){var t=this._readUint(8);if(0===t)break;e+=String.fromCharCode(t)}return e},i.prototype._readData=function(e){var t=e>0?e:this._raw.byteLength-(this._cursor.offset-this._offset);if(t>0){var n=new Uint8Array(this._raw.buffer,this._cursor.offset,t);return this._cursor.offset+=t,n}return null},i.prototype._readUTF8String=function(){var e=this._raw.byteLength-(this._cursor.offset-this._offset),t=null;return e>0&&(t=new DataView(this._raw.buffer,this._cursor.offset,e),this._cursor.offset+=e),t?n.Utils.dataViewToString(t):t},i.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)this._root._incomplete=!0;else{var e;switch(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}this._incomplete||(this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==y(e=this._boxContainers).call(e,this.type)?this._parseContainerBox():this._data=this._readData())}},i.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},i.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(i.parse(this))},i.prototype.append=function(e,t){n.Utils.appendBox(this,e,t)},i.prototype.getLength=function(){var e;if(this._parsing=!1,this._rawo=null,this.size=0,this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==y(e=this._boxContainers).call(e,this.type))for(var t=0;t<this.boxes.length;t++)this.size+=this.boxes[t].getLength();return this._data&&this._writeData(this._data),this.size},i.prototype.write=function(){var e;switch(this._parsing=!1,this._cursor.offset=this._parent._cursor.offset,this.size){case 0:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.parent._rawo.byteLength-this._cursor.offset);break;case 1:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.largesize);break;default:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.size)}if(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==y(e=this._boxContainers).call(e,this.type))for(var t=0;t<this.boxes.length;t++)this.boxes[t].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},i.prototype._writeInt=function(e,t){if(this._rawo){var n=this._cursor.offset-this._rawo.byteOffset;switch(e){case 8:this._rawo.setInt8(n,t);break;case 16:this._rawo.setInt16(n,t);break;case 32:this._rawo.setInt32(n,t);break;case 64:var r=Math.floor(t/Math.pow(2,32)),i=t-r*Math.pow(2,32);this._rawo.setUint32(n,r),this._rawo.setUint32(n+4,i)}this._cursor.offset+=e>>3}else this.size+=e>>3},i.prototype._writeUint=function(e,t){if(this._rawo){var n,r,i=this._cursor.offset-this._rawo.byteOffset;switch(e){case 8:this._rawo.setUint8(i,t);break;case 16:this._rawo.setUint16(i,t);break;case 24:n=(16776960&t)>>8,r=255&t,this._rawo.setUint16(i,n),this._rawo.setUint8(i+2,r);break;case 32:this._rawo.setUint32(i,t);break;case 64:r=t-(n=Math.floor(t/Math.pow(2,32)))*Math.pow(2,32),this._rawo.setUint32(i,n),this._rawo.setUint32(i+4,r)}this._cursor.offset+=e>>3}else this.size+=e>>3},i.prototype._writeString=function(e,t){for(var n=0;n<e;n++)this._writeUint(8,t.charCodeAt(n))},i.prototype._writeTerminatedString=function(e){if(0!==e.length){for(var t=0;t<e.length;t++)this._writeUint(8,e.charCodeAt(t));this._writeUint(8,0)}},i.prototype._writeTemplate=function(e,t){var n=Math.floor(t),r=(t-n)*Math.pow(2,e/2);this._writeUint(e/2,n),this._writeUint(e/2,r)},i.prototype._writeData=function(e){if(e)if(this._rawo){if(e instanceof Array){for(var t=this._cursor.offset-this._rawo.byteOffset,n=0;n<e.length;n++)this._rawo.setInt8(t+n,e[n]);this._cursor.offset+=e.length}e instanceof Uint8Array&&(this._root.bytes.set(e,this._cursor.offset),this._cursor.offset+=e.length)}else this.size+=e.length},i.prototype._writeUTF8String=function(e){var t=n.Utils.utf8ToByteArray(e);if(this._rawo)for(var r=new DataView(this._rawo.buffer,this._cursor.offset,t.length),i=0;i<t.length;i++)r.setUint8(i,t[i]);else this.size+=t.length},i.prototype._writeField=function(e,t,n){switch(e){case"uint":this._writeUint(t,n);break;case"int":this._writeInt(t,n);break;case"template":this._writeTemplate(t,n);break;case"string":-1==t?this._writeTerminatedString(n):this._writeString(t,n);break;case"data":this._writeData(n);break;case"utf8":this._writeUTF8String(n)}},i.prototype._boxProcessors.avc1=i.prototype._boxProcessors.avc2=i.prototype._boxProcessors.avc3=i.prototype._boxProcessors.avc4=i.prototype._boxProcessors.hvc1=i.prototype._boxProcessors.hev1=i.prototype._boxProcessors.encv=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procField("pre_defined1","uint",16),this._procField("reserved2","uint",16),this._procFieldArray("pre_defined2",3,"uint",32),this._procField("width","uint",16),this._procField("height","uint",16),this._procField("horizresolution","template",32),this._procField("vertresolution","template",32),this._procField("reserved3","uint",32),this._procField("frame_count","uint",16),this._procFieldArray("compressorname",32,"uint",8),this._procField("depth","uint",16),this._procField("pre_defined3","int",16),this._procField("config","data",-1)},i.prototype._boxProcessors.ctts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(e){this._procEntryField(e,"sample_count","uint",32),this._procEntryField(e,"sample_offset",1===this.version?"int":"uint",32)}))},i.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},i.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(e){this._procEntryField(e,"segment_duration","uint",1===this.version?64:32),this._procEntryField(e,"media_time","int",1===this.version?64:32),this._procEntryField(e,"media_rate_integer","int",16),this._procEntryField(e,"media_rate_fraction","int",16)}))},i.prototype._boxProcessors.emsg=function(){this._procFullBox(),1==this.version?(this._procField("timescale","uint",32),this._procField("presentation_time","uint",64),this._procField("event_duration","uint",32),this._procField("id","uint",32),this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1)):(this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1),this._procField("timescale","uint",32),this._procField("presentation_time_delta","uint",32),this._procField("event_duration","uint",32),this._procField("id","uint",32)),this._procField("message_data","data",-1)},i.prototype._boxProcessors.free=i.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},i.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},i.prototype._boxProcessors.ftyp=i.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var e=-1;this._parsing&&(e=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",e,"string",4)},i.prototype._boxProcessors.hdlr=function(){this._procFullBox(),this._procField("pre_defined","uint",32),this._procField("handler_type","string",4),this._procFieldArray("reserved",3,"uint",32),this._procField("name","string",-1)},i.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},i.prototype._boxProcessors.mdhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._parsing||"string"!=typeof this.language||(this.language=this.language.charCodeAt(0)-96<<10|this.language.charCodeAt(1)-96<<5|this.language.charCodeAt(2)-96),this._procField("language","uint",16),this._parsing&&(this.language=String.fromCharCode(96+(this.language>>10&31),96+(this.language>>5&31),96+(31&this.language))),this._procField("pre_defined","uint",16)},i.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",1==this.version?64:32)},i.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},i.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},i.prototype._boxProcessors.mp4a=i.prototype._boxProcessors.enca=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procField("channelcount","uint",16),this._procField("samplesize","uint",16),this._procField("pre_defined","uint",16),this._procField("reserved3","uint",16),this._procField("samplerate","template",32),this._procField("esds","data",-1)},i.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procField("rate","template",32),this._procField("volume","template",16),this._procField("reserved1","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procFieldArray("matrix",9,"template",32),this._procFieldArray("pre_defined",6,"uint",32),this._procField("next_track_ID","uint",32)},i.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},i.prototype._boxProcessors.prft=function(){this._procFullBox(),this._procField("reference_track_ID","uint",32),this._procField("ntp_timestamp_sec","uint",32),this._procField("ntp_timestamp_frac","uint",32),this._procField("media_time","uint",1==this.version?64:32)},i.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},i.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),1&G(this)&&this._procField("scheme_uri","string",-1)},i.prototype._boxProcessors.sdtp=function(){this._procFullBox();var e=-1;this._parsing&&(e=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",e,"uint",8)},i.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",1==this.version?64:32),this._procField("first_offset","uint",1==this.version?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,(function(e){this._parsing||(e.reference=(1&e.reference_type)<<31,e.reference|=2147483647&e.referenced_size,e.sap=(1&e.starts_with_SAP)<<31,e.sap|=(3&e.SAP_type)<<28,e.sap|=268435455&e.SAP_delta_time),this._procEntryField(e,"reference","uint",32),this._procEntryField(e,"subsegment_duration","uint",32),this._procEntryField(e,"sap","uint",32),this._parsing&&(e.reference_type=e.reference>>31&1,e.referenced_size=2147483647&e.reference,e.starts_with_SAP=e.sap>>31&1,e.SAP_type=e.sap>>28&7,e.SAP_delta_time=268435455&e.sap)}))},i.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},i.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,(function(e){this._procEntryField(e,"ranges_count","uint",32),this._procSubEntries(e,"ranges",e.ranges_count,(function(e){this._procEntryField(e,"level","uint",8),this._procEntryField(e,"range_size","uint",24)}))}))},i.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},i.prototype._boxProcessors.sttg=function(){this._procField("settings","utf8")},i.prototype._boxProcessors.stts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(e){this._procEntryField(e,"sample_count","uint",32),this._procEntryField(e,"sample_delta","uint",32)}))},i.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(e){this._procEntryField(e,"sample_delta","uint",32),this._procEntryField(e,"subsample_count","uint",16),this._procSubEntries(e,"subsamples",e.subsample_count,(function(e){this._procEntryField(e,"subsample_size","uint",1===this.version?32:16),this._procEntryField(e,"subsample_priority","uint",8),this._procEntryField(e,"discardable","uint",8),this._procEntryField(e,"codec_specific_parameters","uint",32)}))}))},i.prototype._boxProcessors.tenc=function(){this._procFullBox(),this._procField("default_IsEncrypted","uint",24),this._procField("default_IV_size","uint",8),this._procFieldArray("default_KID",16,"uint",8)},i.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",1==this.version?64:32)},i.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),1&G(this)&&this._procField("base_data_offset","uint",64),2&G(this)&&this._procField("sample_description_offset","uint",32),8&G(this)&&this._procField("default_sample_duration","uint",32),16&G(this)&&this._procField("default_sample_size","uint",32),32&G(this)&&this._procField("default_sample_flags","uint",32)},i.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(48&this.length_size_of_traf_num)<<4,this.reserved|=(12&this.length_size_of_trun_num)<<2,this.reserved|=3&this.length_size_of_sample_num),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(48&this.reserved)>>4,this.length_size_of_trun_num=(12&this.reserved)>>2,this.length_size_of_sample_num=3&this.reserved),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,(function(e){this._procEntryField(e,"time","uint",1===this.version?64:32),this._procEntryField(e,"moof_offset","uint",1===this.version?64:32),this._procEntryField(e,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(e,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(e,"sample_number","uint",8*(this.length_size_of_sample_num+1))}))},i.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procFieldArray("reserved2",2,"uint",32),this._procField("layer","uint",16),this._procField("alternate_group","uint",16),this._procField("volume","template",16),this._procField("reserved3","uint",16),this._procFieldArray("matrix",9,"template",32),this._procField("width","template",32),this._procField("height","template",32)},i.prototype._boxProcessors.trex=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._procField("default_sample_description_index","uint",32),this._procField("default_sample_duration","uint",32),this._procField("default_sample_size","uint",32),this._procField("default_sample_flags","uint",32)},i.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),1&G(this)&&this._procField("data_offset","int",32),4&G(this)&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,(function(e){256&G(this)&&this._procEntryField(e,"sample_duration","uint",32),512&G(this)&&this._procEntryField(e,"sample_size","uint",32),1024&G(this)&&this._procEntryField(e,"sample_flags","uint",32),2048&G(this)&&this._procEntryField(e,"sample_composition_time_offset",1===this.version?"int":"uint",32)}))},i.prototype._boxProcessors["url "]=i.prototype._boxProcessors["urn "]=function(){this._procFullBox(),"urn "===this.type&&this._procField("name","string",-1),this._procField("location","string",-1)},i.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},i.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},i.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},i.prototype._boxProcessors.vtte=function(){}},5530:function(e,t,n){e.exports=n(6146).polyfill()},6146:function(e,t,n){e.exports=function(){function e(e){return"function"==typeof e}var t=h||function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=0,i=void 0,a=void 0,o=function(e,t){m[r]=e,m[r+1]=t,2===(r+=2)&&(a?a(v):b())},s="undefined"!=typeof window?window:void 0,l=s||{},u=l.MutationObserver||l.WebKitMutationObserver,d="undefined"==typeof self&&void 0!==tt&&"[object process]"==={}.toString.call(tt),g="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var e=f;return function(){return e(v,1)}}var m=new Array(1e3);function v(){for(var e=0;e<r;e+=2)(0,m[e])(m[e+1]),m[e]=void 0,m[e+1]=void 0;r=0}var y,E,_,T,b=void 0;function S(e,t){var n=this,r=new this.constructor(R);void 0===r[I]&&k(r);var i=n._state;if(i){var a=arguments[i-1];o((function(){return F(i,r,a,n._result)}))}else O(n,r,e,t);return r}function A(e){if(e&&"object"==c(e)&&e.constructor===this)return e;var t=new this(R);return C(t,e),t}b=d?function(){return qe(v)}:u?(E=0,_=new u(v),T=document.createTextNode(""),_.observe(T,{characterData:!0}),function(){T.data=E=++E%2}):g?((y=new MessageChannel).port1.onmessage=v,function(){return y.port2.postMessage(0)}):void 0===s?function(){try{var e=Function("return this")().require("vertx");return void 0!==(i=e.runOnLoop||e.runOnContext)?function(){i(v)}:p()}catch(e){return p()}}():p();var I=Math.random().toString(36).substring(2);function R(){}var w=void 0;function N(t,n,r){n.constructor===t.constructor&&r===S&&n.constructor.resolve===A?function(e,t){1===t._state?M(e,t._result):2===t._state?L(e,t._result):O(t,void 0,(function(t){return C(e,t)}),(function(t){return L(e,t)}))}(t,n):void 0===r?M(t,n):e(r)?function(e,t,n){o((function(e){var r=!1,i=function(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}(n,t,(function(n){r||(r=!0,t!==n?C(e,n):M(e,n))}),(function(t){r||(r=!0,L(e,t))}),e._label);!r&&i&&(r=!0,L(e,i))}),e)}(t,n,r):M(t,n)}function C(e,t){if(e===t)L(e,new TypeError("You cannot resolve a promise with itself"));else if(i=c(r=t),null===r||"object"!==i&&"function"!==i)M(e,t);else{var n=void 0;try{n=t.then}catch(t){return void L(e,t)}N(e,t,n)}var r,i}function D(e){e._onerror&&e._onerror(e._result),P(e)}function M(e,t){e._state===w&&(e._result=t,e._state=1,0!==e._subscribers.length&&o(P,e))}function L(e,t){e._state===w&&(e._state=2,e._result=t,o(D,e))}function O(e,t,n,r){var i=e._subscribers,a=i.length;e._onerror=null,i[a]=t,i[a+1]=n,i[a+2]=r,0===a&&e._state&&o(P,e)}function P(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,i=void 0,a=e._result,o=0;o<t.length;o+=3)r=t[o],i=t[o+n],r?F(n,r,i,a):i(a);e._subscribers.length=0}}function F(t,n,r,i){var a=e(r),o=void 0,s=void 0,l=!0;if(a){try{o=r(i)}catch(e){l=!1,s=e}if(n===o)return void L(n,new TypeError("A promises callback cannot return that same promise."))}else o=i;n._state!==w||(a&&l?C(n,o):!1===l?L(n,s):1===t?M(n,o):2===t&&L(n,o))}var x=0;function k(e){e[I]=x++,e._state=void 0,e._result=void 0,e._subscribers=[]}var U=function(){function e(e,n){this._instanceConstructor=e,this.promise=new e(R),this.promise[I]||k(this.promise),t(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?M(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&M(this.promise,this._result))):L(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===w&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===A){var i=void 0,a=void 0,o=!1;try{i=e.then}catch(e){o=!0,a=e}if(i===S&&e._state!==w)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(n===Z){var s=new n(R);o?L(s,a):N(s,e,i),this._willSettleAt(s,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===w&&(this._remaining--,2===e?L(r,n):this._result[t]=n),0===this._remaining&&M(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;O(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},e}(),Z=function(){function t(e){this[I]=x++,this._result=this._state=void 0,this._subscribers=[],R!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){C(e,t)}),(function(t){L(e,t)}))}catch(t){L(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var n=this,r=n.constructor;return e(t)?n.then((function(e){return r.resolve(t()).then((function(){return e}))}),(function(e){return r.resolve(t()).then((function(){throw e}))})):n.then(t,t)},t}();return Z.prototype.then=S,Z.all=function(e){return new U(this,e).promise},Z.race=function(e){var n=this;return t(e)?new n((function(t,r){for(var i=e.length,a=0;a<i;a++)n.resolve(e[a]).then(t,r)})):new n((function(e,t){return t(new TypeError("You must pass an array to race."))}))},Z.resolve=A,Z.reject=function(e){var t=new this(R);return L(t,e),t},Z._setScheduler=function(e){a=e},Z._setAsap=function(e){o=e},Z._asap=o,Z.polyfill=function(){var e=void 0;if(void 0!==n.g)e=n.g;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=Z},Z.Promise=Z,Z}()},1159:function(e){var t,n="object"==("undefined"==typeof Reflect?"undefined":c(Reflect))?Reflect:null,r=n&&"function"==typeof me?me:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof ve?ve:W?function(e){var t;return d(t=ye(e)).call(t,W(e))}:function(e){return ye(e)};var i=Ee||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new F((function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),n(v([]).call(arguments))}y(e,t,a,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&y(e,"error",t,{once:!0})}(e,i)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+c(e))}function l(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var i,a,o,u;if(s(n),void 0===(a=e._events)?(a=e._events=O(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),void 0===o)o=a[t]=n,++e._eventsCount;else if("function"==typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=l(e))>0&&o.length>i&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,u=c,console&&console.warn&&console.warn(u)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=A(f).call(f,r);return i.listener=n,r.wrapFn=i,i}function g(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function y(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+c(e));e.addEventListener(t,(function i(a){r.once&&e.removeEventListener(t,i),n(a)}))}}C(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),a.init=function(){void 0!==this._events&&this._events!==L(this)._events||(this._events=O(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var u=l.length,c=m(l,u);for(n=0;n<u;++n)r(c[n],this,t)}return!0},a.prototype.addListener=function(e,t){return u(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return u(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,h(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,h(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,a,o;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=O(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=O(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=O(null):delete n[e]),this;if(0===arguments.length){var i,a=z(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=O(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return g(this,e,!0)},a.prototype.rawListeners=function(e){return g(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},3101:function(e){var t=h,n=z,r=Object.prototype.hasOwnProperty;e.exports=function e(i,a){if(i===a)return!0;if(i&&a&&"object"==c(i)&&"object"==c(a)){var o,s,l,u=t(i),f=t(a);if(u&&f){if((s=i.length)!=a.length)return!1;for(o=s;0!=o--;)if(!e(i[o],a[o]))return!1;return!0}if(u!=f)return!1;var d=i instanceof Date,h=a instanceof Date;if(d!=h)return!1;if(d&&h)return i.getTime()==a.getTime();var g=i instanceof RegExp,p=a instanceof RegExp;if(g!=p)return!1;if(g&&p)return i.toString()==a.toString();var m=n(i);if((s=m.length)!==n(a).length)return!1;for(o=s;0!=o--;)if(!r.call(a,m[o]))return!1;for(o=s;0!=o--;)if(!e(i[l=m[o]],a[l]))return!1;return!0}return i!=i&&a!=a}},3362:function(e,t,n){!function(e,t,n,r,i){function a(e){if("contents"in e)for(var t=("styleAttrs"in e?e.styleAttrs[r.byName.ruby.qname]:null),n="span"===e.kind&&("container"===t||"textContainer"===t||"baseContainer"===t),i=e.contents.length-1;i>=0;i--)!n||"styleAttrs"in e.contents[i]&&r.byName.ruby.qname in e.contents[i].styleAttrs?a(e.contents[i]):delete e.contents[i]}function o(e,t,n,r){var i=r&&"seq"===r.timeContainer,a=0;r&&(a=i&&n?n.end:r.begin),t.begin=t.explicit_begin?t.explicit_begin+a:a;var s=t.begin,l=null;if("sets"in t)for(var u=0;u<t.sets.length;u++)o(e,t.sets[u],l,t),s="seq"===t.timeContainer?t.sets[u].end:Math.max(s,t.sets[u].end),l=t.sets[u];if("contents"in t){if("contents"in t)for(var c=0;c<t.contents.length;c++)o(e,t.contents[c],l,t),s="seq"===t.timeContainer?t.contents[c].end:Math.max(s,t.contents[c].end),l=t.contents[c]}else s=i?t.begin:Number.POSITIVE_INFINITY;null!==t.explicit_end&&null!==t.explicit_dur?t.end=Math.min(t.begin+t.explicit_dur,a+t.explicit_end):null===t.explicit_end&&null!==t.explicit_dur?t.end=t.begin+t.explicit_dur:null!==t.explicit_end&&null===t.explicit_dur?t.end=a+t.explicit_end:t.end=s,delete t.explicit_begin,delete t.explicit_dur,delete t.explicit_end,e._registerEvent(t)}function s(e){this.node=e}function l(){this.events=[],this.head=new u,this.body=null}function u(){this.styling=new c,this.layout=new h}function c(){this.styles={},this.initials={}}function f(){this.id=null,this.styleAttrs=null,this.styleRefs=null}function d(){this.styleAttrs=null}function h(){this.regions={}}function g(e,t){p.call(this,"image"),this.src=e,this.type=t}function p(e){this.kind=e}function m(e){this.id=e}function v(e){this.regionID=e}function y(e){this.styleAttrs=e}function E(e){this.sets=e}function T(e){this.contents=e}function b(e,t,n){this.explicit_begin=e,this.explicit_end=t,this.explicit_dur=n}function A(){p.call(this,"body")}function I(){p.call(this,"div")}function R(){p.call(this,"p")}function w(){p.call(this,"span")}function N(){p.call(this,"span")}function C(){p.call(this,"br")}function D(){}function M(){}function L(e){return e&&"xml:id"in e.attributes&&e.attributes["xml:id"].value||null}function O(e){return e&&"style"in e.attributes?e.attributes.style.value.split(" "):[]}function P(e,t){var n={};if(null!==e)for(var i in e.attributes){var a=e.attributes[i].uri+" "+e.attributes[i].local,o=r.byQName[a];if(void 0!==o){var s=o.parse(e.attributes[i].value);null!==s?(n[a]=s,o===r.byName.zIndex&&G(t,"zIndex attribute present but not used by IMSC1 since regions do not overlap")):q(t,"Cannot parse styling attribute "+a+" --\x3e "+e.attributes[i].value)}}return n}function F(e,t,n){for(var r in e.attributes)if(e.attributes[r].uri===t&&e.attributes[r].local===n)return e.attributes[r].value;return null}function k(e,t,n){var r,i=null;return null!==(r=/^(\d+(?:\.\d+)?)f$/.exec(n))?null!==t&&(i=x(r[1])/t):null!==(r=/^(\d+(?:\.\d+)?)t$/.exec(n))?null!==e&&(i=x(r[1])/e):null!==(r=/^(\d+(?:\.\d+)?)ms$/.exec(n))?i=x(r[1])/1e3:null!==(r=/^(\d+(?:\.\d+)?)s$/.exec(n))?i=x(r[1]):null!==(r=/^(\d+(?:\.\d+)?)h$/.exec(n))?i=3600*x(r[1]):null!==(r=/^(\d+(?:\.\d+)?)m$/.exec(n))?i=60*x(r[1]):null!==(r=/^(\d{2,}):(\d\d):(\d\d(?:\.\d+)?)$/.exec(n))?i=3600*_(r[1])+60*_(r[2])+x(r[3]):null!==(r=/^(\d{2,}):(\d\d):(\d\d)\:(\d{2,})$/.exec(n))&&null!==t&&(i=3600*_(r[1])+60*_(r[2])+_(r[3])+(null===r[4]?0:_(r[4])/t)),i}function U(e,t,n){for(;t.styleRefs.length>0;){var r=t.styleRefs.pop();r in e.styles?(U(e,e.styles[r],n),B(e.styles[r].styleAttrs,t.styleAttrs)):q(n,"Non-existant style id referenced")}}function Z(e,t,n,r){for(var i=t.length-1;i>=0;i--){var a=t[i];a in e.styles?B(e.styles[a].styleAttrs,n):q(r,"Non-existant style id referenced")}}function B(e,t){for(var n in e)e.hasOwnProperty(n)&&(n in t||(t[n]=e[n]))}function G(e,t){if(e&&e.warn&&e.warn(t))throw t}function q(e,t){if(e&&e.error&&e.error(t))throw t}function Y(e,t){throw e&&e.fatal&&e.fatal(t),t}function j(e,t){for(var n,r=0,i=e.length-1;r<=i;){var a=e[n=Math.floor((r+i)/2)];if(a<t)r=n+1;else{if(!(a>t))return{found:!0,index:n};i=n-1}}return{found:!1,index:r}}e.fromXML=function(e,i,p){var m=t.parser(!0,{xmlns:!0}),v=[],y=[],E=[],_=0,T=null;m.onclosetag=function(e){if(v[0]instanceof D)null!==T.head&&null!==T.head.styling&&Z(T.head.styling,v[0].styleRefs,v[0].styleAttrs,i),delete v[0].styleRefs;else if(v[0]instanceof c)for(var t in v[0].styles)v[0].styles.hasOwnProperty(t)&&U(v[0],v[0].styles[t],i);else if(v[0]instanceof R||v[0]instanceof w){if(v[0].contents.length>1){var r,a=[v[0].contents[0]];for(r=1;r<v[0].contents.length;r++)v[0].contents[r]instanceof N&&a[a.length-1]instanceof N?a[a.length-1].text+=v[0].contents[r].text:a.push(v[0].contents[r]);v[0].contents=a}v[0]instanceof w&&1===v[0].contents.length&&v[0].contents[0]instanceof N&&(v[0].text=v[0].contents[0].text,delete v[0].contents)}else v[0]instanceof s&&(v[0].node.uri===n.ns_tt&&"metadata"===v[0].node.local?_--:_>0&&p&&"onCloseTag"in p&&p.onCloseTag());E.shift(),y.shift(),v.shift()},m.ontext=function(e){if(void 0===v[0]);else if(v[0]instanceof w||v[0]instanceof R){if(v[0]instanceof w){var t=v[0].styleAttrs[r.byName.ruby.qname];if("container"===t||"textContainer"===t||"baseContainer"===t)return}var n=new N;n.initFromText(T,v[0],e,y[0],E[0],i),v[0].contents.push(n)}else v[0]instanceof s&&_>0&&p&&"onText"in p&&p.onText(e)},m.onopentag=function(e){var t=e.attributes["xml:space"];t?E.unshift(t.value):0===E.length?E.unshift("default"):E.unshift(E[0]);var a=e.attributes["xml:lang"];if(a?y.unshift(a.value):0===y.length?y.unshift(""):y.unshift(y[0]),e.uri===n.ns_tt)if("tt"===e.local)null!==T&&Y(i,"Two <tt> elements at ("+this.line+","+this.column+")"),(T=new l).initFromNode(e,y[0],i),v.unshift(T);else if("head"===e.local)v[0]instanceof l||Y(i,"Parent of <head> element is not <tt> at ("+this.line+","+this.column+")"),v.unshift(T.head);else if("styling"===e.local)v[0]instanceof u||Y(i,"Parent of <styling> element is not <head> at ("+this.line+","+this.column+")"),v.unshift(T.head.styling);else if("style"===e.local){var o;v[0]instanceof c?((o=new f).initFromNode(e,i),o.id?T.head.styling.styles[o.id]=o:q(i,"<style> element missing @id attribute"),v.unshift(o)):v[0]instanceof D?((o=new f).initFromNode(e,i),B(o.styleAttrs,v[0].styleAttrs),v.unshift(o)):Y(i,"Parent of <style> element is not <styling> or <region> at ("+this.line+","+this.column+")")}else if("initial"===e.local){var m;if(v[0]instanceof c){for(var b in(m=new d).initFromNode(e,i),m.styleAttrs)m.styleAttrs.hasOwnProperty(b)&&(T.head.styling.initials[b]=m.styleAttrs[b]);v.unshift(m)}else Y(i,"Parent of <initial> element is not <styling> at ("+this.line+","+this.column+")")}else if("layout"===e.local)v[0]instanceof u||Y(i,"Parent of <layout> element is not <head> at "+this.line+","+this.column+")"),v.unshift(T.head.layout);else if("region"===e.local){v[0]instanceof h||Y(i,"Parent of <region> element is not <layout> at "+this.line+","+this.column+")");var S=new D;S.initFromNode(T,e,y[0],i),!S.id||S.id in T.head.layout.regions?q(i,"Ignoring <region> with duplicate or missing @id at "+this.line+","+this.column+")"):T.head.layout.regions[S.id]=S,v.unshift(S)}else if("body"===e.local){v[0]instanceof l||Y(i,"Parent of <body> element is not <tt> at "+this.line+","+this.column+")"),null!==T.body&&Y(i,"Second <body> element at "+this.line+","+this.column+")");var N=new A;N.initFromNode(T,e,y[0],i),T.body=N,v.unshift(N)}else if("div"===e.local){v[0]instanceof I||v[0]instanceof A||Y(i,"Parent of <div> element is not <body> or <div> at "+this.line+","+this.column+")");var L=new I;L.initFromNode(T,v[0],e,y[0],i);var O=L.styleAttrs[r.byName.backgroundImage.qname];O&&(L.contents.push(new g(O)),delete L.styleAttrs[r.byName.backgroundImage.qname]),v[0].contents.push(L),v.unshift(L)}else if("image"===e.local){v[0]instanceof I||Y(i,"Parent of <image> element is not <div> at "+this.line+","+this.column+")");var P=new g;P.initFromNode(T,v[0],e,y[0],i),v[0].contents.push(P),v.unshift(P)}else if("p"===e.local){v[0]instanceof I||Y(i,"Parent of <p> element is not <div> at "+this.line+","+this.column+")");var F=new R;F.initFromNode(T,v[0],e,y[0],i),v[0].contents.push(F),v.unshift(F)}else if("span"===e.local){v[0]instanceof w||v[0]instanceof R||Y(i,"Parent of <span> element is not <span> or <p> at "+this.line+","+this.column+")");var x=new w;x.initFromNode(T,v[0],e,y[0],E[0],i),v[0].contents.push(x),v.unshift(x)}else if("br"===e.local){v[0]instanceof w||v[0]instanceof R||Y(i,"Parent of <br> element is not <span> or <p> at "+this.line+","+this.column+")");var k=new C;k.initFromNode(T,v[0],e,y[0],i),v[0].contents.push(k),v.unshift(k)}else if("set"===e.local){v[0]instanceof w||v[0]instanceof R||v[0]instanceof I||v[0]instanceof A||v[0]instanceof D||v[0]instanceof C||Y(i,"Parent of <set> element is not a content element or a region at "+this.line+","+this.column+")");var U=new M;U.initFromNode(T,v[0],e,i),v[0].sets.push(U),v.unshift(U)}else v.unshift(new s(e));else v.unshift(new s(e));if(v[0]instanceof s)if(e.uri===n.ns_tt&&"metadata"===e.local)_++;else if(_>0&&p&&"onOpenTag"in p){var Z=[];for(var G in e.attributes)Z[e.attributes[G].uri+" "+e.attributes[G].local]={uri:e.attributes[G].uri,local:e.attributes[G].local,value:e.attributes[G].value};p.onOpenTag(e.uri,e.local,Z)}},m.write(e).close(),delete T.head.styling.styles;var b=!1;for(var S in T.head.layout.regions)if(T.head.layout.regions.hasOwnProperty(S)){b=!0;break}if(!b){var L=D.prototype.createDefaultRegion(T.lang);T.head.layout.regions[L.id]=L}for(var O in T.head.layout.regions)T.head.layout.regions.hasOwnProperty(O)&&o(T,T.head.layout.regions[O],null,null);return T.body&&o(T,T.body,null,null),T.body&&a(T.body),T},l.prototype.initFromNode=function(e,t,r){var a=function(e,t){var r=F(e,n.ns_ttp,"cellResolution"),i=15,a=32;if(null!==r){var o=/(\d+) (\d+)/.exec(r);null!==o?(a=_(o[1]),i=_(o[2])):G(t,"Malformed cellResolution value (using initial value instead)")}return{w:a,h:i}}(e,r);this.cellLength={h:new i.ComputedLength(0,1/a.h),w:new i.ComputedLength(1/a.w,0)};var o=function(e,t){var r,i=F(e,n.ns_ttp,"frameRate"),a=30;null!==i&&(null!==(r=/(\d+)/.exec(i))?a=_(r[1]):G(t,"Malformed frame rate attribute (using initial value instead)"));var o=F(e,n.ns_ttp,"frameRateMultiplier"),s=1;null!==o&&(null!==(r=/(\d+) (\d+)/.exec(o))?s=_(r[1])/_(r[2]):G(t,"Malformed frame rate multiplier attribute (using initial value instead)"));var l=s*a,u=1,c=F(e,n.ns_ttp,"tickRate");return null===c?null!==i&&(u=l):null!==(r=/(\d+)/.exec(c))?u=_(r[1]):G(t,"Malformed tick rate attribute (using initial value instead)"),{effectiveFrameRate:l,tickRate:u}}(e,r);this.effectiveFrameRate=o.effectiveFrameRate,this.tickRate=o.tickRate,this.aspectRatio=function(e,t){var r=F(e,n.ns_ittp,"aspectRatio");null===r&&(r=F(e,n.ns_ttp,"displayAspectRatio"));var i=null;if(null!==r){var a=/(\d+)\s+(\d+)/.exec(r);if(null!==a){var o=_(a[1]),s=_(a[2]);0!==o&&0!==s?i=o/s:q(t,"Illegal aspectRatio values (ignoring)")}else q(t,"Malformed aspectRatio attribute (ignoring)")}return i}(e,r);var s=F(e,n.ns_ttp,"timeBase");null!==s&&"media"!==s&&Y(r,"Unsupported time base");var l=function(e,t){var r=F(e,n.ns_tts,"extent");if(null===r)return null;var a=r.split(" ");if(2!==a.length)return G(t,"Malformed extent (ignoring)"),null;var o=i.parseLength(a[0]),s=i.parseLength(a[1]);return s&&o?{h:s,w:o}:(G(t,"Malformed extent values (ignoring)"),null)}(e,r);null===l?this.pxLength={h:null,w:null}:("px"===l.h.unit&&"px"===l.w.unit||Y(r,"Extent on TT must be in px or absent"),this.pxLength={h:new i.ComputedLength(0,1/l.h.value),w:new i.ComputedLength(1/l.w.value,0)}),this.dimensions={h:new i.ComputedLength(0,1),w:new i.ComputedLength(1,0)},this.lang=t},l.prototype._registerEvent=function(e){if(!(e.end<=e.begin)){var t,n=j(this.events,e.begin);if(n.found||S(t=this.events).call(t,n.index,0,e.begin),e.end!==Number.POSITIVE_INFINITY){var r,i=j(this.events,e.end);i.found||S(r=this.events).call(r,i.index,0,e.end)}}},l.prototype.getMediaTimeRange=function(){return[this.events[0],this.events[this.events.length-1]]},l.prototype.getMediaTimeEvents=function(){return this.events},f.prototype.initFromNode=function(e,t){this.id=L(e),this.styleAttrs=P(e,t),this.styleRefs=O(e)},d.prototype.initFromNode=function(e,t){for(var r in this.styleAttrs={},e.attributes)if(e.attributes[r].uri===n.ns_itts||e.attributes[r].uri===n.ns_ebutts||e.attributes[r].uri===n.ns_tts){var i=e.attributes[r].uri+" "+e.attributes[r].local;this.styleAttrs[i]=e.attributes[r].value}},g.prototype.initFromNode=function(e,t,n,r,i){this.src="src"in n.attributes?n.attributes.src.value:null,this.src||q(i,"Invalid image@src attribute"),this.type="type"in n.attributes?n.attributes.type.value:null,this.type||q(i,"Invalid image@type attribute"),y.prototype.initFromNode.call(this,e,t,n,i),b.prototype.initFromNode.call(this,e,t,n,i),E.prototype.initFromNode.call(this,e,t,n,i),v.prototype.initFromNode.call(this,e,t,n,i),this.lang=r},m.prototype.initFromNode=function(e,t,n,r){this.id=L(n)},v.prototype.initFromNode=function(e,t,n,r){this.regionID=function(e){return e&&"region"in e.attributes?e.attributes.region.value:""}(n)},y.prototype.initFromNode=function(e,t,n,r){this.styleAttrs=P(n,r),null!==e.head&&null!==e.head.styling&&Z(e.head.styling,O(n),this.styleAttrs,r)},E.prototype.initFromNode=function(e,t,n,r){this.sets=[]},T.prototype.initFromNode=function(e,t,n,r){this.contents=[]},b.prototype.initFromNode=function(e,t,n,r){var i=function(e,t,n,r){var i=null;n&&"begin"in n.attributes&&null===(i=k(e.tickRate,e.effectiveFrameRate,n.attributes.begin.value))&&G(r,"Malformed begin value "+n.attributes.begin.value+" (using 0)");var a=null;n&&"dur"in n.attributes&&null===(a=k(e.tickRate,e.effectiveFrameRate,n.attributes.dur.value))&&G(r,"Malformed dur value "+n.attributes.dur.value+" (ignoring)");var o=null;return n&&"end"in n.attributes&&null===(o=k(e.tickRate,e.effectiveFrameRate,n.attributes.end.value))&&G(r,"Malformed end value (ignoring)"),{explicit_begin:i,explicit_end:o,explicit_dur:a}}(e,0,n,r);this.explicit_begin=i.explicit_begin,this.explicit_end=i.explicit_end,this.explicit_dur=i.explicit_dur,this.timeContainer=function(e,t){var n=e&&"timeContainer"in e.attributes?e.attributes.timeContainer.value:null;return n&&"par"!==n?"seq"===n?"seq":(q(t,"Illegal value of timeContainer (assuming 'par')"),"par"):"par"}(n,r)},A.prototype.initFromNode=function(e,t,n,r){y.prototype.initFromNode.call(this,e,null,t,r),b.prototype.initFromNode.call(this,e,null,t,r),E.prototype.initFromNode.call(this,e,null,t,r),v.prototype.initFromNode.call(this,e,null,t,r),T.prototype.initFromNode.call(this,e,null,t,r),this.lang=n},I.prototype.initFromNode=function(e,t,n,r,i){y.prototype.initFromNode.call(this,e,t,n,i),b.prototype.initFromNode.call(this,e,t,n,i),E.prototype.initFromNode.call(this,e,t,n,i),v.prototype.initFromNode.call(this,e,t,n,i),T.prototype.initFromNode.call(this,e,t,n,i),this.lang=r},R.prototype.initFromNode=function(e,t,n,r,i){y.prototype.initFromNode.call(this,e,t,n,i),b.prototype.initFromNode.call(this,e,t,n,i),E.prototype.initFromNode.call(this,e,t,n,i),v.prototype.initFromNode.call(this,e,t,n,i),T.prototype.initFromNode.call(this,e,t,n,i),this.lang=r},w.prototype.initFromNode=function(e,t,n,r,i,a){y.prototype.initFromNode.call(this,e,t,n,a),b.prototype.initFromNode.call(this,e,t,n,a),E.prototype.initFromNode.call(this,e,t,n,a),v.prototype.initFromNode.call(this,e,t,n,a),T.prototype.initFromNode.call(this,e,t,n,a),this.space=i,this.lang=r},N.prototype.initFromText=function(e,t,n,r,i,a){b.prototype.initFromNode.call(this,e,t,null,a),this.text=n,this.space=i,this.lang=r},C.prototype.initFromNode=function(e,t,n,r,i){v.prototype.initFromNode.call(this,e,t,n,i),b.prototype.initFromNode.call(this,e,t,n,i),this.lang=r},D.prototype.createDefaultRegion=function(e){var t=new D;return m.call(t,""),y.call(t,{}),E.call(t,[]),b.call(t,0,Number.POSITIVE_INFINITY,null),this.lang=e,t},D.prototype.initFromNode=function(e,t,n,r){m.prototype.initFromNode.call(this,e,null,t,r),b.prototype.initFromNode.call(this,e,null,t,r),E.prototype.initFromNode.call(this,e,null,t,r),this.styleAttrs=P(t,r),this.styleRefs=O(t),this.lang=n},M.prototype.initFromNode=function(e,t,n,r){b.prototype.initFromNode.call(this,e,t,n,r);var i=P(n,r);for(var a in this.qname=null,this.value=null,i)if(i.hasOwnProperty(a)){if(this.qname){q(r,"More than one style specified on set");break}this.qname=a,this.value=i[a]}}}(t,"undefined"==typeof sax?n(5378):sax,"undefined"==typeof imscNames?n(210):imscNames,"undefined"==typeof imscStyles?n(6811):imscStyles,"undefined"==typeof imscUtils?n(5926):imscUtils)},506:function(e,t,n){var r=/firefox/i.test(navigator.userAgent);!function(e,t,n){function i(e,t,f,h){var g;if("region"===f.kind)(g=document.createElement("div")).style.position="absolute";else if("body"===f.kind)g=document.createElement("div");else if("div"===f.kind)g=document.createElement("div");else if("image"===f.kind){if(g=document.createElement("img"),null!==e.imgResolver&&null!==f.src){var v=e.imgResolver(f.src,g);v&&(g.src=v),g.height=e.regionH,g.width=e.regionW}}else if("p"===f.kind)g=document.createElement("p");else if("span"===f.kind)if("container"===f.styleAttrs[n.byName.ruby.qname])g=document.createElement("ruby"),e.ruby=!0;else if("base"===f.styleAttrs[n.byName.ruby.qname])g=document.createElement("span");else if("text"===f.styleAttrs[n.byName.ruby.qname])g=document.createElement("rt");else if("baseContainer"===f.styleAttrs[n.byName.ruby.qname])g=document.createElement("rbc");else if("textContainer"===f.styleAttrs[n.byName.ruby.qname])g=document.createElement("rtc");else{if("delimiter"===f.styleAttrs[n.byName.ruby.qname])return;g=document.createElement("span")}else"br"===f.kind&&(g=document.createElement("br"));if(g){if(f.lang&&("region"!==f.kind&&f.lang===h.lang||(g.lang=f.lang)),t.appendChild(g),g.style.margin="0","region"===f.kind){var y=f.styleAttrs[n.byName.writingMode.qname];"lrtb"===y||"lr"===y?(e.ipd="lr",e.bpd="tb"):"rltb"===y||"rl"===y?(e.ipd="rl",e.bpd="tb"):"tblr"===y?(e.ipd="tb",e.bpd="lr"):"tbrl"!==y&&"tb"!==y||(e.ipd="tb",e.bpd="rl")}else if("p"===f.kind&&"tb"===e.bpd){var T=f.styleAttrs[n.byName.direction.qname];e.ipd="ltr"===T?"lr":"rl"}for(var b=0;b<d.length;b++){var A=d[b],I=f.styleAttrs[A.qname];void 0!==I&&null!==ee(A)&&ee(A).call(A,e,g,f,I)}var R=g,w=f.styleAttrs[n.byName.linePadding.qname];if(w&&!w.isZero()){var N=w.toUsedLength(e.w,e.h);if(N>0){var C=Math.ceil(N)+"px";"tb"===e.bpd?(R.style.paddingLeft=C,R.style.paddingRight=C):(R.style.paddingTop=C,R.style.paddingBottom=C),e.lp=w}}var D=f.styleAttrs[n.byName.multiRowAlign.qname];if(D&&"auto"!==D){var M=document.createElement("span");M.style.display="inline-block",M.style.textAlign=D,g.appendChild(M),R=M,e.mra=D}var L=f.styleAttrs[n.byName.rubyReserve.qname];if(L&&"none"!==L[0]&&(e.rubyReserve=L),f.styleAttrs[n.byName.fillLineGap.qname]&&(e.flg=!0),"span"===f.kind&&f.text){var O=f.styleAttrs[n.byName.textEmphasis.qname];if(O&&"none"!==O.style&&(e.textEmphasis=!0),n.byName.textCombine.qname in f.styleAttrs&&"all"===f.styleAttrs[n.byName.textCombine.qname])g.textContent=f.text,g._isd_element=f,O&&c(e,g,0,O);else for(var P="",F=0;F<f.text.length;F++){P+=f.text.charAt(F);var x=f.text.charCodeAt(F);if(x<55296||x>56319||F===f.text.length-1){var k=document.createElement("span");k.textContent=P,O&&c(e,k,0,O),g.appendChild(k),P="",k._isd_element=f}}}if("contents"in f)for(var U=0;U<f.contents.length;U++)i(e,R,f.contents[U],f);var Z=[];if("p"===f.kind&&(u(e,R,Z,null),e.rubyReserve&&(function(e,t){for(var n=0;n<e.length;n++){var r,i,a=document.createElement("ruby"),o=document.createElement("span");o.textContent="",a.appendChild(o);var s,l=t.rubyReserve[1].toUsedLength(t.w,t.h)+"px";"both"===t.rubyReserve[0]||"outside"===t.rubyReserve[0]&&1==e.length?((r=document.createElement("rtc")).style[m]=p?"after":"under",r.textContent="",r.style.fontSize=l,(i=document.createElement("rtc")).style[m]=p?"before":"over",i.textContent="",i.style.fontSize=l,a.appendChild(r),a.appendChild(i)):((r=document.createElement("rtc")).textContent="",r.style.fontSize=l,s="after"===t.rubyReserve[0]||"outside"===t.rubyReserve[0]&&n>0?p?"after":"tb"===t.bpd||"rl"===t.bpd?"under":"over":p?"before":"tb"===t.bpd||"rl"===t.bpd?"over":"under",r.style[m]=s,a.appendChild(r));for(var u=null,c=0;c<e[n].rbc.length;c++)if("ruby"===e[n].rbc[c].localName){u=e[n].rbc[c];for(var f=0;f<u.style.length;f++)a.style.setProperty(u.style.item(f),u.style.getPropertyValue(u.style.item(f)));break}(u=u||e[n].elements[0].node).parentElement.insertBefore(a,u)}}(Z,e),e.rubyReserve=null),(e.ruby||e.rubyReserve)&&(function(e,t){for(var n=0;n<e.length;n++)for(var r=0;r<e[n].rbc.length;r++){var i;e[n].rbc[r].style[m]||(i=p?0===n?"before":"after":"tb"===t.bpd||"rl"===t.bpd?0===n?"over":"under":0===n?"under":"over",e[n].rbc[r].style[m]=i)}}(Z,e),e.ruby=null),e.textEmphasis&&(function(e,t){for(var n=0;n<e.length;n++)for(var r=0;r<e[n].te.length;r++){var i;e[n].te[r].style[E]&&"none"!==e[n].te[r].style[E]||(i="tb"===t.bpd?0===n?"left over":"left under":"rl"===t.bpd?0===n?"right under":"left under":0===n?"left under":"right under",e[n].te[r].style[E]=i)}}(Z,e),e.textEmphasis=null),e.mra&&(function(e){for(var t=0;t<e.length-1;t++){var n=e[t].elements.length;if(0!==n&&!1===e[t].br){var r=document.createElement("br"),i=e[t].elements[n-1].node;i.parentElement.insertBefore(r,i.nextSibling)}}}(Z),e.mra=null),e.lp&&(function(e,t,n){if(null!==e)for(var i=0;i<e.length;i++){var a=e[i].elements.length,o=Math.ceil(t)+"px",s="-"+Math.ceil(t)+"px";if(0!==a){var l=e[i].elements[e[i].start_elem],u=e[i].elements[e[i].end_elem];if(l===u){var c=l.node.getBoundingClientRect();if(0==c.width||0==c.height)continue}"lr"===n.ipd?(l.node.style.marginLeft=s,l.node.style.paddingLeft=o):"rl"===n.ipd?(l.node.style.paddingRight=o,l.node.style.marginRight=s):"tb"===n.ipd&&(l.node.style.paddingTop=o,l.node.style.marginTop=s),"lr"===n.ipd?(r||(u.node.style.marginRight=s),u.node.style.paddingRight=o):"rl"===n.ipd?(u.node.style.paddingLeft=o,r||(u.node.style.marginLeft=s)):"tb"===n.ipd&&(u.node.style.paddingBottom=o,u.node.style.marginBottom=s)}}}(Z,e.lp.toUsedLength(e.w,e.h),e),e.lp=null),function(e,t){for(var n=0;n<e.length;n++)for(var r=e[n],i=1;i<r.elements.length;){var s,l=r.elements[i-1],u=r.elements[i];o(l.node,u.node,t)?S(s=r.elements).call(s,i,1):i++}for(var c,f,d=[],h=0;h<e.length;h++)for(var g=0;g<e[h].elements.length;g++)(f=a(c=e[h].elements[g].node,d,!1))&&(c.style.backgroundColor=f);for(var p=0;p<d.length;p++)d[p].style.backgroundColor=""}(Z,e),e.flg)){var B=l(R.getBoundingClientRect(),e);!function(e,t,n,r,i){for(var a=_e(n-t),o=0;o<=e.length;o++){var s,l,u,c;if(s=0===o?Math.round(t):o===e.length?Math.round(n):Math.round((e[o-1].after+e[o].before)/2),o>0&&e[o-1])for(u=0;u<e[o-1].elements.length;u++)l=a*(s-(c=e[o-1].elements[u]).after)+"px","lr"===r.bpd?c.node.style.paddingRight=l:"rl"===r.bpd?c.node.style.paddingLeft=l:"tb"===r.bpd&&(c.node.style.paddingBottom=l);if(o<e.length)for(u=0;u<e[o].elements.length;u++)l=a*((c=e[o].elements[u]).before-s)+"px","lr"===r.bpd?c.node.style.paddingLeft=l:"rl"===r.bpd?c.node.style.paddingRight=l:"tb"===r.bpd&&(c.node.style.paddingTop=l)}}(Z,B.before,B.after,e),e.flg=null}if("region"===f.kind&&"tb"===e.bpd&&e.enableRollUp&&f.contents.length>0&&"after"===f.styleAttrs[n.byName.displayAlign.qname]){u(e,R,Z,null);var G=new s(""===f.id?"_":f.id,Z);if(e.currentISDState[G.id]=G,e.previousISDState&&G.id in e.previousISDState&&e.previousISDState[G.id].plist.length>0&&G.plist.length>1&&G.plist[G.plist.length-2].text===e.previousISDState[G.id].plist[e.previousISDState[G.id].plist.length-1].text){var q=g.firstElementChild,Y=G.plist[G.plist.length-1].after-G.plist[G.plist.length-1].before;q.style.bottom="-"+Y+"px",q.style.transition="transform 0.4s",q.style.position="relative",q.style.transform="translateY(-"+Y+"px)"}}}else _(e.errorHandler,"Error processing ISD element kind: "+f.kind)}function a(e,t,n){return e.style.backgroundColor?(n&&!ne(t).call(t,e)&&t.push(e),e.style.backgroundColor):"SPAN"===e.parentElement.nodeName||"RUBY"===e.parentElement.nodeName||"RBC"===e.parentElement.nodeName||"RTC"===e.parentElement.nodeName||"RT"===e.parentElement.nodeName?a(e.parentElement,t,!0):void 0}function o(e,t,n){if("SPAN"===e.tagName&&"SPAN"===t.tagName&&e._isd_element===t._isd_element){if(!e._isd_element)return _(n.errorHandler,"Internal error: HTML span is not linked to a source element; cannot merge spans."),!1;e.textContent+=t.textContent;for(var r=0;r<t.style.length;r++){var i=t.style[r];(y(i).call(i,"border")>=0||y(i).call(i,"padding")>=0||y(i).call(i,"margin")>=0)&&(e.style[i]=t.style[i])}return t.parentElement.removeChild(t),!0}return!1}function s(e,t){this.id=e,this.plist=t}function l(e,t){var n={before:null,after:null,start:null,end:null};return"tb"===t.bpd?(n.before=e.top,n.after=e.bottom,"lr"===t.ipd?(n.start=e.left,n.end=e.right):(n.start=e.right,n.end=e.left)):"lr"===t.bpd?(n.before=e.left,n.after=e.right,n.start=e.top,n.end=e.bottom):"rl"===t.bpd&&(n.before=e.right,n.after=e.left,n.start=e.top,n.end=e.bottom),n}function u(e,t,n,r){if("rt"!==t.localName&&"rtc"!==t.localName){var i,a,o,s,c=t.style.backgroundColor||r;if(0===t.childElementCount)if("span"===t.localName||"rb"===t.localName){var f=l(t.getBoundingClientRect(),e);if(0!==n.length&&(i=f.before,a=f.after,o=n[n.length-1].before,a<(s=n[n.length-1].after)&&i>o||s<=a&&o>=i)){var d=_e(f.after-f.before),h=_e(f.end-f.start);d*(f.before-n[n.length-1].before)<0&&(n[n.length-1].before=f.before),d*(f.after-n[n.length-1].after)>0&&(n[n.length-1].after=f.after),h*(f.start-n[n.length-1].start)<0&&(n[n.length-1].start=f.start,n[n.length-1].start_elem=n[n.length-1].elements.length),h*(f.end-n[n.length-1].end)>0&&(n[n.length-1].end=f.end,n[n.length-1].end_elem=n[n.length-1].elements.length)}else n.push({before:f.before,after:f.after,start:f.start,end:f.end,start_elem:0,end_elem:0,elements:[],rbc:[],te:[],text:"",br:!1});n[n.length-1].text+=t.textContent,n[n.length-1].elements.push({node:t,bgcolor:c,before:f.before,after:f.after})}else"br"===t.localName&&0!==n.length&&(n[n.length-1].br=!0);else for(var g=t.firstChild;g;)g.nodeType===Node.ELEMENT_NODE&&(u(e,g,n,c),"ruby"===g.localName||"rtc"===g.localName?n.length>0&&n[n.length-1].rbc.push(g):"span"===g.localName&&g.style[v]&&"none"!==g.style[v]&&n.length>0&&n[n.length-1].te.push(g)),g=g.nextSibling}}function c(e,t,n,r){var i;"none"!==r.style&&("auto"===r.style?t.style[v]="filled":t.style[v]=r.style+" "+r.symbol,("before"===r.position||"after"===r.position)&&(i="tb"===e.bpd?"before"===r.position?"left over":"left under":"rl"===e.bpd?"before"===r.position?"right under":"left under":"before"===r.position?"left under":"right under",t.style[E]=i))}function f(e,t){this.qname=e,this.map=t}e.render=function(e,t,n,r,a,o,s,l,u){var c=r||t.clientHeight,f=a||t.clientWidth;if(null!==e.aspectRatio){var d=c*e.aspectRatio;d>f?c=Math.round(f/e.aspectRatio):f=d}var h=document.createElement("div");h.style.position="relative",h.style.width=f+"px",h.style.height=c+"px",h.style.margin="auto",h.style.top=0,h.style.bottom=0,h.style.left=0,h.style.right=0,h.style.zIndex=0;var g={h:c,w:f,regionH:null,regionW:null,imgResolver:n,displayForcedOnlyMode:o||!1,isd:e,errorHandler:s,previousISDState:l,enableRollUp:u||!1,currentISDState:{},flg:null,lp:null,mra:null,ipd:null,bpd:null,ruby:null,textEmphasis:null,rubyReserve:null};if(t.appendChild(h),"contents"in e)for(var p=0;p<e.contents.length;p++)i(g,h,e.contents[p],e);return g.currentISDState};for(var d=[new f("http://www.w3.org/ns/ttml#styling backgroundColor",(function(e,t,n,r){0!==r[3]&&(t.style.backgroundColor="rgba("+r[0].toString()+","+r[1].toString()+","+r[2].toString()+","+(r[3]/255).toString()+")")})),new f("http://www.w3.org/ns/ttml#styling color",(function(e,t,n,r){t.style.color="rgba("+r[0].toString()+","+r[1].toString()+","+r[2].toString()+","+(r[3]/255).toString()+")"})),new f("http://www.w3.org/ns/ttml#styling direction",(function(e,t,n,r){t.style.direction=r})),new f("http://www.w3.org/ns/ttml#styling display",(function(e,t,n,r){})),new f("http://www.w3.org/ns/ttml#styling displayAlign",(function(e,t,n,r){t.style.display="flex",t.style.flexDirection="column","before"===r?t.style.justifyContent="flex-start":"center"===r?t.style.justifyContent="center":"after"===r&&(t.style.justifyContent="flex-end")})),new f("http://www.w3.org/ns/ttml#styling extent",(function(e,t,n,r){e.regionH=r.h.toUsedLength(e.w,e.h),e.regionW=r.w.toUsedLength(e.w,e.h);var i=0,a=0,o=n.styleAttrs["http://www.w3.org/ns/ttml#styling padding"];o&&(i=o[0].toUsedLength(e.w,e.h)+o[2].toUsedLength(e.w,e.h),a=o[1].toUsedLength(e.w,e.h)+o[3].toUsedLength(e.w,e.h)),t.style.height=e.regionH-i+"px",t.style.width=e.regionW-a+"px"})),new f("http://www.w3.org/ns/ttml#styling fontFamily",(function(e,t,n,r){for(var i=[],a=0;a<r.length;a++){var o;r[a]=T(o=r[a]).call(o),"monospaceSerif"===r[a]?(i.push("Courier New"),i.push('"Liberation Mono"'),i.push("Courier"),i.push("monospace")):"proportionalSansSerif"===r[a]?(i.push("Arial"),i.push("Helvetica"),i.push('"Liberation Sans"'),i.push("sans-serif")):"monospace"===r[a]?i.push("monospace"):"sansSerif"===r[a]?i.push("sans-serif"):"serif"===r[a]?i.push("serif"):"monospaceSansSerif"===r[a]?(i.push("Consolas"),i.push("monospace")):"proportionalSerif"===r[a]?i.push("serif"):i.push(r[a])}if(i.length>0){for(var s=[i[0]],l=1;l<i.length;l++)-1==y(s).call(s,i[l])&&s.push(i[l]);i=s}t.style.fontFamily=i.join(",")})),new f("http://www.w3.org/ns/ttml#styling shear",(function(e,t,n,r){if(0!==r){var i=-.9*r;"tb"===e.bpd?t.style.transform="skewX("+i+"deg)":t.style.transform="skewY("+i+"deg)"}})),new f("http://www.w3.org/ns/ttml#styling fontSize",(function(e,t,n,r){t.style.fontSize=r.toUsedLength(e.w,e.h)+"px"})),new f("http://www.w3.org/ns/ttml#styling fontStyle",(function(e,t,n,r){t.style.fontStyle=r})),new f("http://www.w3.org/ns/ttml#styling fontWeight",(function(e,t,n,r){t.style.fontWeight=r})),new f("http://www.w3.org/ns/ttml#styling lineHeight",(function(e,t,n,r){t.style.lineHeight="normal"===r?"normal":r.toUsedLength(e.w,e.h)+"px"})),new f("http://www.w3.org/ns/ttml#styling opacity",(function(e,t,n,r){t.style.opacity=r})),new f("http://www.w3.org/ns/ttml#styling origin",(function(e,t,n,r){t.style.top=r.h.toUsedLength(e.w,e.h)+"px",t.style.left=r.w.toUsedLength(e.w,e.h)+"px"})),new f("http://www.w3.org/ns/ttml#styling overflow",(function(e,t,n,r){t.style.overflow=r})),new f("http://www.w3.org/ns/ttml#styling padding",(function(e,t,n,r){var i=[];i[0]=r[0].toUsedLength(e.w,e.h)+"px",i[1]=r[3].toUsedLength(e.w,e.h)+"px",i[2]=r[2].toUsedLength(e.w,e.h)+"px",i[3]=r[1].toUsedLength(e.w,e.h)+"px",t.style.padding=i.join(" ")})),new f("http://www.w3.org/ns/ttml#styling position",(function(e,t,n,r){t.style.top=r.h.toUsedLength(e.w,e.h)+"px",t.style.left=r.w.toUsedLength(e.w,e.h)+"px"})),new f("http://www.w3.org/ns/ttml#styling rubyAlign",(function(e,t,n,r){t.style.rubyAlign="spaceAround"===r?"space-around":"center"})),new f("http://www.w3.org/ns/ttml#styling rubyPosition",(function(e,t,n,r){var i;"before"!==r&&"after"!==r||(i=p?r:"tb"===e.bpd||"rl"===e.bpd?"before"===r?"over":"under":"before"===r?"under":"over",t.parentElement.style[m]=i)})),new f("http://www.w3.org/ns/ttml#styling showBackground",null),new f("http://www.w3.org/ns/ttml#styling textAlign",(function(e,t,n,r){var i;i="start"===r?"rl"===e.ipd?"right":"left":"end"===r?"rl"===e.ipd?"left":"right":r,t.style.textAlign=i})),new f("http://www.w3.org/ns/ttml#styling textDecoration",(function(e,t,n,r){t.style.textDecoration=r.join(" ").replace("lineThrough","line-through")})),new f("http://www.w3.org/ns/ttml#styling textOutline",(function(e,t,n,r){})),new f("http://www.w3.org/ns/ttml#styling textShadow",(function(e,t,r,i){var a=r.styleAttrs[n.byName.textOutline.qname];if("none"===i&&"none"===a)t.style.textShadow="";else{var o=[];if("none"!==a){var s="rgba("+a.color[0].toString()+","+a.color[1].toString()+","+a.color[2].toString()+","+(a.color[3]/255).toString()+")";o.push("1px 1px 1px "+s),o.push("-1px 1px 1px "+s),o.push("1px -1px 1px "+s),o.push("-1px -1px 1px "+s)}if("none"!==i)for(var l=0;l<i.length;l++)o.push(i[l].x_off.toUsedLength(e.w,e.h)+"px "+i[l].y_off.toUsedLength(e.w,e.h)+"px "+i[l].b_radius.toUsedLength(e.w,e.h)+"px rgba("+i[l].color[0].toString()+","+i[l].color[1].toString()+","+i[l].color[2].toString()+","+(i[l].color[3]/255).toString()+")");t.style.textShadow=o.join(",")}})),new f("http://www.w3.org/ns/ttml#styling textCombine",(function(e,t,n,r){t.style.textCombineUpright=r})),new f("http://www.w3.org/ns/ttml#styling textEmphasis",(function(e,t,n,r){})),new f("http://www.w3.org/ns/ttml#styling unicodeBidi",(function(e,t,n,r){var i;i="bidiOverride"===r?"bidi-override":r,t.style.unicodeBidi=i})),new f("http://www.w3.org/ns/ttml#styling visibility",(function(e,t,n,r){t.style.visibility=r})),new f("http://www.w3.org/ns/ttml#styling wrapOption",(function(e,t,n,r){"wrap"===r?"preserve"===n.space?t.style.whiteSpace="pre-wrap":t.style.whiteSpace="normal":"preserve"===n.space?t.style.whiteSpace="pre":t.style.whiteSpace="noWrap"})),new f("http://www.w3.org/ns/ttml#styling writingMode",(function(e,t,n,r){"lrtb"===r||"lr"===r||"rltb"===r||"rl"===r?t.style.writingMode="horizontal-tb":"tblr"===r?t.style.writingMode="vertical-lr":"tbrl"!==r&&"tb"!==r||(t.style.writingMode="vertical-rl")})),new f("http://www.w3.org/ns/ttml#styling zIndex",(function(e,t,n,r){t.style.zIndex=r})),new f("http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay",(function(e,t,n,r){e.displayForcedOnlyMode&&!1===r&&(t.style.visibility="hidden")}))],h={},g=0;g<d.length;g++)h[d[g].qname]=d[g];var p="webkitRubyPosition"in window.getComputedStyle(document.documentElement),m=p?"webkitRubyPosition":"rubyPosition",v="webkitTextEmphasisStyle"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisStyle":"textEmphasisStyle",E="webkitTextEmphasisPosition"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisPosition":"textEmphasisPosition";function _(e,t){if(e&&e.error&&e.error(t))throw t}}(t,"undefined"==typeof imscNames?n(210):imscNames,"undefined"==typeof imscStyles?n(6811):imscStyles,"undefined"==typeof imscUtils?n(5926):imscUtils)},4080:function(e,t,n){!function(e,t,n,r){e.generateISD=function(e,t,r){var i,o=new l(e),s={},u={},c=e.head.styling.initials[n.byName.showBackground.qname],f=e.head.styling.initials[n.byName.backgroundColor.qname];for(var d in e.head.layout.regions)if(e.head.layout.regions.hasOwnProperty(d)){var h=e.head.layout.regions[d],g=h.styleAttrs[n.byName.showBackground.qname]||c,p=h.styleAttrs[n.byName.backgroundColor.qname]||f;u[h.id]=("always"===g||void 0===g)&&void 0!==p&&!(t<h.begin||t>=h.end)}for(var m in e.body&&e.body.regionID&&(u[e.body.regionID]=!0),i=null!==e.body?function e(t,n){if(n.contents){var r,i,a={};for(var o in n)n.hasOwnProperty(o)&&(a[o]=n[o]);return a.contents=[],I(r=w(i=n.contents).call(i,(function(e){return!(t<e.begin||t>=e.end)}))).call(r,(function(n){var r=e(t,n);r.regionID&&(u[r.regionID]=!0),null!==r&&a.contents.push(r)})),a}return n}(t,e.body):null,void 0!==u[""]&&(u[""]=!0),u)if(u[m]){var v=a(e,t,e.head.layout.regions[m],i,null,"",e.head.layout.regions[m],r,s);null!==v&&o.contents.push(v.element)}return o};var i=[n.byName.color.qname,n.byName.textCombine.qname,n.byName.textDecoration.qname,n.byName.textEmphasis.qname,n.byName.textOutline.qname,n.byName.textShadow.qname];function a(e,t,l,f,d,h,g,p,m){if(t<g.begin||t>=g.end)return null;var E="regionID"in g&&""!==g.regionID?g.regionID:h;if(null!==d&&E!==l.id&&(!("contents"in g)||"contents"in g&&0===g.contents.length||""!==E))return null;var _=new u(g);if("sets"in g)for(var T=0;T<g.sets.length;T++)t<g.sets[T].begin||t>=g.sets[T].end||(_.styleAttrs[g.sets[T].qname]=g.sets[T].value);var b={};for(var A in _.styleAttrs)if(_.styleAttrs.hasOwnProperty(A)&&(b[A]=!0,"region"===_.kind&&A===n.byName.writingMode.qname&&!(n.byName.direction.qname in _.styleAttrs))){var I=_.styleAttrs[A];"lrtb"===I||"lr"===I?_.styleAttrs[n.byName.direction.qname]="ltr":"rltb"!==I&&"rl"!==I||(_.styleAttrs[n.byName.direction.qname]="rtl")}if(null!==d)for(var R=0;R<n.all.length;R++){var w=n.all[R];if(w.qname===n.byName.textDecoration.qname){var N=d.styleAttrs[w.qname],C=_.styleAttrs[w.qname],D=[];void 0===C?D=N:-1===y(C).call(C,"none")?((-1===y(C).call(C,"noUnderline")&&-1!==y(N).call(N,"underline")||-1!==y(C).call(C,"underline"))&&D.push("underline"),(-1===y(C).call(C,"noLineThrough")&&-1!==y(N).call(N,"lineThrough")||-1!==y(C).call(C,"lineThrough"))&&D.push("lineThrough"),(-1===y(C).call(C,"noOverline")&&-1!==y(N).call(N,"overline")||-1!==y(C).call(C,"overline"))&&D.push("overline")):D.push("none"),_.styleAttrs[w.qname]=D}else if(w.qname!==n.byName.fontSize.qname||w.qname in _.styleAttrs||"span"!==_.kind||"textContainer"!==_.styleAttrs[n.byName.ruby.qname])if(w.qname!==n.byName.fontSize.qname||w.qname in _.styleAttrs||"span"!==_.kind||"text"!==_.styleAttrs[n.byName.ruby.qname])w.inherit&&w.qname in d.styleAttrs&&!(w.qname in _.styleAttrs)&&(_.styleAttrs[w.qname]=d.styleAttrs[w.qname]);else{var M=d.styleAttrs[n.byName.fontSize.qname];"textContainer"===d.styleAttrs[n.byName.ruby.qname]?_.styleAttrs[w.qname]=M:_.styleAttrs[w.qname]=new r.ComputedLength(.5*M.rw,.5*M.rh)}else{var L=d.styleAttrs[n.byName.fontSize.qname];_.styleAttrs[w.qname]=new r.ComputedLength(.5*L.rw,.5*L.rh)}}for(var O=0;O<n.all.length;O++){var P=n.all[O];if(!(P.qname in _.styleAttrs)&&!(P.qname===n.byName.position.qname&&n.byName.origin.qname in _.styleAttrs||P.qname===n.byName.origin.qname&&n.byName.position.qname in _.styleAttrs)){var F=e.head.styling.initials[P.qname]||P.initial;if(null!==F&&("region"===_.kind||!1===P.inherit&&null!==F)){var x=P.parse(F);null!==x?(_.styleAttrs[P.qname]=x,b[P.qname]=!0):c(p,"Invalid initial value for '"+P.qname+"' on element '"+_.kind)}}}for(var k=0;k<n.all.length;k++){var U=n.all[k];if(U.qname in b&&null!==U.compute){var Z=U.compute(e,d,_,_.styleAttrs[U.qname],m);null!==Z?_.styleAttrs[U.qname]=Z:(_.styleAttrs[U.qname]=U.compute(e,d,_,U.parse(U.initial),m),c(p,"Style '"+U.qname+"' on element '"+_.kind+"' cannot be computed"))}}if("none"===_.styleAttrs[n.byName.display.qname])return null;var B=null;null===d?B=null===f?[]:[f]:"contents"in g&&(B=g.contents);for(var G=0;null!==B&&G<B.length;G++){var q=a(e,t,l,f,_,E,B[G],p,m);null!==q&&_.contents.push(q.element)}for(var Y in _.styleAttrs)if(_.styleAttrs.hasOwnProperty(Y)){var j=!1;if("span"===_.kind){var H=_.styleAttrs[n.byName.ruby.qname];(j=("container"===H||"textContainer"===H||"baseContainer"===H)&&-1!==y(i).call(i,Y))||(j="container"!==H&&Y===n.byName.rubyAlign.qname),j||(j=!("textContainer"===H||"text"===H)&&Y===n.byName.rubyPosition.qname)}if(!j){var V,K=n.byQName[Y];"applies"in K&&(j=-1===y(V=K.applies).call(V,_.kind))}j&&delete _.styleAttrs[Y]}var z=_.styleAttrs[n.byName.ruby.qname];if("p"===_.kind||"span"===_.kind&&("textContainer"===z||"text"===z)){var W=[];o(_,W),function(e){for(var t,n=0;n<e.length;)if("br"!==(t=e[n]).kind&&"preserve"!==t.space){var r=t.text.replace(/[\t\r\n ]+/g," ");/^[ ]/.test(r)&&(0===n||"br"===(i=e[n-1]).kind||/[\r\n\t ]$/.test(i.text))&&(r=r.substring(1)),t.text=r,0===r.length?S(e).call(e,n,1):n++}else n++;var i,a;for(n=0;n<e.length;n++){var o;"br"!==(t=e[n]).kind&&"preserve"!==t.space?/[ ]$/.test(t.text)&&(n===e.length-1||"br"===(a=e[n+1]).kind||"preserve"===a.space&&/^[\r\n]/.test(a.text))&&(t.text=v(o=t.text).call(o,0,-1)):n++}}(W),s(_)}return"div"===_.kind&&n.byName.backgroundImage.qname in _.styleAttrs||"br"===_.kind||"image"===_.kind||"contents"in _&&_.contents.length>0||"span"===_.kind&&null!==_.text||"region"===_.kind&&"always"===_.styleAttrs[n.byName.showBackground.qname]?{region_id:E,element:_}:null}function o(e,t){if("contents"in e)for(var r=0;r<e.contents.length;r++){var i=e.contents[r],a=i.styleAttrs[n.byName.ruby.qname];("span"!==i.kind||"textContainer"!==a&&"text"!==a)&&("contents"in i?o(i,t):("span"===i.kind&&0!==i.text.length||"br"===i.kind)&&t.push(i))}}function s(e){if("br"===e.kind)return!1;if("text"in e)return 0===e.text.length;if("contents"in e){for(var t=e.contents.length;t--;){var n;s(e.contents[t])&&S(n=e.contents).call(n,t,1)}return 0===e.contents.length}}function l(e){this.contents=[],this.aspectRatio=e.aspectRatio,this.lang=e.lang}function u(e){for(var t in this.kind=e.kind||"region",this.lang=e.lang,e.id&&(this.id=e.id),this.styleAttrs={},e.styleAttrs)e.styleAttrs.hasOwnProperty(t)&&(this.styleAttrs[t]=e.styleAttrs[t]);"src"in e&&(this.src=e.src),"type"in e&&(this.type=e.type),"text"in e?this.text=e.text:("region"===this.kind||"contents"in e)&&(this.contents=[]),"space"in e&&(this.space=e.space)}function c(e,t){if(e&&e.error&&e.error(t))throw t}}(t,"undefined"==typeof imscNames?n(210):imscNames,"undefined"==typeof imscStyles?n(6811):imscStyles,"undefined"==typeof imscUtils?n(5926):imscUtils)},4403:function(e,t,n){t.generateISD=n(4080).generateISD,t.fromXML=n(3362).fromXML,t.renderHTML=n(506).render},210:function(e,t){!function(e){e.ns_tt="http://www.w3.org/ns/ttml",e.ns_tts="http://www.w3.org/ns/ttml#styling",e.ns_ttp="http://www.w3.org/ns/ttml#parameter",e.ns_xml="http://www.w3.org/XML/1998/namespace",e.ns_itts="http://www.w3.org/ns/ttml/profile/imsc1#styling",e.ns_ittp="http://www.w3.org/ns/ttml/profile/imsc1#parameter",e.ns_smpte="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt",e.ns_ebutts="urn:ebu:tt:style"}(t)},6811:function(e,t,n){!function(e,t,n){function r(e,t,n,r,i,a,o,s){this.name=t,this.ns=e,this.qname=e+" "+t,this.inherit=i,this.animatable=a,this.initial=n,this.applies=r,this.parse=o,this.compute=s}for(var i in e.all=[new r(t.ns_tts,"backgroundColor","transparent",["body","div","p","region","span"],!1,!0,n.parseColor,null),new r(t.ns_tts,"color","white",["span"],!0,!0,n.parseColor,null),new r(t.ns_tts,"direction","ltr",["p","span"],!0,!0,(function(e){return e}),null),new r(t.ns_tts,"display","auto",["body","div","p","region","span"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"displayAlign","before",["region"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"extent","auto",["tt","region"],!1,!0,(function(e){if("auto"===e)return e;var t=e.split(" ");if(2!==t.length)return null;var r=n.parseLength(t[0]),i=n.parseLength(t[1]);return i&&r?{h:i,w:r}:null}),(function(e,t,r,i,a){var o,s;if("auto"===i)o=new n.ComputedLength(0,1);else if(null===(o=n.toComputedLength(i.h.value,i.h.unit,null,e.dimensions.h,null,e.pxLength.h)))return null;if("auto"===i)s=new n.ComputedLength(1,0);else if(null===(s=n.toComputedLength(i.w.value,i.w.unit,null,e.dimensions.w,null,e.pxLength.w)))return null;return{h:o,w:s}})),new r(t.ns_tts,"fontFamily","default",["span","p"],!0,!0,(function(e){for(var t=e.split(","),n=[],r=0;r<t.length;r++){var i;t[r]=T(i=t[r]).call(i),"'"!==t[r].charAt(0)&&'"'!==t[r].charAt(0)&&"default"===t[r]?n.push("monospaceSerif"):n.push(t[r])}return n}),null),new r(t.ns_tts,"shear","0%",["p"],!0,!0,n.parseLength,(function(e,t,n,r){return"%"!==r.unit?null:Math.abs(r.value)>100?100*_e(r.value):r.value})),new r(t.ns_tts,"fontSize","1c",["span","p"],!0,!0,n.parseLength,(function(t,r,i,a,o){return n.toComputedLength(a.value,a.unit,null!==r?r.styleAttrs[e.byName.fontSize.qname]:t.cellLength.h,null!==r?r.styleAttrs[e.byName.fontSize.qname]:t.cellLength.h,t.cellLength.h,t.pxLength.h)})),new r(t.ns_tts,"fontStyle","normal",["span","p"],!0,!0,(function(e){return e}),null),new r(t.ns_tts,"fontWeight","normal",["span","p"],!0,!0,(function(e){return e}),null),new r(t.ns_tts,"lineHeight","normal",["p"],!0,!0,(function(e){return"normal"===e?e:n.parseLength(e)}),(function(t,r,i,a,o){var s;if("normal"===a)s=a;else if(null===(s=n.toComputedLength(a.value,a.unit,i.styleAttrs[e.byName.fontSize.qname],i.styleAttrs[e.byName.fontSize.qname],t.cellLength.h,t.pxLength.h)))return null;return s})),new r(t.ns_tts,"opacity",1,["region"],!1,!0,x,null),new r(t.ns_tts,"origin","auto",["region"],!1,!0,(function(e){if("auto"===e)return e;var t=e.split(" ");if(2!==t.length)return null;var r=n.parseLength(t[0]),i=n.parseLength(t[1]);return i&&r?{h:i,w:r}:null}),(function(e,t,r,i,a){var o,s;if("auto"===i)o=new n.ComputedLength(0,0);else if(null===(o=n.toComputedLength(i.h.value,i.h.unit,null,e.dimensions.h,null,e.pxLength.h)))return null;if("auto"===i)s=new n.ComputedLength(0,0);else if(null===(s=n.toComputedLength(i.w.value,i.w.unit,null,e.dimensions.w,null,e.pxLength.w)))return null;return{h:o,w:s}})),new r(t.ns_tts,"overflow","hidden",["region"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"padding","0px",["region"],!1,!0,(function(e){var t=e.split(" ");if(t.length>4)return null;for(var r=[],i=0;i<t.length;i++){var a=n.parseLength(t[i]);if(!a)return null;r.push(a)}return r}),(function(t,r,i,a,o){var s;if(1===a.length)s=[a[0],a[0],a[0],a[0]];else if(2===a.length)s=[a[0],a[1],a[0],a[1]];else if(3===a.length)s=[a[0],a[1],a[2],a[1]];else{if(4!==a.length)return null;s=[a[0],a[1],a[2],a[3]]}var l=i.styleAttrs[e.byName.writingMode.qname];if("lrtb"===l||"lr"===l)s=[s[0],s[3],s[2],s[1]];else if("rltb"===l||"rl"===l)s=[s[0],s[1],s[2],s[3]];else if("tblr"===l)s=[s[3],s[0],s[1],s[2]];else{if("tbrl"!==l&&"tb"!==l)return null;s=[s[3],s[2],s[1],s[0]]}for(var u=[],c=0;c<s.length;c++)if(0===s[c].value)u[c]=new n.ComputedLength(0,0);else if(u[c]=n.toComputedLength(s[c].value,s[c].unit,i.styleAttrs[e.byName.fontSize.qname],0===c||2===c?i.styleAttrs[e.byName.extent.qname].h:i.styleAttrs[e.byName.extent.qname].w,0===c||2===c?t.cellLength.h:t.cellLength.w,0===c||2===c?t.pxLength.h:t.pxLength.w),null===u[c])return null;return u})),new r(t.ns_tts,"position","top left",["region"],!1,!0,(function(e){return n.parsePosition(e)}),(function(t,r,i,a){var o,s;return null===(o=n.toComputedLength(a.v.offset.value,a.v.offset.unit,null,new n.ComputedLength(-i.styleAttrs[e.byName.extent.qname].h.rw,t.dimensions.h.rh-i.styleAttrs[e.byName.extent.qname].h.rh),null,t.pxLength.h))?null:("bottom"===a.v.edge&&(o=new n.ComputedLength(-o.rw-i.styleAttrs[e.byName.extent.qname].h.rw,t.dimensions.h.rh-o.rh-i.styleAttrs[e.byName.extent.qname].h.rh)),s=n.toComputedLength(a.h.offset.value,a.h.offset.unit,null,new n.ComputedLength(t.dimensions.w.rw-i.styleAttrs[e.byName.extent.qname].w.rw,-i.styleAttrs[e.byName.extent.qname].w.rh),null,t.pxLength.w),null===o?null:("right"===a.h.edge&&(s=new n.ComputedLength(t.dimensions.w.rw-s.rw-i.styleAttrs[e.byName.extent.qname].w.rw,-s.rh-i.styleAttrs[e.byName.extent.qname].w.rh)),{h:o,w:s}))})),new r(t.ns_tts,"ruby","none",["span"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"rubyAlign","center",["span"],!0,!0,(function(e){return"center"!==e&&"spaceAround"!==e?null:e}),null),new r(t.ns_tts,"rubyPosition","outside",["span"],!0,!0,(function(e){return e}),null),new r(t.ns_tts,"rubyReserve","none",["p"],!0,!0,(function(e){var t=e.split(" "),r=[null,null];if(0===t.length||t.length>2)return null;if("none"!==t[0]&&"both"!==t[0]&&"after"!==t[0]&&"before"!==t[0]&&"outside"!==t[0])return null;if(r[0]=t[0],2===t.length&&"none"!==t[0]){var i=n.parseLength(t[1]);if(!i)return null;r[1]=i}return r}),(function(t,r,i,a,o){return"none"===a[0]?a:null===(s=null===a[1]?new n.ComputedLength(.5*i.styleAttrs[e.byName.fontSize.qname].rw,.5*i.styleAttrs[e.byName.fontSize.qname].rh):n.toComputedLength(a[1].value,a[1].unit,i.styleAttrs[e.byName.fontSize.qname],i.styleAttrs[e.byName.fontSize.qname],t.cellLength.h,t.pxLength.h))?null:[a[0],s];var s})),new r(t.ns_tts,"showBackground","always",["region"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"textAlign","start",["p"],!0,!0,(function(e){return e}),(function(e,t,n,r,i){return"left"===r?"start":"right"===r?"end":r})),new r(t.ns_tts,"textCombine","none",["span"],!0,!0,(function(e){return"none"===e||"all"===e?e:null}),null),new r(t.ns_tts,"textDecoration","none",["span"],!0,!0,(function(e){return e.split(" ")}),null),new r(t.ns_tts,"textEmphasis","none",["span"],!0,!0,(function(e){for(var t=e.split(" "),r={style:null,symbol:null,color:null,position:null},i=0;i<t.length;i++)if("none"===t[i]||"auto"===t[i])r.style=t[i];else if("filled"===t[i]||"open"===t[i])r.style=t[i];else if("circle"===t[i]||"dot"===t[i]||"sesame"===t[i])r.symbol=t[i];else if("current"===t[i])r.color=t[i];else if("outside"===t[i]||"before"===t[i]||"after"===t[i])r.position=t[i];else if(r.color=n.parseColor(t[i]),null===r.color)return null;return null==r.style&&null==r.symbol?r.style="auto":(r.symbol=r.symbol||"circle",r.style=r.style||"filled"),r.position=r.position||"outside",r.color=r.color||"current",r}),null),new r(t.ns_tts,"textOutline","none",["span"],!0,!0,(function(e){if("none"===e)return e;var t={},r=e.split(" ");if(0===r.length||r.length>2)return null;var i=n.parseColor(r[0]);if(t.color=i,null!==i&&r.shift(),1!==r.length)return null;var a=n.parseLength(r[0]);return a?(t.thickness=a,t):null}),(function(t,r,i,a,o){if("none"===a)return a;var s={};return null===a.color?s.color=i.styleAttrs[e.byName.color.qname]:s.color=a.color,s.thickness=n.toComputedLength(a.thickness.value,a.thickness.unit,i.styleAttrs[e.byName.fontSize.qname],i.styleAttrs[e.byName.fontSize.qname],t.cellLength.h,t.pxLength.h),null===s.thickness?null:s})),new r(t.ns_tts,"textShadow","none",["span"],!0,!0,n.parseTextShadow,(function(t,r,i,a){if("none"===a)return a;for(var o=[],s=0;s<a.length;s++){var l={};if(l.x_off=n.toComputedLength(a[s][0].value,a[s][0].unit,null,i.styleAttrs[e.byName.fontSize.qname],null,t.pxLength.w),null===l.x_off)return null;if(l.y_off=n.toComputedLength(a[s][1].value,a[s][1].unit,null,i.styleAttrs[e.byName.fontSize.qname],null,t.pxLength.h),null===l.y_off)return null;if(null===a[s][2])l.b_radius=0;else if(l.b_radius=n.toComputedLength(a[s][2].value,a[s][2].unit,null,i.styleAttrs[e.byName.fontSize.qname],null,t.pxLength.h),null===l.b_radius)return null;null===a[s][3]?l.color=i.styleAttrs[e.byName.color.qname]:l.color=a[s][3],o.push(l)}return o})),new r(t.ns_tts,"unicodeBidi","normal",["span","p"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"visibility","visible",["body","div","p","region","span"],!0,!0,(function(e){return e}),null),new r(t.ns_tts,"wrapOption","wrap",["span"],!0,!0,(function(e){return e}),null),new r(t.ns_tts,"writingMode","lrtb",["region"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"zIndex","auto",["region"],!1,!0,(function(e){var t;return"auto"===e?t=e:(t=_(e),isNaN(t)&&(t=null)),t}),null),new r(t.ns_ebutts,"linePadding","0c",["p"],!0,!1,n.parseLength,(function(e,t,r,i,a){return n.toComputedLength(i.value,i.unit,null,null,e.cellLength.w,null)})),new r(t.ns_ebutts,"multiRowAlign","auto",["p"],!0,!1,(function(e){return e}),null),new r(t.ns_smpte,"backgroundImage",null,["div"],!1,!1,(function(e){return e}),null),new r(t.ns_itts,"forcedDisplay","false",["body","div","p","region","span"],!0,!0,(function(e){return"true"===e}),null),new r(t.ns_itts,"fillLineGap","false",["p"],!0,!0,(function(e){return"true"===e}),null)],e.byQName={},e.all)e.byQName[e.all[i].qname]=e.all[i];for(var a in e.byName={},e.all)e.byName[e.all[a].name]=e.all[a]}(t,"undefined"==typeof imscNames?n(210):imscNames,"undefined"==typeof imscUtils?n(5926):imscUtils)},5926:function(e,t){!function(e){var t=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/,n=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,r=/rgba\(\s*(\d+),\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,i={transparent:[0,0,0,0],black:[0,0,0,255],silver:[192,192,192,255],gray:[128,128,128,255],white:[255,255,255,255],maroon:[128,0,0,255],red:[255,0,0,255],purple:[128,0,128,255],fuchsia:[255,0,255,255],magenta:[255,0,255,255],green:[0,128,0,255],lime:[0,255,0,255],olive:[128,128,0,255],yellow:[255,255,0,255],navy:[0,0,128,255],blue:[0,0,255,255],teal:[0,128,128,255],aqua:[0,255,255,255],cyan:[0,255,255,255]};e.parseColor=function(e){var a,o=null,s=i[e.toLowerCase()];return void 0!==s?o=s:null!==(a=t.exec(e))?o=[_(a[1],16),_(a[2],16),_(a[3],16),void 0!==a[4]?_(a[4],16):255]:null!==(a=n.exec(e))?o=[_(a[1]),_(a[2]),_(a[3]),255]:null!==(a=r.exec(e))&&(o=[_(a[1]),_(a[2]),_(a[3]),_(a[4])]),o};var a=/^((?:\+|\-)?\d*(?:\.\d+)?)(px|em|c|%|rh|rw)$/;e.parseLength=function(e){var t,n=null;return null!==(t=a.exec(e))&&(n={value:x(t[1]),unit:t[2]}),n},e.parseTextShadow=function(t){for(var n=t.match(/([^\(,\)]|\([^\)]+\))+/g),r=[],i=0;i<n.length;i++){var a=n[i].split(" ");if(1===a.length&&"none"===a[0])return"none";if(a.length>1&&a.length<5){var o=[null,null,null,null],s=e.parseLength(a.shift());if(null===s)return null;if(o[0]=s,null===(s=e.parseLength(a.shift())))return null;if(o[1]=s,0===a.length){r.push(o);continue}if(null!==(s=e.parseLength(a[0]))&&(o[2]=s,a.shift()),0===a.length){r.push(o);continue}var l=e.parseColor(a[0]);if(null===l)return null;o[3]=l,r.push(o)}}return r},e.parsePosition=function(t){var n=t.split(" "),r=function(e){return"center"===e||"left"===e||"top"===e||"bottom"===e||"right"===e};if(n.length>4)return null;for(var i=0;i<n.length;i++)if(!r(n[i])){var a=e.parseLength(n[i]);if(null===a)return null;n[i]=a}for(var o={h:{edge:"left",offset:{value:50,unit:"%"}},v:{edge:"top",offset:{value:50,unit:"%"}}},s=0;s<n.length;){var l=n[s++];if(r(l)){var u={value:0,unit:"%"};2!==n.length&&s<n.length&&!r(n[s])&&(u=n[s++]),"right"===l?(o.h.edge=l,o.h.offset=u):"bottom"===l?(o.v.edge=l,o.v.offset=u):"left"===l?o.h.offset=u:"top"===l&&(o.v.offset=u)}else{if(1!==n.length&&2!==n.length)return null;1===s?o.h.offset=l:o.v.offset=l}}return o},e.ComputedLength=function(e,t){this.rw=e,this.rh=t},e.ComputedLength.prototype.toUsedLength=function(e,t){return e*this.rw+t*this.rh},e.ComputedLength.prototype.isZero=function(){return 0===this.rw&&0===this.rh},e.toComputedLength=function(t,n,r,i,a,o){return"%"===n&&i?new e.ComputedLength(i.rw*t/100,i.rh*t/100):"em"===n&&r?new e.ComputedLength(r.rw*t,r.rh*t):"c"===n&&a?new e.ComputedLength(t*a.rw,t*a.rh):"px"===n&&o?new e.ComputedLength(t*o.rw,t*o.rh):"rh"===n?new e.ComputedLength(0,t/100):"rw"===n?new e.ComputedLength(t/100,0):null}}(t)},3516:function(e){e.exports=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}},2219:function(e,t,n){var r=n(3516),i=n(395);e.exports=function(e){return r(e)||i(e)}},395:function(e){e.exports=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}},3875:function(e){function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+b(e))}function n(e,t){for(var n,r="",i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(a===s-1||1===o);else if(a!==s-1&&2===o){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var l=E(r).call(r,"/");if(l!==r.length-1){-1===l?(r="",i=0):i=(r=v(r).call(r,0,l)).length-1-E(r).call(r,"/"),a=s,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,a=s,o=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+v(e).call(e,a+1,s):r=v(e).call(e,a+1,s),i=s-a-1;a=s,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(void 0===e&&(e=tt.cwd()),o=e),t(o),0!==o.length&&(r=o+"/"+r,i=47===o.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var a=e.length,o=a-i,s=1;s<n.length&&47===n.charCodeAt(s);++s);for(var l=n.length-s,u=o<l?o:l,c=-1,f=0;f<=u;++f){if(f===u){if(l>u){if(47===n.charCodeAt(s+f))return v(n).call(n,s+f+1);if(0===f)return v(n).call(n,s+f)}else o>u&&(47===e.charCodeAt(i+f)?c=f:0===f&&(c=0));break}var d=e.charCodeAt(i+f);if(d!==n.charCodeAt(s+f))break;47===d&&(c=f)}var h="";for(f=i+c+1;f<=a;++f)f!==a&&47!==e.charCodeAt(f)||(0===h.length?h+="..":h+="/..");return h.length>0?h+v(n).call(n,s+c):(s+=c,47===n.charCodeAt(s)&&++s,v(n).call(n,s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,a=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!a){i=o;break}}else a=!1;return-1===i?r?"/":".":r&&1===i?"//":v(e).call(e,0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,a=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var s=n.length-1,l=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!o){i=r+1;break}}else-1===l&&(o=!1,l=r+1),s>=0&&(u===n.charCodeAt(s)?-1==--s&&(a=r):(s=-1,a=l))}return i===a?a=l:-1===a&&(a=e.length),v(e).call(e,i,a)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){i=r+1;break}}else-1===a&&(o=!1,a=r+1);return-1===a?"":v(e).call(e,i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var l=e.charCodeAt(s);if(47!==l)-1===i&&(a=!1,i=s+1),46===l?-1===n?n=s:1!==o&&(o=1):-1!==n&&(o=-1);else if(!a){r=s+1;break}}return-1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":v(e).call(e,n,i)},format:function(e){if(null===e||"object"!=c(e))throw new TypeError('The "pathObject" argument must be of type Object. Received type '+c(e));return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),a=47===i;a?(n.root="/",r=1):r=0;for(var o=-1,s=0,l=-1,u=!0,c=e.length-1,f=0;c>=r;--c)if(47!==(i=e.charCodeAt(c)))-1===l&&(u=!1,l=c+1),46===i?-1===o?o=c:1!==f&&(f=1):-1!==o&&(f=-1);else if(!u){s=c+1;break}return-1===o||-1===l||0===f||1===f&&o===l-1&&o===s+1?-1!==l&&(n.base=n.name=0===s&&a?v(e).call(e,1,l):v(e).call(e,s,l)):(0===s&&a?(n.name=v(e).call(e,1,o),n.base=v(e).call(e,1,l)):(n.name=v(e).call(e,s,o),n.base=v(e).call(e,s,l)),n.ext=v(e).call(e,o,l)),s>0?n.dir=v(e).call(e,0,s-1):a&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r},8387:function(e,t,n){var r=n(1549),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=o),a(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?m(r).call(r,t,n):m(r).call(r,t):m(r).call(r,0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},5378:function(e,t,n){!function(e,t){e.parser=function(e,t){return new a(e,t)},e.SAXParser=a,e.SAXStream=s,e.createStream=function(e,t){return new s(e,t)},e.MAX_BUFFER_LENGTH=65536;var r,i=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function a(t,n){if(!(this instanceof a))return new a(t,n);var r=this;!function(e){for(var t=0,n=i.length;t<n;t++)e[i[t]]=""}(r),r.q=r.c="",r.bufferCheckPosition=e.MAX_BUFFER_LENGTH,r.opt=n||{},r.opt.lowercase=r.opt.lowercase||r.opt.lowercasetags,r.looseCase=r.opt.lowercase?"toLowerCase":"toUpperCase",r.tags=[],r.closed=r.closedRoot=r.sawRoot=!1,r.tag=r.error=null,r.strict=!!t,r.noscript=!(!t&&!r.opt.noscript),r.state=k.BEGIN,r.strictEntities=r.opt.strictEntities,r.ENTITIES=r.strictEntities?O(e.XML_ENTITIES):O(e.ENTITIES),r.attribList=[],r.opt.xmlns&&(r.ns=O(m)),r.trackPosition=!1!==r.opt.position,r.trackPosition&&(r.position=r.line=r.column=0),B(r,"onready")}e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],O||(Object.create=function(e){function t(){}return t.prototype=e,new t}),z||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),a.prototype={end:function(){H(this)},write:function(t){var n=this;if(this.error)throw this.error;if(n.closed)return j(n,"Cannot write after close. Assign an onready handler.");if(null===t)return H(n);"object"==c(t)&&(t=t.toString());for(var r=0,a="";a=ne(t,r++),n.c=a,a;)switch(n.trackPosition&&(n.position++,"\n"===a?(n.line++,n.column=0):n.column++),n.state){case k.BEGIN:if(n.state=k.BEGIN_WHITESPACE,"\ufeff"===a)continue;te(n,a);continue;case k.BEGIN_WHITESPACE:te(n,a);continue;case k.TEXT:if(n.sawRoot&&!n.closedRoot){for(var o=r-1;a&&"<"!==a&&"&"!==a;)(a=ne(t,r++))&&n.trackPosition&&(n.position++,"\n"===a?(n.line++,n.column=0):n.column++);n.textNode+=t.substring(o,r-1)}"<"!==a||n.sawRoot&&n.closedRoot&&!n.strict?(!L(l,a)||n.sawRoot&&!n.closedRoot||V(n,"Text data outside of root node."),"&"===a?n.state=k.TEXT_ENTITY:n.textNode+=a):(n.state=k.OPEN_WAKA,n.startTagPosition=n.position);continue;case k.SCRIPT:"<"===a?n.state=k.SCRIPT_ENDING:n.script+=a;continue;case k.SCRIPT_ENDING:"/"===a?n.state=k.CLOSE_TAG:(n.script+="<"+a,n.state=k.SCRIPT);continue;case k.OPEN_WAKA:if("!"===a)n.state=k.SGML_DECL,n.sgmlDecl="";else if(M(l,a));else if(M(E,a))n.state=k.OPEN_TAG,n.tagName=a;else if("/"===a)n.state=k.CLOSE_TAG,n.tagName="";else if("?"===a)n.state=k.PROC_INST,n.procInstName=n.procInstBody="";else{if(V(n,"Unencoded <"),n.startTagPosition+1<n.position){var s=n.position-n.startTagPosition;a=new Array(s).join(" ")+a}n.textNode+="<"+a,n.state=k.TEXT}continue;case k.SGML_DECL:"[CDATA["===(n.sgmlDecl+a).toUpperCase()?(G(n,"onopencdata"),n.state=k.CDATA,n.sgmlDecl="",n.cdata=""):n.sgmlDecl+a==="--"?(n.state=k.COMMENT,n.comment="",n.sgmlDecl=""):"DOCTYPE"===(n.sgmlDecl+a).toUpperCase()?(n.state=k.DOCTYPE,(n.doctype||n.sawRoot)&&V(n,"Inappropriately located doctype declaration"),n.doctype="",n.sgmlDecl=""):">"===a?(G(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=k.TEXT):M(d,a)?(n.state=k.SGML_DECL_QUOTED,n.sgmlDecl+=a):n.sgmlDecl+=a;continue;case k.SGML_DECL_QUOTED:a===n.q&&(n.state=k.SGML_DECL,n.q=""),n.sgmlDecl+=a;continue;case k.DOCTYPE:">"===a?(n.state=k.TEXT,G(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=a,"["===a?n.state=k.DOCTYPE_DTD:M(d,a)&&(n.state=k.DOCTYPE_QUOTED,n.q=a));continue;case k.DOCTYPE_QUOTED:n.doctype+=a,a===n.q&&(n.q="",n.state=k.DOCTYPE);continue;case k.DOCTYPE_DTD:n.doctype+=a,"]"===a?n.state=k.DOCTYPE:M(d,a)&&(n.state=k.DOCTYPE_DTD_QUOTED,n.q=a);continue;case k.DOCTYPE_DTD_QUOTED:n.doctype+=a,a===n.q&&(n.state=k.DOCTYPE_DTD,n.q="");continue;case k.COMMENT:"-"===a?n.state=k.COMMENT_ENDING:n.comment+=a;continue;case k.COMMENT_ENDING:"-"===a?(n.state=k.COMMENT_ENDED,n.comment=Y(n.opt,n.comment),n.comment&&G(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+a,n.state=k.COMMENT);continue;case k.COMMENT_ENDED:">"!==a?(V(n,"Malformed comment"),n.comment+="--"+a,n.state=k.COMMENT):n.state=k.TEXT;continue;case k.CDATA:"]"===a?n.state=k.CDATA_ENDING:n.cdata+=a;continue;case k.CDATA_ENDING:"]"===a?n.state=k.CDATA_ENDING_2:(n.cdata+="]"+a,n.state=k.CDATA);continue;case k.CDATA_ENDING_2:">"===a?(n.cdata&&G(n,"oncdata",n.cdata),G(n,"onclosecdata"),n.cdata="",n.state=k.TEXT):"]"===a?n.cdata+="]":(n.cdata+="]]"+a,n.state=k.CDATA);continue;case k.PROC_INST:"?"===a?n.state=k.PROC_INST_ENDING:M(l,a)?n.state=k.PROC_INST_BODY:n.procInstName+=a;continue;case k.PROC_INST_BODY:if(!n.procInstBody&&M(l,a))continue;"?"===a?n.state=k.PROC_INST_ENDING:n.procInstBody+=a;continue;case k.PROC_INST_ENDING:">"===a?(G(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=k.TEXT):(n.procInstBody+="?"+a,n.state=k.PROC_INST_BODY);continue;case k.OPEN_TAG:M(A,a)?n.tagName+=a:(W(n),">"===a?$(n):"/"===a?n.state=k.OPEN_TAG_SLASH:(L(l,a)&&V(n,"Invalid character in tag name"),n.state=k.ATTRIB));continue;case k.OPEN_TAG_SLASH:">"===a?($(n,!0),J(n)):(V(n,"Forward-slash in opening tag not followed by >"),n.state=k.ATTRIB);continue;case k.ATTRIB:if(M(l,a))continue;">"===a?$(n):"/"===a?n.state=k.OPEN_TAG_SLASH:M(E,a)?(n.attribName=a,n.attribValue="",n.state=k.ATTRIB_NAME):V(n,"Invalid attribute name");continue;case k.ATTRIB_NAME:"="===a?n.state=k.ATTRIB_VALUE:">"===a?(V(n,"Attribute without value"),n.attribValue=n.attribName,Q(n),$(n)):M(l,a)?n.state=k.ATTRIB_NAME_SAW_WHITE:M(A,a)?n.attribName+=a:V(n,"Invalid attribute name");continue;case k.ATTRIB_NAME_SAW_WHITE:if("="===a)n.state=k.ATTRIB_VALUE;else{if(M(l,a))continue;V(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",G(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",">"===a?$(n):M(E,a)?(n.attribName=a,n.state=k.ATTRIB_NAME):(V(n,"Invalid attribute name"),n.state=k.ATTRIB)}continue;case k.ATTRIB_VALUE:if(M(l,a))continue;M(d,a)?(n.q=a,n.state=k.ATTRIB_VALUE_QUOTED):(V(n,"Unquoted attribute value"),n.state=k.ATTRIB_VALUE_UNQUOTED,n.attribValue=a);continue;case k.ATTRIB_VALUE_QUOTED:if(a!==n.q){"&"===a?n.state=k.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=a;continue}Q(n),n.q="",n.state=k.ATTRIB_VALUE_CLOSED;continue;case k.ATTRIB_VALUE_CLOSED:M(l,a)?n.state=k.ATTRIB:">"===a?$(n):"/"===a?n.state=k.OPEN_TAG_SLASH:M(E,a)?(V(n,"No whitespace between attributes"),n.attribName=a,n.attribValue="",n.state=k.ATTRIB_NAME):V(n,"Invalid attribute name");continue;case k.ATTRIB_VALUE_UNQUOTED:if(L(h,a)){"&"===a?n.state=k.ATTRIB_VALUE_ENTITY_U:n.attribValue+=a;continue}Q(n),">"===a?$(n):n.state=k.ATTRIB;continue;case k.CLOSE_TAG:if(n.tagName)">"===a?J(n):M(A,a)?n.tagName+=a:n.script?(n.script+="</"+n.tagName,n.tagName="",n.state=k.SCRIPT):(L(l,a)&&V(n,"Invalid tagname in closing tag"),n.state=k.CLOSE_TAG_SAW_WHITE);else{if(M(l,a))continue;L(E,a)?n.script?(n.script+="</"+a,n.state=k.SCRIPT):V(n,"Invalid tagname in closing tag."):n.tagName=a}continue;case k.CLOSE_TAG_SAW_WHITE:if(M(l,a))continue;">"===a?J(n):V(n,"Invalid characters in closing tag");continue;case k.TEXT_ENTITY:case k.ATTRIB_VALUE_ENTITY_Q:case k.ATTRIB_VALUE_ENTITY_U:var u,f;switch(n.state){case k.TEXT_ENTITY:u=k.TEXT,f="textNode";break;case k.ATTRIB_VALUE_ENTITY_Q:u=k.ATTRIB_VALUE_QUOTED,f="attribValue";break;case k.ATTRIB_VALUE_ENTITY_U:u=k.ATTRIB_VALUE_UNQUOTED,f="attribValue"}";"===a?(n[f]+=ee(n),n.entity="",n.state=u):M(n.entity.length?N:R,a)?n.entity+=a:(V(n,"Invalid character in entity name"),n[f]+="&"+n.entity+a,n.entity="",n.state=u);continue;default:throw new Error(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&function(t){for(var n=Math.max(e.MAX_BUFFER_LENGTH,10),r=0,a=0,o=i.length;a<o;a++){var s=t[i[a]].length;if(s>n)switch(i[a]){case"textNode":q(t);break;case"cdata":G(t,"oncdata",t.cdata),t.cdata="";break;case"script":G(t,"onscript",t.script),t.script="";break;default:j(t,"Max buffer length exceeded: "+i[a])}r=Math.max(r,s)}var l=e.MAX_BUFFER_LENGTH-r;t.bufferCheckPosition=l+t.position}(n),n},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;q(e=this),""!==e.cdata&&(G(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(G(e,"onscript",e.script),e.script="")}};try{r=n(182).Stream}catch(e){r=function(){}}var o=w(t=e.EVENTS).call(t,(function(e){return"error"!==e&&"end"!==e}));function s(e,t){if(!(this instanceof s))return new s(e,t);r.apply(this),this._parser=new a(e,t),this.writable=!0,this.readable=!0;var n=this;this._parser.onend=function(){n.emit("end")},this._parser.onerror=function(e){n.emit("error",e),n._parser.error=null},this._decoder=null,I(o).call(o,(function(e){C(n,"on"+e,{get:function(){return n._parser["on"+e]},set:function(t){if(!t)return n.removeAllListeners(e),n._parser["on"+e]=t,t;n.on(e,t)},enumerable:!0,configurable:!1})}))}s.prototype=O(r.prototype,{constructor:{value:s}}),s.prototype.write=function(e){if(tn(e)){if(!this._decoder){var t=n(7503).s;this._decoder=new t("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},s.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},s.prototype.on=function(e,t){var n=this;return n._parser["on"+e]||-1===y(o).call(o,e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);S(t).call(t,0,0,e),n.emit.apply(n,t)}),r.prototype.on.call(n,e,t)};var l="\r\n\t ",u="0124356789",f="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",d="'\"",h=l+">",g="http://www.w3.org/XML/1998/namespace",p="http://www.w3.org/2000/xmlns/",m={xml:g,xmlns:p};l=D(l),u=D(u),f=D(f);var E=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,A=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/,R=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,N=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;function D(e){var t;return K(t=e.split("")).call(t,(function(e,t){return e[t]=!0,e}),{})}function M(e,t){return function(e){return"[object RegExp]"===Object.prototype.toString.call(e)}(e)?!!t.match(e):e[t]}function L(e,t){return!M(e,t)}d=D(d),h=D(h);var P,F,x,k=0;for(var U in e.STATE={BEGIN:k++,BEGIN_WHITESPACE:k++,TEXT:k++,TEXT_ENTITY:k++,OPEN_WAKA:k++,SGML_DECL:k++,SGML_DECL_QUOTED:k++,DOCTYPE:k++,DOCTYPE_QUOTED:k++,DOCTYPE_DTD:k++,DOCTYPE_DTD_QUOTED:k++,COMMENT_STARTING:k++,COMMENT:k++,COMMENT_ENDING:k++,COMMENT_ENDED:k++,CDATA:k++,CDATA_ENDING:k++,CDATA_ENDING_2:k++,PROC_INST:k++,PROC_INST_BODY:k++,PROC_INST_ENDING:k++,OPEN_TAG:k++,OPEN_TAG_SLASH:k++,ATTRIB:k++,ATTRIB_NAME:k++,ATTRIB_NAME_SAW_WHITE:k++,ATTRIB_VALUE:k++,ATTRIB_VALUE_QUOTED:k++,ATTRIB_VALUE_CLOSED:k++,ATTRIB_VALUE_UNQUOTED:k++,ATTRIB_VALUE_ENTITY_Q:k++,ATTRIB_VALUE_ENTITY_U:k++,CLOSE_TAG:k++,CLOSE_TAG_SAW_WHITE:k++,SCRIPT:k++,SCRIPT_ENDING:k++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},I(Z=z(e.ENTITIES)).call(Z,(function(t){var n=e.ENTITIES[t],r="number"==typeof n?String.fromCharCode(n):n;e.ENTITIES[t]=r})),e.STATE){var Z;e.STATE[e.STATE[U]]=U}function B(e,t,n){e[t]&&e[t](n)}function G(e,t,n){e.textNode&&q(e),B(e,t,n)}function q(e){e.textNode=Y(e.opt,e.textNode),e.textNode&&B(e,"ontext",e.textNode),e.textNode=""}function Y(e,t){return T(e)&&(t=T(t).call(t)),e.normalize&&(t=t.replace(/\s+/g," ")),t}function j(e,t){return q(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,B(e,"onerror",t),e}function H(e){return e.sawRoot&&!e.closedRoot&&V(e,"Unclosed root tag"),e.state!==k.BEGIN&&e.state!==k.BEGIN_WHITESPACE&&e.state!==k.TEXT&&j(e,"Unexpected end"),q(e),e.c="",e.closed=!0,B(e,"onend"),a.call(e,e.strict,e.opt),e}function V(e,t){if("object"!=c(e)||!(e instanceof a))throw new Error("bad call to strictFail");e.strict&&j(e,t)}function W(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0,G(e,"onopentagstart",n)}function X(e,t){var n=y(e).call(e,":")<0?["",e]:e.split(":"),r=n[0],i=n[1];return t&&"xmlns"===e&&(r="xmlns",i=""),{prefix:r,local:i}}function Q(e){var t;if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==y(t=e.attribList).call(t,e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var n=X(e.attribName,!0),r=n.prefix,i=n.local;if("xmlns"===r)if("xml"===i&&e.attribValue!==g)V(e,"xml: prefix must be bound to "+g+"\nActual: "+e.attribValue);else if("xmlns"===i&&e.attribValue!==p)V(e,"xmlns: prefix must be bound to "+p+"\nActual: "+e.attribValue);else{var a=e.tag,o=e.tags[e.tags.length-1]||e;a.ns===o.ns&&(a.ns=O(o.ns)),a.ns[i]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,G(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function $(e,t){if(e.opt.xmlns){var n,r=e.tag,i=X(e.tagName);r.prefix=i.prefix,r.local=i.local,r.uri=r.ns[i.prefix]||"",r.prefix&&!r.uri&&(V(e,"Unbound namespace prefix: "+b(e.tagName)),r.uri=i.prefix);var a=e.tags[e.tags.length-1]||e;r.ns&&a.ns!==r.ns&&I(n=z(r.ns)).call(n,(function(t){G(e,"onopennamespace",{prefix:t,uri:r.ns[t]})}));for(var o=0,s=e.attribList.length;o<s;o++){var l=e.attribList[o],u=l[0],c=l[1],f=X(u,!0),d=f.prefix,h=f.local,g=""===d?"":r.ns[d]||"",p={name:u,value:c,prefix:d,local:h,uri:g};d&&"xmlns"!==d&&!g&&(V(e,"Unbound namespace prefix: "+b(d)),p.uri=d),e.tag.attributes[u]=p,G(e,"onattribute",p)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),G(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=k.TEXT:e.state=k.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function J(e){if(!e.tagName)return V(e,"Weird empty close tag."),e.textNode+="</>",void(e.state=k.TEXT);if(e.script){if("script"!==e.tagName)return e.script+="</"+e.tagName+">",e.tagName="",void(e.state=k.SCRIPT);G(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());for(var r=n;t--&&e.tags[t].name!==r;)V(e,"Unexpected close tag");if(t<0)return V(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",void(e.state=k.TEXT);e.tagName=n;for(var i=e.tags.length;i-- >t;){var a,o=e.tag=e.tags.pop();e.tagName=e.tag.name,G(e,"onclosetag",e.tagName);var s={};for(var l in o.ns)s[l]=o.ns[l];var u=e.tags[e.tags.length-1]||e;e.opt.xmlns&&o.ns!==u.ns&&I(a=z(o.ns)).call(a,(function(t){var n=o.ns[t];G(e,"onclosenamespace",{prefix:t,uri:n})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=k.TEXT}function ee(e){var t,n=e.entity,r=n.toLowerCase(),i="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[r]?e.ENTITIES[r]:("#"===(n=r).charAt(0)&&("x"===n.charAt(1)?(n=v(n).call(n,2),i=(t=_(n,16)).toString(16)):(n=v(n).call(n,1),i=(t=_(n,10)).toString(10))),n=n.replace(/^0+/,""),i.toLowerCase()!==n?(V(e,"Invalid character entity"),"&"+e.entity+";"):Te(t))}function te(e,t){"<"===t?(e.state=k.OPEN_WAKA,e.startTagPosition=e.position):L(l,t)&&(V(e,"Non-whitespace before first tag."),e.textNode=t,e.state=k.TEXT)}function ne(e,t){var n="";return t<e.length&&(n=e.charAt(t)),n}k=e.STATE,Te||(P=String.fromCharCode,F=Math.floor,x=function(){var e,t,n=16384,r=[],i=-1,a=arguments.length;if(!a)return"";for(var o="";++i<a;){var s=Number(arguments[i]);if(!isFinite(s)||s<0||s>1114111||F(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?r.push(s):(e=55296+((s-=65536)>>10),t=s%1024+56320,r.push(e,t)),(i+1===a||r.length>n)&&(o+=P.apply(null,r),r.length=0)}return o},C?C(String,"fromCodePoint",{value:x,configurable:!0,writable:!0}):String.fromCodePoint=x)}(t)},182:function(e,t,n){e.exports=i;var r=n(1159).EventEmitter;function i(){r.call(this)}n(1765)(i,r),i.Readable=n(2846),i.Writable=n(8318),i.Duplex=n(6138),i.Transform=n(9798),i.PassThrough=n(5472),i.finished=n(8800),i.pipeline=n(7295),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",l));var o=!1;function s(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",a),n.removeListener("end",s),n.removeListener("close",l),n.removeListener("error",u),e.removeListener("error",u),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",u),e.on("error",u),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},1765:function(e){e.exports="function"==typeof O?function(e,t){t&&(e.super_=t,e.prototype=O(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},3690:function(e){var t={};function n(e,n,r){r||(r=Error);var i=function(e){var t,r;function i(t,r,i){return e.call(this,function(e,t,r){return"string"==typeof n?n:n(e,t,r)}(t,r,i))||this}return r=e,(t=i).prototype=O(r.prototype),t.prototype.constructor=t,t.__proto__=r,i}(r);i.prototype.name=r.name,i.prototype.code=e,t[e]=i}function r(e,t){var n;if(h(e)){var r,i,a,o,s=e.length;return e=ee(e).call(e,(function(e){return String(e)})),s>2?d(r="one of ".concat(t," ")).call(r,v(e).call(e,0,s-1).join(", "),", or ")+e[s-1]:2===s?d(i=d(a="one of ".concat(t," ")).call(a,e[0]," or ")).call(i,e[1]):d(o="of ".concat(t," ")).call(o,e[0])}return d(n="of ".concat(t," ")).call(n,String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,n){var i,a,o,s,l,u,f;if("string"==typeof t&&(s="not ",t.substr(0,s.length)===s)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))l=d(i=d(a="The ".concat(e," ")).call(a,o," ")).call(i,r(t,"type"));else{var h,g,p,m=("number"!=typeof f&&(f=0),f+".".length>(u=e).length||-1===y(u).call(u,".",f)?"argument":"property");l=d(h=d(g=d(p='The "'.concat(e,'" ')).call(p,m," ")).call(g,o," ")).call(h,r(t,"type"))}return l+". Received type ".concat(c(n))}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},6138:function(e,t,n){var r=z||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var i=n(2846),a=n(8318);n(1765)(u,i);for(var o=r(a.prototype),s=0;s<o.length;s++){var l=o[s];u.prototype[l]||(u.prototype[l]=a.prototype[l])}function u(e){if(!(this instanceof u))return new u(e);i.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",c)))}function c(){this._writableState.ended||qe(f,this)}function f(e){e.end()}C(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),C(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),C(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),C(u.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},5472:function(e,t,n){e.exports=i;var r=n(9798);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(1765)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},2846:function(e,t,n){var r;e.exports=M,M.ReadableState=D,n(1159).EventEmitter;var i,a=function(e,t){return e.listeners(t).length},o=n(9299),s=n(1549).Buffer,l=n.g.Uint8Array||function(){},u=n(964);i=u&&u.debuglog?u.debuglog("stream"):function(){};var c,f,p,m=n(8393),v=n(6163),y=n(7269).getHighWaterMark,E=n(3690).q,T=E.ERR_INVALID_ARG_TYPE,b=E.ERR_STREAM_PUSH_AFTER_EOF,I=E.ERR_METHOD_NOT_IMPLEMENTED,R=E.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(1765)(M,o);var w=v.errorOrDestroy,N=["error","close","destroy","pause","resume"];function D(e,t,i){r=r||n(6138),e=e||{},"boolean"!=typeof i&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=y(this,e,"readableHighWaterMark",i),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(c||(c=n(7503).s),this.decoder=new c(e.encoding),this.encoding=e.encoding)}function M(e){if(r=r||n(6138),!(this instanceof M))return new M(e);var t=this instanceof r;this._readableState=new D(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function O(e,t,n,r,a){i("readableAddChunk",t);var o,u=e._readableState;if(null===t)u.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?k(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,U(e)))}}(e,u);else if(a||(o=function(e,t){var n,r;return r=t,s.isBuffer(r)||r instanceof l||"string"==typeof t||void 0===t||e.objectMode||(n=new T("chunk",["string","Buffer","Uint8Array"],t)),n}(u,t)),o)w(e,o);else if(u.objectMode||t&&t.length>0)if("string"==typeof t||u.objectMode||L(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)u.endEmitted?w(e,new R):P(e,u,t,!0);else if(u.ended)w(e,new b);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!n?(t=u.decoder.write(t),u.objectMode||0!==t.length?P(e,u,t,!1):Z(e,u)):P(e,u,t,!1)}else r||(u.reading=!1,Z(e,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function P(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&k(e)),Z(e,t)}C(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),M.prototype.destroy=v.destroy,M.prototype._undestroy=v.undestroy,M.prototype._destroy=function(e,t){t(e)},M.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=s.from(e,t),t=""),n=!0),O(this,e,t,!1,n)},M.prototype.unshift=function(e){return O(this,e,null,!0,!1)},M.prototype.isPaused=function(){return!1===this._readableState.flowing},M.prototype.setEncoding=function(e){c||(c=n(7503).s);var t=new c(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var F=1073741824;function x(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=F?e=F:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,qe(U,e))}function U(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,j(e)}function Z(e,t){t.readingMore||(t.readingMore=!0,qe(B,e,t))}function B(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(i("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function G(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function q(e){i("readable nexttick read 0"),e.read(0)}function Y(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function H(e,t){var n,r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():d(n=t.buffer).call(n,t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function V(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,qe(K,t,e))}function K(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function z(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}M.prototype.read=function(e){i("read",e),e=_(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):k(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&V(this),null;var r,a=t.needReadable;return i("need readable",a),(0===t.length||t.length-e<t.highWaterMark)&&i("length less than watermark",a=!0),t.ended||t.reading?i("reading or ended",a=!1):a&&(i("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=x(n,t))),null===(r=e>0?H(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&V(this)),null!==r&&this.emit("data",r),r},M.prototype._read=function(e){w(this,new I("_read()"))},M.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,i("pipe count=%d opts=%j",r.pipesCount,t);var o=t&&!1===t.end||e===tt.stdout||e===tt.stderr?p:s;function s(){i("onend"),e.end()}r.endEmitted?qe(o):n.once("end",o),e.on("unpipe",(function t(a,o){i("onunpipe"),a===n&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,i("cleanup"),e.removeListener("close",d),e.removeListener("finish",g),e.removeListener("drain",l),e.removeListener("error",f),e.removeListener("unpipe",t),n.removeListener("end",s),n.removeListener("end",p),n.removeListener("data",c),u=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}));var l=function(e){return function(){var t=e._readableState;i("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,j(e))}}(n);e.on("drain",l);var u=!1;function c(t){i("ondata");var a=e.write(t);i("dest.write",a),!1===a&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==z(r.pipes,e))&&!u&&(i("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function f(t){i("onerror",t),p(),e.removeListener("error",f),0===a(e,"error")&&w(e,t)}function d(){e.removeListener("finish",g),p()}function g(){i("onfinish"),e.removeListener("close",d),p()}function p(){i("unpipe"),n.unpipe(e)}return n.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?h(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",f),e.once("close",d),e.once("finish",g),e.emit("pipe",n),r.flowing||(i("pipe resume"),n.resume()),e},M.prototype.unpipe=function(e){var t,n=this._readableState,r={hasUnpiped:!1};if(0===n.pipesCount)return this;if(1===n.pipesCount)return e&&e!==n.pipes||(e||(e=n.pipes),n.pipes=null,n.pipesCount=0,n.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var i=n.pipes,a=n.pipesCount;n.pipes=null,n.pipesCount=0,n.flowing=!1;for(var o=0;o<a;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=z(n.pipes,e);return-1===s||(S(t=n.pipes).call(t,s,1),n.pipesCount-=1,1===n.pipesCount&&(n.pipes=n.pipes[0]),e.emit("unpipe",this,r)),this},M.prototype.on=function(e,t){var n=o.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,i("on readable",r.length,r.reading),r.length?k(this):r.reading||qe(q,this))),n},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&qe(G,this),n},M.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||qe(G,this),t},M.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,qe(Y,e,t))}(this,e)),e.paused=!1,this},M.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},M.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var a in e.on("end",(function(){if(i("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(a){i("wrapped data"),n.decoder&&(a=n.decoder.write(a)),n.objectMode&&null==a||(n.objectMode||a&&a.length)&&(t.push(a)||(r=!0,e.pause()))})),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var o=0;o<N.length;o++){var s;e.on(N[o],A(s=this.emit).call(s,this,N[o]))}return this._read=function(t){i("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof g&&(M.prototype[be]=function(){return void 0===f&&(f=n(7299)),f(this)}),C(M.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),C(M.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),C(M.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),M._fromList=H,C(M.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof g&&(M.from=function(e,t){return void 0===p&&(p=n(6233)),p(M,e,t)})},9798:function(e,t,n){e.exports=c;var r=n(3690).q,i=r.ERR_METHOD_NOT_IMPLEMENTED,a=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,l=n(6138);function u(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new a);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);l.call(this,e),this._transformState={afterTransform:A(u).call(u,this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(t,n){d(e,t,n)}))}function d(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new s;if(e._transformState.transforming)throw new o;return e.push(null)}n(1765)(c,l),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,n){n(new i("_transform()"))},c.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,(function(e){t(e)}))}},8318:function(e,t,n){function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(void 0),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=R,R.WritableState=I;var a,o={deprecate:n(7839)},s=n(9299),l=n(1549).Buffer,u=n.g.Uint8Array||function(){},c=n(6163),f=n(7269).getHighWaterMark,d=n(3690).q,h=d.ERR_INVALID_ARG_TYPE,p=d.ERR_METHOD_NOT_IMPLEMENTED,m=d.ERR_MULTIPLE_CALLBACK,v=d.ERR_STREAM_CANNOT_PIPE,E=d.ERR_STREAM_DESTROYED,_=d.ERR_STREAM_NULL_VALUES,T=d.ERR_STREAM_WRITE_AFTER_END,b=d.ERR_UNKNOWN_ENCODING,S=c.errorOrDestroy;function A(){}function I(e,t,a){i=i||n(6138),e=e||{},"boolean"!=typeof a&&(a=t instanceof i),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=f(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if("function"!=typeof i)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(qe(i,r),qe(O,e,t),e._writableState.errorEmitted=!0,S(e,r)):(i(r),e._writableState.errorEmitted=!0,S(e,r),O(e,t))}(e,n,r,t,i);else{var a=M(n)||e.destroyed;a||n.corked||n.bufferProcessing||!n.bufferedRequest||D(e,n),r?qe(N,e,n,a,i):N(e,n,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function R(e){var t=this instanceof(i=i||n(6138));if(!t&&!a.call(R,this))return new R(e);this._writableState=new I(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),s.call(this)}function w(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new E("write")):n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function N(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),O(e,t)}function D(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=t.bufferedRequestCount,a=new Array(i),o=t.corkedRequestsFree;o.entry=n;for(var s=0,l=!0;n;)a[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;a.allBuffers=l,w(e,t,!0,t.length,a,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,c=n.encoding,f=n.callback;if(w(e,t,!1,t.objectMode?1:u.length,u,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function M(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function L(e,t){e._final((function(n){t.pendingcb--,n&&S(e,n),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var n=M(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,qe(L,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}n(1765)(R,s),I.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{C(I.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof g&&Se&&"function"==typeof Function.prototype[Se]?(a=Function.prototype[Se],C(R,Se,{value:function(e){return!!a.call(this,e)||this===R&&e&&e._writableState instanceof I}})):a=function(e){return e instanceof this},R.prototype.pipe=function(){S(this,new v)},R.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,o=!i.objectMode&&(r=e,l.isBuffer(r)||r instanceof u);return o&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=A),i.ending?function(e,t){var n=new T;S(e,n),qe(t,n)}(this,n):(o||function(e,t,n,r){var i;return null===n?i=new _:"string"==typeof n||t.objectMode||(i=new h("chunk",["string","Buffer"],n)),!i||(S(e,i),qe(r,i),!1)}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,i,a){if(!n){var o=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,n)),t}(t,r,i);r!==o&&(n=!0,i="buffer",r=o)}var s=t.objectMode?1:r.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else w(e,t,!1,s,r,i,a);return u}(this,i,o,e,t,n)),a},R.prototype.cork=function(){this._writableState.corked++},R.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||D(this,e))},R.prototype.setDefaultEncoding=function(e){var t;if("string"==typeof e&&(e=e.toLowerCase()),!(y(t=["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"]).call(t,(e+"").toLowerCase())>-1))throw new b(e);return this._writableState.defaultEncoding=e,this},C(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),C(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),R.prototype._write=function(e,t,n){n(new p("_write()"))},R.prototype._writev=null,R.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,O(e,t),n&&(t.finished?qe(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n),this},C(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),C(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),R.prototype.destroy=c.destroy,R.prototype._undestroy=c.undestroy,R.prototype._destroy=function(e,t){t(e)}},7299:function(e,t,n){var r;function i(e,t,n){return t in e?C(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=n(8800),o=g("lastResolve"),s=g("lastReject"),l=g("error"),u=g("ended"),c=g("lastPromise"),f=g("handlePromise"),d=g("stream");function h(e,t){return{value:e,done:t}}function p(e){var t=e[o];if(null!==t){var n=e[d].read();null!==n&&(e[c]=null,e[o]=null,e[s]=null,t(h(n,!1)))}}function m(e){qe(p,e)}var v=L((function(){})),y=M((i(r={get stream(){return this[d]},next:function(){var e=this,t=this[l];if(null!==t)return F.reject(t);if(this[u])return F.resolve(h(void 0,!0));if(this[d].destroyed)return new F((function(t,n){qe((function(){e[l]?n(e[l]):t(h(void 0,!0))}))}));var n,r=this[c];if(r)n=new F(function(e,t){return function(n,r){e.then((function(){t[u]?n(h(void 0,!0)):t[f](n,r)}),r)}}(r,this));else{var i=this[d].read();if(null!==i)return F.resolve(h(i,!1));n=new F(this[f])}return this[c]=n,n}},be,(function(){return this})),i(r,"return",(function(){var e=this;return new F((function(t,n){e[d].destroy(null,(function(e){e?n(e):t(h(void 0,!0))}))}))})),r),v);e.exports=function(e){var t,n=O(y,(i(t={},d,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,l,{value:null,writable:!0}),i(t,u,{value:e._readableState.endEmitted,writable:!0}),i(t,f,{value:function(e,t){var r=n[d].read();r?(n[c]=null,n[o]=null,n[s]=null,e(h(r,!1))):(n[o]=e,n[s]=t)},writable:!0}),t));return n[c]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[s];return null!==t&&(n[c]=null,n[o]=null,n[s]=null,t(e)),void(n[l]=e)}var r=n[o];null!==r&&(n[c]=null,n[o]=null,n[s]=null,r(h(void 0,!0))),n[u]=!0})),e.on("readable",A(m).call(m,null,n)),n}},8393:function(e,t,n){function r(e,t){var n=z(e);if(W){var r=W(e);t&&(r=w(r).call(r,(function(t){return X(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?C(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=n(1549).Buffer,o=n(9862).inspect,s=o&&o.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t;return t=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,n,r,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,n=i,r=s,a.prototype.copy.call(t,n,r),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var n,r,i;return e<this.head.data.length?(i=v(n=this.head.data).call(n,0,e),this.head.data=v(r=this.head.data).call(r,e)):i=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,a=e>i.length?i.length:e;if(a===i.length?r+=i:r+=v(i).call(i,0,e),0==(e-=a)){a===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=v(i).call(i,a));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=v(i).call(i,o));break}++r}return this.length-=r,t}},{key:s,value:function(e,t){return o(this,function(e){for(var t=1;t<arguments.length;t++){var n,a,o=null!=arguments[t]?arguments[t]:{};t%2?I(n=r(Object(o),!0)).call(n,(function(t){i(e,t,o[t])})):Q?$(e,Q(o)):I(a=r(Object(o))).call(a,(function(t){C(e,t,X(o,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}],t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),C(e,r.key,r)}}(e.prototype,t),e}()},6163:function(e){function t(e,t){r(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function r(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var a=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,qe(r,this,e)):qe(r,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!i&&e?a._writableState?a._writableState.errorEmitted?qe(n,a):(a._writableState.errorEmitted=!0,qe(t,a,e)):qe(t,a,e):i?(qe(n,a),i(e)):qe(n,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}},8800:function(e,t,n){var r=n(3690).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,a){if("function"==typeof n)return e(t,null,n);n||(n={}),a=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(a||i);var o=n.readable||!1!==n.readable&&t.readable,s=n.writable||!1!==n.writable&&t.writable,l=function(){t.writable||c()},u=t._writableState&&t._writableState.finished,c=function(){s=!1,u=!0,o||a.call(t)},f=t._readableState&&t._readableState.endEmitted,d=function(){o=!1,f=!0,s||a.call(t)},h=function(e){a.call(t,e)},g=function(){var e;return o&&!f?(t._readableState&&t._readableState.ended||(e=new r),a.call(t,e)):s&&!u?(t._writableState&&t._writableState.ended||(e=new r),a.call(t,e)):void 0},p=function(){t.req.on("finish",c)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",c),t.on("abort",g),t.req?p():t.on("request",p)):s&&!t._writableState&&(t.on("end",l),t.on("close",l)),t.on("end",d),t.on("finish",c),!1!==n.error&&t.on("error",h),t.on("close",g),function(){t.removeListener("complete",c),t.removeListener("abort",g),t.removeListener("request",p),t.req&&t.req.removeListener("finish",c),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",c),t.removeListener("end",d),t.removeListener("error",h),t.removeListener("close",g)}}},6233:function(e){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},7295:function(e,t,n){var r,i=n(3690).q,a=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function l(e,t,i,a){a=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(a);var s=!1;e.on("close",(function(){s=!0})),void 0===r&&(r=n(8800)),r(e,{readable:t,writable:i},(function(e){if(e)return a(e);s=!0,a()}));var l=!1;return function(t){if(!s&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void a(t||new o("pipe"))}}function u(e){e()}function c(e,t){return e.pipe(t)}function f(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}e.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=f(t);if(h(t[0])&&(t=t[0]),t.length<2)throw new a("streams");var o=ee(t).call(t,(function(e,n){var a=n<t.length-1;return l(e,a,n>0,(function(e){r||(r=e),e&&I(o).call(o,u),a||(I(o).call(o,u),i(r))}))}));return K(t).call(t,c)}},7269:function(e,t,n){var r=n(3690).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,i){var a=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new r(i?n:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},9299:function(e,t,n){e.exports=n(1159).EventEmitter},7503:function(e,t,n){var r=n(8387).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],v(n).call(n,0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.s=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},a.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||-2===i?0:(i=o(t[r]))>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||-2===i?0:(i=o(t[r]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},1067:function(e,t,n){var r;!function(i,a){var o="function",s="undefined",l="object",u="string",f="major",h="model",g="name",p="type",m="vendor",v="version",E="architecture",_="console",T="mobile",b="tablet",S="smarttv",A="wearable",I="embedded",R="Amazon",w="Apple",N="ASUS",C="BlackBerry",D="Browser",M="Chrome",L="Firefox",O="Google",P="Huawei",F="LG",x="Microsoft",k="Motorola",U="Opera",Z="Samsung",B="Sharp",G="Sony",q="Xiaomi",Y="Zebra",j="Facebook",H="Chromium OS",V="Mac OS",K=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},z=function(e,t){var n;return c(e)===u&&-1!==y(n=W(t)).call(n,W(e))},W=function(e){return e.toLowerCase()},X=function(e,t){if(c(e)===u)return e=e.replace(/^\s\s*/,""),c(t)===s?e:e.substring(0,500)},Q=function(e,t){for(var n,r,i,s,u,f,d=0;d<t.length&&!u;){var h=t[d],g=t[d+1];for(n=r=0;n<h.length&&!u&&h[n];)if(u=h[n++].exec(e))for(i=0;i<g.length;i++)f=u[++r],c(s=g[i])===l&&s.length>0?2===s.length?c(s[1])==o?this[s[0]]=s[1].call(this,f):this[s[0]]=s[1]:3===s.length?c(s[1])!==o||s[1].exec&&s[1].test?this[s[0]]=f?f.replace(s[1],s[2]):a:this[s[0]]=f?s[1].call(this,f,s[2]):a:4===s.length&&(this[s[0]]=f?s[3].call(this,f.replace(s[1],s[2])):a):this[s]=f||a;d+=2}},$=function(e,t){for(var n in t)if(c(t[n])===l&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(z(t[n][r],e))return"?"===n?a:n}else if(z(t[n],e))return"?"===n?a:n;return e},J={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ee={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[v,[g,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[v,[g,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[g,v],[/opios[\/ ]+([\w\.]+)/i],[v,[g,U+" Mini"]],[/\bopr\/([\w\.]+)/i],[v,[g,U]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[v,[g,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[g,v],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[v,[g,"UC"+D]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[v,[g,"WeChat"]],[/konqueror\/([\w\.]+)/i],[v,[g,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[v,[g,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[v,[g,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[v,[g,"Smart Lenovo "+D]],[/(avast|avg)\/([\w\.]+)/i],[[g,/(.+)/,"$1 Secure "+D],v],[/\bfocus\/([\w\.]+)/i],[v,[g,L+" Focus"]],[/\bopt\/([\w\.]+)/i],[v,[g,U+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[v,[g,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[v,[g,"Dolphin"]],[/coast\/([\w\.]+)/i],[v,[g,U+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[v,[g,"MIUI "+D]],[/fxios\/([-\w\.]+)/i],[v,[g,L]],[/\bqihu|(qi?ho?o?|360)browser/i],[[g,"360 "+D]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[g,/(.+)/,"$1 "+D],v],[/samsungbrowser\/([\w\.]+)/i],[v,[g,Z+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[g,/_/g," "],v],[/metasr[\/ ]?([\d\.]+)/i],[v,[g,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[g,"Sogou Mobile"],v],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[g,v],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[g],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[g,j],v],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[g,v],[/\bgsa\/([\w\.]+) .*safari\//i],[v,[g,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[v,[g,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[v,[g,M+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[g,M+" WebView"],v],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[v,[g,"Android "+D]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[g,v],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[v,[g,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[v,g],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[g,[v,$,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[g,v],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[g,"Netscape"],v],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[v,[g,L+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[g,v],[/(cobalt)\/([\w\.]+)/i],[g,[v,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[E,"amd64"]],[/(ia32(?=;))/i],[[E,W]],[/((?:i[346]|x)86)[;\)]/i],[[E,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[E,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[E,"armhf"]],[/windows (ce|mobile); ppc;/i],[[E,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[E,/ower/,"",W]],[/(sun4\w)[;\)]/i],[[E,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[E,W]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[h,[m,Z],[p,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[h,[m,Z],[p,T]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[h,[m,w],[p,T]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[h,[m,w],[p,b]],[/(macintosh);/i],[h,[m,w]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[h,[m,B],[p,T]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[h,[m,P],[p,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[h,[m,P],[p,T]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[h,/_/g," "],[m,q],[p,T]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[h,/_/g," "],[m,q],[p,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[h,[m,"OPPO"],[p,T]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[h,[m,"Vivo"],[p,T]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[h,[m,"Realme"],[p,T]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[h,[m,k],[p,T]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[h,[m,k],[p,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[h,[m,F],[p,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[h,[m,F],[p,T]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[h,[m,"Lenovo"],[p,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[h,/_/g," "],[m,"Nokia"],[p,T]],[/(pixel c)\b/i],[h,[m,O],[p,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[h,[m,O],[p,T]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[h,[m,G],[p,T]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[h,"Xperia Tablet"],[m,G],[p,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[h,[m,"OnePlus"],[p,T]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[h,[m,R],[p,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[h,/(.+)/g,"Fire Phone $1"],[m,R],[p,T]],[/(playbook);[-\w\),; ]+(rim)/i],[h,m,[p,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[h,[m,C],[p,T]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[h,[m,N],[p,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[h,[m,N],[p,T]],[/(nexus 9)/i],[h,[m,"HTC"],[p,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[m,[h,/_/g," "],[p,T]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[h,[m,"Acer"],[p,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[h,[m,"Meizu"],[p,T]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[h,[m,"Ulefone"],[p,T]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[m,h,[p,T]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[m,h,[p,b]],[/(surface duo)/i],[h,[m,x],[p,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[h,[m,"Fairphone"],[p,T]],[/(u304aa)/i],[h,[m,"AT&T"],[p,T]],[/\bsie-(\w*)/i],[h,[m,"Siemens"],[p,T]],[/\b(rct\w+) b/i],[h,[m,"RCA"],[p,b]],[/\b(venue[\d ]{2,7}) b/i],[h,[m,"Dell"],[p,b]],[/\b(q(?:mv|ta)\w+) b/i],[h,[m,"Verizon"],[p,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[h,[m,"Barnes & Noble"],[p,b]],[/\b(tm\d{3}\w+) b/i],[h,[m,"NuVision"],[p,b]],[/\b(k88) b/i],[h,[m,"ZTE"],[p,b]],[/\b(nx\d{3}j) b/i],[h,[m,"ZTE"],[p,T]],[/\b(gen\d{3}) b.+49h/i],[h,[m,"Swiss"],[p,T]],[/\b(zur\d{3}) b/i],[h,[m,"Swiss"],[p,b]],[/\b((zeki)?tb.*\b) b/i],[h,[m,"Zeki"],[p,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[m,"Dragon Touch"],h,[p,b]],[/\b(ns-?\w{0,9}) b/i],[h,[m,"Insignia"],[p,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[h,[m,"NextBook"],[p,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[m,"Voice"],h,[p,T]],[/\b(lvtel\-)?(v1[12]) b/i],[[m,"LvTel"],h,[p,T]],[/\b(ph-1) /i],[h,[m,"Essential"],[p,T]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[h,[m,"Envizen"],[p,b]],[/\b(trio[-\w\. ]+) b/i],[h,[m,"MachSpeed"],[p,b]],[/\btu_(1491) b/i],[h,[m,"Rotor"],[p,b]],[/(shield[\w ]+) b/i],[h,[m,"Nvidia"],[p,b]],[/(sprint) (\w+)/i],[m,h,[p,T]],[/(kin\.[onetw]{3})/i],[[h,/\./g," "],[m,x],[p,T]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[h,[m,Y],[p,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[h,[m,Y],[p,T]],[/smart-tv.+(samsung)/i],[m,[p,S]],[/hbbtv.+maple;(\d+)/i],[[h,/^/,"SmartTV"],[m,Z],[p,S]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[m,F],[p,S]],[/(apple) ?tv/i],[m,[h,w+" TV"],[p,S]],[/crkey/i],[[h,M+"cast"],[m,O],[p,S]],[/droid.+aft(\w+)( bui|\))/i],[h,[m,R],[p,S]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[h,[m,B],[p,S]],[/(bravia[\w ]+)( bui|\))/i],[h,[m,G],[p,S]],[/(mitv-\w{5}) bui/i],[h,[m,q],[p,S]],[/Hbbtv.*(technisat) (.*);/i],[m,h,[p,S]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[m,X],[h,X],[p,S]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,S]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[m,h,[p,_]],[/droid.+; (shield) bui/i],[h,[m,"Nvidia"],[p,_]],[/(playstation [345portablevi]+)/i],[h,[m,G],[p,_]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[h,[m,x],[p,_]],[/((pebble))app/i],[m,h,[p,A]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[h,[m,w],[p,A]],[/droid.+; (glass) \d/i],[h,[m,O],[p,A]],[/droid.+; (wt63?0{2,3})\)/i],[h,[m,Y],[p,A]],[/(quest( 2| pro)?)/i],[h,[m,j],[p,A]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[m,[p,I]],[/(aeobc)\b/i],[h,[m,R],[p,I]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[h,[p,T]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[h,[p,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,T]],[/(android[-\w\. ]{0,9});.+buil/i],[h,[m,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[v,[g,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[v,[g,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[g,v],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[v,g]],os:[[/microsoft (windows) (vista|xp)/i],[g,v],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[g,[v,$,J]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[v,$,J],[g,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[v,/_/g,"."],[g,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[g,V],[v,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[v,g],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[g,v],[/\(bb(10);/i],[v,[g,C]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[v,[g,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[v,[g,L+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[v,[g,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[v,[g,"watchOS"]],[/crkey\/([\d\.]+)/i],[v,[g,M+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[g,H],v],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[g,v],[/(sunos) ?([\w\.\d]*)/i],[[g,"Solaris"],v],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[g,v]]},te=function(e,t){if(c(e)===l&&(t=e,e=a),!(this instanceof te))return new te(e,t).getResult();var n=c(i)!==s&&i.navigator?i.navigator:a,r=e||(n&&n.userAgent?n.userAgent:""),y=n&&n.userAgentData?n.userAgentData:a,_=t?function(e,t){var n={};for(var r in e){var i;t[r]&&t[r].length%2==0?n[r]=d(i=t[r]).call(i,e[r]):n[r]=e[r]}return n}(ee,t):ee,S=n&&n.userAgent==r;return this.getBrowser=function(){var e,t={};return t[g]=a,t[v]=a,Q.call(t,r,_.browser),t[f]=c(e=t[v])===u?e.replace(/[^\d\.]/g,"").split(".")[0]:a,S&&n&&n.brave&&c(n.brave.isBrave)==o&&(t[g]="Brave"),t},this.getCPU=function(){var e={};return e[E]=a,Q.call(e,r,_.cpu),e},this.getDevice=function(){var e={};return e[m]=a,e[h]=a,e[p]=a,Q.call(e,r,_.device),S&&!e[p]&&y&&y.mobile&&(e[p]=T),S&&"Macintosh"==e[h]&&n&&c(n.standalone)!==s&&n.maxTouchPoints&&n.maxTouchPoints>2&&(e[h]="iPad",e[p]=b),e},this.getEngine=function(){var e={};return e[g]=a,e[v]=a,Q.call(e,r,_.engine),e},this.getOS=function(){var e={};return e[g]=a,e[v]=a,Q.call(e,r,_.os),S&&!e[g]&&y&&"Unknown"!=y.platform&&(e[g]=y.platform.replace(/chrome os/i,H).replace(/macos/i,V)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=c(e)===u&&e.length>500?X(e,500):e,this},this.setUA(r),this};te.VERSION="1.0.37",te.BROWSER=K([g,v,f]),te.CPU=K([E]),te.DEVICE=K([h,m,p,_,T,S,b,A,I]),te.ENGINE=te.OS=K([g,v]),c(t)!==s?(e.exports&&(t=e.exports=te),t.UAParser=te):n.amdO?(r=function(){return te}.call(t,n,t,e))===a||(e.exports=r):c(i)!==s&&(i.UAParser=te);var ne=c(i)!==s&&(i.jQuery||i.Zepto);if(ne&&!ne.ua){var re=new te;ne.ua=re.getResult(),ne.ua.get=function(){return re.getUA()},ne.ua.set=function(e){re.setUA(e);var t=re.getResult();for(var n in t)ne.ua[n]=t[n]}}}("object"==("undefined"==typeof window?"undefined":c(window))?window:this)},7839:function(e,t,n){function r(e){try{if(!n.g.localStorage)return!1}catch(e){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}},9862:function(){},964:function(){},3165:function(e){e.exports=JSON.parse('["mni-beng-in","mni-mtei-in","sat-deva-in","sat-olck-in","shi-latn-ma","shi-tfng-ma","vai-latn-lr","vai-vaii-lr","yue-hans-cn","yue-hant-hk","az-arab-ir","az-cyrl-az","az-latn-az","bm-nkoo-ml","bs-cyrl-ba","bs-latn-ba","en-dsrt-us","ff-adlm-gn","ff-latn-sn","ha-arab-ng","hi-latn-in","iu-latn-ca","ks-arab-in","ks-deva-in","mn-mong-cn","ms-arab-my","pa-arab-pk","pa-guru-in","sd-arab-pk","sd-deva-in","sr-cyrl-rs","sr-latn-rs","su-latn-id","uz-arab-af","uz-cyrl-uz","uz-latn-uz","zh-hans-cn","zh-hant-tw","mni-beng","sat-olck","shi-tfng","vai-vaii","yue-hant","az-latn","bs-latn","ff-latn","jbo-001","ks-arab","pa-guru","prg-001","sd-arab","sr-cyrl","su-latn","uz-latn","zh-hans","agq-cm","ar-001","arn-cl","asa-tz","ast-es","bas-cm","bem-zm","bez-tz","bgn-pk","blt-vn","brx-in","bss-cm","byn-er","cad-us","cch-ng","ccp-bd","ceb-ph","cgg-ug","chr-us","cic-us","ckb-iq","dav-ke","dje-ne","doi-in","dsb-de","dua-cm","dyo-sn","ebu-ke","eo-001","ewo-cm","fil-ph","fur-it","gaa-gh","gez-et","gsw-ch","guz-ke","haw-us","hsb-de","ia-001","ife-tg","io-001","jgo-cm","jmc-tz","kab-dz","kaj-ng","kam-ke","kcg-ng","kde-tz","kea-cv","ken-cm","khq-ml","kkj-cm","kln-ke","kok-in","kpe-lr","ksb-tz","ksf-cm","ksh-de","lag-tz","lkt-us","lrc-ir","luo-ke","luy-ke","mai-in","mas-ke","mer-ke","mfe-mu","mgh-mz","mgo-cm","moh-ca","mua-cm","mus-us","myv-ru","mzn-ir","naq-na","nds-de","nmg-cm","nnh-cm","nqo-gn","nso-za","nus-ss","nyn-ug","osa-us","pcm-ng","quc-gt","rof-tz","rwk-tz","sah-ru","saq-ke","sbp-tz","scn-it","sdh-ir","seh-mz","ses-ml","sid-et","sma-se","smj-se","smn-fi","sms-fi","ssy-er","syr-iq","szl-pl","teo-ug","tig-er","trv-tw","trw-pk","twq-ne","tzm-ma","vo-001","vun-tz","wae-ch","wal-et","wbp-au","xog-ug","yav-cm","yi-001","zgh-ma","aa-et","af-za","ak-gh","am-et","an-es","as-in","ba-ru","be-by","bg-bg","bm-ml","bn-bd","bo-cn","br-fr","ca-es","ce-ru","co-fr","cs-cz","cu-ru","cv-ru","cy-gb","da-dk","de-de","dv-mv","dz-bt","ee-gh","el-gr","en-us","es-es","et-ee","eu-es","fa-ir","fi-fi","fo-fo","fr-fr","fy-nl","ga-ie","gd-gb","gl-es","gn-py","gu-in","gv-im","ha-ng","he-il","hi-in","hr-hr","hu-hu","hy-am","id-id","ig-ng","ii-cn","is-is","it-it","iu-ca","ja-jp","jv-id","ka-ge","ki-ke","kk-kz","kl-gl","km-kh","kn-in","ko-kr","ku-tr","kw-gb","ky-kg","lb-lu","lg-ug","ln-cd","lo-la","lt-lt","lu-cd","lv-lv","mg-mg","mi-nz","mk-mk","ml-in","mn-mn","mr-in","ms-my","mt-mt","my-mm","nb-no","nd-zw","ne-np","nl-nl","nn-no","nr-za","nv-us","ny-mw","oc-fr","om-et","or-in","os-ge","pl-pl","ps-af","pt-br","qu-pe","rm-ch","rn-bi","ro-ro","ru-ru","rw-rw","sa-in","sc-it","se-no","sg-cf","si-lk","sk-sk","sl-si","sn-zw","so-so","sq-al","ss-za","st-za","sv-se","sw-tz","ta-in","te-in","tg-tj","th-th","ti-et","tk-tm","tn-za","to-to","tr-tr","ts-za","tt-ru","ug-cn","uk-ua","ur-pk","ve-za","vi-vn","wa-be","wo-sn","xh-za","yo-ng","zu-za"]')},5813:function(e){e.exports=JSON.parse('[{"from":{"field":"script","value":"qaai"},"to":{"field":"script","value":"zinh"}},{"from":{"field":"region","value":"bu"},"to":{"field":"region","value":"mm"}},{"from":{"field":"region","value":"ct"},"to":{"field":"region","value":"ki"}},{"from":{"field":"region","value":"dd"},"to":{"field":"region","value":"de"}},{"from":{"field":"region","value":"dy"},"to":{"field":"region","value":"bj"}},{"from":{"field":"region","value":"fx"},"to":{"field":"region","value":"fr"}},{"from":{"field":"region","value":"hv"},"to":{"field":"region","value":"bf"}},{"from":{"field":"region","value":"jt"},"to":{"field":"region","value":"um"}},{"from":{"field":"region","value":"mi"},"to":{"field":"region","value":"um"}},{"from":{"field":"region","value":"nh"},"to":{"field":"region","value":"vu"}},{"from":{"field":"region","value":"nq"},"to":{"field":"region","value":"aq"}},{"from":{"field":"region","value":"pu"},"to":{"field":"region","value":"um"}},{"from":{"field":"region","value":"pz"},"to":{"field":"region","value":"pa"}},{"from":{"field":"region","value":"qu"},"to":{"field":"region","value":"eu"}},{"from":{"field":"region","value":"rh"},"to":{"field":"region","value":"zw"}},{"from":{"field":"region","value":"tp"},"to":{"field":"region","value":"tl"}},{"from":{"field":"region","value":"uk"},"to":{"field":"region","value":"gb"}},{"from":{"field":"region","value":"vd"},"to":{"field":"region","value":"vn"}},{"from":{"field":"region","value":"wk"},"to":{"field":"region","value":"um"}},{"from":{"field":"region","value":"yd"},"to":{"field":"region","value":"ye"}},{"from":{"field":"region","value":"zr"},"to":{"field":"region","value":"cd"}},{"from":{"field":"region","value":"230"},"to":{"field":"region","value":"et"}},{"from":{"field":"region","value":"280"},"to":{"field":"region","value":"de"}},{"from":{"field":"region","value":"736"},"to":{"field":"region","value":"sd"}},{"from":{"field":"region","value":"886"},"to":{"field":"region","value":"ye"}},{"from":{"field":"region","value":"958"},"to":{"field":"region","value":"aa"}},{"from":{"field":"region","value":"020"},"to":{"field":"region","value":"ad"}},{"from":{"field":"region","value":"784"},"to":{"field":"region","value":"ae"}},{"from":{"field":"region","value":"004"},"to":{"field":"region","value":"af"}},{"from":{"field":"region","value":"028"},"to":{"field":"region","value":"ag"}},{"from":{"field":"region","value":"660"},"to":{"field":"region","value":"ai"}},{"from":{"field":"region","value":"008"},"to":{"field":"region","value":"al"}},{"from":{"field":"region","value":"051"},"to":{"field":"region","value":"am"}},{"from":{"field":"region","value":"024"},"to":{"field":"region","value":"ao"}},{"from":{"field":"region","value":"010"},"to":{"field":"region","value":"aq"}},{"from":{"field":"region","value":"032"},"to":{"field":"region","value":"ar"}},{"from":{"field":"region","value":"016"},"to":{"field":"region","value":"as"}},{"from":{"field":"region","value":"040"},"to":{"field":"region","value":"at"}},{"from":{"field":"region","value":"036"},"to":{"field":"region","value":"au"}},{"from":{"field":"region","value":"533"},"to":{"field":"region","value":"aw"}},{"from":{"field":"region","value":"248"},"to":{"field":"region","value":"ax"}},{"from":{"field":"region","value":"031"},"to":{"field":"region","value":"az"}},{"from":{"field":"region","value":"070"},"to":{"field":"region","value":"ba"}},{"from":{"field":"region","value":"052"},"to":{"field":"region","value":"bb"}},{"from":{"field":"region","value":"050"},"to":{"field":"region","value":"bd"}},{"from":{"field":"region","value":"056"},"to":{"field":"region","value":"be"}},{"from":{"field":"region","value":"854"},"to":{"field":"region","value":"bf"}},{"from":{"field":"region","value":"100"},"to":{"field":"region","value":"bg"}},{"from":{"field":"region","value":"048"},"to":{"field":"region","value":"bh"}},{"from":{"field":"region","value":"108"},"to":{"field":"region","value":"bi"}},{"from":{"field":"region","value":"204"},"to":{"field":"region","value":"bj"}},{"from":{"field":"region","value":"652"},"to":{"field":"region","value":"bl"}},{"from":{"field":"region","value":"060"},"to":{"field":"region","value":"bm"}},{"from":{"field":"region","value":"096"},"to":{"field":"region","value":"bn"}},{"from":{"field":"region","value":"068"},"to":{"field":"region","value":"bo"}},{"from":{"field":"region","value":"535"},"to":{"field":"region","value":"bq"}},{"from":{"field":"region","value":"076"},"to":{"field":"region","value":"br"}},{"from":{"field":"region","value":"044"},"to":{"field":"region","value":"bs"}},{"from":{"field":"region","value":"064"},"to":{"field":"region","value":"bt"}},{"from":{"field":"region","value":"104"},"to":{"field":"region","value":"mm"}},{"from":{"field":"region","value":"074"},"to":{"field":"region","value":"bv"}},{"from":{"field":"region","value":"072"},"to":{"field":"region","value":"bw"}},{"from":{"field":"region","value":"112"},"to":{"field":"region","value":"by"}},{"from":{"field":"region","value":"084"},"to":{"field":"region","value":"bz"}},{"from":{"field":"region","value":"124"},"to":{"field":"region","value":"ca"}},{"from":{"field":"region","value":"166"},"to":{"field":"region","value":"cc"}},{"from":{"field":"region","value":"180"},"to":{"field":"region","value":"cd"}},{"from":{"field":"region","value":"140"},"to":{"field":"region","value":"cf"}},{"from":{"field":"region","value":"178"},"to":{"field":"region","value":"cg"}},{"from":{"field":"region","value":"756"},"to":{"field":"region","value":"ch"}},{"from":{"field":"region","value":"384"},"to":{"field":"region","value":"ci"}},{"from":{"field":"region","value":"184"},"to":{"field":"region","value":"ck"}},{"from":{"field":"region","value":"152"},"to":{"field":"region","value":"cl"}},{"from":{"field":"region","value":"120"},"to":{"field":"region","value":"cm"}},{"from":{"field":"region","value":"156"},"to":{"field":"region","value":"cn"}},{"from":{"field":"region","value":"170"},"to":{"field":"region","value":"co"}},{"from":{"field":"region","value":"188"},"to":{"field":"region","value":"cr"}},{"from":{"field":"region","value":"192"},"to":{"field":"region","value":"cu"}},{"from":{"field":"region","value":"132"},"to":{"field":"region","value":"cv"}},{"from":{"field":"region","value":"531"},"to":{"field":"region","value":"cw"}},{"from":{"field":"region","value":"162"},"to":{"field":"region","value":"cx"}},{"from":{"field":"region","value":"196"},"to":{"field":"region","value":"cy"}},{"from":{"field":"region","value":"203"},"to":{"field":"region","value":"cz"}},{"from":{"field":"region","value":"278"},"to":{"field":"region","value":"de"}},{"from":{"field":"region","value":"276"},"to":{"field":"region","value":"de"}},{"from":{"field":"region","value":"262"},"to":{"field":"region","value":"dj"}},{"from":{"field":"region","value":"208"},"to":{"field":"region","value":"dk"}},{"from":{"field":"region","value":"212"},"to":{"field":"region","value":"dm"}},{"from":{"field":"region","value":"214"},"to":{"field":"region","value":"do"}},{"from":{"field":"region","value":"012"},"to":{"field":"region","value":"dz"}},{"from":{"field":"region","value":"218"},"to":{"field":"region","value":"ec"}},{"from":{"field":"region","value":"233"},"to":{"field":"region","value":"ee"}},{"from":{"field":"region","value":"818"},"to":{"field":"region","value":"eg"}},{"from":{"field":"region","value":"732"},"to":{"field":"region","value":"eh"}},{"from":{"field":"region","value":"232"},"to":{"field":"region","value":"er"}},{"from":{"field":"region","value":"724"},"to":{"field":"region","value":"es"}},{"from":{"field":"region","value":"231"},"to":{"field":"region","value":"et"}},{"from":{"field":"region","value":"246"},"to":{"field":"region","value":"fi"}},{"from":{"field":"region","value":"242"},"to":{"field":"region","value":"fj"}},{"from":{"field":"region","value":"238"},"to":{"field":"region","value":"fk"}},{"from":{"field":"region","value":"583"},"to":{"field":"region","value":"fm"}},{"from":{"field":"region","value":"234"},"to":{"field":"region","value":"fo"}},{"from":{"field":"region","value":"250"},"to":{"field":"region","value":"fr"}},{"from":{"field":"region","value":"249"},"to":{"field":"region","value":"fr"}},{"from":{"field":"region","value":"266"},"to":{"field":"region","value":"ga"}},{"from":{"field":"region","value":"826"},"to":{"field":"region","value":"gb"}},{"from":{"field":"region","value":"308"},"to":{"field":"region","value":"gd"}},{"from":{"field":"region","value":"268"},"to":{"field":"region","value":"ge"}},{"from":{"field":"region","value":"254"},"to":{"field":"region","value":"gf"}},{"from":{"field":"region","value":"831"},"to":{"field":"region","value":"gg"}},{"from":{"field":"region","value":"288"},"to":{"field":"region","value":"gh"}},{"from":{"field":"region","value":"292"},"to":{"field":"region","value":"gi"}},{"from":{"field":"region","value":"304"},"to":{"field":"region","value":"gl"}},{"from":{"field":"region","value":"270"},"to":{"field":"region","value":"gm"}},{"from":{"field":"region","value":"324"},"to":{"field":"region","value":"gn"}},{"from":{"field":"region","value":"312"},"to":{"field":"region","value":"gp"}},{"from":{"field":"region","value":"226"},"to":{"field":"region","value":"gq"}},{"from":{"field":"region","value":"300"},"to":{"field":"region","value":"gr"}},{"from":{"field":"region","value":"239"},"to":{"field":"region","value":"gs"}},{"from":{"field":"region","value":"320"},"to":{"field":"region","value":"gt"}},{"from":{"field":"region","value":"316"},"to":{"field":"region","value":"gu"}},{"from":{"field":"region","value":"624"},"to":{"field":"region","value":"gw"}},{"from":{"field":"region","value":"328"},"to":{"field":"region","value":"gy"}},{"from":{"field":"region","value":"344"},"to":{"field":"region","value":"hk"}},{"from":{"field":"region","value":"334"},"to":{"field":"region","value":"hm"}},{"from":{"field":"region","value":"340"},"to":{"field":"region","value":"hn"}},{"from":{"field":"region","value":"191"},"to":{"field":"region","value":"hr"}},{"from":{"field":"region","value":"332"},"to":{"field":"region","value":"ht"}},{"from":{"field":"region","value":"348"},"to":{"field":"region","value":"hu"}},{"from":{"field":"region","value":"360"},"to":{"field":"region","value":"id"}},{"from":{"field":"region","value":"372"},"to":{"field":"region","value":"ie"}},{"from":{"field":"region","value":"376"},"to":{"field":"region","value":"il"}},{"from":{"field":"region","value":"833"},"to":{"field":"region","value":"im"}},{"from":{"field":"region","value":"356"},"to":{"field":"region","value":"in"}},{"from":{"field":"region","value":"086"},"to":{"field":"region","value":"io"}},{"from":{"field":"region","value":"368"},"to":{"field":"region","value":"iq"}},{"from":{"field":"region","value":"364"},"to":{"field":"region","value":"ir"}},{"from":{"field":"region","value":"352"},"to":{"field":"region","value":"is"}},{"from":{"field":"region","value":"380"},"to":{"field":"region","value":"it"}},{"from":{"field":"region","value":"832"},"to":{"field":"region","value":"je"}},{"from":{"field":"region","value":"388"},"to":{"field":"region","value":"jm"}},{"from":{"field":"region","value":"400"},"to":{"field":"region","value":"jo"}},{"from":{"field":"region","value":"392"},"to":{"field":"region","value":"jp"}},{"from":{"field":"region","value":"404"},"to":{"field":"region","value":"ke"}},{"from":{"field":"region","value":"417"},"to":{"field":"region","value":"kg"}},{"from":{"field":"region","value":"116"},"to":{"field":"region","value":"kh"}},{"from":{"field":"region","value":"296"},"to":{"field":"region","value":"ki"}},{"from":{"field":"region","value":"174"},"to":{"field":"region","value":"km"}},{"from":{"field":"region","value":"659"},"to":{"field":"region","value":"kn"}},{"from":{"field":"region","value":"408"},"to":{"field":"region","value":"kp"}},{"from":{"field":"region","value":"410"},"to":{"field":"region","value":"kr"}},{"from":{"field":"region","value":"414"},"to":{"field":"region","value":"kw"}},{"from":{"field":"region","value":"136"},"to":{"field":"region","value":"ky"}},{"from":{"field":"region","value":"398"},"to":{"field":"region","value":"kz"}},{"from":{"field":"region","value":"418"},"to":{"field":"region","value":"la"}},{"from":{"field":"region","value":"422"},"to":{"field":"region","value":"lb"}},{"from":{"field":"region","value":"662"},"to":{"field":"region","value":"lc"}},{"from":{"field":"region","value":"438"},"to":{"field":"region","value":"li"}},{"from":{"field":"region","value":"144"},"to":{"field":"region","value":"lk"}},{"from":{"field":"region","value":"430"},"to":{"field":"region","value":"lr"}},{"from":{"field":"region","value":"426"},"to":{"field":"region","value":"ls"}},{"from":{"field":"region","value":"440"},"to":{"field":"region","value":"lt"}},{"from":{"field":"region","value":"442"},"to":{"field":"region","value":"lu"}},{"from":{"field":"region","value":"428"},"to":{"field":"region","value":"lv"}},{"from":{"field":"region","value":"434"},"to":{"field":"region","value":"ly"}},{"from":{"field":"region","value":"504"},"to":{"field":"region","value":"ma"}},{"from":{"field":"region","value":"492"},"to":{"field":"region","value":"mc"}},{"from":{"field":"region","value":"498"},"to":{"field":"region","value":"md"}},{"from":{"field":"region","value":"499"},"to":{"field":"region","value":"me"}},{"from":{"field":"region","value":"663"},"to":{"field":"region","value":"mf"}},{"from":{"field":"region","value":"450"},"to":{"field":"region","value":"mg"}},{"from":{"field":"region","value":"584"},"to":{"field":"region","value":"mh"}},{"from":{"field":"region","value":"807"},"to":{"field":"region","value":"mk"}},{"from":{"field":"region","value":"466"},"to":{"field":"region","value":"ml"}},{"from":{"field":"region","value":"496"},"to":{"field":"region","value":"mn"}},{"from":{"field":"region","value":"446"},"to":{"field":"region","value":"mo"}},{"from":{"field":"region","value":"580"},"to":{"field":"region","value":"mp"}},{"from":{"field":"region","value":"474"},"to":{"field":"region","value":"mq"}},{"from":{"field":"region","value":"478"},"to":{"field":"region","value":"mr"}},{"from":{"field":"region","value":"500"},"to":{"field":"region","value":"ms"}},{"from":{"field":"region","value":"470"},"to":{"field":"region","value":"mt"}},{"from":{"field":"region","value":"480"},"to":{"field":"region","value":"mu"}},{"from":{"field":"region","value":"462"},"to":{"field":"region","value":"mv"}},{"from":{"field":"region","value":"454"},"to":{"field":"region","value":"mw"}},{"from":{"field":"region","value":"484"},"to":{"field":"region","value":"mx"}},{"from":{"field":"region","value":"458"},"to":{"field":"region","value":"my"}},{"from":{"field":"region","value":"508"},"to":{"field":"region","value":"mz"}},{"from":{"field":"region","value":"516"},"to":{"field":"region","value":"na"}},{"from":{"field":"region","value":"540"},"to":{"field":"region","value":"nc"}},{"from":{"field":"region","value":"562"},"to":{"field":"region","value":"ne"}},{"from":{"field":"region","value":"574"},"to":{"field":"region","value":"nf"}},{"from":{"field":"region","value":"566"},"to":{"field":"region","value":"ng"}},{"from":{"field":"region","value":"558"},"to":{"field":"region","value":"ni"}},{"from":{"field":"region","value":"528"},"to":{"field":"region","value":"nl"}},{"from":{"field":"region","value":"578"},"to":{"field":"region","value":"no"}},{"from":{"field":"region","value":"524"},"to":{"field":"region","value":"np"}},{"from":{"field":"region","value":"520"},"to":{"field":"region","value":"nr"}},{"from":{"field":"region","value":"570"},"to":{"field":"region","value":"nu"}},{"from":{"field":"region","value":"554"},"to":{"field":"region","value":"nz"}},{"from":{"field":"region","value":"512"},"to":{"field":"region","value":"om"}},{"from":{"field":"region","value":"591"},"to":{"field":"region","value":"pa"}},{"from":{"field":"region","value":"604"},"to":{"field":"region","value":"pe"}},{"from":{"field":"region","value":"258"},"to":{"field":"region","value":"pf"}},{"from":{"field":"region","value":"598"},"to":{"field":"region","value":"pg"}},{"from":{"field":"region","value":"608"},"to":{"field":"region","value":"ph"}},{"from":{"field":"region","value":"586"},"to":{"field":"region","value":"pk"}},{"from":{"field":"region","value":"616"},"to":{"field":"region","value":"pl"}},{"from":{"field":"region","value":"666"},"to":{"field":"region","value":"pm"}},{"from":{"field":"region","value":"612"},"to":{"field":"region","value":"pn"}},{"from":{"field":"region","value":"630"},"to":{"field":"region","value":"pr"}},{"from":{"field":"region","value":"275"},"to":{"field":"region","value":"ps"}},{"from":{"field":"region","value":"620"},"to":{"field":"region","value":"pt"}},{"from":{"field":"region","value":"585"},"to":{"field":"region","value":"pw"}},{"from":{"field":"region","value":"600"},"to":{"field":"region","value":"py"}},{"from":{"field":"region","value":"634"},"to":{"field":"region","value":"qa"}},{"from":{"field":"region","value":"959"},"to":{"field":"region","value":"qm"}},{"from":{"field":"region","value":"960"},"to":{"field":"region","value":"qn"}},{"from":{"field":"region","value":"962"},"to":{"field":"region","value":"qp"}},{"from":{"field":"region","value":"963"},"to":{"field":"region","value":"qq"}},{"from":{"field":"region","value":"964"},"to":{"field":"region","value":"qr"}},{"from":{"field":"region","value":"965"},"to":{"field":"region","value":"qs"}},{"from":{"field":"region","value":"966"},"to":{"field":"region","value":"qt"}},{"from":{"field":"region","value":"967"},"to":{"field":"region","value":"eu"}},{"from":{"field":"region","value":"968"},"to":{"field":"region","value":"qv"}},{"from":{"field":"region","value":"969"},"to":{"field":"region","value":"qw"}},{"from":{"field":"region","value":"970"},"to":{"field":"region","value":"qx"}},{"from":{"field":"region","value":"971"},"to":{"field":"region","value":"qy"}},{"from":{"field":"region","value":"972"},"to":{"field":"region","value":"qz"}},{"from":{"field":"region","value":"638"},"to":{"field":"region","value":"re"}},{"from":{"field":"region","value":"642"},"to":{"field":"region","value":"ro"}},{"from":{"field":"region","value":"688"},"to":{"field":"region","value":"rs"}},{"from":{"field":"region","value":"643"},"to":{"field":"region","value":"ru"}},{"from":{"field":"region","value":"646"},"to":{"field":"region","value":"rw"}},{"from":{"field":"region","value":"682"},"to":{"field":"region","value":"sa"}},{"from":{"field":"region","value":"090"},"to":{"field":"region","value":"sb"}},{"from":{"field":"region","value":"690"},"to":{"field":"region","value":"sc"}},{"from":{"field":"region","value":"729"},"to":{"field":"region","value":"sd"}},{"from":{"field":"region","value":"752"},"to":{"field":"region","value":"se"}},{"from":{"field":"region","value":"702"},"to":{"field":"region","value":"sg"}},{"from":{"field":"region","value":"654"},"to":{"field":"region","value":"sh"}},{"from":{"field":"region","value":"705"},"to":{"field":"region","value":"si"}},{"from":{"field":"region","value":"744"},"to":{"field":"region","value":"sj"}},{"from":{"field":"region","value":"703"},"to":{"field":"region","value":"sk"}},{"from":{"field":"region","value":"694"},"to":{"field":"region","value":"sl"}},{"from":{"field":"region","value":"674"},"to":{"field":"region","value":"sm"}},{"from":{"field":"region","value":"686"},"to":{"field":"region","value":"sn"}},{"from":{"field":"region","value":"706"},"to":{"field":"region","value":"so"}},{"from":{"field":"region","value":"740"},"to":{"field":"region","value":"sr"}},{"from":{"field":"region","value":"728"},"to":{"field":"region","value":"ss"}},{"from":{"field":"region","value":"678"},"to":{"field":"region","value":"st"}},{"from":{"field":"region","value":"222"},"to":{"field":"region","value":"sv"}},{"from":{"field":"region","value":"534"},"to":{"field":"region","value":"sx"}},{"from":{"field":"region","value":"760"},"to":{"field":"region","value":"sy"}},{"from":{"field":"region","value":"748"},"to":{"field":"region","value":"sz"}},{"from":{"field":"region","value":"796"},"to":{"field":"region","value":"tc"}},{"from":{"field":"region","value":"148"},"to":{"field":"region","value":"td"}},{"from":{"field":"region","value":"260"},"to":{"field":"region","value":"tf"}},{"from":{"field":"region","value":"768"},"to":{"field":"region","value":"tg"}},{"from":{"field":"region","value":"764"},"to":{"field":"region","value":"th"}},{"from":{"field":"region","value":"762"},"to":{"field":"region","value":"tj"}},{"from":{"field":"region","value":"772"},"to":{"field":"region","value":"tk"}},{"from":{"field":"region","value":"626"},"to":{"field":"region","value":"tl"}},{"from":{"field":"region","value":"795"},"to":{"field":"region","value":"tm"}},{"from":{"field":"region","value":"788"},"to":{"field":"region","value":"tn"}},{"from":{"field":"region","value":"776"},"to":{"field":"region","value":"to"}},{"from":{"field":"region","value":"792"},"to":{"field":"region","value":"tr"}},{"from":{"field":"region","value":"780"},"to":{"field":"region","value":"tt"}},{"from":{"field":"region","value":"798"},"to":{"field":"region","value":"tv"}},{"from":{"field":"region","value":"158"},"to":{"field":"region","value":"tw"}},{"from":{"field":"region","value":"834"},"to":{"field":"region","value":"tz"}},{"from":{"field":"region","value":"804"},"to":{"field":"region","value":"ua"}},{"from":{"field":"region","value":"800"},"to":{"field":"region","value":"ug"}},{"from":{"field":"region","value":"581"},"to":{"field":"region","value":"um"}},{"from":{"field":"region","value":"840"},"to":{"field":"region","value":"us"}},{"from":{"field":"region","value":"858"},"to":{"field":"region","value":"uy"}},{"from":{"field":"region","value":"860"},"to":{"field":"region","value":"uz"}},{"from":{"field":"region","value":"336"},"to":{"field":"region","value":"va"}},{"from":{"field":"region","value":"670"},"to":{"field":"region","value":"vc"}},{"from":{"field":"region","value":"862"},"to":{"field":"region","value":"ve"}},{"from":{"field":"region","value":"092"},"to":{"field":"region","value":"vg"}},{"from":{"field":"region","value":"850"},"to":{"field":"region","value":"vi"}},{"from":{"field":"region","value":"704"},"to":{"field":"region","value":"vn"}},{"from":{"field":"region","value":"548"},"to":{"field":"region","value":"vu"}},{"from":{"field":"region","value":"876"},"to":{"field":"region","value":"wf"}},{"from":{"field":"region","value":"882"},"to":{"field":"region","value":"ws"}},{"from":{"field":"region","value":"973"},"to":{"field":"region","value":"xa"}},{"from":{"field":"region","value":"974"},"to":{"field":"region","value":"xb"}},{"from":{"field":"region","value":"975"},"to":{"field":"region","value":"xc"}},{"from":{"field":"region","value":"976"},"to":{"field":"region","value":"xd"}},{"from":{"field":"region","value":"977"},"to":{"field":"region","value":"xe"}},{"from":{"field":"region","value":"978"},"to":{"field":"region","value":"xf"}},{"from":{"field":"region","value":"979"},"to":{"field":"region","value":"xg"}},{"from":{"field":"region","value":"980"},"to":{"field":"region","value":"xh"}},{"from":{"field":"region","value":"981"},"to":{"field":"region","value":"xi"}},{"from":{"field":"region","value":"982"},"to":{"field":"region","value":"xj"}},{"from":{"field":"region","value":"983"},"to":{"field":"region","value":"xk"}},{"from":{"field":"region","value":"984"},"to":{"field":"region","value":"xl"}},{"from":{"field":"region","value":"985"},"to":{"field":"region","value":"xm"}},{"from":{"field":"region","value":"986"},"to":{"field":"region","value":"xn"}},{"from":{"field":"region","value":"987"},"to":{"field":"region","value":"xo"}},{"from":{"field":"region","value":"988"},"to":{"field":"region","value":"xp"}},{"from":{"field":"region","value":"989"},"to":{"field":"region","value":"xq"}},{"from":{"field":"region","value":"990"},"to":{"field":"region","value":"xr"}},{"from":{"field":"region","value":"991"},"to":{"field":"region","value":"xs"}},{"from":{"field":"region","value":"992"},"to":{"field":"region","value":"xt"}},{"from":{"field":"region","value":"993"},"to":{"field":"region","value":"xu"}},{"from":{"field":"region","value":"994"},"to":{"field":"region","value":"xv"}},{"from":{"field":"region","value":"995"},"to":{"field":"region","value":"xw"}},{"from":{"field":"region","value":"996"},"to":{"field":"region","value":"xx"}},{"from":{"field":"region","value":"997"},"to":{"field":"region","value":"xy"}},{"from":{"field":"region","value":"998"},"to":{"field":"region","value":"xz"}},{"from":{"field":"region","value":"720"},"to":{"field":"region","value":"ye"}},{"from":{"field":"region","value":"887"},"to":{"field":"region","value":"ye"}},{"from":{"field":"region","value":"175"},"to":{"field":"region","value":"yt"}},{"from":{"field":"region","value":"710"},"to":{"field":"region","value":"za"}},{"from":{"field":"region","value":"894"},"to":{"field":"region","value":"zm"}},{"from":{"field":"region","value":"716"},"to":{"field":"region","value":"zw"}},{"from":{"field":"region","value":"999"},"to":{"field":"region","value":"zz"}},{"from":{"field":"variants","value":"aaland"},"to":{"field":"region","value":"ax"}},{"from":{"field":"variants","value":"polytoni"},"to":{"field":"variants","value":"polyton"}},{"from":{"field":"variants","value":"heploc"},"to":{"field":"variants","value":"alalc97"}},{"from":{"field":"variants","value":"arevela"},"to":{"field":"language","value":"hy"}},{"from":{"field":"variants","value":"arevmda"},"to":{"field":"language","value":"hyw"}}]')},9460:function(e){e.exports=JSON.parse('{"region":{"172":["ru","am","az","by","ge","kg","kz","md","tj","tm","ua","uz"],"200":["cz","sk"],"530":["cw","sx","bq"],"532":["cw","sx","bq"],"536":["sa","iq"],"582":["fm","mh","mp","pw"],"810":["ru","am","az","by","ee","ge","kz","kg","lv","lt","md","tj","tm","ua","uz"],"830":["je","gg"],"890":["rs","me","si","hr","mk","ba"],"891":["rs","me"],"an":["cw","sx","bq"],"cs":["rs","me"],"fq":["aq","tf"],"nt":["sa","iq"],"pc":["fm","mh","mp","pw"],"su":["ru","am","az","by","ee","ge","kz","kg","lv","lt","md","tj","tm","ua","uz"],"yu":["rs","me"],"062":["034","143"],"ant":["cw","sx","bq"],"scg":["rs","me"],"ntz":["sa","iq"],"sun":["ru","am","az","by","ee","ge","kz","kg","lv","lt","md","tj","tm","ua","uz"],"yug":["rs","me"]}}')},7778:function(e){e.exports=JSON.parse('[{"from":"in","to":"id"},{"from":"iw","to":"he"},{"from":"ji","to":"yi"},{"from":"jw","to":"jv"},{"from":"mo","to":"ro"},{"from":"scc","to":"sr"},{"from":"scr","to":"hr"},{"from":"aam","to":"aas"},{"from":"adp","to":"dz"},{"from":"aue","to":"ktz"},{"from":"ayx","to":"nun"},{"from":"bgm","to":"bcg"},{"from":"bjd","to":"drl"},{"from":"ccq","to":"rki"},{"from":"cjr","to":"mom"},{"from":"cka","to":"cmr"},{"from":"cmk","to":"xch"},{"from":"coy","to":"pij"},{"from":"cqu","to":"quh"},{"from":"drh","to":"mn"},{"from":"drw","to":"fa-af"},{"from":"gav","to":"dev"},{"from":"gfx","to":"vaj"},{"from":"ggn","to":"gvr"},{"from":"gti","to":"nyc"},{"from":"guv","to":"duz"},{"from":"hrr","to":"jal"},{"from":"ibi","to":"opa"},{"from":"ilw","to":"gal"},{"from":"jeg","to":"oyb"},{"from":"kgc","to":"tdf"},{"from":"kgh","to":"kml"},{"from":"koj","to":"kwv"},{"from":"krm","to":"bmf"},{"from":"ktr","to":"dtp"},{"from":"kvs","to":"gdj"},{"from":"kwq","to":"yam"},{"from":"kxe","to":"tvd"},{"from":"kzj","to":"dtp"},{"from":"kzt","to":"dtp"},{"from":"lii","to":"raq"},{"from":"lmm","to":"rmx"},{"from":"meg","to":"cir"},{"from":"mst","to":"mry"},{"from":"mwj","to":"vaj"},{"from":"myt","to":"mry"},{"from":"nad","to":"xny"},{"from":"ncp","to":"kdz"},{"from":"nnx","to":"ngv"},{"from":"nts","to":"pij"},{"from":"oun","to":"vaj"},{"from":"pcr","to":"adx"},{"from":"pmc","to":"huw"},{"from":"pmu","to":"phr"},{"from":"ppa","to":"bfy"},{"from":"ppr","to":"lcq"},{"from":"pry","to":"prt"},{"from":"puz","to":"pub"},{"from":"sca","to":"hle"},{"from":"skk","to":"oyb"},{"from":"tdu","to":"dtp"},{"from":"thc","to":"tpo"},{"from":"thx","to":"oyb"},{"from":"tie","to":"ras"},{"from":"tkk","to":"twm"},{"from":"tlw","to":"weo"},{"from":"tmp","to":"tyj"},{"from":"tne","to":"kak"},{"from":"tnf","to":"fa-af"},{"from":"tsf","to":"taj"},{"from":"uok","to":"ema"},{"from":"xba","to":"cax"},{"from":"xia","to":"acn"},{"from":"xkh","to":"waw"},{"from":"xsj","to":"suj"},{"from":"ybd","to":"rki"},{"from":"yma","to":"lrr"},{"from":"ymt","to":"mtm"},{"from":"yos","to":"zom"},{"from":"yuu","to":"yug"},{"from":"asd","to":"snz"},{"from":"dit","to":"dif"},{"from":"llo","to":"ngt"},{"from":"myd","to":"aog"},{"from":"nns","to":"nbr"},{"from":"sgn-br","to":"bzs"},{"from":"sgn-co","to":"csn"},{"from":"sgn-de","to":"gsg"},{"from":"sgn-dk","to":"dsl"},{"from":"sgn-fr","to":"fsl"},{"from":"sgn-gb","to":"bfi"},{"from":"sgn-gr","to":"gss"},{"from":"sgn-ie","to":"isg"},{"from":"sgn-it","to":"ise"},{"from":"sgn-jp","to":"jsl"},{"from":"sgn-mx","to":"mfs"},{"from":"sgn-ni","to":"ncs"},{"from":"sgn-nl","to":"dse"},{"from":"sgn-no","to":"nsi"},{"from":"sgn-pt","to":"psr"},{"from":"sgn-se","to":"swl"},{"from":"sgn-us","to":"ase"},{"from":"sgn-za","to":"sfs"},{"from":"no-bokmal","to":"nb"},{"from":"no-nynorsk","to":"nn"},{"from":"aa-saaho","to":"ssy"},{"from":"sh","to":"sr-latn"},{"from":"cnr","to":"sr-me"},{"from":"no","to":"nb"},{"from":"tl","to":"fil"},{"from":"az-az","to":"az-latn-az"},{"from":"bs-ba","to":"bs-latn-ba"},{"from":"ha-latn-gh","to":"ha-gh"},{"from":"ha-latn-ne","to":"ha-ne"},{"from":"ha-latn-ng","to":"ha-ng"},{"from":"kk-cyrl-kz","to":"kk-kz"},{"from":"ky-cyrl-kg","to":"ky-kg"},{"from":"ks-arab-in","to":"ks-in"},{"from":"mn-cyrl-mn","to":"mn-mn"},{"from":"ms-latn-bn","to":"ms-bn"},{"from":"ms-latn-my","to":"ms-my"},{"from":"ms-latn-sg","to":"ms-sg"},{"from":"pa-in","to":"pa-guru-in"},{"from":"pa-pk","to":"pa-arab-pk"},{"from":"shi-ma","to":"shi-tfng-ma"},{"from":"sr-ba","to":"sr-cyrl-ba"},{"from":"sr-me","to":"sr-latn-me"},{"from":"sr-rs","to":"sr-cyrl-rs"},{"from":"sr-xk","to":"sr-cyrl-xk"},{"from":"tzm-latn-ma","to":"tzm-ma"},{"from":"ug-arab-cn","to":"ug-cn"},{"from":"uz-af","to":"uz-arab-af"},{"from":"uz-uz","to":"uz-latn-uz"},{"from":"vai-lr","to":"vai-vaii-lr"},{"from":"yue-cn","to":"yue-hans-cn"},{"from":"yue-hk","to":"yue-hant-hk"},{"from":"zh-cn","to":"zh-hans-cn"},{"from":"zh-hk","to":"zh-hant-hk"},{"from":"zh-mo","to":"zh-hant-mo"},{"from":"zh-sg","to":"zh-hans-sg"},{"from":"zh-tw","to":"zh-hant-tw"},{"from":"aju","to":"jrb"},{"from":"als","to":"sq"},{"from":"arb","to":"ar"},{"from":"ayr","to":"ay"},{"from":"azj","to":"az"},{"from":"bcc","to":"bal"},{"from":"bcl","to":"bik"},{"from":"bxk","to":"luy"},{"from":"bxr","to":"bua"},{"from":"cld","to":"syr"},{"from":"cmn","to":"zh"},{"from":"cwd","to":"cr"},{"from":"dgo","to":"doi"},{"from":"dhd","to":"mwr"},{"from":"dik","to":"din"},{"from":"diq","to":"zza"},{"from":"lbk","to":"bnc"},{"from":"ekk","to":"et"},{"from":"emk","to":"man"},{"from":"esk","to":"ik"},{"from":"fat","to":"ak"},{"from":"fuc","to":"ff"},{"from":"gaz","to":"om"},{"from":"gbo","to":"grb"},{"from":"gno","to":"gon"},{"from":"gug","to":"gn"},{"from":"gya","to":"gba"},{"from":"hdn","to":"hai"},{"from":"hea","to":"hmn"},{"from":"ike","to":"iu"},{"from":"kmr","to":"ku"},{"from":"knc","to":"kr"},{"from":"kng","to":"kg"},{"from":"knn","to":"kok"},{"from":"kpv","to":"kv"},{"from":"lvs","to":"lv"},{"from":"mhr","to":"chm"},{"from":"mup","to":"raj"},{"from":"khk","to":"mn"},{"from":"npi","to":"ne"},{"from":"ojg","to":"oj"},{"from":"ory","to":"or"},{"from":"pbu","to":"ps"},{"from":"pes","to":"fa"},{"from":"plt","to":"mg"},{"from":"pnb","to":"lah"},{"from":"quz","to":"qu"},{"from":"rmy","to":"rom"},{"from":"spy","to":"kln"},{"from":"src","to":"sc"},{"from":"swh","to":"sw"},{"from":"ttq","to":"tmh"},{"from":"tw","to":"ak"},{"from":"umu","to":"del"},{"from":"uzn","to":"uz"},{"from":"xpe","to":"kpe"},{"from":"xsl","to":"den"},{"from":"ydd","to":"yi"},{"from":"zai","to":"zap"},{"from":"zsm","to":"ms"},{"from":"zyb","to":"za"},{"from":"him","to":"srx"},{"from":"mnk","to":"man"},{"from":"bh","to":"bho"},{"from":"prs","to":"fa-af"},{"from":"swc","to":"sw-cd"},{"from":"aar","to":"aa"},{"from":"abk","to":"ab"},{"from":"ave","to":"ae"},{"from":"afr","to":"af"},{"from":"aka","to":"ak"},{"from":"amh","to":"am"},{"from":"arg","to":"an"},{"from":"ara","to":"ar"},{"from":"asm","to":"as"},{"from":"ava","to":"av"},{"from":"aym","to":"ay"},{"from":"aze","to":"az"},{"from":"bak","to":"ba"},{"from":"bel","to":"be"},{"from":"bul","to":"bg"},{"from":"bih","to":"bho"},{"from":"bis","to":"bi"},{"from":"bam","to":"bm"},{"from":"ben","to":"bn"},{"from":"bod","to":"bo"},{"from":"bre","to":"br"},{"from":"bos","to":"bs"},{"from":"cat","to":"ca"},{"from":"che","to":"ce"},{"from":"cha","to":"ch"},{"from":"cos","to":"co"},{"from":"cre","to":"cr"},{"from":"ces","to":"cs"},{"from":"chu","to":"cu"},{"from":"chv","to":"cv"},{"from":"cym","to":"cy"},{"from":"dan","to":"da"},{"from":"deu","to":"de"},{"from":"div","to":"dv"},{"from":"dzo","to":"dz"},{"from":"ewe","to":"ee"},{"from":"ell","to":"el"},{"from":"eng","to":"en"},{"from":"epo","to":"eo"},{"from":"spa","to":"es"},{"from":"est","to":"et"},{"from":"eus","to":"eu"},{"from":"fas","to":"fa"},{"from":"ful","to":"ff"},{"from":"fin","to":"fi"},{"from":"fij","to":"fj"},{"from":"fao","to":"fo"},{"from":"fra","to":"fr"},{"from":"fry","to":"fy"},{"from":"gle","to":"ga"},{"from":"gla","to":"gd"},{"from":"glg","to":"gl"},{"from":"grn","to":"gn"},{"from":"guj","to":"gu"},{"from":"glv","to":"gv"},{"from":"hau","to":"ha"},{"from":"heb","to":"he"},{"from":"hin","to":"hi"},{"from":"hmo","to":"ho"},{"from":"hrv","to":"hr"},{"from":"hat","to":"ht"},{"from":"hun","to":"hu"},{"from":"hye","to":"hy"},{"from":"her","to":"hz"},{"from":"ina","to":"ia"},{"from":"ind","to":"id"},{"from":"ile","to":"ie"},{"from":"ibo","to":"ig"},{"from":"iii","to":"ii"},{"from":"ipk","to":"ik"},{"from":"ido","to":"io"},{"from":"isl","to":"is"},{"from":"ita","to":"it"},{"from":"iku","to":"iu"},{"from":"jpn","to":"ja"},{"from":"jav","to":"jv"},{"from":"kat","to":"ka"},{"from":"kon","to":"kg"},{"from":"kik","to":"ki"},{"from":"kua","to":"kj"},{"from":"kaz","to":"kk"},{"from":"kal","to":"kl"},{"from":"khm","to":"km"},{"from":"kan","to":"kn"},{"from":"kor","to":"ko"},{"from":"kau","to":"kr"},{"from":"kas","to":"ks"},{"from":"kur","to":"ku"},{"from":"kom","to":"kv"},{"from":"cor","to":"kw"},{"from":"kir","to":"ky"},{"from":"lat","to":"la"},{"from":"ltz","to":"lb"},{"from":"lug","to":"lg"},{"from":"lim","to":"li"},{"from":"lin","to":"ln"},{"from":"lao","to":"lo"},{"from":"lit","to":"lt"},{"from":"lub","to":"lu"},{"from":"lav","to":"lv"},{"from":"mlg","to":"mg"},{"from":"mah","to":"mh"},{"from":"mri","to":"mi"},{"from":"mkd","to":"mk"},{"from":"mal","to":"ml"},{"from":"mon","to":"mn"},{"from":"mol","to":"ro"},{"from":"mar","to":"mr"},{"from":"msa","to":"ms"},{"from":"mlt","to":"mt"},{"from":"mya","to":"my"},{"from":"nau","to":"na"},{"from":"nob","to":"nb"},{"from":"nde","to":"nd"},{"from":"nep","to":"ne"},{"from":"ndo","to":"ng"},{"from":"nld","to":"nl"},{"from":"nno","to":"nn"},{"from":"nor","to":"nb"},{"from":"nbl","to":"nr"},{"from":"nav","to":"nv"},{"from":"nya","to":"ny"},{"from":"oci","to":"oc"},{"from":"oji","to":"oj"},{"from":"orm","to":"om"},{"from":"ori","to":"or"},{"from":"oss","to":"os"},{"from":"pan","to":"pa"},{"from":"pli","to":"pi"},{"from":"pol","to":"pl"},{"from":"pus","to":"ps"},{"from":"por","to":"pt"},{"from":"que","to":"qu"},{"from":"roh","to":"rm"},{"from":"run","to":"rn"},{"from":"ron","to":"ro"},{"from":"rus","to":"ru"},{"from":"kin","to":"rw"},{"from":"san","to":"sa"},{"from":"srd","to":"sc"},{"from":"snd","to":"sd"},{"from":"sme","to":"se"},{"from":"sag","to":"sg"},{"from":"hbs","to":"sr-latn"},{"from":"sin","to":"si"},{"from":"slk","to":"sk"},{"from":"slv","to":"sl"},{"from":"smo","to":"sm"},{"from":"sna","to":"sn"},{"from":"som","to":"so"},{"from":"sqi","to":"sq"},{"from":"srp","to":"sr"},{"from":"ssw","to":"ss"},{"from":"sot","to":"st"},{"from":"sun","to":"su"},{"from":"swe","to":"sv"},{"from":"swa","to":"sw"},{"from":"tam","to":"ta"},{"from":"tel","to":"te"},{"from":"tgk","to":"tg"},{"from":"tha","to":"th"},{"from":"tir","to":"ti"},{"from":"tuk","to":"tk"},{"from":"tgl","to":"fil"},{"from":"tsn","to":"tn"},{"from":"ton","to":"to"},{"from":"tur","to":"tr"},{"from":"tso","to":"ts"},{"from":"tat","to":"tt"},{"from":"twi","to":"ak"},{"from":"tah","to":"ty"},{"from":"uig","to":"ug"},{"from":"ukr","to":"uk"},{"from":"urd","to":"ur"},{"from":"uzb","to":"uz"},{"from":"ven","to":"ve"},{"from":"vie","to":"vi"},{"from":"vol","to":"vo"},{"from":"wln","to":"wa"},{"from":"wol","to":"wo"},{"from":"xho","to":"xh"},{"from":"yid","to":"yi"},{"from":"yor","to":"yo"},{"from":"zha","to":"za"},{"from":"zho","to":"zh"},{"from":"zul","to":"zu"},{"from":"alb","to":"sq"},{"from":"arm","to":"hy"},{"from":"baq","to":"eu"},{"from":"bur","to":"my"},{"from":"chi","to":"zh"},{"from":"cze","to":"cs"},{"from":"dut","to":"nl"},{"from":"fre","to":"fr"},{"from":"geo","to":"ka"},{"from":"ger","to":"de"},{"from":"gre","to":"el"},{"from":"ice","to":"is"},{"from":"mac","to":"mk"},{"from":"mao","to":"mi"},{"from":"may","to":"ms"},{"from":"per","to":"fa"},{"from":"rum","to":"ro"},{"from":"slo","to":"sk"},{"from":"tib","to":"bo"},{"from":"wel","to":"cy"}]')},8589:function(e){e.exports=JSON.parse('{"en-gb-oed":"en-GB-oxendict","i-ami":"ami","i-bnn":"bnn","i-default":null,"i-enochian":null,"i-hak":"hak","i-klingon":"tlh","i-lux":"lb","i-mingo":null,"i-navajo":"nv","i-pwn":"pwn","i-tao":"tao","i-tay":"tay","i-tsu":"tsu","sgn-be-fr":"sfb","sgn-be-nl":"vgt","sgn-ch-de":"sgg","art-lojban":"jbo","cel-gaulish":null,"no-bok":"nb","no-nyn":"nn","zh-guoyu":"cmn","zh-hakka":"hak","zh-min":null,"zh-min-nan":"nan","zh-xiang":"hsn"}')},858:function(e){e.exports=JSON.parse('["art-lojban","cel-gaulish","no-bok","no-nyn","zh-guoyu","zh-hakka","zh-min","zh-min-nan","zh-xiang"]')}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.amdO={},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&C(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==(void 0===Ae?"undefined":c(Ae)))return Ae;try{return this||new Function("return this")()}catch(e){if("object"==("undefined"==typeof window?"undefined":c(window)))return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var r={};return function(){n.d(r,{default:function(){return c}}),n(8416);var e,t=n(1715),i=n(8080),a=n(1737),o=n(1139),s=function(){var e,t="application/dash+xml";function n(n,r,i){var a;if(!n||!/^VIDEO$/i.test(n.nodeName))return null;if(n._dashjs_player)return n._dashjs_player;var s,l=n.id||n.name||"video element";if(!(r=r||w(a=v([]).call(n.querySelectorAll("source"))).call(a,(function(e){return e.type==t}))[0])&&n.src)(r=document.createElement("source")).src=n.src;else if(!r&&!n.src)return null;return i=i||{},(s=(0,o.Z)(i).create()).initialize(n,r.src,n.autoplay),e||(e=s.getDebug().getLogger()),e.debug("Converted "+l+" to dash.js player and added content: "+r.src),n._dashjs_player=s,s}function r(e){return/^VIDEO$/i.test(e.nodeName)?e:r(e.parentNode)}return{create:n,createAll:function(e,i){var a=[];e=e||"[data-dashjs-player]";for(var o=(i=i||document).querySelectorAll(e),s=0;s<o.length;s++){var l=n(o[s],null);a.push(l)}for(var u=i.querySelectorAll('source[type="'+t+'"]'),c=0;c<u.length;c++){var f=n(r(u[c]),null);a.push(f)}return a}}}();!("undefined"!=typeof window&&window&&window.dashjs&&window.dashjs.skipAutoCreate)&&"undefined"!=typeof window&&window&&window.addEventListener&&("complete"===window.document.readyState?window.dashjs?s.createAll():e=k((function(){window.dashjs&&(window.clearInterval(e),s.createAll())}),500):window.addEventListener("load",(function e(){window.removeEventListener("load",e),s.createAll()})));var l=s,u=n(6398);dashjs.Protection=a.default,dashjs.MetricsReporting=i.default,dashjs.MediaPlayerFactory=l,dashjs.Debug=u.Z,dashjs.supportsMediaSource=t.B;var c=dashjs}(),r.default}()},"object"==("undefined"==typeof exports?"undefined":c(exports))&&"object"==("undefined"==typeof module?"undefined":c(module))?module.exports=zt():"object"==("undefined"==typeof exports?"undefined":c(exports))?exports.dashjs=zt():Kt.dashjs=zt();var sn=Re.getComponent("Component"),ln="#222",un="#ccc",cn={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function fn(e,t,n){try{e.style[t]=n}catch(e){return}}function dn(e){for(var t in e.style&&(e.style.left=null,e.style.width="100%"),e.children)dn(e.children[t])}function hn(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=v(e).call(e,1)}return"rgba("+_(v(n).call(n,0,2),16)+","+_(v(n).call(n,2,4),16)+","+_(v(n).call(n,4,6),16)+","+t+")"}var gn=function(e){o(s,sn);var a=Ne(s);function s(e,n,i){var o,l;t(this,s),(l=a.call(this,e,n)).ready(i);for(var u=e.getChild("TextTrackSettings").$$("select"),c=0;c<u.length;c++){var f;l.on(u[c],"change",A(f=l.updateStyle).call(f,r(l)))}return e.dash.mediaPlayer.on(dashjs.MediaPlayer.events.CAPTION_RENDERED,A(o=l.updateStyle).call(o,r(l))),l}return n(s,[{key:"createEl",value:function(){var e=i(u(s.prototype),"createEl",this).call(this,"div",{className:"vjs-text-track-display-ttml"},{"aria-live":"off","aria-atomic":"true"});return e.style.position="absolute",e.style.left="0",e.style.right="0",e.style.top="0",e.style.bottom="0",e.style.margin="1.5%",e}},{key:"updateStyle",value:function(e){var t=e.captionDiv;if(this.player_.textTrackSettings){var n=this.player_.textTrackSettings.getValues();if(t=t||this.player_.getChild("TTMLTextTrackDisplay").el().firstChild){dn(t);for(var r=t.getElementsByTagName("span"),i=0;i<r.length;i++){var a,o=r[i];if(o.parentNode.style.textAlign="center",n.color&&(o.style.color=n.color),n.textOpacity&&fn(o,"color",hn(n.color||"#fff",n.textOpacity)),n.backgroundColor&&(o.style.backgroundColor=n.backgroundColor),n.backgroundOpacity&&fn(o,"backgroundColor",hn(n.backgroundColor||"#000",n.backgroundOpacity)),n.windowColor&&(n.windowOpacity?fn(o.parentNode,"backgroundColor",hn(n.windowColor,n.windowOpacity)):o.parent.style.backgroundColor=n.windowColor),n.edgeStyle)if("dropshadow"===n.edgeStyle)o.style.textShadow=d(a="2px 2px 3px ".concat(ln,", 2px 2px 4px ").concat(ln,", 2px 2px 5px ")).call(a,ln);else if("raised"===n.edgeStyle){var s;o.style.textShadow=d(s="1px 1px ".concat(ln,", 2px 2px ").concat(ln,", 3px 3px ")).call(s,ln)}else if("depressed"===n.edgeStyle){var l,u;o.style.textShadow=d(l=d(u="1px 1px ".concat(un,", 0 1px ").concat(un,", -1px -1px ")).call(u,ln,", 0 -1px ")).call(l,ln)}else if("uniform"===n.edgeStyle){var c,f;o.style.textShadow=d(c=d(f="0 0 4px ".concat(ln,", 0 0 4px ").concat(ln,", 0 0 4px ")).call(f,ln,", 0 0 4px ")).call(c,ln)}if(n.fontPercent&&1!==n.fontPercent){var h=Ie.parseFloat(o.style.fontSize);o.style.fontSize=h*n.fontPercent+"px",o.style.height="auto",o.style.top="auto",o.style.bottom="2px"}n.fontFamily&&"default"!==n.fontFamily&&("small-caps"===n.fontFamily?o.style.fontVariant="small-caps":o.style.fontFamily=cn[n.fontFamily])}}}}}]),s}();Re.registerComponent("TTMLTextTrackDisplay",gn);var pn=function(){function r(n,i,a){var o,s,l=this;if(t(this,r),a=a||i.options_,this.player=Re(a.playerId),this.player.dash=this.player.dash||{},this.tech_=i,this.el_=i.el(),this.elParent_=this.el_.parentNode,this.hasFiniteDuration_=!1,n.src){i.isReady_=!1,r.updateSourceData&&(Re.log.warn('updateSourceData has been deprecated. Please switch to using hook("updatesource", callback).'),n=r.updateSourceData(n)),I(o=r.hooks("updatesource")).call(o,(function(e){n=e(n)}));var u,c=n.src;if(this.keySystemOptions_=r.buildDashJSProtData(n.keySystemOptions),this.player.dash.mediaPlayer=dashjs.MediaPlayer().create(),this.mediaPlayer_=this.player.dash.mediaPlayer,r.useVideoJSDebug&&(Re.log.warn('useVideoJSDebug has been deprecated. Please switch to using hook("beforeinitialize", callback).'),r.useVideoJSDebug(this.mediaPlayer_)),r.beforeInitialize&&(Re.log.warn('beforeInitialize has been deprecated. Please switch to using hook("beforeinitialize", callback).'),r.beforeInitialize(this.player,this.mediaPlayer_)),I(s=r.hooks("beforeinitialize")).call(s,(function(e){e(l.player,l.mediaPlayer_)})),this.mediaPlayer_.initialize(),this.retriggerError_=function(e){if("capability"===e.error&&"mediasource"===e.event)l.player.error({code:4,message:"The media cannot be played because it requires a feature that your browser does not support."});else if("manifestError"!==e.error||"createParser"!==e.event.id&&"codec"!==e.event.id&&"nostreams"!==e.event.id&&"nostreamscomposed"!==e.event.id&&"parse"!==e.event.id&&"multiplexedrep"!==e.event.id)if("mediasource"===e.error)e.event.match("MEDIA_ERR_ABORTED")?l.player.error({code:1,message:e.event}):e.event.match("MEDIA_ERR_NETWORK")?l.player.error({code:2,message:e.event}):e.event.match("MEDIA_ERR_DECODE")?l.player.error({code:3,message:e.event}):e.event.match("MEDIA_ERR_SRC_NOT_SUPPORTED")?l.player.error({code:4,message:e.event}):e.event.match("MEDIA_ERR_ENCRYPTED")?l.player.error({code:5,message:e.event}):(e.event.match("UNKNOWN"),l.player.error({code:4,message:e.event}));else if("capability"===e.error&&"encryptedmedia"===e.event)l.player.error({code:5,message:"The media cannot be played because it requires encryption features that your browser does not support."});else if("key_session"===e.error)l.player.error({code:5,message:e.event});else if("download"===e.error)l.player.error({code:2,message:"The media playback was aborted because too many consecutive download errors occurred."});else{if("mssError"!==e.error)return;l.player.error({code:3,message:e.event})}else l.player.error({code:4,message:e.event.message});f((function(){l.mediaPlayer_.reset()}),10)},this.mediaPlayer_.on(dashjs.MediaPlayer.events.ERROR,this.retriggerError_),this.getDuration_=function(e){var t=e.data.Period_asArray,n=l.hasFiniteDuration_;e.data.mediaPresentationDuration||t[t.length-1].duration?l.hasFiniteDuration_=!0:l.hasFiniteDuration_=!1,l.hasFiniteDuration_!==n&&l.player.trigger("durationchange")},this.mediaPlayer_.on(dashjs.MediaPlayer.events.MANIFEST_LOADED,this.getDuration_),a.dash)I(u=z(a.dash)).call(u,(function(t){var n;if("useTTML"!==t){var r,i="set"+t.charAt(0).toUpperCase()+v(t).call(t,1),o=a.dash[t];if(l.mediaPlayer_.hasOwnProperty(i))Re.log.warn("Using dash options in videojs-contrib-dash without the set prefix "+d(r="has been deprecated. Change '".concat(t,"' to '")).call(r,i,"'")),t=i;l.mediaPlayer_.hasOwnProperty(t)?(h(o)||(o=[o]),(n=l.mediaPlayer_)[t].apply(n,e(o))):Re.log.warn("Warning: dash configuration option unrecognized: ".concat(t))}}));this.mediaPlayer_.attachView(this.el_),a.dash&&a.dash.useTTML&&(this.ttmlContainer_=this.player.addChild("TTMLTextTrackDisplay"),this.mediaPlayer_.attachTTMLRenderingDiv(this.ttmlContainer_.el())),this.mediaPlayer_.setAutoPlay(!1),an.call(null,this.player,i),on.call(null,this.player,i,a),this.mediaPlayer_.setProtectionData(this.keySystemOptions_),this.mediaPlayer_.attachSource(c),this.tech_.triggerReady()}}return n(r,[{key:"dispose",value:function(){this.mediaPlayer_&&(this.mediaPlayer_.off(dashjs.MediaPlayer.events.ERROR,this.retriggerError_),this.mediaPlayer_.off(dashjs.MediaPlayer.events.MANIFEST_LOADED,this.getDuration_),this.mediaPlayer_.reset()),this.player.dash&&delete this.player.dash,this.ttmlContainer_&&(this.ttmlContainer_.dispose(),this.player.removeChild("TTMLTextTrackDisplay"))}},{key:"duration",value:function(){return this.mediaPlayer_.isDynamic()&&!this.hasFiniteDuration_?1/0:this.mediaPlayer_.duration()}}],[{key:"buildDashJSProtData",value:function(e){var t={};if(!e||!h(e))return null;for(var n=0;n<e.length;n++){var r=e[n],i=Re.mergeOptions({},r.options);i.licenseUrl&&(i.serverURL=i.licenseUrl,delete i.licenseUrl),t[r.name]=i}return t}},{key:"hooks",value:function(e,t){var n;(r.hooks_[e]=r.hooks_[e]||[],t)&&(r.hooks_[e]=d(n=r.hooks_[e]).call(n,t));return r.hooks_[e]}},{key:"hook",value:function(e,t){r.hooks(e,t)}},{key:"removeHook",value:function(e,t){var n,i,a,o=y(n=r.hooks(e)).call(n,t);return-1!==o&&(r.hooks_[e]=v(i=r.hooks_[e]).call(i),S(a=r.hooks_[e]).call(a,o,1),!0)}}]),r}();pn.hooks_={};Re.DashSourceHandler=function(){return{canHandleSource:function(e){return function(e){var t;e=JSON.parse(b(e)),pn.updateSourceData&&(Re.log.warn('updateSourceData has been deprecated. Please switch to using hook("updatesource", callback).'),e=pn.updateSourceData(e)),I(t=pn.hooks("updatesource")).call(t,(function(t){e=t(e)}));var n=we.createElement("video");return!(e.keySystemOptions&&!Ie.navigator.requestMediaKeySystemAccess&&!n.msSetMediaKeys)}(e)?Re.DashSourceHandler.canPlayType(e.type)?"probably":/\.mpd/i.test(e.src)?"maybe":"":""},handleSource:function(e,t,n){return new pn(e,t,n)},canPlayType:function(e){return Re.DashSourceHandler.canPlayType(e)}}},Re.DashSourceHandler.canPlayType=function(e){return/^application\/dash\+xml/i.test(e)?"probably":""},Ie.MediaSource&&Re.getTech("Html5").registerSourceHandler(Re.DashSourceHandler(),0),Re.Html5DashJS=pn,exports.default=pn;
|