Tomasz Lis zmienia poglądy polityczne? Zaskakujący wpis

0
Tomasz Lis

Nie od dziś wiadomo, że Tomasz Lis nie darzy zbytnią sympatią obozu rządzącego i osób z nim związanych. Niejednokrotnie ostro krytykował Jarosława Kaczyńskiego, Andrzeja Dudę, czy też innych prawicowych polityków. Nie dziwi zatem, iż niemałe zaskoczenie wywołał wpis znanego publicysty na Twitterze. Jego bohaterką stała się prezydencka córka – Kinga Duda. O co chodzi? Co takiego kontrowersyjnego napisał dziennikarz?

Tomasz Lis niespodziewanie broni Kingi Dudy

Przypomnijmy, iż prezydentówna stała się celem medialnych ataków po otrzymaniu posady w renomowanej kancelarii prawniczej. Wówczas rozpoczęła się nagonka medialna na nią. Zarzucano jej, iż pracę załatwił jej znany tata – Andrzej Duda. W social mediach posypała się lawina nieprzychylnych komentarzy. Niespodziewanie w obronie młodej prawniczki stanął zagorzały krytyk jej ojca – Tomasz Lis. W swoim komentarzu pisze: „Czytam tu szyderstwa, że fakt, iż pani Kinga Duda dostała pracę w świetnej kancelarii wynika z protekcji. Niegodziwe insynuacje.” Mało tego, publicysta chwali latorośl Dudy, pisząc o jej pracowitości i talencie. Wspomina także, iż rewelacyjnie zdała egzamin na aplikację. Potwierdzać mają to jego znajomi prawnicy, którzy jak to określa Lis, nie są zwolennikami „dobrej zmiany”.

ZOBACZ:
Skandal w sejmie! Kontrowersyjne zmiany w regulaminie

Czy Andrzej Duda zyskał nowego sprzymierzeńca?

Prezydent i dziennikarz nie pałają do siebie zbytnią sympatią. Tomasz Lis niejednokrotnie w niewybrednych słowach komentował działania głowy państwa. Przykładowo, w kontekście spotkania Andrzej Duda – Donald Trump, ten pierwszy został porównany do dziecka w Disneylandzie. Prezydent nie pozostawił kąśliwej uwagi, którą poczynił Lis, bez reakcji. Odpowiedział, zachowując dużą klasę: „Szyderstwa (…) pokazują sukces wizyty w Waszyngtonie.” Na koniec wykazał się dużym poczuciem humoru dziękując za te, jak się wyraził, „słowa uznania.” Zatem wydaje się, że Tomasz Lis pisząc (skądinąd słusznie i w oparciu o fakty), iż Kinga Duda tylko sobie zawdzięcza znalezienie dobrej posady, nie poprawi stosunków z jej rodzicem.

Zgadzacie się z naszym zdaniem? Czy faktycznie nie ma mowy o przełomie w relacjach publicysty z głową państwa? Tomasz Lis Was zaskoczył? Czekamy na Wasze opinie.

i;)o.push(arguments[i++]);if(r=t,(p(t)||void 0!==e)&&!oe(e))return d(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!oe(t))return t}),o[1]=t,V.apply(null,o)}}),H.prototype[F]||A(H.prototype,F,H.prototype.valueOf),I(H,"Symbol"),R[N]=!0},"./node_modules/core-js/modules/web.dom-collections.for-each.js":function(e,t,n){var r=n("./node_modules/core-js/internals/global.js"),o=n("./node_modules/core-js/internals/dom-iterables.js"),i=n("./node_modules/core-js/internals/array-for-each.js"),s=n("./node_modules/core-js/internals/create-non-enumerable-property.js");for(var a in o){var u=r[a],l=u&&u.prototype;if(l&&l.forEach!==i)try{s(l,"forEach",i)}catch(e){l.forEach=i}}},"./node_modules/core-js/modules/web.dom-collections.iterator.js":function(e,t,n){var r=n("./node_modules/core-js/internals/global.js"),o=n("./node_modules/core-js/internals/dom-iterables.js"),i=n("./node_modules/core-js/modules/es.array.iterator.js"),s=n("./node_modules/core-js/internals/create-non-enumerable-property.js"),a=n("./node_modules/core-js/internals/well-known-symbol.js"),u=a("iterator"),l=a("toStringTag"),c=i.values;for(var d in o){var p=r[d],f=p&&p.prototype;if(f){if(f[u]!==c)try{s(f,u,c)}catch(e){f[u]=c}if(f[l]||s(f,l,d),o[d])for(var h in i)if(f[h]!==i[h])try{s(f,h,i[h])}catch(e){f[h]=i[h]}}}},"./node_modules/crypt/crypt.js":function(e,t){var n,r;n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-i)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],r=0,o=0;r>>6-2*o);return t}},e.exports=r},"./node_modules/css-loader/dist/cjs.js!./node_modules/cssimportant-loader/index.js!./node_modules/postcss-loader/src/index.js!./node_modules/sass-loader/dist/cjs.js!./app/core.scss":function(e,t,n){(t=e.exports=n("./node_modules/css-loader/dist/runtime/api.js")(!1)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Lato:400,700&subset=latin-ext);",""]),t.push([e.i,'@-webkit-keyframes fade-out {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n }\n}\n\[email protected] fade-out {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n }\n}\n\[email protected] fade-in {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n\[email protected] fade-in {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n\n#quest .clearfix__element::after,\n#reminder-quest .clearfix__element::after {\n content: " " !important;\n clear: both !important;\n display: table !important;\n}\n\n#quest .adblock,\n#reminder-quest .adblock {\n font-family: "Lato",Arial,Helvetica,sans-serif !important;\n max-width: 550px !important;\n margin: 30px auto !important;\n -webkit-box-flex: 1 !important;\n flex: 1 1 auto !important;\n position: relative !important;\n opacity: 0 !important;\n -webkit-transition: opacity 500ms ease-in-out !important;\n transition: opacity 500ms ease-in-out !important;\n}\n\n#quest .adblock--active,\n#reminder-quest .adblock--active {\n opacity: 1 !important;\n}\n\n#quest .adblock__inner,\n#reminder-quest .adblock__inner {\n background-color: #fff !important;\n border-radius: 10px !important;\n border: 1px solid #d9d9d9 !important;\n box-shadow: 0 0 20px 0 rgba(0,0,0,0.2) !important;\n padding: 36px 20px 46px !important;\n text-align: center !important;\n}\n\n#quest .adblock__image,\n#reminder-quest .adblock__image {\n display: inline-block !important;\n width: 123px !important;\n height: 123px !important;\n margin: 0 0 23px !important;\n padding: 0 !important;\n opacity: 1 !important;\n -webkit-transition: none !important;\n transition: none !important;\n}\n\n#quest .adblock__title,\n#reminder-quest .adblock__title {\n font-size: 22px !important;\n font-weight: bold !important;\n color: #024bb5 !important;\n margin-bottom: 46px !important;\n}\n\n#quest .adblock__paragraph,\n#reminder-quest .adblock__paragraph {\n font-size: 15px !important;\n color: #000000 !important;\n margin-bottom: 20px !important;\n line-height: normal !important;\n}\n\n#quest .adblock__link,\n#reminder-quest .adblock__link {\n text-decoration: underline !important;\n text-underline-position: under !important;\n color: #024bb5 !important;\n box-shadow: none !important;\n}\n\n#quest .adblock__link:after,\n#reminder-quest .adblock__link:after {\n content: \' \\00BB\' !important;\n}\n\n#quest .adblock__reminder,\n#reminder-quest .adblock__reminder {\n margin-top: 35px !important;\n font-size: 15px !important;\n color: #000000 !important;\n}\n\n#quest .adblock__line,\n#reminder-quest .adblock__line {\n white-space: nowrap !important;\n}\n\[email protected] only screen and (max-device-width: 768px) {\n #quest .adblock,\n #reminder-quest .adblock {\n margin: 20px auto !important;\n }\n\n #quest .adblock__content,\n #reminder-quest .adblock__content {\n padding: 34px 20px 25px !important;\n }\n\n #quest .adblock__image,\n #reminder-quest .adblock__image {\n width: 85px !important;\n height: 85px !important;\n margin-bottom: 34px !important;\n }\n\n #quest .adblock__title,\n #reminder-quest .adblock__title {\n margin-bottom: 40px !important;\n font-size: 18px !important;\n }\n}\n\n#quest .logo,\n#reminder-quest .logo {\n position: relative !important;\n height: 17px !important;\n margin-top: 8px !important;\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-pack: end !important;\n justify-content: flex-end !important;\n}\n\n#quest .logo__link,\n#reminder-quest .logo__link {\n text-decoration: none !important;\n cursor: pointer !important;\n box-shadow: none !important;\n outline: 0 !important;\n border: none !important;\n width: 97px !important;\n height: 17px !important;\n display: block !important;\n}\n\n#quest .logo__image,\n#reminder-quest .logo__image {\n display: inline-block !important;\n position: absolute !important;\n top: 0 !important;\n right: 0 !important;\n width: 97px !important;\n height: 17px !important;\n padding: 0 !important;\n margin: 0 3px 0 0 !important;\n -webkit-transition: none !important;\n transition: none !important;\n box-shadow: none !important;\n opacity: 1 !important;\n}',""])},"./node_modules/css-loader/dist/cjs.js!./node_modules/cssimportant-loader/index.js!./node_modules/postcss-loader/src/index.js!./node_modules/sass-loader/dist/cjs.js!./app/main.scss":function(e,t,n){(t=e.exports=n("./node_modules/css-loader/dist/runtime/api.js")(!1)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Lato:400,700&subset=latin-ext);",""]),t.push([e.i,'@-webkit-keyframes fade-out {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n }\n}\n\[email protected] fade-out {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n }\n}\n\[email protected] fade-in {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n\[email protected] fade-in {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n\n#quest .quest,\n#reminder-quest .quest {\n width: 100% !important;\n position: relative !important;\n font-family: "Lato",Arial,Helvetica,sans-serif !important;\n box-sizing: border-box !important;\n line-height: normal !important;\n margin: 30px 0 !important;\n opacity: 0 !important;\n -webkit-transition: opacity 500ms ease-in-out !important;\n transition: opacity 500ms ease-in-out !important;\n}\n\n#quest .quest--active,\n#reminder-quest .quest--active {\n opacity: 1 !important;\n}\n\n#quest .quest *,\n#quest .quest :before,\n#quest .quest :after,\n#reminder-quest .quest *,\n#reminder-quest .quest :before,\n#reminder-quest .quest :after {\n box-sizing: border-box !important;\n position: static !important;\n font-family: "Lato",Arial,Helvetica,sans-serif !important;\n font-style: normal !important;\n -webkit-tap-highlight-color: transparent !important;\n}\n\n#quest .quest__image-wrapper,\n#reminder-quest .quest__image-wrapper {\n margin: 0 auto !important;\n padding: 0 30px !important;\n position: relative !important;\n text-align: center !important;\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-orient: vertical !important;\n -webkit-box-direction: normal !important;\n flex-direction: column !important;\n max-width: 550px !important;\n}\n\n#quest .quest__image-wrapper--border,\n#reminder-quest .quest__image-wrapper--border {\n border-left: 1px solid #d9d9d9 !important;\n border-right: 1px solid #d9d9d9 !important;\n}\n\n#quest .quest__image,\n#reminder-quest .quest__image {\n display: inline-block !important;\n -webkit-transition: none !important;\n transition: none !important;\n -webkit-box-flex: 0 !important;\n flex: 0 0 auto !important;\n max-width: 100% !important;\n border-radius: 0 !important;\n vertical-align: top !important;\n border: none !important;\n padding: 0 !important;\n margin: 0 !important;\n opacity: 1 !important;\n box-shadow: 0 2px 25px 2px rgba(0,0,0,0.5) !important;\n}\n\[email protected] success-img {\n}\n\[email protected] success-img {\n}\n\n#quest .quest__image--success,\n#reminder-quest .quest__image--success {\n position: absolute !important;\n top: 100% !important;\n opacity: 0 !important;\n -webkit-transition: opacity 500ms ease-in-out !important;\n transition: opacity 500ms ease-in-out !important;\n -webkit-transition-delay: 1.5s !important;\n transition-delay: 1.5s !important;\n}\n\n#quest .quest__image--success-show,\n#reminder-quest .quest__image--success-show {\n opacity: 1 !important;\n top: 0 !important;\n}\n\n#quest .quest__children,\n#reminder-quest .quest__children {\n margin: -22px auto 0 !important;\n padding: 21px 29px 5px !important;\n border: 1px solid #d9d9d9 !important;\n border-radius: 10px !important;\n background: #fff !important;\n max-width: 550px !important;\n}\n\n#quest .quest__image-link,\n#reminder-quest .quest__image-link {\n cursor: default !important;\n box-shadow: none !important;\n border: none !important;\n outline: none !important;\n text-decoration: none !important;\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-orient: vertical !important;\n -webkit-box-direction: normal !important;\n flex-direction: column !important;\n -webkit-box-flex: 0 !important;\n flex: 0 0 auto !important;\n position: relative !important;\n}\n\n#quest .quest__image-link--solved,\n#reminder-quest .quest__image-link--solved {\n cursor: pointer !important;\n}\n\n#quest .quest__logo,\n#reminder-quest .quest__logo {\n margin: 0 auto !important;\n max-width: 550px !important;\n}\n\[email protected] only screen and (max-device-width: 768px) {\n #quest .quest,\n #reminder-quest .quest {\n margin: 20px 0 !important;\n }\n\n #quest .quest__image-wrapper,\n #reminder-quest .quest__image-wrapper {\n padding: 0 !important;\n }\n\n #quest .quest__children,\n #reminder-quest .quest__children {\n margin: -1px auto 0 !important;\n padding: 1px 17px 5px !important;\n border-radius: 0 !important;\n }\n}\n\n#quest .pollquest .quest__image,\n#reminder-quest .pollquest .quest__image {\n box-shadow: 0 2px 25px 2px rgba(0,0,0,0.2) !important;\n}\n\n#quest .is-video .quest__image,\n#reminder-quest .is-video .quest__image {\n opacity: 0.5 !important;\n}\n\n#quest .is-video .quest__video-image-post,\n#reminder-quest .is-video .quest__video-image-post {\n position: absolute !important;\n visibility: hidden !important;\n opacity: 0 !important;\n width: 0 !important;\n -webkit-transition: opacity 200ms ease-in !important;\n transition: opacity 200ms ease-in !important;\n}\n\n#quest .is-video .quest__image-wrapper,\n#reminder-quest .is-video .quest__image-wrapper {\n padding: 0 35px !important;\n}\n\[email protected] only screen and (max-device-width: 768px) {\n #quest .is-video .quest__image-wrapper,\n #reminder-quest .is-video .quest__image-wrapper {\n padding: 0 !important;\n }\n}\n\n#quest .quest__video,\n#reminder-quest .quest__video {\n display: inline-block !important;\n -webkit-box-flex: 0 !important;\n flex: 0 0 auto !important;\n max-width: 100% !important;\n vertical-align: top !important;\n border: none !important;\n padding: 0 !important;\n margin: 0 !important;\n width: 100% !important;\n z-index: 20 !important;\n}\n\n#quest .quest__video-overlay,\n#reminder-quest .quest__video-overlay {\n position: absolute !important;\n top: calc(50% - 35px) !important;\n left: calc(50% - 35px) !important;\n margin: 0 auto !important;\n z-index: 20 !important;\n}\n\n#quest .quest__video-overlay img,\n#reminder-quest .quest__video-overlay img {\n margin: 0 !important;\n opacity: 1 !important;\n}\n\n#quest .quest__video-play-icon,\n#reminder-quest .quest__video-play-icon {\n max-width: 69px !important;\n max-height: 69px !important;\n padding: 0 !important;\n margin: 0 !important;\n height: auto !important;\n border: 0 !important;\n opacity: 1 !important;\n}\n\n#quest .quest__video-container,\n#reminder-quest .quest__video-container {\n width: 100% !important;\n background: #000000 !important;\n position: relative !important;\n cursor: pointer !important;\n}\n\n#quest .quest__video-timer,\n#reminder-quest .quest__video-timer {\n color: #ffffff !important;\n font-size: 18px !important;\n}\n\n#quest .quest__video-loader,\n#reminder-quest .quest__video-loader {\n display: none !important;\n position: relative !important;\n width: 64px !important;\n height: 64px !important;\n}\n\n#quest .quest__video-loader div,\n#reminder-quest .quest__video-loader div {\n box-sizing: border-box !important;\n display: block !important;\n position: absolute !important;\n width: 51px !important;\n height: 51px !important;\n margin: 6px !important;\n border: 6px solid #fff !important;\n border-radius: 50% !important;\n -webkit-animation: quest__video-loader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite !important;\n animation: quest__video-loader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite !important;\n border-color: #fff transparent transparent transparent !important;\n}\n\n#quest .quest__video-loader div:nth-child(1),\n#reminder-quest .quest__video-loader div:nth-child(1) {\n -webkit-animation-delay: -0.45s !important;\n animation-delay: -0.45s !important;\n}\n\n#quest .quest__video-loader div:nth-child(2),\n#reminder-quest .quest__video-loader div:nth-child(2) {\n -webkit-animation-delay: -0.3s !important;\n animation-delay: -0.3s !important;\n}\n\n#quest .quest__video-loader div:nth-child(3),\n#reminder-quest .quest__video-loader div:nth-child(3) {\n -webkit-animation-delay: -0.15s !important;\n animation-delay: -0.15s !important;\n}\n\[email protected] quest__video-loader {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\[email protected] quest__video-loader {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n#quest .quest__video-controls,\n#reminder-quest .quest__video-controls {\n height: 20px !important;\n width: 100% !important;\n background: #000 !important;\n}\n\n#quest .quest__video-wrapper,\n#reminder-quest .quest__video-wrapper {\n width: 100% !important;\n overflow: hidden !important;\n line-height: 0 !important;\n}\n\n#quest .quest__video video,\n#reminder-quest .quest__video video {\n width: 100% !important;\n -o-object-fit: fill !important;\n object-fit: fill !important;\n -webkit-appearance: none !important;\n -moz-appearance: none !important;\n appearance: none !important;\n -webkit-backface-visibility: hidden !important;\n -moz-backface-visibility: hidden !important;\n padding: 0 !important;\n border: 0 !important;\n font-size: 100% !important;\n vertical-align: baseline !important;\n border-image-width: 0 !important;\n}\n\n#quest .quest__video-answer-pixel,\n#reminder-quest .quest__video-answer-pixel {\n position: absolute !important;\n width: 2px !important;\n height: 100% !important;\n background-color: #fcbe00 !important;\n}\n\n#quest .quest__video-controls-icon,\n#reminder-quest .quest__video-controls-icon {\n height: 18px !important;\n width: 18px !important;\n float: left !important;\n display: block !important;\n margin: 1px 5px 0 7px !important;\n}\n\n#quest .quest__video-controls-play-icon,\n#reminder-quest .quest__video-controls-play-icon {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAABTAAAAUwBaYa9OQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAB8SURBVDiN5dOhEcJAEAXQgIhBxaOiaIIqGOpIC2kjdWDw6YESMoPD4XgIkkkGd5c1DH9m3e3bb64o/i/YRUEDThHQlAv2ERA80GC7FprS4xABwRMtyuX79Kqfnc042Y2uqJPOfgF3nNPLz9ALHaosZIRuOGYDCyjmi/x+3q9msxjJYDoWAAAAAElFTkSuQmCC) !important;\n}\n\n#quest .quest__video-controls-pause-icon,\n#reminder-quest .quest__video-controls-pause-icon {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAABTAAAAUwBaYa9OQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAA/SURBVDiNY2AYtoARXeD///8KDAwMClDuA0ZGxgf4xHGC////N/xHgAZC4jDARKIPcIJRg0YNogagXRYZPgAAt+kx+cUNsEoAAAAASUVORK5CYII=) !important;\n}\n\n#quest .quest__video-controls-replay-icon,\n#reminder-quest .quest__video-controls-replay-icon {\n width: 16px !important;\n height: 16px !important;\n margin: 2px 6px 0 8px !important;\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAABJwAAAScBjbzwzAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAELSURBVDiNpZM5TgNBEEVfTUBkREwAoWUJC2JOQAbIEmfgClyDA7DJGVuIkAiJAYEgQRAZQ8wBmEfSYw1mPDJDRdW1/K76/Rv+aVE4ahcYRMSn2gE2gCUgA16Bs4h4mIikbqnXal/N1fd0vkp+rh6rc3UApsJtNSvlMrWnDtVbtVXkshLGADgBToGZiMhHe0bkEXEOrALzwO4faPo1aU/9UttNAbLEyQ78XGEqS6vdA+0RgHqgXjSZqJjgBVhWo644XZYBK8BzOdhJxKxPAVBNonqU3nmhpnlR/VD3qpKz6p36pm7WCOmmLKRxkJZ6mNQ4TDIuS3l/vLmStPSx1oBuCj0ClxHxNGm9xvYN69L4yKj+K2wAAAAASUVORK5CYII=) !important;\n}\n\n#quest .quest__video-controls-sound-icon,\n#reminder-quest .quest__video-controls-sound-icon {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAABTAAAAUwBaYa9OQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADiSURBVDiN1dO7TgJBGIbh121sDA1GCkmWQywIpaUxbELnjXEr3gEUJFZyA3aGABWNxFqr12YM7mQ4uBV8zUzyzzyZI5xV1I7aO2ZstgfpATOgURlSW8A4hahXR0FqDrwAeaI2AN7VbnJZ6o1aqE/qwnKKMCZTb9VP9TmFXKsbd6dQh+o0YCP1K95iBvSBenKp27SBIdABXoFL4C6GPIAAXPxpf8+1NC8D3oCPA9ACmABz4AH4Dv1y1Jp6rz5WPuwEmqvLGAq1gbreef0JrKWuYijUkg9yH9ZU5zFUKf/5tKeXH05R75eQk8SIAAAAAElFTkSuQmCC) !important;\n margin-right: 15px !important;\n}\n\n#quest .quest__video-controls-sound-icon-max,\n#reminder-quest .quest__video-controls-sound-icon-max {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAABTAAAAUwBaYa9OQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAD9SURBVDiN1dO9LgVRFMXxdX3kFp4AjSh4AFqJiAi5nUqpFCURUdxEzRNIVHrdjc4TeAJPQeUjPn4KZ5JxI+6gECvZmT2z9vznnD1nJ/9O6JTrOg4w9RPIGh5KvoNXPOMYo00hq7iH2rNJnHpXDyODICsVpAKhg4WSbxer2//iNJZLbOJOTaWmW7a2W+4vcIuxOujQFyo1bZzhCTNYLHYnSYYaNSxJq9V6TLKfZCTJUpKrYs1+C1QtvuKWqPLmILSTHCV5TnKZZL5Y1/WiCcyV2GjY7HPcfGj2J18f9Pu3irXXZCufHchxnJSV9TDctC/9I/LiuyNSg/1+aP9Eb4aUbTUBK/S2AAAAAElFTkSuQmCC) !important;\n}\n\n#quest .quest__video-controls-sound-icon-muted,\n#reminder-quest .quest__video-controls-sound-icon-muted {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAABTAAAAUwBaYa9OQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAC4SURBVDiN1ZOxCsIwFEWvfoNOjlInnVx10sU66OjoH/QP/Db7Ly7tqggthePyKrG0QpuCeCHkJbk5yXsh0t8J2PcBOQJ5LxAAH8gByDC13TwFtsAZeOLI8URAYPEMiKqQDVDQIPOMgQS4ATvrE2Dkgi5NkMqNFkBq0ykwL9eGLcuXW5OkzInfoFhS8Y1gKVxtGEoaSIo/UjPjBFgCp87Frjl9Bdw7PX8NbF3CvEAO7OENMpj/p/2JXnbRDl1ytWZhAAAAAElFTkSuQmCC) !important;\n}\n\n#quest .quest__video-volume,\n#reminder-quest .quest__video-volume {\n position: absolute !important;\n -webkit-transform: rotate(270deg) !important;\n transform: rotate(270deg) !important;\n width: 80px !important;\n left: 4px !important;\n bottom: 65px !important;\n cursor: pointer !important;\n display: none !important;\n padding: 0 !important;\n margin: 0 !important;\n -webkit-appearance: none !important;\n -moz-appearance: none !important;\n appearance: none !important;\n height: 7px !important;\n border-radius: 5px !important;\n background: #d3d3d3 !important;\n outline: none !important;\n opacity: 1 !important;\n}\n\n#quest .quest__video-volume--visible,\n#reminder-quest .quest__video-volume--visible {\n display: block !important;\n}\n\n#quest .quest__video-volume:hover,\n#reminder-quest .quest__video-volume:hover {\n opacity: 1 !important;\n}\n\n#quest .quest__video-volume::-webkit-slider-thumb,\n#reminder-quest .quest__video-volume::-webkit-slider-thumb {\n -webkit-appearance: none !important;\n appearance: none !important;\n width: 15px !important;\n height: 15px !important;\n border-radius: 20px !important;\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAABXUlEQVQokZXTvWrCUBwF8FMFQQoSTLt0dHEQDHKjFLq4drjglNihs6+RycHXcGhvRSJk73ah0ojESYR270dSn6ApR4xbxRwId8j55eN/kzPP85AlCIICABfAHYBrAJcAvgC8AHgAoKSUv1n/gIMgqAF4ajabwnVd2LYN0zQRxzHCMIRSCqvVagHAkVK+7xCxEKLW6XQ+lFLpsfA8e+zvbiqEKAghXn3fPwqzsMc+Hd+xb1mW3ev1cErYY5+O+N5xnJNgFs6Ejthut9u5cKvV4mIRX1Sr1VzYMAwuJvF3kiS58Ha75RITh9zHPFkul2xHxGN+AHmy74+JH6MoCmez2UmcPfbpioPBIN1sNs9a675hGOeNRuNfOJlMMBqNPtM0vZVSJsVut4t6vf6zXq99rfXNfD6/KpfLqFQqKJVK4DC11hgOh5hOp4s9fOPFjv1VgtvIqXKofEweh78KwB8zXdGx88r0IAAAAABJRU5ErkJggg==) !important;\n cursor: pointer !important;\n border: 0 !important;\n}\n\n#quest .quest__video-volume::-moz-range-thumb,\n#reminder-quest .quest__video-volume::-moz-range-thumb {\n width: 15px !important;\n height: 15px !important;\n border-radius: 20px !important;\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAABXUlEQVQokZXTvWrCUBwF8FMFQQoSTLt0dHEQDHKjFLq4drjglNihs6+RycHXcGhvRSJk73ah0ojESYR270dSn6ApR4xbxRwId8j55eN/kzPP85AlCIICABfAHYBrAJcAvgC8AHgAoKSUv1n/gIMgqAF4ajabwnVd2LYN0zQRxzHCMIRSCqvVagHAkVK+7xCxEKLW6XQ+lFLpsfA8e+zvbiqEKAghXn3fPwqzsMc+Hd+xb1mW3ev1cErYY5+O+N5xnJNgFs6Ejthut9u5cKvV4mIRX1Sr1VzYMAwuJvF3kiS58Ha75RITh9zHPFkul2xHxGN+AHmy74+JH6MoCmez2UmcPfbpioPBIN1sNs9a675hGOeNRuNfOJlMMBqNPtM0vZVSJsVut4t6vf6zXq99rfXNfD6/KpfLqFQqKJVK4DC11hgOh5hOp4s9fOPFjv1VgtvIqXKofEweh78KwB8zXdGx88r0IAAAAABJRU5ErkJggg==) !important;\n cursor: pointer !important;\n border: 0 !important;\n}\n\n#quest .quest__video-progressbar,\n#reminder-quest .quest__video-progressbar {\n float: left !important;\n width: calc(100% - 90px) !important;\n height: 100% !important;\n cursor: pointer !important;\n z-index: 30 !important;\n}\n\n#quest .quest__video-progressbar-progress,\n#reminder-quest .quest__video-progressbar-progress {\n position: relative !important;\n margin-top: 9px !important;\n background: #333 !important;\n cursor: pointer !important;\n height: 2px !important;\n width: 100% !important;\n}\n\n#quest .quest__video-progressbar-progress span,\n#reminder-quest .quest__video-progressbar-progress span {\n display: block !important;\n background: #707070 !important;\n height: 100% !important;\n}\n\n#quest [data-state*="not-started"] .quest__video-controls,\n#reminder-quest [data-state*="not-started"] .quest__video-controls {\n display: none !important;\n}\n\n#quest [data-state*="not-started"] video,\n#reminder-quest [data-state*="not-started"] video {\n display: none !important;\n}\n\n#quest [data-state*="not-started"] .quest__video--empty-pre-image video,\n#reminder-quest [data-state*="not-started"] .quest__video--empty-pre-image video {\n display: block !important;\n}\n\n#quest [data-state*="not-started"] .main-quest-solved-state__success-message,\n#quest [data-state*="not-started"] .main-quest-unsolved-state__question,\n#reminder-quest [data-state*="not-started"] .main-quest-solved-state__success-message,\n#reminder-quest [data-state*="not-started"] .main-quest-unsolved-state__question {\n margin-top: 30px !important;\n}\n\n#quest .is-video:not([data-state*="not-started"]) .quest__children,\n#reminder-quest .is-video:not([data-state*="not-started"]) .quest__children {\n margin-top: -42px !important;\n padding-top: 40px !important;\n}\n\[email protected] only screen and (max-device-width: 768px) {\n #quest .is-video:not([data-state*="not-started"]) .quest__children,\n #reminder-quest .is-video:not([data-state*="not-started"]) .quest__children {\n margin: 0 auto 0 !important;\n padding: 0 17px 5px !important;\n }\n}\n\n#quest [data-state*="playing"] .quest__video-timer,\n#quest [data-state*="playing"] .quest__video-play-icon,\n#reminder-quest [data-state*="playing"] .quest__video-timer,\n#reminder-quest [data-state*="playing"] .quest__video-play-icon {\n display: none !important;\n}\n\n#quest [data-state*="playing"] .quest__video-controls,\n#reminder-quest [data-state*="playing"] .quest__video-controls {\n display: block !important;\n}\n\n#quest [data-state*="paused"] .quest__video-timer,\n#reminder-quest [data-state*="paused"] .quest__video-timer {\n display: none !important;\n}\n\n#quest [data-state*="paused"] .quest__video-play-icon,\n#quest [data-state*="paused"] .quest__video-controls,\n#reminder-quest [data-state*="paused"] .quest__video-play-icon,\n#reminder-quest [data-state*="paused"] .quest__video-controls {\n display: block !important;\n}\n\n#quest [data-state*="loading"] .quest__video-loader,\n#reminder-quest [data-state*="loading"] .quest__video-loader {\n display: inline-block !important;\n}\n\n#quest [data-state*="loading"] .quest__video-play-icon,\n#reminder-quest [data-state*="loading"] .quest__video-play-icon {\n display: none !important;\n}\n\n#quest [data-state*="ended"] .quest__video-image-post,\n#reminder-quest [data-state*="ended"] .quest__video-image-post {\n position: static !important;\n opacity: 1 !important;\n visibility: visible !important;\n width: 100% !important;\n}\n\n#quest [data-state*="ended"] .quest__video video,\n#reminder-quest [data-state*="ended"] .quest__video video {\n display: none !important;\n height: 0 !important;\n}\n\n#quest [data-state*="ended"] .quest__video--empty-post-image video,\n#reminder-quest [data-state*="ended"] .quest__video--empty-post-image video {\n display: block !important;\n height: auto !important;\n}\n\n#quest .is-video .adquesto__tooltip,\n#reminder-quest .is-video .adquesto__tooltip {\n z-index: 4 !important;\n visibility: hidden !important;\n max-width: 160px !important;\n box-shadow: 0 0 20px 0 rgba(0,0,0,0.2) !important;\n background-color: #6d6d6d !important;\n color: #fff !important;\n text-align: center !important;\n padding: 6px 10px !important;\n border-radius: 6px !important;\n position: absolute !important;\n font-size: 12px !important;\n min-height: 26px !important;\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-orient: vertical !important;\n -webkit-box-direction: normal !important;\n flex-direction: column !important;\n -webkit-box-pack: center !important;\n justify-content: center !important;\n white-space: normal !important;\n line-height: 1.5 !important;\n top: auto !important;\n bottom: calc(100% + 10px) !important;\n left: 0 !important;\n right: 0 !important;\n margin-left: auto !important;\n margin-right: auto !important;\n -webkit-transform: translateX(0) !important;\n transform: translateX(0) !important;\n}\n\n#quest .is-video .adquesto__tooltip:after,\n#reminder-quest .is-video .adquesto__tooltip:after {\n content: \'\' !important;\n position: absolute !important;\n right: calc(50% - 8px) !important;\n border-style: solid !important;\n border-width: 8px 8px 0 8px !important;\n bottom: auto !important;\n top: 100% !important;\n border-color: #6d6d6d transparent transparent transparent !important;\n}\n\n#quest .is-video .adquesto__tooltip,\n#reminder-quest .is-video .adquesto__tooltip {\n position: absolute !important;\n top: auto !important;\n bottom: calc(100% + 10px) !important;\n left: 0 !important;\n right: 0 !important;\n margin-left: auto !important;\n margin-right: auto !important;\n -webkit-transform: translateX(0) !important;\n transform: translateX(0) !important;\n}\n\n#quest .is-video .adquesto__tooltip:after,\n#reminder-quest .is-video .adquesto__tooltip:after {\n content: \'\' !important;\n position: absolute !important;\n width: 0 !important;\n height: 0 !important;\n right: calc(50% - 8px) !important;\n border-style: solid !important;\n border-width: 8px 8px 0 8px !important;\n bottom: auto !important;\n top: 100% !important;\n border-color: #6d6d6d transparent transparent transparent !important;\n}\n\n#quest .is-video[data-state*="disabled-answers"] .answer-buttons__wrapper--hover .adquesto__tooltip,\n#reminder-quest .is-video[data-state*="disabled-answers"] .answer-buttons__wrapper--hover .adquesto__tooltip {\n visibility: visible !important;\n}\n\n#quest .is-video[data-state*="disabled-answers"] button.answer-buttons__item,\n#reminder-quest .is-video[data-state*="disabled-answers"] button.answer-buttons__item {\n position: relative !important;\n}\n\n#quest .is-video[data-state*="disabled-answers"] button.answer-buttons__item .answer-buttons__answer,\n#reminder-quest .is-video[data-state*="disabled-answers"] button.answer-buttons__item .answer-buttons__answer {\n opacity: 0.5 !important;\n}\n\n#quest .is-video[data-state*="disabled-answers"] button.answer-buttons__item--hover,\n#reminder-quest .is-video[data-state*="disabled-answers"] button.answer-buttons__item--hover {\n background: white !important;\n border: solid 1px #d9d9d9 !important;\n color: #333 !important;\n}\n\n#quest .is-video.watchquest .answer-buttons__grid,\n#reminder-quest .is-video.watchquest .answer-buttons__grid {\n margin: 4px !important;\n}\n\n#quest .is-video.watchquest .answer-buttons__wrapper,\n#reminder-quest .is-video.watchquest .answer-buttons__wrapper {\n width: 100% !important;\n}\n\n#quest .is-video.watchquest button.answer-buttons__item,\n#reminder-quest .is-video.watchquest button.answer-buttons__item {\n line-height: 100% !important;\n height: 32px !important;\n margin-bottom: 0 !important;\n}\n\n#quest .is-video.watchquest .answer-buttons__wrapper--hover .adquesto__tooltip,\n#reminder-quest .is-video.watchquest .answer-buttons__wrapper--hover .adquesto__tooltip {\n visibility: visible !important;\n}\n\n#quest .is-video.watchquest[data-state*="enabled-answers"] .answer-buttons__item,\n#reminder-quest .is-video.watchquest[data-state*="enabled-answers"] .answer-buttons__item {\n color: #024bb5 !important;\n border-color: #024bb5 !important;\n}\n\n#quest .is-video.watchquest[data-state*="enabled-answers"] .answer-buttons__item--hover,\n#reminder-quest .is-video.watchquest[data-state*="enabled-answers"] .answer-buttons__item--hover {\n color: #fff !important;\n}\n\n#quest .is-video.watchquest[data-state*="not-started"] .quest__children,\n#reminder-quest .is-video.watchquest[data-state*="not-started"] .quest__children {\n padding-top: 40px !important;\n}\n\[email protected] only screen and (max-device-width: 768px) {\n #quest .is-video.watchquest[data-state*="not-started"] .quest__children,\n #reminder-quest .is-video.watchquest[data-state*="not-started"] .quest__children {\n padding-top: 21px !important;\n }\n}\n\n#quest .is-video.watchquest .main-quest,\n#reminder-quest .is-video.watchquest .main-quest {\n display: block !important;\n}\n\n#quest .is-video.watchquest .main-quest .answer-buttons__loader,\n#reminder-quest .is-video.watchquest .main-quest .answer-buttons__loader {\n display: none !important;\n}\n\n#quest .is-video.watchquest .main-quest__loading .answer-buttons__loader,\n#reminder-quest .is-video.watchquest .main-quest__loading .answer-buttons__loader {\n display: block !important;\n position: absolute !important;\n margin: 6px 10px !important;\n z-index: 1 !important;\n border: 2px solid #333 !important;\n opacity: 0.4 !important;\n}\n\n#quest .is-video.watchquest .main-quest-unsolved-state,\n#reminder-quest .is-video.watchquest .main-quest-unsolved-state {\n margin: 0 !important;\n}\n\n#quest .is-video.watchquest .main-quest-unsolved-state__content,\n#reminder-quest .is-video.watchquest .main-quest-unsolved-state__content {\n height: 60px !important;\n}\n\n#quest .is-video.watchquest .main-quest-unsolved-state__content--long,\n#reminder-quest .is-video.watchquest .main-quest-unsolved-state__content--long {\n height: 60px !important;\n}\n\n#quest .is-video.watchquest .main-quest-unsolved-state__content--is-answered .answer-buttons__item,\n#reminder-quest .is-video.watchquest .main-quest-unsolved-state__content--is-answered .answer-buttons__item {\n opacity: 0.8 !important;\n background: white !important;\n border: solid 1px #d9d9d9 !important;\n color: #333 !important;\n}\n\n#quest .is-video.watchquest .main-quest-unsolved-state__content--is-answered .answer-buttons__item span,\n#reminder-quest .is-video.watchquest .main-quest-unsolved-state__content--is-answered .answer-buttons__item span {\n opacity: 0.5 !important;\n}\n\n#quest .is-video.watchquest .main-quest-unsolved-state .answer-buttons,\n#reminder-quest .is-video.watchquest .main-quest-unsolved-state .answer-buttons {\n opacity: 1 !important;\n}\n\n#quest .is-video.watchquest .main-quest-solved-state,\n#reminder-quest .is-video.watchquest .main-quest-solved-state {\n overflow: hidden !important;\n height: 0 !important;\n}\n\n#quest .is-video.watchquest .main-quest-solved-state .main-quest-solved-state__learn-more,\n#reminder-quest .is-video.watchquest .main-quest-solved-state .main-quest-solved-state__learn-more {\n -webkit-transform: translateY(-200%) !important;\n transform: translateY(-200%) !important;\n -webkit-transition: all 500ms ease-in-out !important;\n transition: all 500ms ease-in-out !important;\n -webkit-transition-delay: 0s !important;\n transition-delay: 0s !important;\n}\n\n#quest .is-video.watchquest .main-quest-solved-state--init,\n#reminder-quest .is-video.watchquest .main-quest-solved-state--init {\n margin-top: 0 !important;\n}\n\n#quest .is-video.watchquest .main-quest-solved-state--active,\n#reminder-quest .is-video.watchquest .main-quest-solved-state--active {\n height: 60px !important;\n -webkit-transition: height 500ms ease-in-out !important;\n transition: height 500ms ease-in-out !important;\n}\n\n#quest .is-video.watchquest .main-quest-solved-state--active .main-quest-solved-state__learn-more,\n#reminder-quest .is-video.watchquest .main-quest-solved-state--active .main-quest-solved-state__learn-more {\n -webkit-transform: translateY(0%) !important;\n transform: translateY(0%) !important;\n}\n\n#quest .reminder-quest,\n#reminder-quest .reminder-quest {\n -webkit-box-flex: 1 !important;\n flex: 1 0 auto !important;\n display: -webkit-box !important;\n display: flex !important;\n padding: 35px 0 25px !important;\n text-align: center !important;\n -webkit-box-pack: center !important;\n justify-content: center !important;\n -webkit-box-align: center !important;\n align-items: center !important;\n}\n\[email protected] only screen and (max-device-width: 768px) {\n #quest .reminder-quest,\n #reminder-quest .reminder-quest {\n padding: 28px 0 20px !important;\n }\n}\n\n#quest .main-quest-solved-state,\n#reminder-quest .main-quest-solved-state {\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-orient: vertical !important;\n -webkit-box-direction: normal !important;\n flex-direction: column !important;\n -webkit-box-flex: 1 !important;\n flex: 1 !important;\n z-index: 10 !important;\n}\n\n#quest .main-quest-solved-state--active .main-quest-solved-state__success-message,\n#quest .main-quest-solved-state--active .main-quest-solved-state__learn-more,\n#reminder-quest .main-quest-solved-state--active .main-quest-solved-state__success-message,\n#reminder-quest .main-quest-solved-state--active .main-quest-solved-state__learn-more {\n opacity: 1 !important;\n}\n\n#quest .main-quest-solved-state--active .main-quest-solved-state__learn-more-loader,\n#reminder-quest .main-quest-solved-state--active .main-quest-solved-state__learn-more-loader {\n opacity: 0 !important;\n}\n\n#quest .main-quest-solved-state__success-message,\n#reminder-quest .main-quest-solved-state__success-message {\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-align: center !important;\n align-items: center !important;\n -webkit-box-pack: center !important;\n justify-content: center !important;\n height: 52px !important;\n margin: 10px 0 !important;\n -webkit-transition: opacity 500ms ease-in-out !important;\n transition: opacity 500ms ease-in-out !important;\n opacity: 0 !important;\n}\n\n#quest .main-quest-solved-state__success-message-content,\n#reminder-quest .main-quest-solved-state__success-message-content {\n text-align: center !important;\n color: #333 !important;\n word-spacing: 0.1px !important;\n font-size: 15px !important;\n}\n\n#quest .main-quest-solved-state__yes,\n#quest .main-quest-solved-state__yes span,\n#reminder-quest .main-quest-solved-state__yes,\n#reminder-quest .main-quest-solved-state__yes span {\n color: #129b28 !important;\n font-weight: bold !important;\n}\n\n#quest .main-quest-solved-state__learn-more,\n#reminder-quest .main-quest-solved-state__learn-more {\n height: 40px !important;\n margin-bottom: 20px !important;\n text-align: center !important;\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-orient: vertical !important;\n -webkit-box-direction: normal !important;\n flex-direction: column !important;\n -webkit-box-align: center !important;\n align-items: center !important;\n -webkit-transition: opacity 500ms ease-in-out !important;\n transition: opacity 500ms ease-in-out !important;\n opacity: 0 !important;\n}\n\n#quest .main-quest-solved-state__learn-more--delayed,\n#reminder-quest .main-quest-solved-state__learn-more--delayed {\n -webkit-transition-delay: 1.5s !important;\n transition-delay: 1.5s !important;\n}\n\n#quest .main-quest-solved-state__tracking,\n#reminder-quest .main-quest-solved-state__tracking {\n position: absolute !important;\n bottom: 0 !important;\n left: 0 !important;\n}\n\[email protected] only screen and (max-device-width: 768px) {\n #quest .main-quest-solved-state__learn-more,\n #reminder-quest .main-quest-solved-state__learn-more {\n margin-bottom: 10px !important;\n }\n}\n\n#quest .answer-buttons,\n#reminder-quest .answer-buttons {\n opacity: 0 !important;\n -webkit-transition: opacity 400ms ease-in-out !important;\n transition: opacity 400ms ease-in-out !important;\n}\n\n#quest .answer-buttons__wrapper,\n#reminder-quest .answer-buttons__wrapper {\n position: relative !important;\n width: 32% !important;\n}\n\n#quest .answer-buttons__wrapper--fill,\n#reminder-quest .answer-buttons__wrapper--fill {\n width: 100% !important;\n}\n\n#quest .answer-buttons--delay,\n#reminder-quest .answer-buttons--delay {\n -webkit-transition-delay: 400ms !important;\n transition-delay: 400ms !important;\n}\n\n#quest .answer-buttons--active,\n#reminder-quest .answer-buttons--active {\n opacity: 1 !important;\n}\n\n#quest .answer-buttons__grid,\n#reminder-quest .answer-buttons__grid {\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-pack: justify !important;\n justify-content: space-between !important;\n}\n\n#quest .answer-buttons__grid--column,\n#reminder-quest .answer-buttons__grid--column {\n -webkit-box-orient: vertical !important;\n -webkit-box-direction: normal !important;\n flex-direction: column !important;\n}\n\n#quest button.answer-buttons__item,\n#reminder-quest button.answer-buttons__item {\n background: white !important;\n border: solid 1px #d9d9d9 !important;\n border-radius: 3px !important;\n width: 100% !important;\n height: 40px !important;\n line-height: 38px !important;\n text-align: center !important;\n font-size: 13px !important;\n cursor: pointer !important;\n box-shadow: 0 5px 10px 0 rgba(0,0,0,0.1) !important;\n outline: none !important;\n -webkit-transition: -webkit-transform 200ms !important;\n transition: -webkit-transform 200ms !important;\n transition: transform 200ms !important;\n transition: transform 200ms, -webkit-transform 200ms !important;\n font-family: "Lato",Arial,Helvetica,sans-serif !important;\n padding: 0 10px !important;\n color: #333 !important;\n text-transform: none !important;\n letter-spacing: normal !important;\n font-weight: normal !important;\n margin: 0 0 20px !important;\n will-change: auto !important;\n}\n\n#quest button.answer-buttons__item--hover,\n#reminder-quest button.answer-buttons__item--hover {\n color: #ffffff !important;\n background: #024bb5 !important;\n border-color: #1e468a !important;\n}\n\n#quest button.answer-buttons__item span,\n#reminder-quest button.answer-buttons__item span {\n white-space: nowrap !important;\n display: inline-block !important;\n text-align: center !important;\n}\n\n#quest button.answer-buttons__item--active,\n#reminder-quest button.answer-buttons__item--active {\n -webkit-transform: scale(0.85) !important;\n transform: scale(0.85) !important;\n}\n\n#quest button.answer-buttons__item--fill,\n#reminder-quest button.answer-buttons__item--fill {\n width: 100% !important;\n padding: 0 10px !important;\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n}\n\[email protected] only screen and (max-device-width: 768px) {\n #quest button.answer-buttons__item,\n #reminder-quest button.answer-buttons__item {\n margin-bottom: 10px !important;\n }\n}\n\n#quest .counter,\n#reminder-quest .counter {\n height: 40px !important;\n font-size: 13px !important;\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-align: center !important;\n align-items: center !important;\n -webkit-box-pack: center !important;\n justify-content: center !important;\n margin-bottom: 20px !important;\n opacity: 0 !important;\n -webkit-transition: opacity 400ms ease-in-out !important;\n transition: opacity 400ms ease-in-out !important;\n}\n\n#quest .counter--active,\n#reminder-quest .counter--active {\n opacity: 1 !important;\n}\n\n#quest .counter__inner,\n#reminder-quest .counter__inner {\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-pack: center !important;\n justify-content: center !important;\n -webkit-box-align: center !important;\n align-items: center !important;\n font-size: 14px !important;\n font-weight: bold !important;\n white-space: nowrap !important;\n}\n\n#quest .counter__try-again,\n#reminder-quest .counter__try-again {\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-align: center !important;\n align-items: center !important;\n}\n\n#quest .counter__wrong-answer,\n#reminder-quest .counter__wrong-answer {\n color: #ca0000 !important;\n}\n\n#quest .counter__try-again-in,\n#reminder-quest .counter__try-again-in {\n color: #333 !important;\n margin-right: 5px !important;\n}\n\n#quest .counter__circle-wrapper,\n#reminder-quest .counter__circle-wrapper {\n width: 28px !important;\n height: 28px !important;\n position: relative !important;\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-pack: center !important;\n justify-content: center !important;\n -webkit-box-align: center !important;\n align-items: center !important;\n}\n\n#quest .counter__circle,\n#reminder-quest .counter__circle {\n width: 100% !important;\n height: 100% !important;\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n}\n\n#quest .counter__circle--ie,\n#reminder-quest .counter__circle--ie {\n -webkit-transform: rotate(-90deg) !important;\n transform: rotate(-90deg) !important;\n}\n\n#quest .counter__value,\n#reminder-quest .counter__value {\n line-height: 28px !important;\n font-size: 18px !important;\n font-weight: bold !important;\n}\n\n#quest .counter__circle-bg,\n#quest .counter__circle-value,\n#reminder-quest .counter__circle-bg,\n#reminder-quest .counter__circle-value {\n fill: none !important;\n stroke-linecap: round !important;\n}\n\n#quest .counter__circle-bg,\n#reminder-quest .counter__circle-bg {\n stroke: #d9f0e8 !important;\n}\n\n#quest .counter__circle-value,\n#reminder-quest .counter__circle-value {\n stroke: #129b28 !important;\n -webkit-transform: rotate(-90deg) scaleY(-1) !important;\n transform: rotate(-90deg) scaleY(-1) !important;\n -webkit-transform-origin: 19px 19px !important;\n transform-origin: 19px 19px !important;\n}\n\[email protected] only screen and (max-device-width: 768px) {\n #quest .counter,\n #reminder-quest .counter {\n margin-bottom: 10px !important;\n height: 45px !important;\n }\n\n #quest .counter__inner,\n #reminder-quest .counter__inner {\n -webkit-box-orient: vertical !important;\n -webkit-box-direction: normal !important;\n flex-direction: column !important;\n }\n}\n\n#quest .main-quest-unsolved-state,\n#reminder-quest .main-quest-unsolved-state {\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-orient: vertical !important;\n -webkit-box-direction: normal !important;\n flex-direction: column !important;\n -webkit-box-pack: justify !important;\n justify-content: space-between !important;\n width: 100% !important;\n box-sizing: border-box !important;\n z-index: 10 !important;\n}\n\n#quest .main-quest-unsolved-state__content,\n#reminder-quest .main-quest-unsolved-state__content {\n height: 60px !important;\n}\n\n#quest .main-quest-unsolved-state__content--long,\n#reminder-quest .main-quest-unsolved-state__content--long {\n height: 180px !important;\n}\n\n#quest .main-quest-unsolved-state__content--measured,\n#reminder-quest .main-quest-unsolved-state__content--measured {\n -webkit-transition: height 400ms ease-in-out !important;\n transition: height 400ms ease-in-out !important;\n}\n\n#quest .main-quest-unsolved-state__question,\n#reminder-quest .main-quest-unsolved-state__question {\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-align: center !important;\n align-items: center !important;\n -webkit-box-pack: center !important;\n justify-content: center !important;\n overflow: hidden !important;\n text-align: center !important;\n height: 52px !important;\n margin: 10px 0 !important;\n font-size: 16px !important;\n font-weight: bold !important;\n opacity: 0 !important;\n -webkit-transition: opacity 400ms ease-in-out !important;\n transition: opacity 400ms ease-in-out !important;\n -webkit-transition-delay: 400ms !important;\n transition-delay: 400ms !important;\n color: #333 !important;\n}\n\n#quest .main-quest-unsolved-state__question--active,\n#reminder-quest .main-quest-unsolved-state__question--active {\n opacity: 1 !important;\n}\n\[email protected] only screen and (max-device-width: 768px) {\n #quest .main-quest-unsolved-state__content,\n #reminder-quest .main-quest-unsolved-state__content {\n height: 50px !important;\n }\n\n #quest .main-quest-unsolved-state__content--long,\n #reminder-quest .main-quest-unsolved-state__content--long {\n height: 150px !important;\n }\n\n #quest .main-quest-unsolved-state__content--counter,\n #reminder-quest .main-quest-unsolved-state__content--counter {\n height: 55px !important;\n }\n}\n\n#quest .top-bar__container,\n#reminder-quest .top-bar__container {\n position: relative !important;\n}\n\n#quest .top-bar,\n#reminder-quest .top-bar {\n position: absolute !important;\n z-index: 1000 !important;\n -webkit-transition: background 500ms ease-out !important;\n transition: background 500ms ease-out !important;\n pointer-events: none !important;\n -webkit-transform: translateY(-100%) !important;\n transform: translateY(-100%) !important;\n padding-top: 1px !important;\n padding-bottom: 27px !important;\n left: -1px !important;\n right: -1px !important;\n}\n\n#quest .top-bar--entered,\n#reminder-quest .top-bar--entered {\n pointer-events: auto !important;\n}\n\n#quest .top-bar__content,\n#reminder-quest .top-bar__content {\n opacity: 0 !important;\n max-width: 550px !important;\n z-index: 2 !important;\n margin: 58px auto 0 !important;\n -webkit-transition: opacity 500ms ease-out !important;\n transition: opacity 500ms ease-out !important;\n}\n\n#quest .top-bar__content--entered,\n#reminder-quest .top-bar__content--entered {\n opacity: 1 !important;\n}\n\n#quest .top-bar__inner,\n#reminder-quest .top-bar__inner {\n margin: 0 1px !important;\n background-color: #fff !important;\n box-shadow: 0 0 20px 0 rgba(0,0,0,0.2) !important;\n border: 1px solid #d9d9d9 !important;\n border-radius: 10px !important;\n padding: 15px 0 !important;\n text-align: center !important;\n color: #000 !important;\n}\n\n#quest .top-bar__title,\n#reminder-quest .top-bar__title {\n font-size: 16px !important;\n color: #000 !important;\n font-weight: bold !important;\n}\n\n#quest .top-bar__title:after,\n#reminder-quest .top-bar__title:after {\n content: \' \' !important;\n display: block !important;\n margin-top: 5px !important;\n}\n\n#quest .top-bar__subtitle,\n#reminder-quest .top-bar__subtitle {\n font-size: 14px !important;\n padding: 0 5px !important;\n}\n\n#quest .top-bar__link,\n#reminder-quest .top-bar__link {\n text-decoration: underline !important;\n text-underline-position: under !important;\n color: #024bb5 !important;\n cursor: pointer !important;\n}\n\n#quest .top-bar__link:after,\n#reminder-quest .top-bar__link:after {\n content: \' \\00BB\' !important;\n}\n\n#quest .top-bar__subtitle-with-subscription-mobile,\n#reminder-quest .top-bar__subtitle-with-subscription-mobile {\n display: none !important;\n}\n\[email protected] only screen and (max-device-width: 768px) {\n #quest .top-bar__title,\n #reminder-quest .top-bar__title {\n font-size: 13px !important;\n }\n\n #quest .top-bar__subtitle,\n #reminder-quest .top-bar__subtitle {\n font-size: 12px !important;\n }\n\n #quest .top-bar__subtitle-with-subscription-desktop,\n #reminder-quest .top-bar__subtitle-with-subscription-desktop {\n display: none !important;\n }\n\n #quest .top-bar__subtitle-with-subscription-mobile,\n #reminder-quest .top-bar__subtitle-with-subscription-mobile {\n display: inline !important;\n }\n}\n\n#quest .bottom-bar,\n#reminder-quest .bottom-bar {\n position: absolute !important;\n z-index: 1000 !important;\n -webkit-transition: box-shadow 500ms ease-out !important;\n transition: box-shadow 500ms ease-out !important;\n bottom: -157px !important;\n left: -1px !important;\n right: -1px !important;\n pointer-events: none !important;\n}\n\n#quest .bottom-bar--entered,\n#reminder-quest .bottom-bar--entered {\n pointer-events: auto !important;\n}\n\n#quest .bottom-bar__content,\n#reminder-quest .bottom-bar__content {\n opacity: 0 !important;\n cursor: pointer !important;\n max-width: 550px !important;\n z-index: 2 !important;\n margin: 56px auto 0 !important;\n -webkit-transition: opacity 500ms ease-out,-webkit-transform 400ms ease-out !important;\n transition: opacity 500ms ease-out,-webkit-transform 400ms ease-out !important;\n transition: opacity 500ms ease-out,transform 400ms ease-out !important;\n transition: opacity 500ms ease-out,transform 400ms ease-out,-webkit-transform 400ms ease-out !important;\n}\n\n#quest .bottom-bar__content--entered,\n#reminder-quest .bottom-bar__content--entered {\n opacity: 1 !important;\n}\n\n#quest .bottom-bar__inner,\n#reminder-quest .bottom-bar__inner {\n margin: 0 1px !important;\n background-color: #fff !important;\n box-shadow: 0 0 20px 0 rgba(0,0,0,0.2) !important;\n border: 1px solid #d9d9d9 !important;\n border-radius: 10px !important;\n padding: 15px !important;\n text-align: center !important;\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-orient: horizontal !important;\n -webkit-box-direction: normal !important;\n flex-direction: row !important;\n -webkit-box-align: center !important;\n align-items: center !important;\n -webkit-box-pack: center !important;\n justify-content: center !important;\n}\n\n#quest .bottom-bar__title,\n#reminder-quest .bottom-bar__title {\n font-size: 16px !important;\n color: #024bb5 !important;\n margin: 0 17px !important;\n}\n\n#quest .bottom-bar__arrow,\n#reminder-quest .bottom-bar__arrow {\n width: 0 !important;\n height: 0 !important;\n border-style: solid !important;\n border-width: 0 8px 8px 8px !important;\n border-color: transparent transparent #024bb5 transparent !important;\n}\n\n#quest .bottom-bar__line,\n#reminder-quest .bottom-bar__line {\n white-space: nowrap !important;\n}\n\[email protected] only screen and (max-device-width: 768px) {\n #quest .bottom-bar,\n #reminder-quest .bottom-bar {\n bottom: -147px !important;\n }\n\n #quest .bottom-bar__title,\n #reminder-quest .bottom-bar__title {\n font-size: 14px !important;\n margin: 0 7px !important;\n }\n}\n\n#quest .main-quest,\n#reminder-quest .main-quest {\n -webkit-box-flex: 1 !important;\n flex: 1 0 auto !important;\n display: -webkit-box !important;\n display: flex !important;\n position: relative !important;\n z-index: 30 !important;\n}\n\n#quest .main-quest__header,\n#reminder-quest .main-quest__header {\n padding: 0 20px 15px !important;\n text-align: center !important;\n font-size: 14px !important;\n color: #000 !important;\n flex-wrap: wrap !important;\n line-height: 18px !important;\n}\n\n#quest .main-quest__header-link,\n#reminder-quest .main-quest__header-link {\n box-shadow: none !important;\n border: none !important;\n outline: none !important;\n text-decoration: none !important;\n height: 15px !important;\n}\n\n#quest .main-quest__header-logo,\n#reminder-quest .main-quest__header-logo {\n display: inline-block !important;\n vertical-align: middle !important;\n width: 64px !important;\n height: 18px !important;\n box-shadow: none !important;\n padding: 0 !important;\n opacity: 1 !important;\n margin: -5px 0 0 5px !important;\n -webkit-transition: none !important;\n transition: none !important;\n}\n\n#quest .main-quest__line,\n#reminder-quest .main-quest__line {\n white-space: nowrap !important;\n}\n\n#quest .main-quest__line:nth-child(2),\n#reminder-quest .main-quest__line:nth-child(2) {\n display: inline-block !important;\n}\n\[email protected] only screen and (max-device-width: 360px) {\n #quest .main-quest__line,\n #reminder-quest .main-quest__line {\n white-space: normal !important;\n }\n}\n\n#quest .main-quest__loader,\n#reminder-quest .main-quest__loader {\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-pack: center !important;\n justify-content: center !important;\n -webkit-box-align: center !important;\n align-items: center !important;\n position: absolute !important;\n width: 100% !important;\n height: 40px !important;\n -webkit-transition: opacity 0.4s !important;\n transition: opacity 0.4s !important;\n bottom: 22px !important;\n opacity: 0 !important;\n z-index: 0 !important;\n -webkit-box-orient: vertical !important;\n -webkit-box-direction: normal !important;\n flex-direction: column !important;\n left: 0 !important;\n}\n\n#quest .main-quest__loader--visible,\n#reminder-quest .main-quest__loader--visible {\n opacity: 1 !important;\n -webkit-transition-delay: 0.5s !important;\n transition-delay: 0.5s !important;\n}\n\[email protected] only screen and (max-device-width: 768px) {\n #quest .main-quest__loader,\n #reminder-quest .main-quest__loader {\n bottom: 10px !important;\n }\n}\n\n#quest .button,\n#reminder-quest .button {\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-align: center !important;\n align-items: center !important;\n -webkit-box-pack: center !important;\n justify-content: center !important;\n text-decoration: none !important;\n height: 40px !important;\n line-height: normal !important;\n padding: 7px 15px !important;\n box-shadow: 0 5px 15px 0 rgba(0,0,0,0.3) !important;\n cursor: pointer !important;\n outline: none !important;\n font-family: inherit !important;\n box-sizing: border-box !important;\n font-size: 14px !important;\n font-weight: bold !important;\n text-transform: none !important;\n margin: 0 !important;\n border-radius: 5px !important;\n}\n\n#quest .button__inner,\n#reminder-quest .button__inner {\n -webkit-box-flex: 1 !important;\n flex: 1 1 auto !important;\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-align: center !important;\n align-items: center !important;\n -webkit-box-pack: center !important;\n justify-content: center !important;\n}\n\n#quest .button__arrow,\n#reminder-quest .button__arrow {\n align-self: center !important;\n display: inline-block !important;\n width: 0 !important;\n height: 0 !important;\n margin-left: 8px !important;\n border-style: solid !important;\n border-width: 4.5px 0 4.5px 7px !important;\n border-color: transparent !important;\n}\n\n#quest .button--green,\n#reminder-quest .button--green {\n background: #129b28 !important;\n color: #ffffff !important;\n border: 1px solid #129b28 !important;\n box-shadow: 0 5px 20px 0 rgba(0,0,0,0.3) !important;\n}\n\n#quest .button--green:hover,\n#reminder-quest .button--green:hover {\n background: #16b530 !important;\n border: 1px solid #16b530 !important;\n}\n\n#quest .button--green span,\n#reminder-quest .button--green span {\n color: #ffffff !important;\n}\n\n#quest .button--green .button__arrow,\n#reminder-quest .button--green .button__arrow {\n border-left-color: #fff !important;\n}\n\n#quest .button--blue,\n#reminder-quest .button--blue {\n background: #ffffff !important;\n color: #024bb5 !important;\n border: 1px solid #d9d9d9 !important;\n}\n\n#quest .button--blue:hover,\n#reminder-quest .button--blue:hover {\n background: #f2f2f2 !important;\n}\n\n#quest .button--blue span,\n#reminder-quest .button--blue span {\n color: #024bb5 !important;\n}\n\n#quest .button--blue .button__arrow,\n#reminder-quest .button--blue .button__arrow {\n border-left-color: #024bb5 !important;\n}\n\n#quest .button--uppercase,\n#reminder-quest .button--uppercase {\n text-transform: uppercase !important;\n}\n\[email protected] only screen and (max-device-width: 768px) {\n #quest .button,\n #reminder-quest .button {\n height: 36px !important;\n padding: 5px 15px !important;\n line-height: 26px !important;\n font-size: 12px !important;\n border-radius: 3px !important;\n }\n}\n\n#quest .subscriber-profile,\n#reminder-quest .subscriber-profile {\n font-family: "Lato",Arial,Helvetica,sans-serif !important;\n max-width: 550px !important;\n margin: 30px auto !important;\n -webkit-box-flex: 1 !important;\n flex: 1 1 auto !important;\n position: relative !important;\n opacity: 0 !important;\n -webkit-transition: opacity 500ms ease-in-out !important;\n transition: opacity 500ms ease-in-out !important;\n}\n\n#quest .subscriber-profile--active,\n#reminder-quest .subscriber-profile--active {\n opacity: 1 !important;\n}\n\n#quest .subscriber-profile__inner,\n#reminder-quest .subscriber-profile__inner {\n background-color: #fff !important;\n border-radius: 10px !important;\n border: 1px solid #d9d9d9 !important;\n box-shadow: 0 0 20px 0 rgba(0,0,0,0.2) !important;\n text-align: center !important;\n}\n\n#quest .subscriber-profile__content,\n#reminder-quest .subscriber-profile__content {\n padding: 47px 20px 10px !important;\n text-align: center !important;\n}\n\n#quest .subscriber-profile__logo,\n#reminder-quest .subscriber-profile__logo {\n display: inline-block !important;\n width: 50px !important;\n height: 50px !important;\n border-radius: 5px !important;\n border: 3px solid #dddddd !important;\n margin: 0 0 29px !important;\n padding: 0 !important;\n opacity: 1 !important;\n -webkit-transition: none !important;\n transition: none !important;\n}\n\n#quest .subscriber-profile__title,\n#reminder-quest .subscriber-profile__title {\n color: #024bb5 !important;\n font-size: 22px !important;\n font-weight: bold !important;\n margin-bottom: 23px !important;\n}\n\n#quest .subscriber-profile__subtitle,\n#reminder-quest .subscriber-profile__subtitle {\n font-size: 16px !important;\n color: #000000 !important;\n margin-bottom: 28px !important;\n}\n\n#quest .subscriber-profile__extend-button,\n#reminder-quest .subscriber-profile__extend-button {\n margin-bottom: 15px !important;\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-orient: vertical !important;\n -webkit-box-direction: normal !important;\n flex-direction: column !important;\n -webkit-box-align: center !important;\n align-items: center !important;\n}\n\n#quest .subscriber-profile__extend-button .button,\n#reminder-quest .subscriber-profile__extend-button .button {\n min-width: 160px !important;\n}\n\[email protected] only screen and (max-device-width: 768px) {\n #quest .subscriber-profile__content,\n #reminder-quest .subscriber-profile__content {\n padding: 37px 30px 1px !important;\n }\n\n #quest .subscriber-profile__title,\n #reminder-quest .subscriber-profile__title {\n color: #024bb5 !important;\n font-size: 20px !important;\n margin-bottom: 20px !important;\n }\n\n #quest .subscriber-profile__subtitle,\n #reminder-quest .subscriber-profile__subtitle {\n margin-bottom: 25px !important;\n }\n\n #quest .subscriber-profile__extend-button,\n #reminder-quest .subscriber-profile__extend-button {\n margin-bottom: 28px !important;\n }\n}\n\n#quest .subscriber-footer,\n#reminder-quest .subscriber-footer {\n border-top: 1px solid #d9d9d9 !important;\n -webkit-box-flex: 1 !important;\n flex: 1 1 auto !important;\n color: #626262 !important;\n font-size: 14px !important;\n padding: 0 20px !important;\n}\n\n#quest .subscriber-footer__link-wrapper,\n#reminder-quest .subscriber-footer__link-wrapper {\n position: relative !important;\n}\n\n#quest .subscriber-footer__link,\n#reminder-quest .subscriber-footer__link {\n text-decoration: none !important;\n color: #024bb5 !important;\n box-shadow: none !important;\n}\n\n#quest .subscriber-footer__link--with-arrow:after,\n#reminder-quest .subscriber-footer__link--with-arrow:after {\n content: \' \\00BB\' !important;\n}\n\n#quest .subscriber-footer__anonymous,\n#reminder-quest .subscriber-footer__anonymous {\n height: 66px !important;\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-orient: horizontal !important;\n -webkit-box-direction: normal !important;\n flex-direction: row !important;\n -webkit-box-pack: center !important;\n justify-content: center !important;\n -webkit-box-align: center !important;\n align-items: center !important;\n}\n\n#quest .subscriber-footer__logged-in,\n#reminder-quest .subscriber-footer__logged-in {\n height: 82px !important;\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-orient: vertical !important;\n -webkit-box-direction: normal !important;\n flex-direction: column !important;\n -webkit-box-pack: center !important;\n justify-content: center !important;\n -webkit-box-align: center !important;\n align-items: center !important;\n}\n\n#quest .subscriber-footer__logged--in-value,\n#reminder-quest .subscriber-footer__logged--in-value {\n min-width: 0 !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n max-width: 100% !important;\n}\n\n#quest .subscriber-footer__logged--in-value,\n#reminder-quest .subscriber-footer__logged--in-value {\n white-space: nowrap !important;\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n}\n\[email protected] only screen and (max-device-width: 768px) {\n #quest .subscriber-footer__anonymous,\n #reminder-quest .subscriber-footer__anonymous {\n height: 60px !important;\n }\n}\n\n#quest .subscription,\n#reminder-quest .subscription {\n font-family: "Lato",Arial,Helvetica,sans-serif !important;\n max-width: 550px !important;\n margin: 30px auto !important;\n -webkit-box-flex: 1 !important;\n flex: 1 1 auto !important;\n position: relative !important;\n line-height: normal !important;\n opacity: 0 !important;\n -webkit-transition: opacity 500ms ease-in-out !important;\n transition: opacity 500ms ease-in-out !important;\n}\n\n#quest .subscription--active,\n#reminder-quest .subscription--active {\n opacity: 1 !important;\n}\n\n#quest .subscription__inner,\n#reminder-quest .subscription__inner {\n background-color: #fff !important;\n border-radius: 10px !important;\n border: 1px solid #d9d9d9 !important;\n box-shadow: 0 0 20px 0 rgba(0,0,0,0.2) !important;\n text-align: center !important;\n}\n\n#quest .subscription__content,\n#reminder-quest .subscription__content {\n color: #000 !important;\n padding: 49px 38px 32px !important;\n}\n\n#quest .subscription__title,\n#reminder-quest .subscription__title {\n font-size: 22px !important;\n font-weight: bold !important;\n margin-bottom: 36px !important;\n}\n\n#quest .subscription__subtitle,\n#reminder-quest .subscription__subtitle {\n font-size: 20px !important;\n font-weight: bold !important;\n display: -webkit-box !important;\n display: flex !important;\n text-align: center !important;\n -webkit-box-align: center !important;\n align-items: center !important;\n -webkit-box-pack: justify !important;\n justify-content: space-between !important;\n margin-bottom: 21px !important;\n}\n\n#quest .subscription__subtitle-text,\n#reminder-quest .subscription__subtitle-text {\n -webkit-box-flex: 2 !important;\n flex: 2 !important;\n padding: 0 20px !important;\n white-space: nowrap !important;\n}\n\n#quest .subscription__subtitle-line,\n#reminder-quest .subscription__subtitle-line {\n border-top: 1px solid #d9d9d9 !important;\n max-width: 92px !important;\n -webkit-box-flex: 1 !important;\n flex: 1 !important;\n}\n\n#quest .subscription__text,\n#reminder-quest .subscription__text {\n font-size: 16px !important;\n margin-bottom: 21px !important;\n}\n\n#quest .subscription__text b,\n#reminder-quest .subscription__text b {\n color: #129b28 !important;\n}\n\n#quest .subscription__button-wrapper,\n#reminder-quest .subscription__button-wrapper {\n position: relative !important;\n}\n\n#quest .subscription__activate-button,\n#reminder-quest .subscription__activate-button {\n margin-bottom: 43px !important;\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-orient: vertical !important;\n -webkit-box-direction: normal !important;\n flex-direction: column !important;\n -webkit-box-align: center !important;\n align-items: center !important;\n}\n\n#quest .subscription__active-button--no-bottom-margin,\n#reminder-quest .subscription__active-button--no-bottom-margin {\n margin-bottom: 0 !important;\n}\n\n#quest .subscription__activate-button .button,\n#reminder-quest .subscription__activate-button .button {\n min-width: 160px !important;\n}\n\n#quest .subscription__return-button,\n#reminder-quest .subscription__return-button {\n display: -webkit-box !important;\n display: flex !important;\n -webkit-box-orient: vertical !important;\n -webkit-box-direction: normal !important;\n flex-direction: column !important;\n -webkit-box-align: center !important;\n align-items: center !important;\n}\n\n#quest .subscription__return-button .button:before,\n#quest .subscription__return-button .button:after,\n#reminder-quest .subscription__return-button .button:before,\n#reminder-quest .subscription__return-button .button:after {\n display: none !important;\n}\n\n#quest .subscription__line,\n#reminder-quest .subscription__line {\n white-space: nowrap !important;\n}\n\[email protected] screen and (min-width: 769px) and (max-width: 1024px) {\n #quest .subscription__content,\n #reminder-quest .subscription__content {\n padding: 26px 0 !important;\n }\n\n #quest .subscription__title,\n #reminder-quest .subscription__title {\n padding: 0 10px !important;\n font-size: 20px !important;\n margin-bottom: 26px !important;\n }\n\n #quest .subscription__subtitle,\n #reminder-quest .subscription__subtitle {\n font-size: 18px !important;\n margin-bottom: 20px !important;\n }\n\n #quest .subscription__text,\n #reminder-quest .subscription__text {\n font-size: 14px !important;\n }\n}\n\[email protected] only screen and (max-device-width: 768px) {\n #quest .subscription,\n #reminder-quest .subscription {\n margin: 20px auto !important;\n }\n\n #quest .subscription__content,\n #reminder-quest .subscription__content {\n padding: 26px 0 !important;\n }\n\n #quest .subscription__title,\n #reminder-quest .subscription__title {\n padding: 0 50px !important;\n font-size: 19px !important;\n margin-bottom: 26px !important;\n }\n\n #quest .subscription__subtitle,\n #reminder-quest .subscription__subtitle {\n font-size: 16px !important;\n margin-bottom: 18px !important;\n }\n\n #quest .subscription__subtitle-line,\n #reminder-quest .subscription__subtitle-line {\n max-width: 60px !important;\n }\n\n #quest .subscription__text,\n #reminder-quest .subscription__text {\n font-size: 12px !important;\n }\n}\n\n#quest .learn-more-button,\n#reminder-quest .learn-more-button {\n text-decoration: none !important;\n box-shadow: none !important;\n border: 0 !important;\n outline: 0 !important;\n position: relative !important;\n}\n\n#quest .learn-more-button .button,\n#reminder-quest .learn-more-button .button {\n min-width: 226px !important;\n max-width: 100% !important;\n}\n\[email protected] rotator {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\[email protected] rotator {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n#quest .loader,\n#reminder-quest .loader {\n width: 20px !important;\n height: 20px !important;\n border: 2px solid #129b28 !important;\n border-radius: 100px !important;\n box-sizing: border-box !important;\n position: relative !important;\n}\n\n#quest .loader__separator,\n#reminder-quest .loader__separator {\n position: absolute !important;\n top: 2px !important;\n width: 0 !important;\n height: 0 !important;\n border-top: 6px solid transparent !important;\n border-bottom: 6px solid transparent !important;\n border-left: 12px solid white !important;\n -webkit-transform-origin: 100% 50% !important;\n transform-origin: 100% 50% !important;\n -webkit-animation: rotator 1.4s linear infinite !important;\n animation: rotator 1.4s linear infinite !important;\n left: -4px !important;\n}',""])},"./node_modules/css-loader/dist/runtime/api.js":function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,o,i=e[1]||"",s=e[3];if(!s)return i;if(t&&"function"==typeof btoa){var a=(n=s,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(o," */")),u=s.sources.map((function(e){return"/*# sourceURL=".concat(s.sourceRoot).concat(e," */")}));return[i].concat(u).concat([a]).join("\n")}return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(n,"}"):n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o-1};function o(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function i(e){return"string"!=typeof e&&(e=String(e)),e}function s(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(n[Symbol.iterator]=function(){return n}),n}function a(e){this.map={},e instanceof a?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function u(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function l(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function c(e){var t=new FileReader,n=l(t);return t.readAsArrayBuffer(e),n}function d(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(e){var n;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:t.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:t.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():t.arrayBuffer&&t.blob&&(n=e)&&DataView.prototype.isPrototypeOf(n)?(this._bodyArrayBuffer=d(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):t.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||r(e))?this._bodyArrayBuffer=d(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=u(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?u(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(c)}),this.text=function(){var e,t,n,r=u(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=l(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function m(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function g(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new a(t.headers),this.url=t.url||"",this._initBody(e)}h.prototype.clone=function(){return new h(this,{body:this._bodyInit})},p.call(h.prototype),p.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new a(this.headers),url:this.url})},g.error=function(){var e=new g(null,{status:0,statusText:""});return e.type="error",e};var v=[301,302,303,307,308];g.redirect=function(e,t){if(-1===v.indexOf(t))throw new RangeError("Invalid status code");return new g(null,{status:t,headers:{location:e}})},e.DOMException=self.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function b(n,r){return new Promise((function(o,i){var s=new h(n,r);if(s.signal&&s.signal.aborted)return i(new e.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function l(){u.abort()}u.onload=function(){var e,t,n={status:u.status,statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new a,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};n.url="responseURL"in u?u.responseURL:n.headers.get("X-Request-URL");var r="response"in u?u.response:u.responseText;o(new g(r,n))},u.onerror=function(){i(new TypeError("Network request failed"))},u.ontimeout=function(){i(new TypeError("Network request failed"))},u.onabort=function(){i(new e.DOMException("Aborted","AbortError"))},u.open(s.method,s.url,!0),"include"===s.credentials?u.withCredentials=!0:"omit"===s.credentials&&(u.withCredentials=!1),"responseType"in u&&t.blob&&(u.responseType="blob"),s.headers.forEach((function(e,t){u.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&s.signal.removeEventListener("abort",l)}),u.send(void 0===s._bodyInit?null:s._bodyInit)}))}b.polyfill=!0,self.fetch||(self.fetch=b,self.Headers=a,self.Request=h,self.Response=g),e.Headers=a,e.Request=h,e.Response=g,e.fetch=b,Object.defineProperty(e,"__esModule",{value:!0})}(t),e.exports=self.fetch},"./node_modules/fast-safe-stringify/index.js":function(e,t){e.exports=o,o.default=o,o.stable=s,o.stableStringify=s;var n=[],r=[];function o(e,t,o){var i;for(function e(t,o,i,s){var a;if("object"==typeof t&&null!==t){for(a=0;at?1:0}function s(e,t,o){var s,u=function e(t,o,s,a){var u;if("object"==typeof t&&null!==t){for(u=0;u0)for(var o=0;o>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},t=function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},n=function(e,t){return 32==(t%=64)?[e[1],e[0]]:t<32?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])},r=function(e,t){return 0==(t%=64)?e:t<32?[e[0]<>>32-t,e[1]<>>1]),e=t(e,[4283543511,3981806797]),e=o(e,[0,e[0]>>>1]),e=t(e,[3301882366,444984403]),o(e,[0,e[0]>>>1])},s=function(s,a){a=a||0;for(var u=(s=s||"").length%16,l=s.length-u,c=[0,a],d=[0,a],p=[0,0],f=[0,0],h=[2277735313,289559509],m=[1291169091,658871167],g=0;g>>0).toString(16)).slice(-8)+("00000000"+(c[1]>>>0).toString(16)).slice(-8)+("00000000"+(d[0]>>>0).toString(16)).slice(-8)+("00000000"+(d[1]>>>0).toString(16)).slice(-8)},a={preprocessor:null,audio:{timeout:1e3,excludeIOS11:!0},fonts:{swfContainerId:"fingerprintjs2",swfPath:"flash/compiled/FontList.swf",userDefinedFonts:[],extendedJsFonts:!1},screen:{detectScreenOrientation:!0},plugins:{sortPluginsFor:[/palemoon/i],excludeIE:!1},extraComponents:[],excludes:{enumerateDevices:!0,pixelRatio:!0,doNotTrack:!0,fontsFlash:!0},NOT_AVAILABLE:"not available",ERROR:"error",EXCLUDED:"excluded"},u=function(e,t){if(Array.prototype.forEach&&e.forEach===Array.prototype.forEach)e.forEach(t);else if(e.length===+e.length)for(var n=0,r=e.length;nt.name?1:e.name=0?"Windows Phone":t.indexOf("win")>=0?"Windows":t.indexOf("android")>=0?"Android":t.indexOf("linux")>=0||t.indexOf("cros")>=0?"Linux":t.indexOf("iphone")>=0||t.indexOf("ipad")>=0?"iOS":t.indexOf("mac")>=0?"Mac":"Other",("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)&&"Windows Phone"!==e&&"Android"!==e&&"iOS"!==e&&"Other"!==e)return!0;if(void 0!==n){if((n=n.toLowerCase()).indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e)return!0;if(n.indexOf("linux")>=0&&"Linux"!==e&&"Android"!==e)return!0;if(n.indexOf("mac")>=0&&"Mac"!==e&&"iOS"!==e)return!0;if((-1===n.indexOf("win")&&-1===n.indexOf("linux")&&-1===n.indexOf("mac"))!=("Other"===e))return!0}return r.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e||(r.indexOf("linux")>=0||r.indexOf("android")>=0||r.indexOf("pike")>=0)&&"Linux"!==e&&"Android"!==e||(r.indexOf("mac")>=0||r.indexOf("ipad")>=0||r.indexOf("ipod")>=0||r.indexOf("iphone")>=0)&&"Mac"!==e&&"iOS"!==e||(r.indexOf("win")<0&&r.indexOf("linux")<0&&r.indexOf("mac")<0&&r.indexOf("iphone")<0&&r.indexOf("ipad")<0)!=("Other"===e)||void 0===navigator.plugins&&"Windows"!==e&&"Windows Phone"!==e}())}},{key:"hasLiedBrowser",getData:function(e){e(function(){var e,t=navigator.userAgent.toLowerCase(),n=navigator.productSub;if(("Chrome"==(e=t.indexOf("firefox")>=0?"Firefox":t.indexOf("opera")>=0||t.indexOf("opr")>=0?"Opera":t.indexOf("chrome")>=0?"Chrome":t.indexOf("safari")>=0?"Safari":t.indexOf("trident")>=0?"Internet Explorer":"Other")||"Safari"===e||"Opera"===e)&&"20030107"!==n)return!0;var r,o=eval.toString().length;if(37===o&&"Safari"!==e&&"Firefox"!==e&&"Other"!==e)return!0;if(39===o&&"Internet Explorer"!==e&&"Other"!==e)return!0;if(33===o&&"Chrome"!==e&&"Opera"!==e&&"Other"!==e)return!0;try{throw"a"}catch(e){try{e.toSource(),r=!0}catch(e){r=!1}}return r&&"Firefox"!==e&&"Other"!==e}())}},{key:"touchSupport",getData:function(e){e(function(){var e,t=0;void 0!==navigator.maxTouchPoints?t=navigator.maxTouchPoints:void 0!==navigator.msMaxTouchPoints&&(t=navigator.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(t){e=!1}return[t,e,"ontouchstart"in window]}())}},{key:"fonts",getData:function(e,t){var n=["monospace","sans-serif","serif"],r=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"];t.fonts.extendedJsFonts&&(r=r.concat(["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"])),r=(r=r.concat(t.fonts.userDefinedFonts)).filter((function(e,t){return r.indexOf(e)===t}));var o=document.getElementsByTagName("body")[0],i=document.createElement("div"),s=document.createElement("div"),a={},u={},l=function(){var e=document.createElement("span");return e.style.position="absolute",e.style.left="-9999px",e.style.fontSize="72px",e.style.fontStyle="normal",e.style.fontWeight="normal",e.style.letterSpacing="normal",e.style.lineBreak="auto",e.style.lineHeight="normal",e.style.textTransform="none",e.style.textAlign="left",e.style.textDecoration="none",e.style.textShadow="none",e.style.whiteSpace="normal",e.style.wordBreak="normal",e.style.wordSpacing="normal",e.innerHTML="mmmmmmmmmmlli",e},c=function(e,t){var n=l();return n.style.fontFamily="'"+e+"',"+t,n},d=function(e){for(var t=!1,r=0;r=e.components.length)t(n.data);else{var s=e.components[r];if(e.excludes[s.key])o(!1);else{if(!i&&s.pauseBefore)return r-=1,void setTimeout((function(){o(!0)}),1);try{s.getData((function(e){n.addPreprocessedComponent(s.key,e),o(!1)}),e)}catch(e){n.addPreprocessedComponent(s.key,String(e)),o(!1)}}}};o(!1)},g.getPromise=function(e){return new Promise((function(t,n){g.get(e,t)}))},g.getV18=function(e,t){return null==t&&(t=e,e={}),g.get(e,(function(n){for(var r=[],o=0;oparseInt(e[1],10)}else u=!1;return u}()){var h=new Promise((function(e,t){!function n(){(new Date).getTime()-p>=c?t(Error(c+"ms timeout exceeded")):document.fonts.load(f(o,'"'+o.family+'"'),s).then((function(t){1<=t.length?e():setTimeout(n,25)}),t)}()})),m=new Promise((function(e,t){l=setTimeout((function(){t(Error(c+"ms timeout exceeded"))}),c)}));Promise.race([m,h]).then((function(){clearTimeout(l),e(o)}),t)}else!function(e){document.body?e():document.addEventListener?document.addEventListener("DOMContentLoaded",(function t(){document.removeEventListener("DOMContentLoaded",t),e()})):document.attachEvent("onreadystatechange",(function t(){"interactive"!=document.readyState&&"complete"!=document.readyState||(document.detachEvent("onreadystatechange",t),e())}))}((function(){function u(){var t;(t=-1!=g&&-1!=v||-1!=g&&-1!=b||-1!=v&&-1!=b)&&((t=g!=v&&g!=b&&v!=b)||(null===a&&(t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),a=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))),t=a&&(g==y&&v==y&&b==y||g==_&&v==_&&b==_||g==j&&v==j&&b==j)),t=!t),t&&(w.parentNode&&w.parentNode.removeChild(w),clearTimeout(l),e(o))}var d=new n(s),h=new n(s),m=new n(s),g=-1,v=-1,b=-1,y=-1,_=-1,j=-1,w=document.createElement("div");w.dir="ltr",r(d,f(o,"sans-serif")),r(h,f(o,"serif")),r(m,f(o,"monospace")),w.appendChild(d.a),w.appendChild(h.a),w.appendChild(m.a),document.body.appendChild(w),y=d.a.offsetWidth,_=h.a.offsetWidth,j=m.a.offsetWidth,function e(){if((new Date).getTime()-p>=c)w.parentNode&&w.parentNode.removeChild(w),t(Error(c+"ms timeout exceeded"));else{var n=document.hidden;!0!==n&&void 0!==n||(g=d.a.offsetWidth,v=h.a.offsetWidth,b=m.a.offsetWidth,u()),l=setTimeout(e,50)}}(),i(d,(function(e){g=e,u()})),r(d,f(o,'"'+o.family+'",sans-serif')),i(h,(function(e){v=e,u()})),r(h,f(o,'"'+o.family+'",serif')),i(m,(function(e){b=e,u()})),r(m,f(o,'"'+o.family+'",monospace'))}))}))},e.exports=s}()},"./node_modules/hls.js/dist/hls.js":function(e,t,n){var r;"undefined"!=typeof window&&(r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s="./src/hls.js")}({"./node_modules/eventemitter3/index.js":function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,o="~";function i(){}function s(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new s(n,r||e,i),u=o?o+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function u(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function l(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(o=!1)),l.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(o?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},l.prototype.listeners=function(e){var t=o?o+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,s=new Array(i);r0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function o(){this.removeListener(e,o),n||(n=!0,t.apply(this,arguments))}return o.listener=t,this.on(e,o),this},n.prototype.removeListener=function(e,t){var n,i,s,a;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(n=this._events[e]).length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(a=s;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){i=a;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},"./node_modules/url-toolkit/src/url-toolkit.js":function(e,t,n){var r,o,i,s,a;r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,o=/^([^\/?#]*)(.*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,a={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=a.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=a.normalizePath(r.path),a.buildURLFromParts(r)}var i=a.parseURL(t);if(!i)throw new Error("Error trying to parse relative URL.");if(i.scheme)return n.alwaysNormalize?(i.path=a.normalizePath(i.path),a.buildURLFromParts(i)):t;var s=a.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var u=o.exec(s.path);s.netLoc=u[1],s.path=u[2]}s.netLoc&&!s.path&&(s.path="/");var l={scheme:s.scheme,netLoc:i.netLoc,path:null,params:i.params,query:i.query,fragment:i.fragment};if(!i.netLoc&&(l.netLoc=s.netLoc,"/"!==i.path[0]))if(i.path){var c=s.path,d=c.substring(0,c.lastIndexOf("/")+1)+i.path;l.path=a.normalizePath(d)}else l.path=s.path,i.params||(l.params=s.params,i.query||(l.query=s.query));return null===l.path&&(l.path=n.alwaysNormalize?a.normalizePath(i.path):i.path),a.buildURLFromParts(l)},parseURL:function(e){var t=r.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(i,"");e.length!==(e=e.replace(s,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=a},"./node_modules/webworkify-webpack/index.js":function(e,t,n){function r(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n.oe=function(e){throw console.error(e),e};var r=n(n.s=ENTRY_MODULE);return r.default||r}var o="[\\.|\\-|\\+|\\w|/|@]+",i="\\((/\\*.*?\\*/)?s?.*?("+o+").*?\\)";function s(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function a(e,t,r){var a={};a[r]=[];var u=t.toString(),l=u.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);if(!l)return a;for(var c,d=l[1],p=new RegExp("(\\\\n|\\W)"+s(d)+i,"g");c=p.exec(u);)"dll-reference"!==c[3]&&a[r].push(c[3]);for(p=new RegExp("\\("+s(d)+'\\("(dll-reference\\s('+o+'))"\\)\\)'+i,"g");c=p.exec(u);)e[c[2]]||(a[r].push(c[1]),e[c[2]]=n(c[1]).m),a[c[2]]=a[c[2]]||[],a[c[2]].push(c[4]);for(var f,h=Object.keys(a),m=0;m0}),!1)}e.exports=function(e,t){t=t||{};var o={main:n.m},i=t.all?{main:Object.keys(o.main)}:function(e,t){for(var n={main:[t]},r={main:[]},o={main:{}};u(n);)for(var i=Object.keys(n),s=0;s500*n.duration/c){var p=e.levels,f=Math.max(1,s.bw?s.bw/8:1e3*s.loaded/u),h=p[n.level],m=h.realBitrate?Math.max(h.realBitrate,h.bitrate):h.bitrate,g=s.total?s.total:Math.max(s.loaded,Math.round(n.duration*m/8)),v=t.currentTime,b=(g-s.loaded)/f,y=(a.BufferHelper.bufferInfo(t,v,e.config.maxBufferHole).end-v)/c;if(y<2*n.duration/c&&b>y){var _=void 0,j=void 0;for(j=n.level-1;j>o;j--){var w=p[j].realBitrate?Math.max(p[j].realBitrate,p[j].bitrate):p[j].bitrate;if((_=n.duration*w/(6.4*f))=0)return h;l.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var m=u?Math.min(u,r.maxStarvationDelay):r.maxStarvationDelay,g=r.abrBandWidthFactor,v=r.abrBandWidthUpFactor;if(0===f){var b=this.bitrateTestDelay;b&&(m=(u?Math.min(u,r.maxLoadingDelay):r.maxLoadingDelay)-b,l.logger.trace("bitrate test took "+Math.round(1e3*b)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*m)+" ms"),g=v=1)}return h=this._findBestLevel(s,u,p,o,t,f+m,g,v,n),Math.max(h,0)},enumerable:!0,configurable:!0}),n.prototype._findBestLevel=function(e,t,n,r,o,i,s,a,u){for(var c=o;c>=r;c--){var d=u[c];if(d){var p,f=d.details,h=f?f.totalduration/f.fragments.length:t,m=!!f&&f.live;p=c<=e?s*n:a*n;var g=u[c].realBitrate?Math.max(u[c].realBitrate,u[c].bitrate):u[c].bitrate,v=g*h/p;if(l.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+c+"/"+Math.round(p)+"/"+g+"/"+h+"/"+i+"/"+v),p>g&&(!v||m&&!this.bitrateTestDelay||v0&&-1===e?(p.logger.log("audio:override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=g.State.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:e,this.state=g.State.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=e,this.state=g.State.STOPPED},Object.defineProperty(n.prototype,"state",{get:function(){return this._state},set:function(e){if(this.state!==e){var t=this.state;this._state=e,p.logger.log("audio stream:"+t+"->"+e)}},enumerable:!0,configurable:!0}),n.prototype.doTick=function(){var t,n,r,o=this.hls,a=o.config;switch(this.state){case g.State.ERROR:case g.State.PAUSED:case g.State.BUFFER_FLUSHING:break;case g.State.STARTING:this.state=g.State.WAITING_TRACK,this.loadedmetadata=!1;break;case g.State.IDLE:var l=this.tracks;if(!l)break;if(!this.media&&(this.startFragRequested||!a.startFragPrefetch))break;if(this.loadedmetadata)t=this.media.currentTime;else if(void 0===(t=this.nextLoadPosition))break;var c=this.mediaBuffer?this.mediaBuffer:this.media,d=this.videoBuffer?this.videoBuffer:this.media,m=s.BufferHelper.bufferInfo(c,t,a.maxBufferHole),b=s.BufferHelper.bufferInfo(d,t,a.maxBufferHole),y=m.len,_=m.end,j=this.fragPrevious,w=Math.min(a.maxBufferLength,a.maxMaxBufferLength),S=Math.max(w,b.len),x=this.audioSwitch,T=this.trackId;if((yk||m.nextStart))return;p.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=k+.05}if(r.initSegment&&!r.initSegment.data)R=r.initSegment;else if(_<=k){if(R=A[0],null!==this.videoTrackCC&&R.cc!==this.videoTrackCC&&(R=f.findFragWithCC(A,this.videoTrackCC)),r.live&&R.loadIdx&&R.loadIdx===this.fragLoadIdx){var C=m.nextStart?m.nextStart:k;return p.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(C+.05)),void(this.media.currentTime=C+.05)}}else{var D=void 0,P=a.maxFragLookUpTolerance,L=j?A[j.sn-A[0].sn+1]:void 0,I=function(e){var t=Math.min(P,e.duration);return e.start+e.duration-t<=_?1:e.start-t>_&&e.start?-1:0};_O-P&&(P=0),D=L&&!I(L)?L:i.default.search(A,I)):D=A[E-1],D&&(R=D,k=D.start,j&&R.level===j.level&&R.sn===j.sn&&(R.sn=M||N)&&(p.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=g.State.IDLE);break;case g.State.WAITING_INIT_PTS:var F=this.videoTrackCC;if(void 0===this.initPTS[F])break;var B=this.waitingFragment;if(B){var U=B.frag.cc;F!==U?(n=this.tracks[this.trackId]).details&&n.details.live&&(p.logger.warn("Waiting fragment CC ("+U+") does not match video track CC ("+F+")"),this.waitingFragment=null,this.state=g.State.IDLE):(this.state=g.State.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=g.State.IDLE;break;case g.State.STOPPED:case g.State.FRAG_LOADING:case g.State.PARSING:case g.State.PARSED:case g.State.ENDED:}},n.prototype.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("ended",this.onvended);var n=this.config;this.tracks&&n.autoStartLoad&&this.startLoad(n.startPosition)},n.prototype.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(p.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.stopLoad()},n.prototype.onAudioTracksUpdated=function(e){p.logger.log("audio tracks updated"),this.tracks=e.audioTracks},n.prototype.onAudioTrackSwitching=function(e){var t=!!e.url;this.trackId=e.id,this.fragCurrent=null,this.state=g.State.PAUSED,this.waitingFragment=null,t?this.setInterval(100):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),t&&(this.audioSwitch=!0,this.state=g.State.IDLE),this.tick()},n.prototype.onAudioTrackLoaded=function(t){var n=t.details,r=t.id,o=this.tracks[r],i=n.totalduration,s=0;if(p.logger.log("track "+r+" loaded ["+n.startSN+","+n.endSN+"],duration:"+i),n.live){var a=o.details;a&&n.fragments.length>0?(l.mergeDetails(a,n),s=n.fragments[0].start,n.PTSKnown?p.logger.log("live audio playlist sliding:"+s.toFixed(3)):p.logger.log("live audio playlist - outdated PTS, unknown sliding")):(n.PTSKnown=!1,p.logger.log("live audio playlist - first load, unknown sliding"))}else n.PTSKnown=!1;if(o.details=n,!this.startFragRequested){if(-1===this.startPosition){var u=n.startTimeOffset;e.isFinite(u)?(p.logger.log("start time offset found in playlist, adjust startPosition to "+u),this.startPosition=u):this.startPosition=0}this.nextLoadPosition=this.startPosition}this.state===g.State.WAITING_TRACK&&(this.state=g.State.IDLE),this.tick()},n.prototype.onKeyLoaded=function(){this.state===g.State.KEY_LOADING&&(this.state=g.State.IDLE,this.tick())},n.prototype.onFragLoaded=function(e){var t=this.fragCurrent,n=e.frag;if(this.state===g.State.FRAG_LOADING&&t&&"audio"===n.type&&n.level===t.level&&n.sn===t.sn){var r=this.tracks[this.trackId],o=r.details,i=o.totalduration,s=t.level,l=t.sn,c=t.cc,d=this.config.defaultAudioCodec||r.audioCodec||"mp4a.40.2",f=this.stats=e.stats;if("initSegment"===l)this.state=g.State.IDLE,f.tparsed=f.tbuffered=v.now(),o.initSegment.data=e.payload,this.hls.trigger(u.default.FRAG_BUFFERED,{stats:f,frag:t,id:"audio"}),this.tick();else{this.state=g.State.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new a.default(this.hls,"audio"));var h=this.initPTS[c],m=o.initSegment?o.initSegment.data:[];o.initSegment||void 0!==h?(this.pendingBuffering=!0,p.logger.log("Demuxing "+l+" of ["+o.startSN+" ,"+o.endSN+"],track "+s),this.demuxer.push(e.payload,m,d,null,t,i,!1,h)):(p.logger.log("unknown video PTS for continuity counter "+c+", waiting for video PTS before demuxing audio frag "+l+" of ["+o.startSN+" ,"+o.endSN+"],track "+s),this.waitingFragment=e,this.state=g.State.WAITING_INIT_PTS)}}this.fragLoadError=0},n.prototype.onFragParsingInitSegment=function(e){var t=this.fragCurrent,n=e.frag;if(t&&"audio"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===g.State.PARSING){var r=e.tracks,o=void 0;if(r.video&&delete r.video,o=r.audio){o.levelCodec=o.codec,o.id=e.id,this.hls.trigger(u.default.BUFFER_CODECS,r),p.logger.log("audio track:audio,container:"+o.container+",codecs[level/parsed]=["+o.levelCodec+"/"+o.codec+"]");var i=o.initSegment;if(i){var s={type:"audio",data:i,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[s]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(u.default.BUFFER_APPENDING,s))}this.tick()}}},n.prototype.onFragParsingData=function(t){var n=this,r=this.fragCurrent,o=t.frag;if(r&&"audio"===t.id&&"audio"===t.type&&o.sn===r.sn&&o.level===r.level&&this.state===g.State.PARSING){var i=this.trackId,s=this.tracks[i],a=this.hls;e.isFinite(t.endPTS)||(t.endPTS=t.startPTS+r.duration,t.endDTS=t.startDTS+r.duration),r.addElementaryStream(m.default.ElementaryStreamTypes.AUDIO),p.logger.log("parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb),l.updateFragPTSDTS(s.details,r,t.startPTS,t.endPTS);var c=this.audioSwitch,f=this.media,h=!1;if(c&&f)if(f.readyState){var v=f.currentTime;p.logger.log("switching audio track : currentTime:"+v),v>=t.startPTS&&(p.logger.log("switching audio track : flushing all audio"),this.state=g.State.BUFFER_FLUSHING,a.trigger(u.default.BUFFER_FLUSHING,{startOffset:0,endOffset:e.POSITIVE_INFINITY,type:"audio"}),h=!0,this.audioSwitch=!1,a.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:i}))}else this.audioSwitch=!1,a.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:i});var b=this.pendingData;if(!b)return p.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void a.trigger(u.default.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([t.data1,t.data2].forEach((function(e){e&&e.length&&b.push({type:t.type,data:e,parent:"audio",content:"data"})})),!h&&b.length&&(b.forEach((function(e){n.state===g.State.PARSING&&(n.pendingBuffering=!0,n.hls.trigger(u.default.BUFFER_APPENDING,e))})),this.pendingData=[],this.appended=!0)),this.tick()}},n.prototype.onFragParsed=function(e){var t=this.fragCurrent,n=e.frag;t&&"audio"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===g.State.PARSING&&(this.stats.tparsed=v.now(),this.state=g.State.PARSED,this._checkAppendedParsed())},n.prototype.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},n.prototype.onBufferCreated=function(e){var t=e.tracks.audio;t&&(this.mediaBuffer=t.buffer,this.loadedmetadata=!0),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},n.prototype.onBufferAppended=function(e){if("audio"===e.parent){var t=this.state;t!==g.State.PARSING&&t!==g.State.PARSED||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},n.prototype._checkAppendedParsed=function(){if(!(this.state!==g.State.PARSED||this.appended&&this.pendingBuffering)){var e=this.fragCurrent,t=this.stats,n=this.hls;if(e){this.fragPrevious=e,t.tbuffered=v.now(),n.trigger(u.default.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var r=this.mediaBuffer?this.mediaBuffer:this.media;p.logger.log("audio buffered : "+c.default.toString(r.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,n.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=g.State.IDLE}this.tick()}},n.prototype.onError=function(t){var n=t.frag;if(!n||"audio"===n.type)switch(t.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:var r=t.frag;if(r&&"audio"!==r.type)break;if(!t.fatal){var o=this.fragLoadError;if(o?o++:o=1,o<=(a=this.config).fragLoadingMaxRetry){this.fragLoadError=o;var i=Math.min(Math.pow(2,o-1)*a.fragLoadingRetryDelay,a.fragLoadingMaxRetryTimeout);p.logger.warn("AudioStreamController: frag loading failed, retry in "+i+" ms"),this.retryDate=v.now()+i,this.state=g.State.FRAG_LOADING_WAITING_RETRY}else p.logger.error("AudioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=g.State.ERROR}break;case d.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case d.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case d.ErrorDetails.KEY_LOAD_ERROR:case d.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==g.State.ERROR&&(this.state=t.fatal?g.State.ERROR:g.State.IDLE,p.logger.warn("AudioStreamController: "+t.details+" while loading frag, now switching to "+this.state+" state ..."));break;case d.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===t.parent&&(this.state===g.State.PARSING||this.state===g.State.PARSED)){var a,l=this.mediaBuffer,c=this.media.currentTime;l&&s.BufferHelper.isBuffered(l,c)&&s.BufferHelper.isBuffered(l,c+.5)?((a=this.config).maxMaxBufferLength>=a.maxBufferLength&&(a.maxMaxBufferLength/=2,p.logger.warn("AudioStreamController: reduce max buffer length to "+a.maxMaxBufferLength+"s")),this.state=g.State.IDLE):(p.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=g.State.BUFFER_FLUSHING,this.hls.trigger(u.default.BUFFER_FLUSHING,{startOffset:0,endOffset:e.POSITIVE_INFINITY,type:"audio"}))}}},n.prototype.onBufferFlushed=function(){var e=this,t=this.pendingData;t&&t.length?(p.logger.log("AudioStreamController: appending pending audio data after buffer flushed"),t.forEach((function(t){e.hls.trigger(u.default.BUFFER_APPENDING,t)})),this.appended=!0,this.pendingData=[],this.state=g.State.PARSED):(this.state=g.State.IDLE,this.fragPrevious=null,this.tick())},n}(g.default);t.default=b}).call(this,n("./src/polyfills/number.js").Number)},"./src/controller/audio-track-controller.js":function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n("./src/events.js"),s=n("./src/task-loop.js"),a=n("./src/utils/logger.js"),u=n("./src/errors.js"),l=function(e){function t(t){var n=e.call(this,t,i.default.MANIFEST_LOADING,i.default.MANIFEST_PARSED,i.default.AUDIO_TRACK_LOADED,i.default.AUDIO_TRACK_SWITCHED,i.default.LEVEL_LOADED,i.default.ERROR)||this;return n._trackId=-1,n._selectDefaultTrack=!0,n.tracks=[],n.trackIdBlacklist=Object.create(null),n.audioGroupId=null,n}return o(t,e),t.prototype.onManifestLoading=function(){this.tracks=[],this._trackId=-1,this._selectDefaultTrack=!0},t.prototype.onManifestParsed=function(e){var t=this.tracks=e.audioTracks||[];this.hls.trigger(i.default.AUDIO_TRACKS_UPDATED,{audioTracks:t})},t.prototype.onAudioTrackLoaded=function(e){if(e.id>=this.tracks.length)a.logger.warn("Invalid audio track id:",e.id);else{if(a.logger.log("audioTrack "+e.id+" loaded"),this.tracks[e.id].details=e.details,e.details.live&&!this.hasInterval()){var t=1e3*e.details.targetduration;this.setInterval(t)}!e.details.live&&this.hasInterval()&&this.clearInterval()}},t.prototype.onAudioTrackSwitched=function(e){var t=this.tracks[e.id].groupId;t&&this.audioGroupId!==t&&(this.audioGroupId=t)},t.prototype.onLevelLoaded=function(e){var t=this.hls.levels[e.level];if(t.audioGroupIds){var n=t.audioGroupIds[t.urlId];this.audioGroupId!==n&&(this.audioGroupId=n,this._selectInitialAudioTrack())}},t.prototype.onError=function(e){e.type===u.ErrorTypes.NETWORK_ERROR&&(e.fatal&&this.clearInterval(),e.details===u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR&&(a.logger.warn("Network failure on audio-track id:",e.context.id),this._handleLoadError()))},Object.defineProperty(t.prototype,"audioTracks",{get:function(){return this.tracks},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"audioTrack",{get:function(){return this._trackId},set:function(e){this._setAudioTrack(e),this._selectDefaultTrack=!1},enumerable:!0,configurable:!0}),t.prototype._setAudioTrack=function(e){if(this._trackId===e&&this.tracks[this._trackId].details)a.logger.debug("Same id as current audio-track passed, and track details available -> no-op");else if(e<0||e>=this.tracks.length)a.logger.warn("Invalid id passed to audio-track controller");else{var t=this.tracks[e];a.logger.log("Now switching to audio-track index "+e),this.clearInterval(),this._trackId=e;var n=t.url,r=t.type,o=t.id;this.hls.trigger(i.default.AUDIO_TRACK_SWITCHING,{id:o,type:r,url:n}),this._loadTrackDetailsIfNeeded(t)}},t.prototype.doTick=function(){this._updateTrack(this._trackId)},t.prototype._selectInitialAudioTrack=function(){var e=this,t=this.tracks;if(t.length){var n=this.tracks[this._trackId],r=null;if(n&&(r=n.name),this._selectDefaultTrack){var o=t.filter((function(e){return e.default}));o.length?t=o:a.logger.warn("No default audio tracks defined")}var s=!1,l=function(){t.forEach((function(t){s||e.audioGroupId&&t.groupId!==e.audioGroupId||r&&r!==t.name||(e._setAudioTrack(t.id),s=!0)}))};l(),s||(r=null,l()),s||(a.logger.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(i.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},t.prototype._needsTrackLoading=function(e){var t=e.details,n=e.url;return!(t&&!t.live||!n)},t.prototype._loadTrackDetailsIfNeeded=function(e){if(this._needsTrackLoading(e)){var t=e.url,n=e.id;a.logger.log("loading audio-track playlist for id: "+n),this.hls.trigger(i.default.AUDIO_TRACK_LOADING,{url:t,id:n})}},t.prototype._updateTrack=function(e){if(!(e<0||e>=this.tracks.length)){this.clearInterval(),this._trackId=e,a.logger.log("trying to update audio-track "+e);var t=this.tracks[e];this._loadTrackDetailsIfNeeded(t)}},t.prototype._handleLoadError=function(){this.trackIdBlacklist[this._trackId]=!0;var e=this._trackId,t=this.tracks[e],n=t.name,r=t.language,o=t.groupId;a.logger.warn("Loading failed on audio track id: "+e+", group-id: "+o+', name/language: "'+n+'" / "'+r+'"');for(var i=e,s=0;sf?(c.loader&&(u.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),c.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=t.State.IDLE):u.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else i===t.State.ENDED&&(0===l.len&&(this.fragPrevious=null,this.fragCurrent=null),this.state=t.State.IDLE);r&&(this.lastCurrentTime=s),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=s),this.tick()},r.prototype.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},r.prototype.onHandlerDestroying=function(){this.stopLoad(),n.prototype.onHandlerDestroying.call(this)},r.prototype.onHandlerDestroyed=function(){this.state=t.State.STOPPED,this.fragmentTracker=null},r}(i.default);t.default=l}).call(this,n("./src/polyfills/number.js").Number)},"./src/controller/buffer-controller.js":function(e,t,n){"use strict";(function(e){var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n("./src/events.js"),s=n("./src/event-handler.js"),a=n("./src/utils/logger.js"),u=n("./src/errors.js"),l=n("./src/utils/mediasource-helper.js").getMediaSource(),c=function(t){function n(e){var n=t.call(this,e,i.default.MEDIA_ATTACHING,i.default.MEDIA_DETACHING,i.default.MANIFEST_PARSED,i.default.BUFFER_RESET,i.default.BUFFER_APPENDING,i.default.BUFFER_CODECS,i.default.BUFFER_EOS,i.default.BUFFER_FLUSHING,i.default.LEVEL_PTS_UPDATED,i.default.LEVEL_UPDATED)||this;return n._msDuration=null,n._levelDuration=null,n._levelTargetDuration=10,n._live=null,n._objectUrl=null,n.bufferCodecEventsExpected=0,n.onsbue=n.onSBUpdateEnd.bind(n),n.onsbe=n.onSBUpdateError.bind(n),n.pendingTracks={},n.tracks={},n}return o(n,t),n.prototype.destroy=function(){s.default.prototype.destroy.call(this)},n.prototype.onLevelPtsUpdated=function(e){var t=e.type,n=this.tracks.audio;if("audio"===t&&n&&"audio/mpeg"===n.container){var r=this.sourceBuffer.audio;if(Math.abs(r.timestampOffset-e.start)>.1){var o=r.updating;try{r.abort()}catch(e){a.logger.warn("can not abort audio buffer: "+e)}o?this.audioTimestampOffset=e.start:(a.logger.warn("change mpeg audio timestamp offset from "+r.timestampOffset+" to "+e.start),r.timestampOffset=e.start)}}},n.prototype.onManifestParsed=function(e){this.bufferCodecEventsExpected=e.altAudio?2:1,a.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},n.prototype.onMediaAttaching=function(e){var t=this.media=e.media;if(t){var n=this.mediaSource=new l;this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),n.addEventListener("sourceopen",this.onmso),n.addEventListener("sourceended",this.onmse),n.addEventListener("sourceclose",this.onmsc),t.src=window.URL.createObjectURL(n),this._objectUrl=t.src}},n.prototype.onMediaDetaching=function(){a.logger.log("media source detaching");var e=this.mediaSource;if(e){if("open"===e.readyState)try{e.endOfStream()}catch(e){a.logger.warn("onMediaDetaching:"+e.message+" while calling endOfStream")}e.removeEventListener("sourceopen",this.onmso),e.removeEventListener("sourceended",this.onmse),e.removeEventListener("sourceclose",this.onmsc),this.media&&(window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):a.logger.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(i.default.MEDIA_DETACHED)},n.prototype.onMediaSourceOpen=function(){a.logger.log("media source opened"),this.hls.trigger(i.default.MEDIA_ATTACHED,{media:this.media});var e=this.mediaSource;e&&e.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()},n.prototype.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.pendingTracks,n=Object.keys(t).length;(n&&!e||2===n)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())},n.prototype.onMediaSourceClose=function(){a.logger.log("media source closed")},n.prototype.onMediaSourceEnded=function(){a.logger.log("media source ended")},n.prototype.onSBUpdateEnd=function(){if(this.audioTimestampOffset){var e=this.sourceBuffer.audio;a.logger.warn("change mpeg audio timestamp offset from "+e.timestampOffset+" to "+this.audioTimestampOffset),e.timestampOffset=this.audioTimestampOffset,delete this.audioTimestampOffset}this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1;var t=this.parent,n=this.segments.reduce((function(e,n){return n.parent===t?e+1:e}),0),r={},o=this.sourceBuffer;for(var s in o)r[s]=o[s].buffered;this.hls.trigger(i.default.BUFFER_APPENDED,{parent:t,pending:n,timeRanges:r}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration(),0===n&&this.flushLiveBackBuffer()},n.prototype.onSBUpdateError=function(e){a.logger.error("sourceBuffer error:",e),this.hls.trigger(i.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})},n.prototype.onBufferReset=function(){var e=this.sourceBuffer;for(var t in e){var n=e[t];try{this.mediaSource.removeSourceBuffer(n),n.removeEventListener("updateend",this.onsbue),n.removeEventListener("error",this.onsbe)}catch(e){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},n.prototype.onBufferCodecs=function(e){var t=this;if(!Object.keys(this.sourceBuffer).length){Object.keys(e).forEach((function(n){t.pendingTracks[n]=e[n]}));var n=this.mediaSource;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),n&&"open"===n.readyState&&this.checkPendingTracks()}},n.prototype.createSourceBuffers=function(e){var t=this.sourceBuffer,n=this.mediaSource;for(var r in e)if(!t[r]){var o=e[r],s=o.levelCodec||o.codec,l=o.container+";codecs="+s;a.logger.log("creating sourceBuffer("+l+")");try{var c=t[r]=n.addSourceBuffer(l);c.addEventListener("updateend",this.onsbue),c.addEventListener("error",this.onsbe),this.tracks[r]={codec:s,container:o.container},o.buffer=c}catch(e){a.logger.error("error while trying to add sourceBuffer:"+e.message),this.hls.trigger(i.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:e,mimeType:l})}}this.hls.trigger(i.default.BUFFER_CREATED,{tracks:e})},n.prototype.onBufferAppending=function(e){this._needsFlush||(this.segments?this.segments.push(e):this.segments=[e],this.doAppending())},n.prototype.onBufferAppendFail=function(e){a.logger.error("sourceBuffer error:",e.event),this.hls.trigger(i.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})},n.prototype.onBufferEos=function(e){var t=this.sourceBuffer,n=e.type;for(var r in t)n&&r!==n||t[r].ended||(t[r].ended=!0,a.logger.log(r+" sourceBuffer now EOS"));this.checkEos()},n.prototype.checkEos=function(){var e=this.sourceBuffer,t=this.mediaSource;if(t&&"open"===t.readyState){for(var n in e){var r=e[n];if(!r.ended)return;if(r.updating)return void(this._needsEos=!0)}a.logger.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{t.endOfStream()}catch(e){a.logger.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1}else this._needsEos=!1},n.prototype.onBufferFlushing=function(e){this.flushRange.push({start:e.startOffset,end:e.endOffset,type:e.type}),this.flushBufferCounter=0,this.doFlush()},n.prototype.flushLiveBackBuffer=function(){if(this._live){var e=this.hls.config.liveBackBufferLength;if(isFinite(e)&&!(e<0))for(var t=this.media.currentTime,n=this.sourceBuffer,r=Object.keys(n),o=t-Math.max(e,this._levelTargetDuration),i=r.length-1;i>=0;i--){var s=r[i],a=n[s].buffered;a.length>0&&o>a.start(0)&&this.removeBufferRange(s,n[s],0,o)}}},n.prototype.onLevelUpdated=function(e){var t=e.details;t.fragments.length>0&&(this._levelDuration=t.totalduration+t.fragments[0].start,this._levelTargetDuration=t.averagetargetduration||t.targetduration||10,this._live=t.live,this.updateMediaElementDuration())},n.prototype.updateMediaElementDuration=function(){var t,n=this.hls.config;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var r in this.sourceBuffer)if(!0===this.sourceBuffer[r].updating)return;t=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===n.liveDurationInfinity?(a.logger.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>t||!e.isFinite(t))&&(a.logger.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},n.prototype.doFlush=function(){for(;this.flushRange.length;){var e=this.flushRange[0];if(!this.flushBuffer(e.start,e.end,e.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var t=0,n=this.sourceBuffer;try{for(var r in n)t+=n[r].buffered.length}catch(e){a.logger.error("error while accessing sourceBuffer.buffered")}this.appended=t,this.hls.trigger(i.default.BUFFER_FLUSHED)}},n.prototype.doAppending=function(){var e=this.hls,t=this.segments,n=this.sourceBuffer;if(Object.keys(n).length){if(this.media.error)return this.segments=[],void a.logger.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(t&&t.length){var r=t.shift();try{var o=n[r.type];o?o.updating?t.unshift(r):(o.ended=!1,this.parent=r.parent,o.appendBuffer(r.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(n){a.logger.error("error while trying to append buffer:"+n.message),t.unshift(r);var s={type:u.ErrorTypes.MEDIA_ERROR,parent:r.parent};22!==n.code?(this.appendError?this.appendError++:this.appendError=1,s.details=u.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>e.config.appendErrorMaxRetry?(a.logger.log("fail "+e.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],s.fatal=!0,e.trigger(i.default.ERROR,s)):(s.fatal=!1,e.trigger(i.default.ERROR,s))):(this.segments=[],s.details=u.ErrorDetails.BUFFER_FULL_ERROR,s.fatal=!1,e.trigger(i.default.ERROR,s))}}}},n.prototype.flushBuffer=function(e,t,n){var r,o=this.sourceBuffer;if(Object.keys(o).length){if(a.logger.log("flushBuffer,pos/start/end: "+this.media.currentTime.toFixed(3)+"/"+e+"/"+t),this.flushBufferCounter.5)return a.logger.log("sb remove "+e+" ["+u+","+l+"], of ["+i+","+s+"], pos:"+this.media.currentTime),t.remove(u,l),!0}}catch(e){a.logger.warn("removeBufferRange failed",e)}return!1},n}(s.default);t.default=c}).call(this,n("./src/polyfills/number.js").Number)},"./src/controller/cap-level-controller.js":function(e,t,n){"use strict";(function(e){var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n("./src/events.js"),s=function(t){function n(n){var r=t.call(this,n,i.default.FPS_DROP_LEVEL_CAPPING,i.default.MEDIA_ATTACHING,i.default.MANIFEST_PARSED,i.default.BUFFER_CODECS,i.default.MEDIA_DETACHING)||this;return r.autoLevelCapping=e.POSITIVE_INFINITY,r.firstLevel=null,r.levels=[],r.media=null,r.restrictedLevels=[],r.timer=null,r}return o(n,t),n.prototype.destroy=function(){this.hls.config.capLevelToPlayerSize&&(this.media=null,this._stopCapping())},n.prototype.onFpsDropLevelCapping=function(e){n.isLevelAllowed(e.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(e.droppedLevel)},n.prototype.onMediaAttaching=function(e){this.media=e.media instanceof window.HTMLVideoElement?e.media:null},n.prototype.onManifestParsed=function(e){var t=this.hls;this.restrictedLevels=[],this.levels=e.levels,this.firstLevel=e.firstLevel,t.config.capLevelToPlayerSize&&e.video&&this._startCapping()},n.prototype.onBufferCodecs=function(e){this.hls.config.capLevelToPlayerSize&&e.video&&this._startCapping()},n.prototype.onLevelsUpdated=function(e){this.levels=e.levels},n.prototype.onMediaDetaching=function(){this._stopCapping()},n.prototype.detectPlayerSize=function(){if(this.media){var e=this.levels?this.levels.length:0;if(e){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e-1),t.autoLevelCapping>this.autoLevelCapping&&t.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},n.prototype.getMaxLevel=function(e){var t=this;if(!this.levels)return-1;var r=this.levels.filter((function(r,o){return n.isLevelAllowed(o,t.restrictedLevels)&&o<=e}));return n.getMaxLevelByMediaSize(r,this.mediaWidth,this.mediaHeight)},n.prototype._startCapping=function(){this.timer||(this.autoLevelCapping=e.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},n.prototype._stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=e.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},Object.defineProperty(n.prototype,"mediaWidth",{get:function(){var e,t=this.media;return t&&(e=t.width||t.clientWidth||t.offsetWidth,e*=n.contentScaleFactor),e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"mediaHeight",{get:function(){var e,t=this.media;return t&&(e=t.height||t.clientHeight||t.offsetHeight,e*=n.contentScaleFactor),e},enumerable:!0,configurable:!0}),Object.defineProperty(n,"contentScaleFactor",{get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){}return e},enumerable:!0,configurable:!0}),n.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},n.getMaxLevelByMediaSize=function(e,t,n){if(!e||e&&!e.length)return-1;for(var r,o,i=e.length-1,s=0;s=t||a.height>=n)&&(r=a,!(o=e[s+1])||r.width!==o.width||r.height!==o.height)){i=s;break}}return i},n}(n("./src/event-handler.js").default);t.default=s}).call(this,n("./src/polyfills/number.js").Number)},"./src/controller/eme-controller.js":function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n("./src/event-handler.js"),s=n("./src/events.js"),a=n("./src/errors.js"),u=n("./src/utils/logger.js"),l=window.XMLHttpRequest,c="com.widevine.alpha",d=function(e){function t(t){var n=e.call(this,t,s.default.MEDIA_ATTACHED,s.default.MANIFEST_PARSED)||this;return n._widevineLicenseUrl=t.config.widevineLicenseUrl,n._licenseXhrSetup=t.config.licenseXhrSetup,n._emeEnabled=t.config.emeEnabled,n._requestMediaKeySystemAccess=t.config.requestMediaKeySystemAccessFunc,n._mediaKeysList=[],n._media=null,n._hasSetMediaKeys=!1,n._isMediaEncrypted=!1,n._requestLicenseFailureCount=0,n}return o(t,e),t.prototype.getLicenseServerUrl=function(e){var t;switch(e){case c:t=this._widevineLicenseUrl;break;default:t=null}return t||(u.logger.error('No license server URL configured for key-system "'+e+'"'),this.hls.trigger(s.default.ERROR,{type:a.ErrorTypes.KEY_SYSTEM_ERROR,details:a.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})),t},t.prototype._attemptKeySystemAccess=function(e,t,n){var r=this,o=function(e,t,n){switch(e){case c:return function(e,t,n){var r={videoCapabilities:[]};return t.forEach((function(e){r.videoCapabilities.push({contentType:'video/mp4; codecs="'+e+'"'})})),[r]}(0,n);default:throw Error("Unknown key-system: "+e)}}(e,0,n);o?(u.logger.log("Requesting encrypted media key-system access"),this.requestMediaKeySystemAccess(e,o).then((function(t){r._onMediaKeySystemAccessObtained(e,t)})).catch((function(t){u.logger.error('Failed to obtain key-system "'+e+'" access:',t)}))):u.logger.warn("Can not create config for key-system (maybe because platform is not supported):",e)},Object.defineProperty(t.prototype,"requestMediaKeySystemAccess",{get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess},enumerable:!0,configurable:!0}),t.prototype._onMediaKeySystemAccessObtained=function(e,t){var n=this;u.logger.log('Access for key-system "'+e+'" obtained');var r={mediaKeys:null,mediaKeysSession:null,mediaKeysSessionInitialized:!1,mediaKeySystemAccess:t,mediaKeySystemDomain:e};this._mediaKeysList.push(r),t.createMediaKeys().then((function(t){r.mediaKeys=t,u.logger.log('Media-keys created for key-system "'+e+'"'),n._onMediaKeysCreated()})).catch((function(e){u.logger.error("Failed to create media-keys:",e)}))},t.prototype._onMediaKeysCreated=function(){var e=this;this._mediaKeysList.forEach((function(t){t.mediaKeysSession||(t.mediaKeysSession=t.mediaKeys.createSession(),e._onNewMediaKeySession(t.mediaKeysSession))}))},t.prototype._onNewMediaKeySession=function(e){var t=this;u.logger.log("New key-system session "+e.sessionId),e.addEventListener("message",(function(n){t._onKeySessionMessage(e,n.message)}),!1)},t.prototype._onKeySessionMessage=function(e,t){u.logger.log("Got EME message event, creating license request"),this._requestLicense(t,(function(t){u.logger.log("Received license data, updating key-session"),e.update(t)}))},t.prototype._onMediaEncrypted=function(e,t){u.logger.log('Media is encrypted using "'+e+'" init data type'),this._isMediaEncrypted=!0,this._mediaEncryptionInitDataType=e,this._mediaEncryptionInitData=t,this._attemptSetMediaKeys(),this._generateRequestWithPreferredKeySession()},t.prototype._attemptSetMediaKeys=function(){if(!this._hasSetMediaKeys){var e=this._mediaKeysList[0];if(!e||!e.mediaKeys)return u.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(s.default.ERROR,{type:a.ErrorTypes.KEY_SYSTEM_ERROR,details:a.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});u.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(e.mediaKeys),this._hasSetMediaKeys=!0}},t.prototype._generateRequestWithPreferredKeySession=function(){var e=this,t=this._mediaKeysList[0];if(!t)return u.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(s.default.ERROR,{type:a.ErrorTypes.KEY_SYSTEM_ERROR,details:a.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(t.mediaKeysSessionInitialized)u.logger.warn("Key-Session already initialized but requested again");else{var n=t.mediaKeysSession;n||(u.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(s.default.ERROR,{type:a.ErrorTypes.KEY_SYSTEM_ERROR,details:a.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0}));var r=this._mediaEncryptionInitDataType,o=this._mediaEncryptionInitData;u.logger.log('Generating key-session request for "'+r+'" init data type'),t.mediaKeysSessionInitialized=!0,n.generateRequest(r,o).then((function(){u.logger.debug("Key-session generation succeeded")})).catch((function(t){u.logger.error("Error generating key-session request:",t),e.hls.trigger(s.default.ERROR,{type:a.ErrorTypes.KEY_SYSTEM_ERROR,details:a.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})}))}},t.prototype._createLicenseXhr=function(e,t,n){var r=new l,o=this._licenseXhrSetup;try{if(o)try{o(r,e)}catch(t){r.open("POST",e,!0),o(r,e)}r.readyState||r.open("POST",e,!0)}catch(e){return u.logger.error("Error setting up key-system license XHR",e),void this.hls.trigger(s.default.ERROR,{type:a.ErrorTypes.KEY_SYSTEM_ERROR,details:a.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}return r.responseType="arraybuffer",r.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,r,e,t,n),r},t.prototype._onLicenseRequestReadyStageChange=function(e,t,n,r){switch(e.readyState){case 4:if(200===e.status)this._requestLicenseFailureCount=0,u.logger.log("License request succeeded"),r(e.response);else{if(u.logger.error("License Request XHR failed ("+t+"). Status: "+e.status+" ("+e.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount<=3){var o=3-this._requestLicenseFailureCount+1;return u.logger.warn("Retrying license request, "+o+" attempts left"),void this._requestLicense(n,r)}this.hls.trigger(s.default.ERROR,{type:a.ErrorTypes.KEY_SYSTEM_ERROR,details:a.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}}},t.prototype._generateLicenseRequestChallenge=function(e,t){var n;return"com.microsoft.playready"===e.mediaKeySystemDomain?u.logger.error("PlayReady is not supported (yet)"):e.mediaKeySystemDomain===c?n=t:u.logger.error("Unsupported key-system:",e.mediaKeySystemDomain),n},t.prototype._requestLicense=function(e,t){u.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n)return u.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(s.default.ERROR,{type:a.ErrorTypes.KEY_SYSTEM_ERROR,details:a.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});var r=this.getLicenseServerUrl(n.mediaKeySystemDomain),o=this._createLicenseXhr(r,e,t);u.logger.log("Sending license request to URL: "+r),o.send(this._generateLicenseRequestChallenge(n,e))},t.prototype.onMediaAttached=function(e){var t=this;if(this._emeEnabled){var n=e.media;this._media=n,n.addEventListener("encrypted",(function(e){t._onMediaEncrypted(e.initDataType,e.initData)}))}},t.prototype.onManifestParsed=function(e){if(this._emeEnabled){var t=e.levels.map((function(e){return e.audioCodec})),n=e.levels.map((function(e){return e.videoCodec}));this._attemptKeySystemAccess(c,t,n)}},t}(i.default);t.default=d},"./src/controller/fps-controller.js":function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n("./src/events.js"),s=n("./src/event-handler.js"),a=n("./src/utils/logger.js"),u=window.performance,l=function(e){function t(t){return e.call(this,t,i.default.MEDIA_ATTACHING)||this}return o(t,e),t.prototype.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},t.prototype.onMediaAttaching=function(e){var t=this.hls.config;t.capLevelOnFPSDrop&&("function"==typeof(this.video=e.media instanceof window.HTMLVideoElement?e.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),t.fpsDroppedMonitoringPeriod))},t.prototype.checkFPS=function(e,t,n){var r=u.now();if(t){if(this.lastTime){var o=r-this.lastTime,s=n-this.lastDroppedFrames,l=t-this.lastDecodedFrames,c=1e3*s/o,d=this.hls;if(d.trigger(i.default.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:n}),c>0&&s>d.config.fpsDroppedMonitoringThreshold*l){var p=d.currentLevel;a.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+p),p>0&&(-1===d.autoLevelCapping||d.autoLevelCapping>=p)&&(p-=1,d.trigger(i.default.FPS_DROP_LEVEL_CAPPING,{level:p,droppedLevel:d.currentLevel}),d.autoLevelCapping=p,d.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=t}},t.prototype.checkFPSInterval=function(){var e=this.video;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},t}(s.default);t.default=l},"./src/controller/fragment-finders.js":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n("./src/utils/binary-search.js");function o(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0);var r=Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-r<=e?1:n.start-r>e&&n.start?-1:0}function i(e,t,n){var r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.endProgramDateTime-r>e}t.findFragmentByPDT=function(t,n,r){if(!Array.isArray(t)||!t.length||!e.isFinite(n))return null;if(n=t[t.length-1].endProgramDateTime)return null;r=r||0;for(var o=0;o=r&&t<=o){i.push({startPTS:Math.max(e,n.start(a)),endPTS:Math.min(t,n.end(a))});break}if(er)i.push({startPTS:Math.max(e,n.start(a)),endPTS:Math.min(t,n.end(a))}),s=!0;else if(t<=r)break}return{time:i,partial:s}},r.prototype.getFragmentKey=function(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn},r.prototype.getPartialFragment=function(e){var t,n,r,o=this,i=null,s=0;return Object.keys(this.fragments).forEach((function(a){var u=o.fragments[a];o.isPartial(u)&&(n=u.body.startPTS-o.bufferPadding,r=u.body.endPTS+o.bufferPadding,e>=n&&e<=r&&(t=Math.min(e-n,r-e),s<=t&&(i=u.body,s=t)))})),i},r.prototype.getState=function(e){var n=this.getFragmentKey(e),r=this.fragments[n],o=t.FragmentState.NOT_LOADED;return void 0!==r&&(o=r.buffered?!0===this.isPartial(r)?t.FragmentState.PARTIAL:t.FragmentState.OK:t.FragmentState.APPENDING),o},r.prototype.isPartial=function(e){return!0===e.buffered&&(void 0!==e.range.video&&!0===e.range.video.partial||void 0!==e.range.audio&&!0===e.range.audio.partial)},r.prototype.isTimeBuffered=function(e,t,n){for(var r,o,i=0;i=r&&t<=o)return!0;if(t<=r)return!1}return!1},r.prototype.onFragLoaded=function(t){var n=t.frag;e.isFinite(n.sn)&&!n.bitrateTest&&(this.fragments[this.getFragmentKey(n)]={body:n,range:Object.create(null),buffered:!1})},r.prototype.onBufferAppended=function(e){var t=this;this.timeRanges=e.timeRanges,Object.keys(this.timeRanges).forEach((function(e){var n=t.timeRanges[e];t.detectEvictedFragments(e,n)}))},r.prototype.onFragBuffered=function(e){this.detectPartialFragments(e.frag)},r.prototype.hasFragment=function(e){var t=this.getFragmentKey(e);return void 0!==this.fragments[t]},r.prototype.removeFragment=function(e){var t=this.getFragmentKey(e);delete this.fragments[t]},r.prototype.removeAllFragments=function(){this.fragments=Object.create(null)},r}(i.default);t.FragmentTracker=a}).call(this,n("./src/polyfills/number.js").Number)},"./src/controller/gap-controller.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./src/utils/buffer-helper.js"),o=n("./src/errors.js"),i=n("./src/events.js"),s=n("./src/utils/logger.js"),a=function(){function e(e,t,n,r){this.config=e,this.media=t,this.fragmentTracker=n,this.hls=r,this.stallReported=!1}return e.prototype.poll=function(e,t){var n=this.config,o=this.media,i=o.currentTime,a=window.performance.now();if(i!==e)return this.stallReported&&(s.logger.warn("playback not stuck anymore @"+i+", after "+Math.round(a-this.stalled)+"ms"),this.stallReported=!1),this.stalled=null,void(this.nudgeRetry=0);if(!(o.ended||!o.buffered.length||o.readyState>2||o.seeking&&r.BufferHelper.isBuffered(o,i))){var u=a-this.stalled,l=r.BufferHelper.bufferInfo(o,i,n.maxBufferHole);this.stalled?(u>=1e3&&this._reportStall(l.len),this._tryFixBufferStall(l,u)):this.stalled=a}},e.prototype._tryFixBufferStall=function(e,t){var n=this.config,r=this.fragmentTracker,o=this.media.currentTime,i=r.getPartialFragment(o);i&&this._trySkipBufferHole(i),e.len>.5&&t>1e3*n.highBufferWatchdogPeriod&&(this.stalled=null,this._tryNudgeBuffer())},e.prototype._reportStall=function(e){var t=this.hls,n=this.media;this.stallReported||(this.stallReported=!0,s.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer"),t.trigger(i.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e}))},e.prototype._trySkipBufferHole=function(e){for(var t=this.hls,n=this.media,r=n.currentTime,a=0,u=0;u=a&&r0){t=n[0].bitrate,n.sort((function(e,t){return e.bitrate-t.bitrate})),this._levels=n;for(var h=0;h=0&&e1&&d.loadError0){var t=this.currentLevelIndex,n=e.urlId,r=e.url[n];u.logger.log("Attempt loading level index "+t+" with URL-id "+n),this.hls.trigger(s.default.LEVEL_LOADING,{url:r,level:t,id:n})}}},Object.defineProperty(t.prototype,"nextLoadLevel",{get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)},enumerable:!0,configurable:!0}),t}(a.default));t.default=p},"./src/controller/level-helper.js":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n("./src/utils/logger.js");function o(t,n,o){var i=t[n],s=t[o],a=s.startPTS;e.isFinite(a)?o>n?(i.duration=a-i.start,i.duration<0&&r.logger.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):(s.duration=i.start-a,s.duration<0&&r.logger.warn("negative duration computed for frag "+s.sn+",level "+s.level+", there should be some duration drift between playlist and fragment!")):s.start=o>n?i.start+i.duration:Math.max(i.start-s.duration,0)}function i(t,n,r,i,s,a){var u=r;if(e.isFinite(n.startPTS)){var l=Math.abs(n.startPTS-r);e.isFinite(n.deltaPTS)?n.deltaPTS=Math.max(l,n.deltaPTS):n.deltaPTS=l,u=Math.max(r,n.startPTS),r=Math.min(r,n.startPTS),i=Math.max(i,n.endPTS),s=Math.min(s,n.startDTS),a=Math.max(a,n.endDTS)}var c=r-n.start;n.start=n.startPTS=r,n.maxStartPTS=u,n.endPTS=i,n.startDTS=s,n.endDTS=a,n.duration=i-r;var d,p,f,h=n.sn;if(!t||ht.endSN)return 0;for(d=h-t.startSN,(p=t.fragments)[d]=n,f=d;f>0;f--)o(p,f,f-1);for(f=d;fr.length))for(var i=0;i0&&-1===e&&(m.logger.log("override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=y.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this.forceStartLoad=!0,this.state=y.State.STOPPED},n.prototype.stopLoad=function(){this.forceStartLoad=!1,t.prototype.stopLoad.call(this)},n.prototype.doTick=function(){switch(this.state){case y.State.BUFFER_FLUSHING:this.fragLoadError=0;break;case y.State.IDLE:this._doTickIdle();break;case y.State.WAITING_LEVEL:var e=this.levels[this.level];e&&e.details&&(this.state=y.State.IDLE);break;case y.State.FRAG_LOADING_WAITING_RETRY:var t=window.performance.now(),n=this.retryDate;(!n||t>=n||this.media&&this.media.seeking)&&(m.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=y.State.IDLE);break;case y.State.ERROR:case y.State.STOPPED:case y.State.FRAG_LOADING:case y.State.PARSING:case y.State.PARSED:case y.State.ENDED:}this._checkBuffer(),this._checkFragmentChanged()},n.prototype._doTickIdle=function(){var e=this.hls,t=e.config,n=this.media;if(void 0!==this.levelLastLoaded&&(n||!this.startFragRequested&&t.startFragPrefetch)){var r;r=this.loadedmetadata?n.currentTime:this.nextLoadPosition;var o=e.nextLoadLevel,i=this.levels[o];if(i){var a,l=i.bitrate;a=l?Math.max(8*t.maxBufferSize/l,t.maxBufferLength):t.maxBufferLength,a=Math.min(a,t.maxMaxBufferLength);var c=s.BufferHelper.bufferInfo(this.mediaBuffer?this.mediaBuffer:n,r,t.maxBufferHole),d=c.len;if(!(d>=a)){m.logger.trace("buffer length of "+d.toFixed(3)+" is below max of "+a.toFixed(3)+". checking for more payload ..."),this.level=e.nextLoadLevel=o;var p=i.details;if(!p||p.live&&this.levelLastLoaded!==o)this.state=y.State.WAITING_LEVEL;else{if(this._streamEnded(c,p)){var f={};return this.altAudio&&(f.type="video"),this.hls.trigger(u.default.BUFFER_EOS,f),void(this.state=y.State.ENDED)}this._fetchPayloadOrEos(r,c,p)}}}}},n.prototype._fetchPayloadOrEos=function(e,t,n){var r=this.fragPrevious,o=this.level,i=n.fragments,s=i.length;if(0!==s){var a,u=i[0].start,l=i[s-1].start+i[s-1].duration,c=t.end;if(n.initSegment&&!n.initSegment.data)a=n.initSegment;else if(n.live){var d=this.config.initialLiveManifestSize;if(sp&&(c.currentTime=p),this.nextLoadPosition=p}if(e.PTSKnown&&t>r&&c&&c.readyState)return null;if(this.startFragRequested&&!e.PTSKnown){if(o)if(e.hasProgramDateTime)m.logger.log("live playlist, switching playlist, load frag with same PDT: "+o.programDateTime),u=v.findFragmentByPDT(s,o.endProgramDateTime,l.maxFragLookUpTolerance);else{var f=o.sn+1;if(f>=e.startSN&&f<=e.endSN){var h=s[f-e.startSN];o.cc===h.cc&&(u=h,m.logger.log("live playlist, switching playlist, load frag with next SN: "+u.sn))}u||(u=i.default.search(s,(function(e){return o.cc-e.cc})))&&m.logger.log("live playlist, switching playlist, load frag with same CC: "+u.sn)}u||(u=s[Math.min(a-1,Math.round(a/2))],m.logger.log("live playlist, switching playlist, unknown, load middle frag : "+u.sn))}return u},n.prototype._findFragment=function(e,t,n,r,o,i,s){var a,u=this.hls.config;if(oi-u.maxFragLookUpTolerance?0:u.maxFragLookUpTolerance;a=v.findFragmentByPTS(t,r,o,l)}else a=r[n-1];if(a){var c=a.sn-s.startSN,d=t&&a.level===t.level,p=r[c-1],f=r[c+1];if(t&&a.sn===t.sn)if(d&&!a.backtracked)if(a.snu.maxBufferHole&&t.dropped&&c?(a=p,m.logger.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this")):(a=f,m.logger.log("SN just loaded, load next one: "+a.sn,a))}else a=null;else a.backtracked&&(f&&f.backtracked?(m.logger.warn("Already backtracked from fragment "+f.sn+", will not backtrack to fragment "+a.sn+". Loading fragment "+f.sn),a=f):(m.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),a.dropped=0,p?(a=p).backtracked=!0:c&&(a=null)))}return a},n.prototype._loadKey=function(e){this.state=y.State.KEY_LOADING,this.hls.trigger(u.default.KEY_LOADING,{frag:e})},n.prototype._loadFragment=function(t){var n=this.fragmentTracker.getState(t);this.fragCurrent=t,this.startFragRequested=!0,e.isFinite(t.sn)&&!t.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),t.backtracked||n===l.FragmentState.NOT_LOADED||n===l.FragmentState.PARTIAL?(t.autoLevel=this.hls.autoLevelEnabled,t.bitrateTest=this.bitrateTest,this.hls.trigger(u.default.FRAG_LOADING,{frag:t}),this.demuxer||(this.demuxer=new a.default(this.hls,"main")),this.state=y.State.FRAG_LOADING):n===l.FragmentState.APPENDING&&this._reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t)},Object.defineProperty(n.prototype,"state",{get:function(){return this._state},set:function(e){if(this.state!==e){var t=this.state;this._state=e,m.logger.log("main stream:"+t+"->"+e),this.hls.trigger(u.default.STREAM_STATE_TRANSITION,{previousState:t,nextState:e})}},enumerable:!0,configurable:!0}),n.prototype.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,d.default.LevelType.MAIN)},Object.defineProperty(n.prototype,"currentLevel",{get:function(){var e=this.media;if(e){var t=this.getBufferedFrag(e.currentTime);if(t)return t.level}return-1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"nextBufferedFrag",{get:function(){var e=this.media;return e?this.followingBufferedFrag(this.getBufferedFrag(e.currentTime)):null},enumerable:!0,configurable:!0}),n.prototype.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.endPTS+.5):null},Object.defineProperty(n.prototype,"nextLevel",{get:function(){var e=this.nextBufferedFrag;return e?e.level:-1},enumerable:!0,configurable:!0}),n.prototype._checkFragmentChanged=function(){var e,t,n=this.media;if(n&&n.readyState&&!1===n.seeking&&((t=n.currentTime)>this.lastCurrentTime&&(this.lastCurrentTime=t),s.BufferHelper.isBuffered(n,t)?e=this.getBufferedFrag(t):s.BufferHelper.isBuffered(n,t+.1)&&(e=this.getBufferedFrag(t+.1)),e)){var r=e;if(r!==this.fragPlaying){this.hls.trigger(u.default.FRAG_CHANGED,{frag:r});var o=r.level;this.fragPlaying&&this.fragPlaying.level===o||this.hls.trigger(u.default.LEVEL_SWITCHED,{level:o}),this.fragPlaying=r}}},n.prototype.immediateLevelSwitch=function(){if(m.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var t=this.media,n=void 0;t?(n=t.paused,t.pause()):n=!0,this.previouslyPaused=n}var r=this.fragCurrent;r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,e.POSITIVE_INFINITY)},n.prototype.immediateLevelSwitchEnd=function(){var e=this.media;e&&e.buffered.length&&(this.immediateSwitch=!1,s.BufferHelper.isBuffered(e,e.currentTime)&&(e.currentTime-=1e-4),this.previouslyPaused||e.play())},n.prototype.nextLevelSwitch=function(){var t=this.media;if(t&&t.readyState){var n,r=void 0,o=void 0;if((n=this.getBufferedFrag(t.currentTime))&&n.startPTS>1&&this.flushMainBuffer(0,n.startPTS-1),t.paused)r=0;else{var i=this.hls.nextLoadLevel,s=this.levels[i],a=this.fragLastKbps;r=a&&this.fragCurrent?this.fragCurrent.duration*s.bitrate/(1e3*a)+1:0}if((o=this.getBufferedFrag(t.currentTime+r))&&(o=this.followingBufferedFrag(o))){var u=this.fragCurrent;u&&u.loader&&u.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(o.maxStartPTS,e.POSITIVE_INFINITY)}}},n.prototype.flushMainBuffer=function(e,t){this.state=y.State.BUFFER_FLUSHING;var n={startOffset:e,endOffset:t};this.altAudio&&(n.type="video"),this.hls.trigger(u.default.BUFFER_FLUSHING,n)},n.prototype.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("seeked",this.onvseeked),t.addEventListener("ended",this.onvended);var n=this.config;this.levels&&n.autoStartLoad&&this.hls.startLoad(n.startPosition),this.gapController=new b.default(n,t,this.fragmentTracker,this.hls)},n.prototype.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(m.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.levels;t&&t.forEach((function(e){e.details&&e.details.fragments.forEach((function(e){e.backtracked=void 0}))})),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("seeked",this.onvseeked),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},n.prototype.onMediaSeeked=function(){var t=this.media,n=t?t.currentTime:void 0;e.isFinite(n)&&m.logger.log("media seeked to "+n.toFixed(3)),this.tick()},n.prototype.onManifestLoading=function(){m.logger.log("trigger BUFFER_RESET"),this.hls.trigger(u.default.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},n.prototype.onManifestParsed=function(e){var t,n=!1,r=!1;e.levels.forEach((function(e){(t=e.audioCodec)&&(-1!==t.indexOf("mp4a.40.2")&&(n=!0),-1!==t.indexOf("mp4a.40.5")&&(r=!0))})),this.audioCodecSwitch=n&&r,this.audioCodecSwitch&&m.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startFragRequested=!1;var o=this.config;(o.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(o.startPosition)},n.prototype.onLevelLoaded=function(t){var n=t.details,r=t.level,o=this.levels[this.levelLastLoaded],i=this.levels[r],s=n.totalduration,a=0;if(m.logger.log("level "+r+" loaded ["+n.startSN+","+n.endSN+"],duration:"+s),n.live){var l=i.details;l&&n.fragments.length>0?(p.mergeDetails(l,n),a=n.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(a,l),n.PTSKnown&&e.isFinite(a)?m.logger.log("live playlist sliding:"+a.toFixed(3)):(m.logger.log("live playlist - outdated PTS, unknown sliding"),g.alignStream(this.fragPrevious,o,n))):(m.logger.log("live playlist - first load, unknown sliding"),n.PTSKnown=!1,g.alignStream(this.fragPrevious,o,n))}else n.PTSKnown=!1;if(i.details=n,this.levelLastLoaded=r,this.hls.trigger(u.default.LEVEL_UPDATED,{details:n,level:r}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var c=n.startTimeOffset;e.isFinite(c)?(c<0&&(m.logger.log("negative start time offset "+c+", count from end of last fragment"),c=a+s+c),m.logger.log("start time offset found in playlist, adjust startPosition to "+c),this.startPosition=c):n.live?(this.startPosition=this.computeLivePosition(a,n),m.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===y.State.WAITING_LEVEL&&(this.state=y.State.IDLE),this.tick()},n.prototype.onKeyLoaded=function(){this.state===y.State.KEY_LOADING&&(this.state=y.State.IDLE,this.tick())},n.prototype.onFragLoaded=function(e){var t=this.fragCurrent,n=this.hls,r=this.levels,o=this.media,i=e.frag;if(this.state===y.State.FRAG_LOADING&&t&&"main"===i.type&&i.level===t.level&&i.sn===t.sn){var s=e.stats,l=r[t.level],c=l.details;if(this.bitrateTest=!1,this.stats=s,m.logger.log("Loaded "+t.sn+" of ["+c.startSN+" ,"+c.endSN+"],level "+t.level),i.bitrateTest&&n.nextLoadLevel)this.state=y.State.IDLE,this.startFragRequested=!1,s.tparsed=s.tbuffered=window.performance.now(),n.trigger(u.default.FRAG_BUFFERED,{stats:s,frag:t,id:"main"}),this.tick();else if("initSegment"===i.sn)this.state=y.State.IDLE,s.tparsed=s.tbuffered=window.performance.now(),c.initSegment.data=e.payload,n.trigger(u.default.FRAG_BUFFERED,{stats:s,frag:t,id:"main"}),this.tick();else{m.logger.log("Parsing "+t.sn+" of ["+c.startSN+" ,"+c.endSN+"],level "+t.level+", cc "+t.cc),this.state=y.State.PARSING,this.pendingBuffering=!0,this.appended=!1,i.bitrateTest&&(i.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:i}));var d=!(o&&o.seeking)&&(c.PTSKnown||!c.live),p=c.initSegment?c.initSegment.data:[],f=this._getAudioCodec(l);(this.demuxer=this.demuxer||new a.default(this.hls,"main")).push(e.payload,p,f,l.videoCodec,t,c.totalduration,d)}}this.fragLoadError=0},n.prototype.onFragParsingInitSegment=function(e){var t=this.fragCurrent,n=e.frag;if(t&&"main"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===y.State.PARSING){var r=e.tracks,o=void 0,i=void 0;if(r.audio&&this.altAudio&&delete r.audio,i=r.audio){var s=this.levels[this.level].audioCodec,a=navigator.userAgent.toLowerCase();s&&this.audioCodecSwap&&(m.logger.log("swapping playlist audio codec"),s=-1!==s.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==i.metadata.channelCount&&-1===a.indexOf("firefox")&&(s="mp4a.40.5"),-1!==a.indexOf("android")&&"audio/mpeg"!==i.container&&(s="mp4a.40.2",m.logger.log("Android: force audio codec to "+s)),i.levelCodec=s,i.id=e.id}for(o in(i=r.video)&&(i.levelCodec=this.levels[this.level].videoCodec,i.id=e.id),this.hls.trigger(u.default.BUFFER_CODECS,r),r){i=r[o],m.logger.log("main track:"+o+",container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var l=i.initSegment;l&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(u.default.BUFFER_APPENDING,{type:o,data:l,parent:"main",content:"initSegment"}))}this.tick()}},n.prototype.onFragParsingData=function(t){var n=this,r=this.fragCurrent,o=t.frag;if(r&&"main"===t.id&&o.sn===r.sn&&o.level===r.level&&("audio"!==t.type||!this.altAudio)&&this.state===y.State.PARSING){var i=this.levels[this.level],s=r;if(e.isFinite(t.endPTS)||(t.endPTS=t.startPTS+r.duration,t.endDTS=t.startDTS+r.duration),!0===t.hasAudio&&s.addElementaryStream(c.default.ElementaryStreamTypes.AUDIO),!0===t.hasVideo&&s.addElementaryStream(c.default.ElementaryStreamTypes.VIDEO),m.logger.log("Parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb+",dropped:"+(t.dropped||0)),"video"===t.type)if(s.dropped=t.dropped,s.dropped)if(s.backtracked)m.logger.warn("Already backtracked on this fragment, appending with the gap",s.sn);else{var a=i.details;if(!a||s.sn!==a.startSN)return m.logger.warn("missing video frame(s), backtracking fragment",s.sn),this.fragmentTracker.removeFragment(s),s.backtracked=!0,this.nextLoadPosition=t.startPTS,this.state=y.State.IDLE,this.fragPrevious=s,void this.tick();m.logger.warn("missing video frame(s) on first frag, appending with gap",s.sn)}else s.backtracked=!1;var l=p.updateFragPTSDTS(i.details,s,t.startPTS,t.endPTS,t.startDTS,t.endDTS),d=this.hls;d.trigger(u.default.LEVEL_PTS_UPDATED,{details:i.details,level:this.level,drift:l,type:t.type,start:t.startPTS,end:t.endPTS}),[t.data1,t.data2].forEach((function(e){e&&e.length&&n.state===y.State.PARSING&&(n.appended=!0,n.pendingBuffering=!0,d.trigger(u.default.BUFFER_APPENDING,{type:t.type,data:e,parent:"main",content:"data"}))})),this.tick()}},n.prototype.onFragParsed=function(e){var t=this.fragCurrent,n=e.frag;t&&"main"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===y.State.PARSING&&(this.stats.tparsed=window.performance.now(),this.state=y.State.PARSED,this._checkAppendedParsed())},n.prototype.onAudioTrackSwitching=function(t){var n=!!t.url,r=t.id;if(!n){if(this.mediaBuffer!==this.media){m.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var o=this.fragCurrent;o.loader&&(m.logger.log("switching to main audio track, cancel main fragment load"),o.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=y.State.IDLE}var i=this.hls;i.trigger(u.default.BUFFER_FLUSHING,{startOffset:0,endOffset:e.POSITIVE_INFINITY,type:"audio"}),i.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:r}),this.altAudio=!1}},n.prototype.onAudioTrackSwitched=function(e){var t=e.id,n=!!this.hls.audioTracks[t].url;if(n){var r=this.videoBuffer;r&&this.mediaBuffer!==r&&(m.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=n,this.tick()},n.prototype.onBufferCreated=function(e){var t,n,r=e.tracks,o=!1;for(var i in r){var s=r[i];"main"===s.id?(n=i,t=s,"video"===i&&(this.videoBuffer=r[i].buffer)):o=!0}o&&t?(m.logger.log("alternate track found, use "+n+".buffered to schedule main fragment loading"),this.mediaBuffer=t.buffer):this.mediaBuffer=this.media},n.prototype.onBufferAppended=function(e){if("main"===e.parent){var t=this.state;t!==y.State.PARSING&&t!==y.State.PARSED||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},n.prototype._checkAppendedParsed=function(){if(!(this.state!==y.State.PARSED||this.appended&&this.pendingBuffering)){var e=this.fragCurrent;if(e){var t=this.mediaBuffer?this.mediaBuffer:this.media;m.logger.log("main buffered : "+f.default.toString(t.buffered)),this.fragPrevious=e;var n=this.stats;n.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*n.total/(n.tbuffered-n.tfirst)),this.hls.trigger(u.default.FRAG_BUFFERED,{stats:n,frag:e,id:"main"}),this.state=y.State.IDLE}this.tick()}},n.prototype.onError=function(t){var n=t.frag||this.fragCurrent;if(!n||"main"===n.type){var r=!!this.media&&s.BufferHelper.isBuffered(this.media,this.media.currentTime)&&s.BufferHelper.isBuffered(this.media,this.media.currentTime+.5);switch(t.details){case h.ErrorDetails.FRAG_LOAD_ERROR:case h.ErrorDetails.FRAG_LOAD_TIMEOUT:case h.ErrorDetails.KEY_LOAD_ERROR:case h.ErrorDetails.KEY_LOAD_TIMEOUT:if(!t.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var o=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);m.logger.warn("mediaController: frag loading failed, retry in "+o+" ms"),this.retryDate=window.performance.now()+o,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=y.State.FRAG_LOADING_WAITING_RETRY}else m.logger.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=y.State.ERROR;break;case h.ErrorDetails.LEVEL_LOAD_ERROR:case h.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==y.State.ERROR&&(t.fatal?(this.state=y.State.ERROR,m.logger.warn("streamController: "+t.details+",switch to "+this.state+" state ...")):t.levelRetry||this.state!==y.State.WAITING_LEVEL||(this.state=y.State.IDLE));break;case h.ErrorDetails.BUFFER_FULL_ERROR:"main"!==t.parent||this.state!==y.State.PARSING&&this.state!==y.State.PARSED||(r?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=y.State.IDLE):(m.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,e.POSITIVE_INFINITY)))}}},n.prototype._reduceMaxBufferLength=function(e){var t=this.config;return t.maxMaxBufferLength>=e&&(t.maxMaxBufferLength/=2,m.logger.warn("main:reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},n.prototype._checkBuffer=function(){var e=this.media;if(e&&0!==e.readyState){var t=(this.mediaBuffer?this.mediaBuffer:e).buffered;!this.loadedmetadata&&t.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,t)}},n.prototype.onFragLoadEmergencyAborted=function(){this.state=y.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},n.prototype.onBufferFlushed=function(){var e=this.mediaBuffer?this.mediaBuffer:this.media;e&&this.fragmentTracker.detectEvictedFragments(c.default.ElementaryStreamTypes.VIDEO,e.buffered),this.state=y.State.IDLE,this.fragPrevious=null},n.prototype.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},n.prototype.computeLivePosition=function(e,t){var n=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*t.targetduration;return e+Math.max(0,t.totalduration-n)},n.prototype._seekToStartPos=function(){var e=this.media,t=e.currentTime,n=e.seeking?t:this.startPosition;t!==n&&(m.logger.log("target start position not buffered, seek to buffered.start(0) "+n+" from current time "+t+" "),e.currentTime=n)},n.prototype._getAudioCodec=function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&(m.logger.log("swapping playlist audio codec"),t&&(t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),t},Object.defineProperty(n.prototype,"liveSyncPosition",{get:function(){return this._liveSyncPosition},set:function(e){this._liveSyncPosition=e},enumerable:!0,configurable:!0}),n}(y.default);t.default=_}).call(this,n("./src/polyfills/number.js").Number)},"./src/controller/subtitle-stream-controller.js":function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n("./src/events.js"),s=n("./src/utils/logger.js"),a=n("./src/crypt/decrypter.js"),u=n("./src/utils/buffer-helper.js"),l=n("./src/controller/fragment-finders.js"),c=n("./src/controller/fragment-tracker.js"),d=n("./src/controller/base-stream-controller.js"),p=n("./src/controller/level-helper.js"),f=window.performance,h=function(e){function t(t,n){var r=e.call(this,t,i.default.MEDIA_ATTACHED,i.default.MEDIA_DETACHING,i.default.ERROR,i.default.KEY_LOADED,i.default.FRAG_LOADED,i.default.SUBTITLE_TRACKS_UPDATED,i.default.SUBTITLE_TRACK_SWITCH,i.default.SUBTITLE_TRACK_LOADED,i.default.SUBTITLE_FRAG_PROCESSED,i.default.LEVEL_UPDATED)||this;return r.fragmentTracker=n,r.config=t.config,r.state=d.State.STOPPED,r.tracks=[],r.tracksBuffered=[],r.currentTrackId=-1,r.decrypter=new a.default(t,t.config),r.lastAVStart=0,r._onMediaSeeking=r.onMediaSeeking.bind(r),r}return o(t,e),t.prototype.onSubtitleFragProcessed=function(e){var t=e.frag,n=e.success;if(this.fragPrevious=t,this.state=d.State.IDLE,n){var r=this.tracksBuffered[this.currentTrackId];if(r){for(var o,i=t.start,s=0;s=r[s].start&&i<=r[s].end){o=r[s];break}var a=t.start+t.duration;o?o.end=a:(o={start:i,end:a},r.push(o))}}},t.prototype.onMediaAttached=function(e){var t=e.media;this.media=t,t.addEventListener("seeking",this._onMediaSeeking),this.state=d.State.IDLE},t.prototype.onMediaDetaching=function(){this.media.removeEventListener("seeking",this._onMediaSeeking),this.media=null,this.state=d.State.STOPPED},t.prototype.onError=function(e){var t=e.frag;t&&"subtitle"===t.type&&(this.state=d.State.IDLE)},t.prototype.onSubtitleTracksUpdated=function(e){var t=this;s.logger.log("subtitle tracks updated"),this.tracksBuffered=[],this.tracks=e.subtitleTracks,this.tracks.forEach((function(e){t.tracksBuffered[e.id]=[]}))},t.prototype.onSubtitleTrackSwitch=function(e){if(this.currentTrackId=e.id,this.tracks&&-1!==this.currentTrackId){var t=this.tracks[this.currentTrackId];t&&t.details&&this.setInterval(500)}else this.clearInterval()},t.prototype.onSubtitleTrackLoaded=function(e){var t=e.id,n=e.details,r=this.currentTrackId,o=this.tracks,i=o[r];t>=o.length||t!==r||!i||(n.live&&p.mergeSubtitlePlaylists(i.details,n,this.lastAVStart),i.details=n,this.setInterval(500))},t.prototype.onKeyLoaded=function(){this.state===d.State.KEY_LOADING&&(this.state=d.State.IDLE)},t.prototype.onFragLoaded=function(e){var t=this.fragCurrent,n=e.frag.decryptdata,r=e.frag,o=this.hls;if(this.state===d.State.FRAG_LOADING&&t&&"subtitle"===e.frag.type&&t.sn===e.frag.sn&&e.payload.byteLength>0&&n&&n.key&&"AES-128"===n.method){var s=f.now();this.decrypter.decrypt(e.payload,n.key.buffer,n.iv.buffer,(function(e){var t=f.now();o.trigger(i.default.FRAG_DECRYPTED,{frag:r,payload:e,stats:{tstart:s,tdecrypt:t}})}))}},t.prototype.onLevelUpdated=function(e){var t=e.details.fragments;this.lastAVStart=t.length?t[0].start:0},t.prototype.doTick=function(){if(this.media)switch(this.state){case d.State.IDLE:var e=this,t=e.config,n=e.currentTrackId,r=e.fragmentTracker,o=e.media,a=e.tracks;if(!a||!a[n]||!a[n].details)break;var p=t.maxBufferHole,f=t.maxFragLookUpTolerance,h=Math.min(t.maxBufferLength,t.maxMaxBufferLength),m=u.BufferHelper.bufferedInfo(this._getBuffered(),o.currentTime,p),g=m.end,v=m.len,b=a[n].details,y=b.fragments,_=y.length,j=y[_-1].start+y[_-1].duration;if(v>h)return;var w=void 0,S=this.fragPrevious;g=i.length||n!==o||!s||this.stopped)this._clearReloadTimer();else if(a.logger.log("subtitle track "+n+" loaded"),r.live){var l=u.computeReloadInterval(s.details,r,e.stats.trequest);a.logger.log("Reloading live subtitle playlist in "+l+"ms"),this.timer=setTimeout((function(){t._loadCurrentTrack()}),l)}else this._clearReloadTimer()},n.prototype.startLoad=function(){this.stopped=!1,this._loadCurrentTrack()},n.prototype.stopLoad=function(){this.stopped=!0,this._clearReloadTimer()},Object.defineProperty(n.prototype,"subtitleTracks",{get:function(){return this.tracks},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"subtitleTrack",{get:function(){return this.trackId},set:function(e){this.trackId!==e&&(this._toggleTrackModes(e),this._setSubtitleTrackInternal(e))},enumerable:!0,configurable:!0}),n.prototype._clearReloadTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},n.prototype._loadCurrentTrack=function(){var e=this.trackId,t=this.tracks,n=this.hls,r=t[e];e<0||!r||r.details&&!r.details.live||(a.logger.log("Loading subtitle track "+e),n.trigger(i.default.SUBTITLE_TRACK_LOADING,{url:r.url,id:e}))},n.prototype._toggleTrackModes=function(e){var t=this.media,n=this.subtitleDisplay,r=this.trackId;if(t){var o=c(t.textTracks);if(-1===e)[].slice.call(o).forEach((function(e){e.mode="disabled"}));else{var i=o[r];i&&(i.mode="disabled")}var s=o[e];s&&(s.mode=n?"showing":"hidden")}},n.prototype._setSubtitleTrackInternal=function(t){var n=this.hls,r=this.tracks;!e.isFinite(t)||t<-1||t>=r.length||(this.trackId=t,a.logger.log("Switching to subtitle track "+t),n.trigger(i.default.SUBTITLE_TRACK_SWITCH,{id:t}),this._loadCurrentTrack())},n.prototype._onTextTracksChanged=function(){if(this.media){for(var e=-1,t=c(this.media.textTracks),n=0;n=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],n),l=!0,p/(n-t)>.5))return}l||u.push([t,n]),this.Cues.newCue(this.captionsTracks[e],t,n,r)},n.prototype.onInitPtsFound=function(e){var t=this;if("main"===e.id&&(this.initPTS[e.frag.cc]=e.initPTS),this.unparsedVttFrags.length){var n=this.unparsedVttFrags;this.unparsedVttFrags=[],n.forEach((function(e){t.onFragLoaded(e)}))}},n.prototype.getExistingTrack=function(e){var t=this.media;if(t)for(var n=0;n>>8^255&g^99,e[f]=g,t[g]=f;var v=p[f],b=p[v],y=p[b],_=257*p[g]^16843008*g;r[f]=_<<24|_>>>8,o[f]=_<<16|_>>>16,i[f]=_<<8|_>>>24,s[f]=_,_=16843009*y^65537*b^257*v^16843008*f,u[g]=_<<24|_>>>8,l[g]=_<<16|_>>>16,c[g]=_<<8|_>>>24,d[g]=_,f?(f=v^p[p[p[y^v]]],h^=p[p[h]]):f=h=1}},e.prototype.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,r=0;r>>6),!((u=(60&t[n+2])>>>2)>h.length-1))return c=(1&t[n+2])<<2,c|=(192&t[n+3])>>>6,r.logger.log("manifest codec:"+s+",ADTS data:type:"+a+",sampleingIndex:"+u+"["+h[u]+"Hz],channelConfig:"+c),/firefox/i.test(p)?u>=6?(a=5,d=new Array(4),l=u-3):(a=2,d=new Array(2),l=u):-1!==p.indexOf("android")?(a=2,d=new Array(2),l=u):(a=5,d=new Array(4),s&&(-1!==s.indexOf("mp4a.40.29")||-1!==s.indexOf("mp4a.40.5"))||!s&&u>=6?l=u-3:((s&&-1!==s.indexOf("mp4a.40.2")&&(u>=6&&1===c||/vivaldi/i.test(p))||!s&&1===c)&&(a=2,d=new Array(2)),l=u)),d[0]=a<<3,d[0]|=(14&u)>>1,d[1]|=(1&u)<<7,d[1]|=c<<3,5===a&&(d[1]|=(14&l)>>1,d[2]=(1&l)<<7,d[2]|=8,d[3]=0),{config:d,samplerate:h[u],channelCount:c,codec:"mp4a.40."+a,manifestCodec:f};e.trigger(i.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+u})}function a(e,t){return 255===e[t]&&240==(246&e[t+1])}function u(e,t){return 1&e[t+1]?7:9}function l(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function c(e){return 9216e4/e}function d(e,t,n,r,o){var i,s,a=e.length;if(i=u(e,t),s=l(e,t),(s-=i)>0&&t+i+s<=a)return{headerLength:i,frameLength:s,stamp:n+r*o}}t.getAudioConfig=s,t.isHeaderPattern=a,t.getHeaderLength=u,t.getFullFrameLength=l,t.isHeader=function(e,t){return!!(t+10&&null!=t&&null!=t.key&&"AES-128"===t.method){var g=this.decrypter;null==g&&(g=this.decrypter=new s.default(this.observer,this.config));var v=r();g.decrypt(e,t.key.buffer,t.iv.buffer,(function(e){var s=r();m.observer.trigger(o.default.FRAG_DECRYPTED,{stats:{tstart:v,tdecrypt:s}}),m.pushDecrypted(new Uint8Array(e),t,new Uint8Array(n),i,a,u,l,c,d,p,f,h)}))}else this.pushDecrypted(new Uint8Array(e),t,new Uint8Array(n),i,a,u,l,c,d,p,f,h)},e.prototype.pushDecrypted=function(e,t,n,r,s,f,h,m,g,v,b,y){var _=this.demuxer;if(!_||(h||m)&&!this.probe(e)){for(var j=this.observer,w=this.typeSupported,S=this.config,x=[{demux:l.default,remux:d.default},{demux:u.default,remux:p.default},{demux:a.default,remux:d.default},{demux:c.default,remux:d.default}],T=0,A=x.length;Te?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},e.prototype.readBits=function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&r.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?n<>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},e.prototype.skipUEG=function(){this.skipBits(1+this.skipLZ())},e.prototype.skipEG=function(){this.skipBits(1+this.skipLZ())},e.prototype.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},e.prototype.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},e.prototype.readBoolean=function(){return 1===this.readBits(1)},e.prototype.readUByte=function(){return this.readBits(8)},e.prototype.readUShort=function(){return this.readBits(16)},e.prototype.readUInt=function(){return this.readBits(32)},e.prototype.skipScalingList=function(e){var t,n=8,r=8;for(t=0;t0)return t.subarray(r,r+o)},e._readSize=function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,(n|=(127&e[t+2])<<7)|127&e[t+3]},e.getTimeStamp=function(t){for(var n=e.getID3Frames(t),r=0;r>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:s+=String.fromCharCode(n);break;case 12:case 13:r=e[a++],s+=String.fromCharCode((31&n)<<6|63&r);break;case 14:r=e[a++],o=e[a++],s+=String.fromCharCode((15&n)<<12|(63&r)<<6|(63&o)<<0)}}return s},e}(),o=r._utf8ArrayToStr;t.utf8ArrayToStr=o,t.default=r},"./src/demux/mp3demuxer.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./src/demux/id3.js"),o=n("./src/utils/logger.js"),i=n("./src/demux/mpegaudio.js"),s=function(){function e(e,t,n){this.observer=e,this.config=n,this.remuxer=t}return e.prototype.resetInitSegment=function(e,t,n,r){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:t,duration:r,inputTimeScale:9e4}},e.prototype.resetTimeStamp=function(){},e.probe=function(e){var t,n,s=r.default.getID3Data(e,0);if(s&&void 0!==r.default.getTimeStamp(s))for(t=s.length,n=Math.min(e.length-1,t+100);t0},e.bin2str=function(e){return String.fromCharCode.apply(null,e)},e.readUint16=function(e,t){e.data&&(t+=e.start,e=e.data);var n=e[t]<<8|e[t+1];return n<0?65536+n:n},e.readUint32=function(e,t){e.data&&(t+=e.start,e=e.data);var n=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return n<0?4294967296+n:n},e.writeUint32=function(e,t,n){e.data&&(t+=e.start,e=e.data),e[t]=n>>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},e.findBox=function(t,n){var r,o,i,s,a,u,l=[];if(t.data?(a=t.start,i=t.end,t=t.data):(a=0,i=t.byteLength),!n.length)return null;for(r=a;r1?r+o:i,e.bin2str(t.subarray(r+4,r+8))===n[0]&&(1===n.length?l.push({data:t,start:r+8,end:u}):(s=e.findBox({data:t,start:r+8,end:u},n.slice(1))).length&&(l=l.concat(s))),r=u;return l},e.parseSegmentIndex=function(t){var n,r=e.findBox(t,["moov"])[0],o=r?r.end:null,i=0,s=e.findBox(t,["sidx"]);if(!s||!s[0])return null;n=[];var a=(s=s[0]).data[0];i=0===a?8:16;var u=e.readUint32(s,i);i+=4,i+=0===a?8:16,i+=2;var l=s.end+0,c=e.readUint16(s,i);i+=2;for(var d=0;d>>31)return void console.warn("SIDX has hierarchical references (not supported)");var m=e.readUint32(s,p);p+=4,n.push({referenceSize:h,subsegmentDuration:m,info:{duration:m/u,start:l,end:l+h-1}}),l+=h,i=p+=4}return{earliestPresentationTime:0,timescale:u,version:a,referencesCount:c,references:n,moovEndOffset:o}},e.parseInitSegment=function(t){var n=[];return e.findBox(t,["moov","trak"]).forEach((function(t){var o=e.findBox(t,["tkhd"])[0];if(o){var i=o.data[o.start],s=0===i?12:20,a=e.readUint32(o,s),u=e.findBox(t,["mdia","mdhd"])[0];if(u){s=0===(i=u.data[u.start])?12:20;var l=e.readUint32(u,s),c=e.findBox(t,["mdia","hdlr"])[0];if(c){var d={soun:"audio",vide:"video"}[e.bin2str(c.data.subarray(c.start+8,c.start+12))];if(d){var p=e.findBox(t,["mdia","minf","stbl","stsd"]);if(p.length){p=p[0];var f=e.bin2str(p.data.subarray(p.start+12,p.start+16));r.logger.log("MP4Demuxer:"+d+":"+f+" found")}n[a]={timescale:l,type:d},n[d]={timescale:l,id:a}}}}}})),n},e.getStartDTS=function(t,n){var r,o,i;return r=e.findBox(n,["moof","traf"]),o=[].concat.apply([],r.map((function(n){return e.findBox(n,["tfhd"]).map((function(r){var o,i;return o=e.readUint32(r,4),i=t[o].timescale||9e4,e.findBox(n,["tfdt"]).map((function(t){var n,r;return n=t.data[t.start],r=e.readUint32(t,4),1===n&&(r*=Math.pow(2,32),r+=e.readUint32(t,8)),r}))[0]/i}))}))),i=Math.min.apply(null,o),isFinite(i)?i:0},e.offsetStartDTS=function(t,n,r){e.findBox(n,["moof","traf"]).map((function(n){return e.findBox(n,["tfhd"]).map((function(o){var s=e.readUint32(o,4),a=t[s].timescale||9e4;e.findBox(n,["tfdt"]).map((function(t){var n=t.data[t.start],o=e.readUint32(t,4);if(0===n)e.writeUint32(t,4,o-r*a);else{o*=Math.pow(2,32),o+=e.readUint32(t,8),o-=r*a,o=Math.max(o,0);var s=Math.floor(o/(i+1)),u=Math.floor(o%(i+1));e.writeUint32(t,4,s),e.writeUint32(t,8,u)}}))}))}))},e.prototype.append=function(t,n,r,i){var s=this.initData;s||(this.resetInitSegment(t,this.audioCodec,this.videoCodec,!1),s=this.initData);var a,u=this.initPTS;if(void 0===u){var l=e.getStartDTS(s,t);this.initPTS=u=l-n,this.observer.trigger(o.default.INIT_PTS_FOUND,{initPTS:u})}e.offsetStartDTS(s,t,u),a=e.getStartDTS(s,t),this.remuxer.remux(s.audio,s.video,null,null,a,r,i,t)},e.prototype.destroy=function(){},e}();t.default=s},"./src/demux/mpegaudio.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(e,t,n,r,o){if(!(n+24>t.length)){var i=this.parseHeader(t,n);if(i&&n+i.frameLength<=t.length){var s=r+o*(9e4*i.samplesPerFrame/i.sampleRate),a={unit:t.subarray(n,n+i.frameLength),pts:s,dts:s};return e.config=[],e.channelCount=i.channelCount,e.samplerate=i.sampleRate,e.samples.push(a),e.len+=i.frameLength,{sample:a,length:i.frameLength}}}},parseHeader:function(e,t){var n=e[t+1]>>3&3,o=e[t+1]>>1&3,i=e[t+2]>>4&15,s=e[t+2]>>2&3,a=e[t+2]>>1&1;if(1!==n&&0!==i&&15!==i&&3!==s){var u=3===n?3-o:3===o?3:4,l=1e3*r.BitratesMap[14*u+i-1],c=3===n?0:2===n?1:2,d=r.SamplingRateMap[3*c+s],p=e[t+3]>>6==3?1:2,f=r.SamplesCoefficients[n][o],h=r.BytesInSlot[o],m=8*f*h;return{sampleRate:d,channelCount:p,frameLength:parseInt(f*l/d+a,10)*h,samplesPerFrame:m}}},isHeaderPattern:function(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])},isHeader:function(e,t){return!!(t+1=e.length)return void n();if(!(e[t].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(e,t,n,r),!r)return}}},e.prototype.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),r=0,o=32;o<=e.length-16;o+=160,r+=16)n.set(e.subarray(o,o+16),r);return n},e.prototype.getAvcDecryptedUnit=function(e,t){t=new Uint8Array(t);for(var n=0,r=32;r<=e.length-16;r+=160,n+=16)e.set(t.subarray(n,n+16),r);return e},e.prototype.decryptAvcSample=function(e,t,n,r,o,i){var s=this.discardEPB(o.data),a=this.getAvcEncryptedData(s),u=this;this.decryptBuffer(a.buffer,(function(a){o.data=u.getAvcDecryptedUnit(s,a),i||u.decryptAvcSamples(e,t,n+1,r)}))},e.prototype.decryptAvcSamples=function(e,t,n,r){for(;;t++,n=0){if(t>=e.length)return void r();for(var o=e[t].units;!(n>=o.length);n++){var i=o[n];if(!(i.length<=48||1!==i.type&&5!==i.type)){var s=this.decrypter.isSync();if(this.decryptAvcSample(e,t,n,r,i,s),!s)return}}}},e}();t.default=o},"./src/demux/tsdemuxer.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./src/demux/adts.js"),o=n("./src/demux/mpegaudio.js"),i=n("./src/events.js"),s=n("./src/demux/exp-golomb.js"),a=n("./src/demux/sample-aes.js"),u=n("./src/utils/logger.js"),l=n("./src/errors.js"),c={video:1,audio:2,id3:3,text:4},d=function(){function e(e,t,n,r){this.observer=e,this.config=n,this.typeSupported=r,this.remuxer=t,this.sampleAes=null}return e.prototype.setDecryptData=function(e){null!=e&&null!=e.key&&"SAMPLE-AES"===e.method?this.sampleAes=new a.default(this.observer,this.config,e,this.discardEPB):this.sampleAes=null},e.probe=function(t){var n=e._syncOffset(t);return!(n<0||(n&&u.logger.warn("MPEG2-TS detected but first sync word found @ offset "+n+", junk ahead ?"),0))},e._syncOffset=function(e){for(var t=Math.min(1e3,e.length-564),n=0;n>4>1){if((d=s+5+t[s+4])===s+188)continue}else d=s+4;switch(c){case y:a&&(S&&(p=k(S))&&void 0!==p.pts&&O(p,!1),S={data:[],size:0}),S&&(S.data.push(t.subarray(d,s+188)),S.size+=s+188-d);break;case _:a&&(x&&(p=k(x))&&void 0!==p.pts&&(v.isAAC?R(p):C(p)),x={data:[],size:0}),x&&(x.data.push(t.subarray(d,s+188)),x.size+=s+188-d);break;case j:a&&(T&&(p=k(T))&&void 0!==p.pts&&D(p),T={data:[],size:0}),T&&(T.data.push(t.subarray(d,s+188)),T.size+=s+188-d);break;case 0:a&&(d+=t[d]+1),w=this._pmtId=A(t,d);break;case w:a&&(d+=t[d]+1);var L=E(t,d,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(y=L.avc)>0&&(g.pid=y),(_=L.audio)>0&&(v.pid=_,v.isAAC=L.isAAC),(j=L.id3)>0&&(b.pid=j),h&&!m&&(u.logger.log("reparse from beginning"),h=!1,s=P-188),m=this.pmtParsed=!0;break;case 17:case 8191:break;default:h=!0}}else this.observer.trigger(i.default.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});S&&(p=k(S))&&void 0!==p.pts?(O(p,!0),g.pesData=null):g.pesData=S,x&&(p=k(x))&&void 0!==p.pts?(v.isAAC?R(p):C(p),v.pesData=null):(x&&x.size&&u.logger.log("last AAC PES packet truncated,might overlap between fragments"),v.pesData=x),T&&(p=k(T))&&void 0!==p.pts?(D(p),b.pesData=null):b.pesData=T,null==this.sampleAes?this.remuxer.remux(v,g,b,this._txtTrack,n,r,o):this.decryptAndRemux(v,g,b,this._txtTrack,n,r,o)},e.prototype.decryptAndRemux=function(e,t,n,r,o,i,s){if(e.samples&&e.isAAC){var a=this;this.sampleAes.decryptAacSamples(e.samples,0,(function(){a.decryptAndRemuxAvc(e,t,n,r,o,i,s)}))}else this.decryptAndRemuxAvc(e,t,n,r,o,i,s)},e.prototype.decryptAndRemuxAvc=function(e,t,n,r,o,i,s){if(t.samples){var a=this;this.sampleAes.decryptAvcSamples(t.samples,0,0,(function(){a.remuxer.remux(e,t,n,r,o,i,s)}))}else this.remuxer.remux(e,t,n,r,o,i,s)},e.prototype.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},e.prototype._parsePAT=function(e,t){return(31&e[t+10])<<8|e[t+11]},e.prototype._parsePMT=function(e,t,n,r){var o,i,s={audio:-1,avc:-1,id3:-1,isAAC:!0};for(o=t+3+((15&e[t+1])<<8|e[t+2])-4,t+=12+((15&e[t+10])<<8|e[t+11]);t1;){var p=new Uint8Array(d[0].length+d[1].length);p.set(d[0]),p.set(d[1],d[0].length),d[0]=p,d.splice(1,1)}if(1===((t=d[0])[0]<<16)+(t[1]<<8)+t[2]){if((r=(t[4]<<8)+t[5])&&r>e.size-6)return null;192&(n=t[7])&&((s=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2)>4294967295&&(s-=8589934592),64&n?((a=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>4294967295&&(a-=8589934592),s-a>54e5&&(u.logger.warn(Math.round((s-a)/9e4)+"s delta between PTS and DTS, align them"),s=a)):a=s),l=(o=t[8])+9,e.size-=l,i=new Uint8Array(e.size);for(var f=0,h=d.length;fm){l-=m;continue}t=t.subarray(l),m-=l,l=0}i.set(t,c),c+=m}return r&&(r-=o+3),{data:i,pts:s,dts:a,len:r}}return null},e.prototype.pushAccesUnit=function(e,t){if(e.units.length&&e.frame){var n=t.samples,r=n.length;!this.config.forceKeyFrameOnDiscontinuity||!0===e.key||t.sps&&(r||this.contiguous)?(e.id=r,n.push(e)):t.dropped++}e.debug.length&&u.logger.log(e.pts+"/"+e.dts+":"+e.debug)},e.prototype._parseAVCPES=function(e,t){var n,r,o,i=this,a=this._avcTrack,u=this._parseAVCNALu(e.data),l=this.avcSample,c=!1,d=this.pushAccesUnit.bind(this),p=function(e,t,n,r){return{key:e,pts:t,dts:n,units:[],debug:r}};e.data=null,l&&u.length&&!a.audFound&&(d(l,a),l=this.avcSample=p(!1,e.pts,e.dts,"")),u.forEach((function(t){switch(t.type){case 1:r=!0,l||(l=i.avcSample=p(!0,e.pts,e.dts,"")),l.frame=!0;var u=t.data;if(c&&u.length>4){var f=new s.default(u).readSliceType();2!==f&&4!==f&&7!==f&&9!==f||(l.key=!0)}break;case 5:r=!0,l||(l=i.avcSample=p(!0,e.pts,e.dts,"")),l.key=!0,l.frame=!0;break;case 6:r=!0,(n=new s.default(i.discardEPB(t.data))).readUByte();for(var h=0,m=0,g=!1,v=0;!g&&n.bytesAvailable>1;){h=0;do{h+=v=n.readUByte()}while(255===v);m=0;do{m+=v=n.readUByte()}while(255===v);if(4===h&&0!==n.bytesAvailable){if(g=!0,181===n.readUByte()&&49===n.readUShort()&&1195456820===n.readUInt()&&3===n.readUByte()){var b=n.readUByte(),y=31&b,_=[b,n.readUByte()];for(o=0;o0){if(t.pts>=e[n-1].pts)e.push(t);else for(var r=n-1;r>=0;r--)if(t.pts=0?(r={data:e.subarray(d,i-u-1),type:o},c.push(r)):(p=this._getLastNalUnit())&&(l&&i<=4-l&&p.state&&(p.data=p.data.subarray(0,p.data.byteLength-l)),(n=i-u-1)>0&&((f=new Uint8Array(p.data.byteLength+n)).set(p.data,0),f.set(e.subarray(0,n),p.data.byteLength),p.data=f)),i=0&&u>=0&&(r={data:e.subarray(d,s),type:o,state:u},c.push(r)),0===c.length&&(p=this._getLastNalUnit())&&((f=new Uint8Array(p.data.byteLength+e.byteLength)).set(p.data,0),f.set(e,p.data.byteLength),p.data=f),a.naluState=u,c},e.prototype.discardEPB=function(e){for(var t,n,r=e.byteLength,o=[],i=1;i1&&(u.logger.log("AAC: align PTS for overlapping frames by "+Math.round((b-p)/90)),p=b)}for(;ot)return r;return 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxAutoLevel",{get:function(){var e=this.levels,t=this.autoLevelCapping;return-1===t&&e&&e.length?e.length-1:t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextAutoLevel",{get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"audioTracks",{get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"audioTrack",{get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"liveSyncPosition",{get:function(){return this.streamController.liveSyncPosition},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subtitleTracks",{get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subtitleTrack",{get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subtitleDisplay",{get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)},enumerable:!0,configurable:!0}),t}(n("./src/observer.js").Observer);t.default=b},"./src/is-supported.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./src/utils/mediasource-helper.js");t.isSupported=function(){var e=r.getMediaSource(),t=window.SourceBuffer||window.WebKitSourceBuffer,n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),o=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!n&&!!o}},"./src/loader/fragment-loader.js":function(e,t,n){"use strict";(function(e){var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n("./src/events.js"),s=n("./src/event-handler.js"),a=n("./src/errors.js"),u=n("./src/utils/logger.js"),l=function(t){function n(e){var n=t.call(this,e,i.default.FRAG_LOADING)||this;return n.loaders={},n}return o(n,t),n.prototype.destroy=function(){var e=this.loaders;for(var n in e){var r=e[n];r&&r.destroy()}this.loaders={},t.prototype.destroy.call(this)},n.prototype.onFragLoading=function(t){var n=t.frag,r=n.type,o=this.loaders,i=this.hls.config,s=i.fLoader,a=i.loader;n.loaded=0;var l,c,d,p=o[r];p&&(u.logger.warn("abort previous fragment loader for type: "+r),p.abort()),p=o[r]=n.loader=i.fLoader?new s(i):new a(i),l={url:n.url,frag:n,responseType:"arraybuffer",progressData:!1};var f=n.byteRangeStartOffset,h=n.byteRangeEndOffset;e.isFinite(f)&&e.isFinite(h)&&(l.rangeStart=f,l.rangeEnd=h),c={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:i.fragLoadingMaxRetryTimeout},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},p.load(l,c,d)},n.prototype.loadsuccess=function(e,t,n,r){void 0===r&&(r=null);var o=e.data,s=n.frag;s.loader=void 0,this.loaders[s.type]=void 0,this.hls.trigger(i.default.FRAG_LOADED,{payload:o,frag:s,stats:t,networkDetails:r})},n.prototype.loaderror=function(e,t,n){void 0===n&&(n=null);var r=t.frag,o=r.loader;o&&o.abort(),this.loaders[r.type]=void 0,this.hls.trigger(i.default.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t.frag,response:e,networkDetails:n})},n.prototype.loadtimeout=function(e,t,n){void 0===n&&(n=null);var r=t.frag,o=r.loader;o&&o.abort(),this.loaders[r.type]=void 0,this.hls.trigger(i.default.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t.frag,networkDetails:n})},n.prototype.loadprogress=function(e,t,n,r){void 0===r&&(r=null);var o=t.frag;o.loaded=e.loaded,this.hls.trigger(i.default.FRAG_LOAD_PROGRESS,{frag:o,stats:e,networkDetails:r})},n}(s.default);t.default=l}).call(this,n("./src/polyfills/number.js").Number)},"./src/loader/fragment.js":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n("./node_modules/url-toolkit/src/url-toolkit.js"),o=n("./src/loader/level-key.js"),i=function(){function t(){var e;this._url=null,this._byteRange=null,this._decryptdata=null,this.tagList=[],this.programDateTime=null,this.rawProgramDateTime=null,this._elementaryStreams=((e={})[t.ElementaryStreamTypes.AUDIO]=!1,e[t.ElementaryStreamTypes.VIDEO]=!1,e)}return Object.defineProperty(t,"ElementaryStreamTypes",{get:function(){return{AUDIO:"audio",VIDEO:"video"}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return!this._url&&this.relurl&&(this._url=r.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(e){this._url=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"byteRange",{get:function(){if(!this._byteRange&&!this.rawByteRange)return[];if(this._byteRange)return this._byteRange;var e=[];if(this.rawByteRange){var t=this.rawByteRange.split("@",2);if(1===t.length){var n=this.lastByteRangeEndOffset;e[0]=n||0}else e[0]=parseInt(t[1]);e[1]=parseInt(t[0])+e[0],this._byteRange=e}return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"byteRangeStartOffset",{get:function(){return this.byteRange[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"byteRangeEndOffset",{get:function(){return this.byteRange[1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"decryptdata",{get:function(){return this._decryptdata||(this._decryptdata=this.fragmentDecryptdataFromLevelkey(this.levelkey,this.sn)),this._decryptdata},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"endProgramDateTime",{get:function(){if(!e.isFinite(this.programDateTime))return null;var t=e.isFinite(this.duration)?this.duration:0;return this.programDateTime+1e3*t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"encrypted",{get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)},enumerable:!0,configurable:!0}),t.prototype.addElementaryStream=function(e){this._elementaryStreams[e]=!0},t.prototype.hasElementaryStream=function(e){return!0===this._elementaryStreams[e]},t.prototype.createInitializationVector=function(e){for(var t=new Uint8Array(16),n=12;n<16;n++)t[n]=e>>8*(15-n)&255;return t},t.prototype.fragmentDecryptdataFromLevelkey=function(e,t){var n=e;return e&&e.method&&e.uri&&!e.iv&&((n=new o.default).method=e.method,n.baseuri=e.baseuri,n.reluri=e.reluri,n.iv=this.createInitializationVector(t)),n},t}();t.default=i}).call(this,n("./src/polyfills/number.js").Number)},"./src/loader/key-loader.js":function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n("./src/events.js"),s=n("./src/event-handler.js"),a=n("./src/errors.js"),u=n("./src/utils/logger.js"),l=function(e){function t(t){var n=e.call(this,t,i.default.KEY_LOADING)||this;return n.loaders={},n.decryptkey=null,n.decrypturl=null,n}return o(t,e),t.prototype.destroy=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={},s.default.prototype.destroy.call(this)},t.prototype.onKeyLoading=function(e){var t=e.frag,n=t.type,r=this.loaders[n],o=t.decryptdata,s=o.uri;if(s!==this.decrypturl||null===this.decryptkey){var a,l,c,d=this.hls.config;r&&(u.logger.warn("abort previous key loader for type:"+n),r.abort()),t.loader=this.loaders[n]=new d.loader(d),this.decrypturl=s,this.decryptkey=null,a={url:s,frag:t,responseType:"arraybuffer"},l={timeout:d.fragLoadingTimeOut,maxRetry:0,retryDelay:d.fragLoadingRetryDelay,maxRetryDelay:d.fragLoadingMaxRetryTimeout},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},t.loader.load(a,l,c)}else this.decryptkey&&(o.key=this.decryptkey,this.hls.trigger(i.default.KEY_LOADED,{frag:t}))},t.prototype.loadsuccess=function(e,t,n){var r=n.frag;this.decryptkey=r.decryptdata.key=new Uint8Array(e.data),r.loader=void 0,this.loaders[r.type]=void 0,this.hls.trigger(i.default.KEY_LOADED,{frag:r})},t.prototype.loaderror=function(e,t){var n=t.frag,r=n.loader;r&&r.abort(),this.loaders[t.type]=void 0,this.hls.trigger(i.default.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:e})},t.prototype.loadtimeout=function(e,t){var n=t.frag,r=n.loader;r&&r.abort(),this.loaders[t.type]=void 0,this.hls.trigger(i.default.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},t}(s.default);t.default=l},"./src/loader/level-key.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./node_modules/url-toolkit/src/url-toolkit.js"),o=function(){function e(){this.method=null,this.key=null,this.iv=null,this._uri=null}return Object.defineProperty(e.prototype,"uri",{get:function(){return!this._uri&&this.reluri&&(this._uri=r.buildAbsoluteURL(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri},enumerable:!0,configurable:!0}),e}();t.default=o},"./src/loader/level.js":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function t(e){this.endCC=0,this.endSN=0,this.fragments=[],this.initSegment=null,this.live=!0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=e,this.version=null}return Object.defineProperty(t.prototype,"hasProgramDateTime",{get:function(){return!(!this.fragments[0]||!e.isFinite(this.fragments[0].programDateTime))},enumerable:!0,configurable:!0}),t}();t.default=n}).call(this,n("./src/polyfills/number.js").Number)},"./src/loader/m3u8-parser.js":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n("./node_modules/url-toolkit/src/url-toolkit.js"),o=n("./src/loader/fragment.js"),i=n("./src/loader/level.js"),s=n("./src/loader/level-key.js"),a=n("./src/utils/attr-list.js"),u=n("./src/utils/logger.js"),l=n("./src/utils/codecs.js"),c=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,d=/#EXT-X-MEDIA:(.*)/g,p=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),f=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,h=/\.(mp4|m4s|m4v|m4a)$/i,m=function(){function t(){}return t.findGroup=function(e,t){if(!e)return null;for(var n=null,r=0;r2?(t=n.shift()+".",t+=parseInt(n.shift()).toString(16),t+=("000"+parseInt(n.shift()).toString(16)).substr(-4)):t=e,t},t.resolve=function(e,t){return r.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,n){var r,o=[];function i(e,t){["video","audio"].forEach((function(n){var r=e.filter((function(e){return l.isCodecType(e,n)}));if(r.length){var o=r.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[n+"Codec"]=o.length>0?o[0]:r[0],e=e.filter((function(e){return-1===r.indexOf(e)}))}})),t.unknownCodecs=e}for(c.lastIndex=0;null!=(r=c.exec(e));){var s={},u=s.attrs=new a.default(r[1]);s.url=t.resolve(r[2],n);var d=u.decimalResolution("RESOLUTION");d&&(s.width=d.width,s.height=d.height),s.bitrate=u.decimalInteger("AVERAGE-BANDWIDTH")||u.decimalInteger("BANDWIDTH"),s.name=u.NAME,i([].concat((u.CODECS||"").split(/[ ,]+/)),s),s.videoCodec&&-1!==s.videoCodec.indexOf("avc1")&&(s.videoCodec=t.convertAVC1ToAVCOTI(s.videoCodec)),o.push(s)}return o},t.parseMasterPlaylistMedia=function(e,n,r,o){var i;void 0===o&&(o=[]);var s=[],u=0;for(d.lastIndex=0;null!==(i=d.exec(e));){var l={},c=new a.default(i[1]);if(c.TYPE===r){if(l.groupId=c["GROUP-ID"],l.name=c.NAME,l.type=r,l.default="YES"===c.DEFAULT,l.autoselect="YES"===c.AUTOSELECT,l.forced="YES"===c.FORCED,c.URI&&(l.url=t.resolve(c.URI,n)),l.lang=c.LANGUAGE,l.name||(l.name=l.lang),o.length){var p=t.findGroup(o,l.groupId);l.audioCodec=p?p.codec:o[0].codec}l.id=u++,s.push(l)}}return s},t.parseLevelPlaylist=function(t,n,r,l,c){var d,m,v=0,b=0,y=new i.default(n),_=new s.default,j=0,w=null,S=new o.default,x=null;for(p.lastIndex=0;null!==(d=p.exec(t));){var T=d[1];if(T){S.duration=parseFloat(T);var A=(" "+d[2]).slice(1);S.title=A||null,S.tagList.push(A?["INF",T,A]:["INF",T])}else if(d[3]){if(e.isFinite(S.duration)){var E=v++;S.type=l,S.start=b,S.levelkey=_,S.sn=E,S.level=r,S.cc=j,S.urlId=c,S.baseurl=n,S.relurl=(" "+d[3]).slice(1),g(S,w),y.fragments.push(S),w=S,b+=S.duration,S=new o.default}}else if(d[4]){if(S.rawByteRange=(" "+d[4]).slice(1),w){var k=w.byteRangeEndOffset;k&&(S.lastByteRangeEndOffset=k)}}else if(d[5])S.rawProgramDateTime=(" "+d[5]).slice(1),S.tagList.push(["PROGRAM-DATE-TIME",S.rawProgramDateTime]),null===x&&(x=y.fragments.length);else{for(d=d[0].match(f),m=1;m=0&&(_.method=P,_.baseuri=n,_.reluri=L,_.key=null,_.iv=I));break;case"START":var q=O,M=new a.default(q).decimalFloatingPoint("TIME-OFFSET");e.isFinite(M)&&(y.startTimeOffset=M);break;case"MAP":var N=new a.default(O);S.relurl=N.URI,S.rawByteRange=N.BYTERANGE,S.baseurl=n,S.level=r,S.type=l,S.sn="initSegment",y.initSegment=S,(S=new o.default).rawProgramDateTime=y.initSegment.rawProgramDateTime;break;default:u.logger.warn("line parsed but not handled: "+d)}}}return(S=w)&&!S.relurl&&(y.fragments.pop(),b-=S.duration),y.totalduration=b,y.averagetargetduration=b/y.fragments.length,y.endSN=v-1,y.startCC=y.fragments[0]?y.fragments[0].cc:0,y.endCC=j,!y.initSegment&&y.fragments.length&&y.fragments.every((function(e){return h.test(e.relurl)}))&&(u.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(S=new o.default).relurl=y.fragments[0].relurl,S.baseurl=n,S.level=r,S.type=l,S.sn="initSegment",y.initSegment=S,y.needSidxRanges=!0),x&&function(e,t){for(var n=e[t],r=t-1;r>=0;r--){var o=e[r];o.programDateTime=n.programDateTime-1e3*o.duration,n=o}}(y.fragments,x),y},t}();function g(t,n){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):n&&n.programDateTime&&(t.programDateTime=n.endProgramDateTime),e.isFinite(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}t.default=m}).call(this,n("./src/polyfills/number.js").Number)},"./src/loader/playlist-loader.js":function(e,t,n){"use strict";(function(e){var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n("./src/events.js"),s=n("./src/event-handler.js"),a=n("./src/errors.js"),u=n("./src/utils/logger.js"),l=n("./src/demux/mp4demuxer.js"),c=n("./src/loader/m3u8-parser.js"),d=window.performance,p={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},f={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"},h=function(t){function n(e){var n=t.call(this,e,i.default.MANIFEST_LOADING,i.default.LEVEL_LOADING,i.default.AUDIO_TRACK_LOADING,i.default.SUBTITLE_TRACK_LOADING)||this;return n.loaders={},n}return o(n,t),Object.defineProperty(n,"ContextType",{get:function(){return p},enumerable:!0,configurable:!0}),Object.defineProperty(n,"LevelType",{get:function(){return f},enumerable:!0,configurable:!0}),n.canHaveQualityLevels=function(e){return e!==p.AUDIO_TRACK&&e!==p.SUBTITLE_TRACK},n.mapContextToLevelType=function(e){switch(e.type){case p.AUDIO_TRACK:return f.AUDIO;case p.SUBTITLE_TRACK:return f.SUBTITLE;default:return f.MAIN}},n.getResponseUrl=function(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n},n.prototype.createInternalLoader=function(e){var t=this.hls.config,n=t.pLoader,r=t.loader,o=new(n||r)(t);return e.loader=o,this.loaders[e.type]=o,o},n.prototype.getInternalLoader=function(e){return this.loaders[e.type]},n.prototype.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},n.prototype.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},n.prototype.destroy=function(){this.destroyInternalLoaders(),t.prototype.destroy.call(this)},n.prototype.onManifestLoading=function(e){this.load(e.url,{type:p.MANIFEST,level:0,id:null})},n.prototype.onLevelLoading=function(e){this.load(e.url,{type:p.LEVEL,level:e.level,id:e.id})},n.prototype.onAudioTrackLoading=function(e){this.load(e.url,{type:p.AUDIO_TRACK,level:null,id:e.id})},n.prototype.onSubtitleTrackLoading=function(e){this.load(e.url,{type:p.SUBTITLE_TRACK,level:null,id:e.id})},n.prototype.load=function(e,t){var n=this.hls.config;u.logger.debug("Loading playlist of type "+t.type+", level: "+t.level+", id: "+t.id);var r,o,i,s,a=this.getInternalLoader(t);if(a){var l=a.context;if(l&&l.url===e)return u.logger.trace("playlist request ongoing"),!1;u.logger.warn("aborting previous loader for type: "+t.type),a.abort()}switch(t.type){case p.MANIFEST:r=n.manifestLoadingMaxRetry,o=n.manifestLoadingTimeOut,i=n.manifestLoadingRetryDelay,s=n.manifestLoadingMaxRetryTimeout;break;case p.LEVEL:r=0,o=n.levelLoadingTimeOut;break;default:r=n.levelLoadingMaxRetry,o=n.levelLoadingTimeOut,i=n.levelLoadingRetryDelay,s=n.levelLoadingMaxRetryTimeout}a=this.createInternalLoader(t),t.url=e,t.responseType=t.responseType||"";var c={timeout:o,maxRetry:r,retryDelay:i,maxRetryDelay:s},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return u.logger.debug("Calling internal loader delegate for URL: "+e),a.load(t,c,d),!0},n.prototype.loadsuccess=function(e,t,n,r){if(void 0===r&&(r=null),n.isSidxRequest)return this._handleSidxRequest(e,n),void this._handlePlaylistLoaded(e,t,n,r);this.resetInternalLoader(n.type);var o=e.data;t.tload=d.now(),0===o.indexOf("#EXTM3U")?o.indexOf("#EXTINF:")>0||o.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(e,t,n,r):this._handleMasterPlaylist(e,t,n,r):this._handleManifestParsingError(e,n,"no EXTM3U delimiter",r)},n.prototype.loaderror=function(e,t,n){void 0===n&&(n=null),this._handleNetworkError(t,n,!1,e)},n.prototype.loadtimeout=function(e,t,n){void 0===n&&(n=null),this._handleNetworkError(t,n,!0)},n.prototype._handleMasterPlaylist=function(e,t,r,o){var s=this.hls,a=e.data,l=n.getResponseUrl(e,r),d=c.default.parseMasterPlaylist(a,l);if(d.length){var p=d.map((function(e){return{id:e.attrs.AUDIO,codec:e.audioCodec}})),f=c.default.parseMasterPlaylistMedia(a,l,"AUDIO",p),h=c.default.parseMasterPlaylistMedia(a,l,"SUBTITLES");if(f.length){var m=!1;f.forEach((function(e){e.url||(m=!0)})),!1===m&&d[0].audioCodec&&!d[0].attrs.AUDIO&&(u.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),f.unshift({type:"main",name:"main"}))}s.trigger(i.default.MANIFEST_LOADED,{levels:d,audioTracks:f,subtitles:h,url:l,stats:t,networkDetails:o})}else this._handleManifestParsingError(e,r,"no level found in manifest",o)},n.prototype._handleTrackOrLevelPlaylist=function(t,r,o,s){var a=this.hls,u=o.id,l=o.level,f=o.type,h=n.getResponseUrl(t,o),m=e.isFinite(u)?u:0,g=e.isFinite(l)?l:m,v=n.mapContextToLevelType(o),b=c.default.parseLevelPlaylist(t.data,h,g,v,m);if(b.tload=r.tload,f===p.MANIFEST){var y={url:h,details:b};a.trigger(i.default.MANIFEST_LOADED,{levels:[y],audioTracks:[],url:h,stats:r,networkDetails:s})}if(r.tparsed=d.now(),b.needSidxRanges){var _=b.initSegment.url;this.load(_,{isSidxRequest:!0,type:f,level:l,levelDetails:b,id:u,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}else o.levelDetails=b,this._handlePlaylistLoaded(t,r,o,s)},n.prototype._handleSidxRequest=function(e,t){var n=l.default.parseSegmentIndex(new Uint8Array(e.data));if(n){var r=n.references,o=t.levelDetails;r.forEach((function(e,t){var n=e.info,r=o.fragments[t];0===r.byteRange.length&&(r.rawByteRange=String(1+n.end-n.start)+"@"+String(n.start))})),o.initSegment.rawByteRange=String(n.moovEndOffset)+"@0"}},n.prototype._handleManifestParsingError=function(e,t,n,r){this.hls.trigger(i.default.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:e.url,reason:n,networkDetails:r})},n.prototype._handleNetworkError=function(e,t,n,r){var o,s;void 0===n&&(n=!1),void 0===r&&(r=null),u.logger.info("A network error occured while loading a "+e.type+"-type playlist");var l=this.getInternalLoader(e);switch(e.type){case p.MANIFEST:o=n?a.ErrorDetails.MANIFEST_LOAD_TIMEOUT:a.ErrorDetails.MANIFEST_LOAD_ERROR,s=!0;break;case p.LEVEL:o=n?a.ErrorDetails.LEVEL_LOAD_TIMEOUT:a.ErrorDetails.LEVEL_LOAD_ERROR,s=!1;break;case p.AUDIO_TRACK:o=n?a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,s=!1;break;default:s=!1}l&&(l.abort(),this.resetInternalLoader(e.type));var c={type:a.ErrorTypes.NETWORK_ERROR,details:o,fatal:s,url:l.url,loader:l,context:e,networkDetails:t};r&&(c.response=r),this.hls.trigger(i.default.ERROR,c)},n.prototype._handlePlaylistLoaded=function(e,t,r,o){var s=r.type,a=r.level,u=r.id,l=r.levelDetails;if(l.targetduration)if(n.canHaveQualityLevels(r.type))this.hls.trigger(i.default.LEVEL_LOADED,{details:l,level:a||0,id:u||0,stats:t,networkDetails:o});else switch(s){case p.AUDIO_TRACK:this.hls.trigger(i.default.AUDIO_TRACK_LOADED,{details:l,id:u,stats:t,networkDetails:o});break;case p.SUBTITLE_TRACK:this.hls.trigger(i.default.SUBTITLE_TRACK_LOADED,{details:l,id:u,stats:t,networkDetails:o})}else this._handleManifestParsingError(e,r,"invalid target duration",o)},n}(s.default);t.default=h}).call(this,n("./src/polyfills/number.js").Number)},"./src/observer.js":function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.trigger=function(e){for(var t=[],n=1;n>24&255,t[1]=r>>16&255,t[2]=r>>8&255,t[3]=255&r,t.set(e,4),o=0,r=8;o>24&255,t>>16&255,t>>8&255,255&t,o>>24,o>>16&255,o>>8&255,255&o,i>>24,i>>16&255,i>>8&255,255&i,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,n,r){return e.box(e.types.moof,e.mfhd(t),e.traf(r,n))},e.moov=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))},e.mvex=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(r))},e.mvhd=function(t,n){n*=t;var o=Math.floor(n/(r+1)),i=Math.floor(n%(r+1)),s=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,o>>24,o>>16&255,o>>8&255,255&o,i>>24,i>>16&255,i>>8&255,255&i,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,s)},e.sdtp=function(t){var n,r,o=t.samples||[],i=new Uint8Array(4+o.length);for(r=0;r>>8&255),i.push(255&o),i=i.concat(Array.prototype.slice.call(r));for(n=0;n>>8&255),s.push(255&o),s=s.concat(Array.prototype.slice.call(r));var a=e.box(e.types.avcC,new Uint8Array([1,i[3],i[4],i[5],255,224|t.sps.length].concat(i).concat([t.pps.length]).concat(s))),u=t.width,l=t.height,c=t.pixelRatio[0],d=t.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,u>>8&255,255&u,l>>8&255,255&l,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),a,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,d>>24,d>>16&255,d>>8&255,255&d])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var n=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var n=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},e.stsd=function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var n=t.id,o=t.duration*t.timescale,i=t.width,s=t.height,a=Math.floor(o/(r+1)),u=Math.floor(o%(r+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,u>>24,u>>16&255,u>>8&255,255&u,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>8&255,255&i,0,0,s>>8&255,255&s,0,0]))},e.traf=function(t,n){var o=e.sdtp(t),i=t.id,s=Math.floor(n/(r+1)),a=Math.floor(n%(r+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,a>>24,a>>16&255,a>>8&255,255&a])),e.trun(t,o.length+16+20+8+16+8+8),o)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,n){var r,o,i,s,a,u,l=t.samples||[],c=l.length,d=12+16*c,p=new Uint8Array(d);for(n+=8+d,p.set([0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,255&c,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r>>24&255,i>>>16&255,i>>>8&255,255&i,s>>>24&255,s>>>16&255,s>>>8&255,255&s,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,61440&a.degradPrio,15&a.degradPrio,u>>>24&255,u>>>16&255,u>>>8&255,255&u],12+16*r);return e.box(e.types.trun,p)},e.initSegment=function(t){e.types||e.init();var n,r=e.moov(t);return(n=new Uint8Array(e.FTYP.byteLength+r.byteLength)).set(e.FTYP),n.set(r,e.FTYP.byteLength),n},e}();t.default=o},"./src/remux/mp4-remuxer.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./src/remux/aac-helper.js"),o=n("./src/remux/mp4-generator.js"),i=n("./src/events.js"),s=n("./src/errors.js"),a=n("./src/utils/logger.js"),u=function(){function e(e,t,n,r){this.observer=e,this.config=t,this.typeSupported=n;var o=navigator.userAgent;this.isSafari=r&&r.indexOf("Apple")>-1&&o&&!o.match("CriOS"),this.ISGenerated=!1}return e.prototype.destroy=function(){},e.prototype.resetTimeStamp=function(e){this._initPTS=this._initDTS=e},e.prototype.resetInitSegment=function(){this.ISGenerated=!1},e.prototype.remux=function(e,t,n,r,o,s,u){if(this.ISGenerated||this.generateIS(e,t,o),this.ISGenerated){var l=e.samples.length,c=t.samples.length,d=o,p=o;if(l&&c){var f=(e.samples[0].pts-t.samples[0].pts)/t.inputTimeScale;d+=Math.max(0,f),p+=Math.max(0,-f)}if(l){e.timescale||(a.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(e,t,o));var h=this.remuxAudio(e,d,s,u);if(c){var m=void 0;h&&(m=h.endPTS-h.startPTS),t.timescale||(a.logger.warn("regenerate InitSegment as video detected"),this.generateIS(e,t,o)),this.remuxVideo(t,p,s,m,u)}}else if(c){var g=this.remuxVideo(t,p,s,0,u);g&&e.codec&&this.remuxEmptyAudio(e,d,s,g)}}n.samples.length&&this.remuxID3(n,o),r.samples.length&&this.remuxText(r,o),this.observer.trigger(i.default.FRAG_PARSED)},e.prototype.generateIS=function(e,t,n){var r,u,l=this.observer,c=e.samples,d=t.samples,p=this.typeSupported,f="audio/mp4",h={},m={tracks:h},g=void 0===this._initPTS;if(g&&(r=u=1/0),e.config&&c.length&&(e.timescale=e.samplerate,a.logger.log("audio sampling rate : "+e.samplerate),e.isAAC||(p.mpeg?(f="audio/mpeg",e.codec=""):p.mp3&&(e.codec="mp3")),h.audio={container:f,codec:e.codec,initSegment:!e.isAAC&&p.mpeg?new Uint8Array:o.default.initSegment([e]),metadata:{channelCount:e.channelCount}},g&&(r=u=c[0].pts-e.inputTimeScale*n)),t.sps&&t.pps&&d.length){var v=t.inputTimeScale;t.timescale=v,h.video={container:"video/mp4",codec:t.codec,initSegment:o.default.initSegment([t]),metadata:{width:t.width,height:t.height}},g&&(r=Math.min(r,d[0].pts-v*n),u=Math.min(u,d[0].dts-v*n),this.observer.trigger(i.default.INIT_PTS_FOUND,{initPTS:r}))}Object.keys(h).length?(l.trigger(i.default.FRAG_PARSING_INIT_SEGMENT,m),this.ISGenerated=!0,g&&(this._initPTS=r,this._initDTS=u)):l.trigger(i.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},e.prototype.remuxVideo=function(e,t,n,r,u){var l,c,d,p,f,h,m,g=8,v=e.timescale,b=e.samples,y=[],_=b.length,j=this._PTSNormalize,w=this._initPTS,S=this.nextAvcDts,x=this.isSafari;if(0!==_){x&&(n|=b.length&&S&&(u&&Math.abs(t-S/v)<.1||Math.abs(b[0].pts-S-w)1?a.logger.log("AVC:"+k+" ms hole between fragments detected,filling it"):k<-1&&a.logger.log("AVC:"+-k+" ms overlapping between fragments detected"),f=S,b[0].dts=f,p=Math.max(p-k,S),b[0].pts=p,a.logger.log("Video/PTS/DTS adjusted: "+Math.round(p/90)+"/"+Math.round(f/90)+",delta:"+k+" ms")),E=b[b.length-1],m=Math.max(E.dts,0),h=Math.max(E.pts,0,m),x&&(l=Math.round((m-f)/(b.length-1)));var O=0,R=0;for(A=0;A<_;A++){for(var C=b[A],D=C.units,P=D.length,L=0,I=0;I0?A-1:A].dts;if(z.stretchShortVideoTrack){var K=z.maxBufferHole,Q=Math.floor(K*v),Y=(r?p+r*v:this.nextAudioPts)-N.pts;Y>Q?((l=Y-W)<0&&(l=W),a.logger.log("It is approximately "+Y/90+" ms to the next segment; using duration "+l/90+" ms for the last video frame.")):l=W}else l=W}U=Math.round(N.pts-N.dts)}y.push({size:B,duration:l,cts:U,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:N.key?2:1,isNonSync:N.key?0:1}})}this.nextAvcDts=m+l;var X=e.dropped;if(e.len=0,e.nbNalu=0,e.dropped=0,y.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var J=y[0].flags;J.dependsOn=2,J.isNonSync=0}e.samples=y,d=o.default.moof(e.sequenceNumber++,f,e),e.samples=[];var $={data1:d,data2:c,startPTS:p/v,endPTS:(h+l)/v,startDTS:f/v,endDTS:this.nextAvcDts/v,type:"video",hasAudio:!1,hasVideo:!0,nb:y.length,dropped:X};return this.observer.trigger(i.default.FRAG_PARSING_DATA,$),$}},e.prototype.remuxAudio=function(e,t,n,u){var l,c,d,p,f,h,m,g=e.inputTimeScale,v=e.timescale,b=g/v,y=(e.isAAC?1024:1152)*b,_=this._PTSNormalize,j=this._initPTS,w=!e.isAAC&&this.typeSupported.mpeg,S=e.samples,x=[],T=this.nextAudioPts;if(n|=S.length&&T&&(u&&Math.abs(t-T/g)<.1||Math.abs(S[0].pts-T-j)<20*y),S.forEach((function(e){e.pts=e.dts=_(e.pts-j,t*g)})),0!==(S=S.filter((function(e){return e.pts>=0}))).length){if(n||(T=u?t*g:S[0].pts),e.isAAC)for(var A=this.config.maxAudioFramesDrift,E=0,k=T;E=A*y&&C<1e4&&k){var D=Math.round(O/y);a.logger.warn("Injecting "+D+" audio frame @ "+(k/g).toFixed(3)+"s due to "+Math.round(1e3*O/g)+" ms gap.");for(var P=0;P0&&F<1e4)B=Math.round((N-T)/y),a.logger.log(F+" ms hole between AAC samples detected,filling it"),B>0&&((d=r.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(d=M.subarray()),e.len+=B*d.length);else if(F<-12){a.logger.log("drop overlapping AAC sample, expected/parsed/delta:"+(T/g).toFixed(3)+"s/"+(N/g).toFixed(3)+"s/"+-F+"ms"),e.len-=M.byteLength;continue}N=T}if(h=N,!(e.len>0))return;var U=w?e.len:e.len+8;l=w?0:8;try{p=new Uint8Array(U)}catch(e){return void this.observer.trigger(i.default.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:U,reason:"fail allocating audio mdat "+U})}for(w||(new DataView(p.buffer).setUint32(0,U),p.set(o.default.types.mdat,4)),E=0;E=2&&(H=x[V-2].duration,c.duration=H),V){this.nextAudioPts=T=m+b*H,e.len=0,e.samples=x,f=w?new Uint8Array:o.default.moof(e.sequenceNumber++,h/b,e),e.samples=[];var z=h/g,W=T/g,K={data1:f,data2:p,startPTS:z,endPTS:W,startDTS:z,endDTS:W,type:"audio",hasAudio:!0,hasVideo:!1,nb:V};return this.observer.trigger(i.default.FRAG_PARSING_DATA,K),K}return null}},e.prototype.remuxEmptyAudio=function(e,t,n,o){var i=e.inputTimeScale,s=i/(e.samplerate?e.samplerate:i),u=this.nextAudioPts,l=(void 0!==u?u:o.startDTS*i)+this._initDTS,c=o.endDTS*i+this._initDTS,d=1024*s,p=Math.ceil((c-l)/d),f=r.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(a.logger.warn("remux empty Audio"),f){for(var h=[],m=0;m4294967296;)e+=n;return e},e}();t.default=u},"./src/remux/passthrough-remuxer.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./src/events.js"),o=function(){function e(e){this.observer=e}return e.prototype.destroy=function(){},e.prototype.resetTimeStamp=function(){},e.prototype.resetInitSegment=function(){},e.prototype.remux=function(e,t,n,o,i,s,a,u){var l=this.observer,c="";e&&(c+="audio"),t&&(c+="video"),l.trigger(r.default.FRAG_PARSING_DATA,{data1:u,startPTS:i,startDTS:i,type:c,hasAudio:!!e,hasVideo:!!t,nb:1,dropped:0}),l.trigger(r.default.FRAG_PARSED)},e}();t.default=o},"./src/task-loop.js":function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){for(var n=[],r=1;r1&&(this.clearNextTick(),this._tickTimer=setTimeout(this._boundTick,0)),this._tickCallCount=0)},t.prototype.doTick=function(){},t}(n("./src/event-handler.js").default);t.default=i},"./src/utils/attr-list.js":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=/^(\d+)x(\d+)$/,r=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,o=function(){function t(e){for(var n in"string"==typeof e&&(e=t.parseAttrList(e)),e)e.hasOwnProperty(n)&&(this[n]=e[n])}return t.prototype.decimalInteger=function(t){var n=parseInt(this[t],10);return n>e.MAX_SAFE_INTEGER?1/0:n},t.prototype.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),r=0;re.MAX_SAFE_INTEGER?1/0:n},t.prototype.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.prototype.enumeratedString=function(e){return this[e]},t.prototype.decimalResolution=function(e){var t=n.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},t.parseAttrList=function(e){var t,n={};for(r.lastIndex=0;null!==(t=r.exec(e));){var o=t[2];0===o.indexOf('"')&&o.lastIndexOf('"')===o.length-1&&(o=o.slice(1,-1)),n[t[1]]=o}return n},t}();t.default=o}).call(this,n("./src/polyfills/number.js").Number)},"./src/utils/binary-search.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={search:function(e,t){for(var n=0,r=e.length-1,o=null,i=null;n<=r;){var s=t(i=e[o=(n+r)/2|0]);if(s>0)n=o+1;else{if(!(s<0))return i;r=o-1}}return null}}},"./src/utils/buffer-helper.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.isBuffered=function(e,t){try{if(e)for(var n=e.buffered,r=0;r=n.start(r)&&t<=n.end(r))return!0}catch(e){}return!1},e.bufferInfo=function(e,t,n){try{if(e){var r=e.buffered,o=[],i=void 0;for(i=0;ic&&(u[l-1].end=e[a].end):u.push(e[a])}else u.push(e[a])}for(a=0,r=0,o=i=t;a=d&&ts&&(p.log("ERROR","Too large cursor position "+this.pos),this.pos=s)},e.prototype.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n=144&&this.backSpace();var t=o(e);this.pos>=s?p.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))},e.prototype.clearFromPos=function(e){var t;for(t=e;t0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},e.prototype.getTextAndFormat=function(){return this.rows},e}(),b=function(){function e(e,t){this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new v,this.nonDisplayedMemory=new v,this.lastOutputScreen=new v,this.currRollUpRow=this.displayedMemory.rows[i-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return e.prototype.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[i-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},e.prototype.getHandler=function(){return this.outputFilter},e.prototype.setHandler=function(e){this.outputFilter=e},e.prototype.setPAC=function(e){this.writeScreen.setPAC(e)},e.prototype.setBkgData=function(e){this.writeScreen.setBkgData(e)},e.prototype.setMode=function(e){e!==this.mode&&(this.mode=e,p.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)},e.prototype.insertChars=function(e){for(var t=0;t=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}p.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},e.prototype.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=p.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),!0===e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue()),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},e.prototype.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}(),y=function(){function e(e,t,n){this.field=e||1,this.outputs=[t,n],this.channels=[new b(1,t),new b(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}}return e.prototype.getHandler=function(e){return this.channels[e].getHandler()},e.prototype.setHandler=function(e,t){this.channels[e].setHandler(t)},e.prototype.addData=function(e,t){var n,r,o,i=!1;this.lastTime=e,p.setTime(e);for(var s=0;s ("+f([r,o])+")"),(n=this.parseCmd(r,o))||(n=this.parseMidrow(r,o)),n||(n=this.parsePAC(r,o)),n||(n=this.parseBackgroundAttributes(r,o)),n||(i=this.parseChars(r,o))&&(this.currChNr&&this.currChNr>=0?this.channels[this.currChNr-1].insertChars(i):p.log("WARNING","No channel found yet. TEXT-MODE?")),n?this.dataCounters.cmd+=2:i?this.dataCounters.char+=2:(this.dataCounters.other+=2,p.log("WARNING","Couldn't parse cleaned data "+f([r,o])+" orig: "+f([t[s],t[s+1]])))):this.dataCounters.padding+=2},e.prototype.parseCmd=function(e,t){var n;if(!((20===e||28===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,p.log("DEBUG","Repeated command ("+f([e,t])+") is dropped"),!0;n=20===e||23===e?1:2;var r=this.channels[n-1];return 20===e||28===e?32===t?r.ccRCL():33===t?r.ccBS():34===t?r.ccAOF():35===t?r.ccAON():36===t?r.ccDER():37===t?r.ccRU(2):38===t?r.ccRU(3):39===t?r.ccRU(4):40===t?r.ccFON():41===t?r.ccRDC():42===t?r.ccTR():43===t?r.ccRTD():44===t?r.ccEDM():45===t?r.ccCR():46===t?r.ccENM():47===t&&r.ccEOC():r.ccTO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},e.prototype.parseMidrow=function(e,t){var n=null;return(17===e||25===e)&&t>=32&&t<=47&&((n=17===e?1:2)!==this.currChNr?(p.log("ERROR","Mismatch channel in midrow parsing"),!1):(this.channels[n-1].ccMIDROW(t),p.log("DEBUG","MIDROW ("+f([e,t])+")"),!0))},e.prototype.parsePAC=function(e,t){var n,r;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;n=e<=23?1:2,r=t>=64&&t<=95?1===n?a[e]:l[e]:1===n?u[e]:c[e];var o=this.interpretPAC(r,t);return this.channels[n-1].setPAC(o),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},e.prototype.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},e.prototype.parseChars=function(e,t){var n=null,r=null,i=null;if(e>=25?(n=2,i=e-8):(n=1,i=e),i>=17&&i<=19){var s;s=17===i?t+80:18===i?t+112:t+144,p.log("INFO","Special char '"+o(s)+"' in channel "+n),r=[s]}else e>=32&&e<=127&&(r=0===t?[e]:[e,t]);if(r){var a=f(r);p.log("DEBUG","Char codes = "+a.join(",")),this.lastCmdA=null,this.lastCmdB=null}return r},e.prototype.parseBackgroundAttributes=function(e,t){var n,r,o;return((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47)&&(n={},16===e||24===e?(r=Math.floor((t-32)/2),n.background=d[r],t%2==1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",47===t&&(n.underline=!0)),o=e<24?1:2,this.channels[o-1].setBkgData(n),this.lastCmdA=null,this.lastCmdB=null,!0)},e.prototype.reset=function(){for(var e=0;e=16?u--:u++,navigator.userAgent.match(/Firefox\//)?s.line=d+1:s.line=d>7?d-2:d+1,s.align="left",s.position=Math.max(0,Math.min(100,u/32*100+(navigator.userAgent.match(/Firefox\//)?50:0))),e.addCue(s)}}},"./src/utils/discontinuities.js":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n("./src/utils/binary-search.js"),o=n("./src/utils/logger.js");function i(e,t){for(var n=null,r=0;rn.startCC||e&&e.cct?-1:0}))},t.shouldAlignOnDiscontinuities=s,t.findDiscontinuousReferenceFrag=a,t.adjustPts=u,t.alignStream=function(e,t,n){l(e,n,t),!n.PTSKnown&&t&&c(n,t.details)},t.alignDiscontinuities=l,t.alignPDT=c}).call(this,n("./src/polyfills/number.js").Number)},"./src/utils/ewma-bandwidth-estimator.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./src/utils/ewma.js"),o=function(){function e(e,t,n,o){this.hls=e,this.defaultEstimate_=o,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new r.default(t),this.fast_=new r.default(n)}return e.prototype.sample=function(e,t){var n=8e3*t/(e=Math.max(e,this.minDelayMs_)),r=e/1e3;this.fast_.sample(r,n),this.slow_.sample(r,n)},e.prototype.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},e.prototype.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},e.prototype.destroy=function(){},e}();t.default=o},"./src/utils/ewma.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=0,this.totalWeight_=0}return e.prototype.sample=function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e},e.prototype.getTotalWeight=function(){return this.totalWeight_},e.prototype.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/e}return this.estimate_},e}();t.default=r},"./src/utils/get-self-scope.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSelfScope=function(){return"undefined"==typeof window?self:window}},"./src/utils/logger.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./src/utils/get-self-scope.js");function o(){}var i={trace:o,debug:o,log:o,warn:o,info:o,error:o},s=i;function a(e,t){return"["+e+"] > "+t}var u=r.getSelfScope();t.enableLogs=function(e){if(!0===e||"object"==typeof e){!function(e){for(var t=[],n=1;ne)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},e}();t.default=r},"./src/utils/texttrack-utils.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendAddTrackEvent=function(e,t){var n=null;try{n=new window.Event("addtrack")}catch(e){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)},t.clearCurrentCues=function(e){if(e&&e.cues)for(;e.cues.length>0;)e.removeCue(e.cues[0])}},"./src/utils/time-ranges.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={toString:function(e){for(var t="",n=e.length,r=0;r100)throw new Error("Position must be between 0 and 100.");_=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",o({},l,{get:function(){return j},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");j=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",o({},l,{get:function(){return w},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");w=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",o({},l,{get:function(){return S},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");S=t,this.hasBeenReset=!0}})),a.displayState=void 0,u)return a}return i.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},i}()},"./src/utils/vttparser.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./src/utils/vttcue.js"),o=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}};function i(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new o,this.regionList=[]}function s(){this.values=Object.create(null)}function a(e,t,n,r){var o=r?e.split(r):[e];for(var i in o)if("string"==typeof o[i]){var s=o[i].split(n);2===s.length&&t(s[0],s[1])}}s.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r=0&&t<=100)&&(this.set(e,t),!0)}};var u=new r.default(0,0,0),l="middle"===u.align?"middle":"center";function c(e,t,n){var r=e;function o(){var t=function(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}(e);if(null===t)throw new Error("Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function i(){e=e.replace(/^\s+/,"")}if(i(),t.startTime=o(),i(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),i(),t.endTime=o(),i(),function(e,t){var r=new s;a(e,(function(e,t){switch(e){case"region":for(var o=n.length-1;o>=0;o--)if(n[o].id===t){r.set(e,n[o].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var i=t.split(","),s=i[0];r.integer(e,s),r.percent(e,s)&&r.set("snapToLines",!1),r.alt(e,s,["auto"]),2===i.length&&r.alt("lineAlign",i[1],["start",l,"end"]);break;case"position":i=t.split(","),r.percent(e,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start",l,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",l,"end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");var o=r.get("line","auto");"auto"===o&&-1===u.line&&(o=-1),t.line=o,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",l);var i=r.get("position","auto");"auto"===i&&50===u.position&&(i="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=i}(e,t)}function d(e){return e.replace(//gi,"\n")}t.fixLineBreaks=d,i.prototype={parse:function(e){var t=this;function n(){var e=t.buffer,n=0;for(e=d(e);n>>0).toString()},a={parse:function(t,n,a,u,l,c){var d,p=o.utf8ArrayToStr(new Uint8Array(t)).trim().replace(/\r\n|\n\r|\n|\r/g,"\n").split("\n"),f="00:00.000",h=0,m=0,g=0,v=[],b=!0,y=new r.default;y.oncue=function(e){var t=a[u],n=a.ccOffset;t&&t.new&&(void 0!==m?n=a.ccOffset=t.start:function(e,t,n){var r=e[t],o=e[r.prevCC];if(!o||!o.new&&r.new)return e.ccOffset=e.presentationOffset=r.start,void(r.new=!1);for(;o&&o.new;)e.ccOffset+=r.start-o.start,r.new=!1,o=e[(r=o).prevCC];e.presentationOffset=n}(a,u,g)),g&&(n=g-a.presentationOffset),e.startTime+=n-m,e.endTime+=n-m,e.id=s(e.startTime.toString())+s(e.endTime.toString())+s(e.text),e.text=decodeURIComponent(encodeURIComponent(e.text)),e.endTime>0&&v.push(e)},y.onparsingerror=function(e){d=e},y.onflush=function(){d&&c?c(d):l(v)},p.forEach((function(t){if(b){if(i(t,"X-TIMESTAMP-MAP=")){b=!1,t.substr(16).split(",").forEach((function(e){i(e,"LOCAL:")?f=e.substr(6):i(e,"MPEGTS:")&&(h=parseInt(e.substr(7)))}));try{n+(9e4*a[u].start||0)<0&&(n+=8589934592),h-=n,r=f,o=parseInt(r.substr(-3)),s=parseInt(r.substr(-6,2)),l=parseInt(r.substr(-9,2)),c=r.length>9?parseInt(r.substr(0,r.indexOf(":"))):0,m=(e.isFinite(o)&&e.isFinite(s)&&e.isFinite(l)&&e.isFinite(c)?(o+=1e3*s,o+=6e4*l,o+=36e5*c):-1)/1e3,g=h/9e4,-1===m&&(d=new Error("Malformed X-TIMESTAMP-MAP: "+t))}catch(e){d=new Error("Malformed X-TIMESTAMP-MAP: "+t)}return}""===t&&(b=!1)}var r,o,s,l,c;y.parse(t+"\n")})),y.flush()}};t.default=a}).call(this,n("./src/polyfills/number.js").Number)},"./src/utils/xhr-loader.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./src/utils/logger.js"),o=window.performance,i=window.XMLHttpRequest,s=function(){function e(e){e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}return e.prototype.destroy=function(){this.abort(),this.loader=null},e.prototype.abort=function(){var e=this.loader;e&&4!==e.readyState&&(this.stats.aborted=!0,e.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},e.prototype.load=function(e,t,n){this.context=e,this.config=t,this.callbacks=n,this.stats={trequest:o.now(),retry:0},this.retryDelay=t.retryDelay,this.loadInternal()},e.prototype.loadInternal=function(){var e,t=this.context;e=this.loader=new i;var n=this.stats;n.tfirst=0,n.loaded=0;var r=this.xhrSetup;try{if(r)try{r(e,t.url)}catch(n){e.open("GET",t.url,!0),r(e,t.url)}e.readyState||e.open("GET",t.url,!0)}catch(n){return void this.callbacks.onError({code:e.status,text:n.message},t,e)}t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),e.send()},e.prototype.readystatechange=function(e){var t=e.currentTarget,n=t.readyState,i=this.stats,s=this.context,a=this.config;if(!i.aborted&&n>=2)if(window.clearTimeout(this.requestTimeout),0===i.tfirst&&(i.tfirst=Math.max(o.now(),i.trequest)),4===n){var u=t.status;if(u>=200&&u<300){i.tload=Math.max(i.tfirst,o.now());var l,c=void 0;l="arraybuffer"===s.responseType?(c=t.response).byteLength:(c=t.responseText).length,i.loaded=i.total=l;var d={url:t.responseURL,data:c};this.callbacks.onSuccess(d,i,s,t)}else i.retry>=a.maxRetry||u>=400&&u<499?(r.logger.error(u+" while loading "+s.url),this.callbacks.onError({code:u,text:t.statusText},s,t)):(r.logger.warn(u+" while loading "+s.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),i.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),a.timeout)},e.prototype.loadtimeout=function(){r.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},e.prototype.loadprogress=function(e){var t=e.currentTarget,n=this.stats;n.loaded=e.loaded,e.lengthComputable&&(n.total=e.total);var r=this.callbacks.onProgress;r&&r(n,this.context,null,t)},e}();t.default=s}}).default},e.exports=r())},"./node_modules/is-buffer/index.js":function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},"./node_modules/is_js/is.js":function(e,t,n){(function(r){var o,i;i=this,void 0===(o=function(){return i.is=function(){var e={VERSION:"0.8.0",not:{},all:{},any:{}},t=Object.prototype.toString,n=Array.prototype.slice,o=Object.prototype.hasOwnProperty;function i(e){return function(){return!e.apply(null,n.call(arguments))}}function s(e){return function(){for(var t=c(arguments),n=t.length,r=0;r":function(e,t){return e>t},">=":function(e,t){return e>=t}};function l(e,t){var n=t+"",r=+(n.match(/\d+/)||NaN),o=n.match(/^[<>]=?|/)[0];return u[o]?u[o](e,r):e==r||r!=r}function c(t){var r=n.call(t);return 1===r.length&&e.array(r[0])&&(r=r[0]),r}e.arguments=function(e){return"[object Arguments]"===t.call(e)||null!=e&&"object"==typeof e&&"callee"in e},e.array=Array.isArray||function(e){return"[object Array]"===t.call(e)},e.boolean=function(e){return!0===e||!1===e||"[object Boolean]"===t.call(e)},e.char=function(t){return e.string(t)&&1===t.length},e.date=function(e){return"[object Date]"===t.call(e)},e.domNode=function(t){return e.object(t)&&t.nodeType>0},e.error=function(e){return"[object Error]"===t.call(e)},e.function=function(e){return"[object Function]"===t.call(e)||"function"==typeof e},e.json=function(e){return"[object Object]"===t.call(e)},e.nan=function(e){return e!=e},e.null=function(e){return null===e},e.number=function(n){return e.not.nan(n)&&"[object Number]"===t.call(n)},e.object=function(e){return Object(e)===e},e.regexp=function(e){return"[object RegExp]"===t.call(e)},e.sameType=function(n,r){var o=t.call(n);return o===t.call(r)&&("[object Number]"!==o||!e.any.nan(n,r)||e.all.nan(n,r))},e.sameType.api=["not"],e.string=function(e){return"[object String]"===t.call(e)},e.undefined=function(e){return void 0===e},e.windowObject=function(e){return null!=e&&"object"==typeof e&&"setInterval"in e},e.empty=function(t){if(e.object(t)){var n=Object.getOwnPropertyNames(t).length;return!!(0===n||1===n&&e.array(t)||2===n&&e.arguments(t))}return""===t},e.existy=function(e){return null!=e},e.falsy=function(e){return!e},e.truthy=i(e.falsy),e.above=function(t,n){return e.all.number(t,n)&&t>n},e.above.api=["not"],e.decimal=function(t){return e.number(t)&&t%1!=0},e.equal=function(t,n){return e.all.number(t,n)?t===n&&1/t==1/n:e.all.string(t,n)||e.all.regexp(t,n)?""+t==""+n:!!e.all.boolean(t,n)&&t===n},e.equal.api=["not"],e.even=function(t){return e.number(t)&&t%2==0},e.finite=isFinite||function(t){return e.not.infinite(t)&&e.not.nan(t)},e.infinite=function(e){return e===1/0||e===-1/0},e.integer=function(t){return e.number(t)&&t%1==0},e.negative=function(t){return e.number(t)&&t<0},e.odd=function(t){return e.number(t)&&t%2==1},e.positive=function(t){return e.number(t)&&t>0},e.under=function(t,n){return e.all.number(t,n)&&tn&&t=0&&t.indexOf(n,r)===r},e.endWith.api=["not"],e.include=function(e,t){return e.indexOf(t)>-1},e.include.api=["not"],e.lowerCase=function(t){return e.string(t)&&t===t.toLowerCase()},e.palindrome=function(t){if(e.not.string(t))return!1;for(var n=(t=t.replace(/[^a-zA-Z0-9]+/g,"").toLowerCase()).length-1,r=0,o=Math.floor(n/2);r<=o;r++)if(t.charAt(r)!==t.charAt(n-r))return!1;return!0},e.space=function(t){if(e.not.char(t))return!1;var n=t.charCodeAt(0);return n>8&&n<14||32===n},e.startWith=function(t,n){return e.string(t)&&0===t.indexOf(n)},e.startWith.api=["not"],e.upperCase=function(t){return e.string(t)&&t===t.toUpperCase()};var h=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],m=["january","february","march","april","may","june","july","august","september","october","november","december"];e.day=function(t,n){return e.date(t)&&n.toLowerCase()===h[t.getDay()]},e.day.api=["not"],e.dayLightSavingTime=function(e){var t=new Date(e.getFullYear(),0,1),n=new Date(e.getFullYear(),6,1),r=Math.max(t.getTimezoneOffset(),n.getTimezoneOffset());return e.getTimezoneOffset()n.getTime()},e.inDateRange=function(t,n,r){if(e.not.date(t)||e.not.date(n)||e.not.date(r))return!1;var o=t.getTime();return o>n.getTime()&&on)return!1;return r===n},e.propertyCount.api=["not"],e.propertyDefined=function(t,n){return e.object(t)&&e.string(n)&&n in t},e.propertyDefined.api=["not"],e.inArray=function(t,n){if(e.not.array(n))return!1;for(var r=0;r="],o=1;o=t||n<0||d&&e-l>=i}function _(){var e=m();if(y(e))return j(e);a=setTimeout(_,function(e){var n=t-(e-u);return d?h(n,i-(e-l)):n}(e))}function j(e){return a=void 0,p&&r?b(e):(r=o=void 0,s)}function w(){var e=m(),n=y(e);if(r=arguments,o=this,u=e,n){if(void 0===a)return function(e){return l=e,a=setTimeout(_,t),c?b(e):s}(u);if(d)return a=setTimeout(_,t),b(u)}return void 0===a&&(a=setTimeout(_,t)),s}return t=v(t)||0,g(n)&&(c=!!n.leading,i=(d="maxWait"in n)?f(v(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p),w.cancel=function(){void 0!==a&&clearTimeout(a),l=0,r=u=o=a=void 0},w.flush=function(){return void 0===a?s:j(m())},w}}).call(this,n("./node_modules/webpack/buildin/global.js"))},"./node_modules/lodash.get/index.js":function(e,t,n){(function(t){var n,r="Expected a function",o="__lodash_hash_undefined__",i=1/0,s="[object Function]",a="[object GeneratorFunction]",u="[object Symbol]",l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,d=/^\./,p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,m="object"==typeof t&&t&&t.Object===Object&&t,g="object"==typeof self&&self&&self.Object===Object&&self,v=m||g||Function("return this")(),b=Array.prototype,y=Function.prototype,_=Object.prototype,j=v["__core-js_shared__"],w=(n=/[^.]+$/.exec(j&&j.keys&&j.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",S=y.toString,x=_.hasOwnProperty,T=_.toString,A=RegExp("^"+S.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=v.Symbol,k=b.splice,O=N(v,"Map"),R=N(Object,"create"),C=E?E.prototype:void 0,D=C?C.toString:void 0;function P(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},L.prototype.set=function(e,t){var n=this.__data__,r=q(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},I.prototype.clear=function(){this.__data__={hash:new P,map:new(O||L),string:new P}},I.prototype.delete=function(e){return M(this,e).delete(e)},I.prototype.get=function(e){return M(this,e).get(e)},I.prototype.has=function(e){return M(this,e).has(e)},I.prototype.set=function(e,t){return M(this,e).set(e,t),this};var F=U((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(V(e))return D?D.call(e):"";var t=e+"";return"0"==t&&1/e==-i?"-0":t}(t);var n=[];return d.test(e)&&n.push(""),e.replace(p,(function(e,t,r,o){n.push(r?o.replace(f,"$1"):t||e)})),n}));function B(e){if("string"==typeof e||V(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}function U(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(r);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s),s};return n.cache=new(U.Cache||I),n}U.Cache=I;var G=Array.isArray;function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function V(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&T.call(e)==u}e.exports=function(e,t,n){var r=null==e?void 0:function(e,t){for(var n,r=0,o=(t=function(e,t){if(G(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!V(e))||(c.test(e)||!l.test(e)||null!=t&&e in Object(t))}(t,e)?[t]:G(n=t)?n:F(n)).length;null!=e&&r-1},x.prototype.set=function(e,t){var n=this.__data__,r=A(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new S,map:new(j||x),string:new S}},T.prototype.delete=function(e){return E(this,e).delete(e)},T.prototype.get=function(e){return E(this,e).get(e)},T.prototype.has=function(e){return E(this,e).has(e)},T.prototype.set=function(e,t){return E(this,e).set(e,t),this},O.Cache=T,e.exports=O}).call(this,n("./node_modules/webpack/buildin/global.js"))},"./node_modules/lodash.unescape/index.js":function(e,t,n){(function(t){var n,r=1/0,o="[object Symbol]",i=/&(?:amp|lt|gt|quot|#39|#96);/g,s=RegExp(i.source),a="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,l=a||u||Function("return this")(),c=(n={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},function(e){return null==n?void 0:n[e]}),d=Object.prototype.toString,p=l.Symbol,f=p?p.prototype:void 0,h=f?f.toString:void 0;e.exports=function(e){var t;return(e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&d.call(e)==o}(e))return h?h.call(e):"";var t=e+"";return"0"==t&&1/e==-r?"-0":t}(t))&&s.test(e)?e.replace(i,c):e}}).call(this,n("./node_modules/webpack/buildin/global.js"))},"./node_modules/md5/md5.js":function(e,t,n){var r,o,i,s,a;r=n("./node_modules/crypt/crypt.js"),o=n("./node_modules/charenc/charenc.js").utf8,i=n("./node_modules/is-buffer/index.js"),s=n("./node_modules/charenc/charenc.js").bin,(a=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?s.stringToBytes(e):o.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());for(var n=r.bytesToWords(e),u=8*e.length,l=1732584193,c=-271733879,d=-1732584194,p=271733878,f=0;f>>24)|4278255360&(n[f]<<24|n[f]>>>8);n[u>>>5]|=128<>>9<<4)]=u;var h=a._ff,m=a._gg,g=a._hh,v=a._ii;for(f=0;f>>0,c=c+y>>>0,d=d+_>>>0,p=p+j>>>0}return r.endian([l,c,d,p])})._ff=function(e,t,n,r,o,i,s){var a=e+(t&n|~t&r)+(o>>>0)+s;return(a<>>32-i)+t},a._gg=function(e,t,n,r,o,i,s){var a=e+(t&r|n&~r)+(o>>>0)+s;return(a<>>32-i)+t},a._hh=function(e,t,n,r,o,i,s){var a=e+(t^n^r)+(o>>>0)+s;return(a<>>32-i)+t},a._ii=function(e,t,n,r,o,i,s){var a=e+(n^(t|~r))+(o>>>0)+s;return(a<>>32-i)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(a(e,t));return t&&t.asBytes?n:t&&t.asString?s.bytesToString(n):r.bytesToHex(n)}},"./node_modules/object-assign/index.js":function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function s(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,u=s(e),l=1;l/g,">").replace(/"/g,""")},n={};function r(t){var r="";for(var o in t){var i=t[o];null!=i&&(r&&(r+=" "),r+=n[o]||(n[o]=o.replace(/([A-Z])/g,"-$1").toLowerCase()),r+=": ",r+=i,"number"==typeof i&&!1===e.test(o)&&(r+="px"),r+=";")}return r||void 0}function o(e,t){for(var n in t)e[n]=t[n];return e}var i={shallow:!0},s=[],a=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;function u(e,n,i,l,c){if(null==e||"boolean"==typeof e)return"";var d,p=e.nodeName,f=e.attributes,h=!1;if(n=n||{},i=i||{},"object"!=typeof e&&!p)return t(e);if("function"==typeof p){if(h=!0,!i.shallow||!l&&!1!==i.renderRootComponent){var m,g=function(e){var t=o({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}(e);if(p.prototype&&"function"==typeof p.prototype.render){var v=new p(g,n);v._disable=v.__x=!0,v.props=g,v.context=n,p.getDerivedStateFromProps?v.state=o(o({},v.state),p.getDerivedStateFromProps(v.props,v.state)):v.componentWillMount&&v.componentWillMount(),m=v.render(v.props,v.state,v.context),v.getChildContext&&(n=o(o({},n),v.getChildContext()))}else m=p(g,n);return u(m,n,i,!1!==i.shallowHighOrder)}p=(d=p).displayName||d!==Function&&d.name||function(e){var t=(Function.prototype.toString.call(e).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!t){for(var n=-1,r=s.length;r--;)if(s[r]===e){n=r;break}n<0&&(n=s.push(e)-1),t="UnnamedComponent"+n}return t}(d)}var b,y="";if(f){var _=Object.keys(f);i&&!0===i.sortAttributes&&_.sort();for(var j=0;j<_.length;j++){var w=_[j],S=f[w];if("children"!==w&&!w.match(/[\s\n\\/='"\0<>]/)&&(i&&i.allAttributes||"key"!==w&&"ref"!==w)){if("className"===w){if(f.class)continue;w="class"}else c&&w.match(/^xlink:?./)&&(w=w.toLowerCase().replace(/^xlink:?/,"xlink:"));"style"===w&&S&&"object"==typeof S&&(S=r(S));var x=i.attributeHook&&i.attributeHook(w,S,n,i,h);if(x||""===x)y+=x;else if("dangerouslySetInnerHTML"===w)b=S&&S.__html;else if((S||0===S||""===S)&&"function"!=typeof S){if(!(!0!==S&&""!==S||(S=w,i&&i.xml))){y+=" "+w;continue}y+=" "+w+'="'+t(S)+'"'}}}}if(y="<"+p+y+">",String(p).match(/[\s\n\\/='"\0<>]/))throw y;var T=String(p).match(a);T&&(y=y.replace(/>$/," />"));var A=[];if(b)y+=b;else if(e.children)for(var E=0;E";return T||(y+=""),y}return u.render=u,u.shallowRender=function(e,t){return u(e,t,i)},u}()},"./node_modules/preact/dist/preact.js":function(e,t,n){!function(){"use strict";function t(e,t){var n,r,o,i,s=A;for(i=arguments.length;i-- >2;)T.push(arguments[i]);for(t&&null!=t.children&&(T.length||T.push(t.children),delete t.children);T.length;)if((r=T.pop())&&void 0!==r.pop)for(i=r.length;i--;)T.push(r[i]);else"boolean"==typeof r&&(r=null),(o="function"!=typeof e)&&(null==r?r="":"number"==typeof r?r=String(r):"string"!=typeof r&&(o=!1)),o&&n?s[s.length-1]+=r:s===A?s=[r]:s.push(r),n=o;var a=new S;return a.nodeName=e,a.children=s,a.attributes=null==t?void 0:t,a.key=null==t?void 0:t.key,void 0!==x.vnode&&x.vnode(a),a}function n(e,t){for(var n in t)e[n]=t[n];return e}function r(e,t){e&&("function"==typeof e?e(t):e.current=t)}function o(e){!e.__d&&(e.__d=!0)&&1==O.push(e)&&(x.debounceRendering||E)(i)}function i(){for(var e;e=O.pop();)e.__d&&_(e)}function s(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&a(e,t.nodeName):n||e._componentConstructor===t.nodeName}function a(e,t){return e.__n===t||e.nodeName.toLowerCase()===t.toLowerCase()}function u(e){var t=n({},e.attributes);t.children=e.children;var r=e.nodeName.defaultProps;if(void 0!==r)for(var o in r)void 0===t[o]&&(t[o]=r[o]);return t}function l(e){var t=e.parentNode;t&&t.removeChild(e)}function c(e,t,n,o,i){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)r(n,null),r(o,e);else if("class"!==t||i)if("style"===t){if(o&&"string"!=typeof o&&"string"!=typeof n||(e.style.cssText=o||""),o&&"object"==typeof o){if("string"!=typeof n)for(var s in n)s in o||(e.style[s]="");for(var s in o)e.style[s]="number"==typeof o[s]&&!1===k.test(s)?o[s]+"px":o[s]}}else if("dangerouslySetInnerHTML"===t)o&&(e.innerHTML=o.__html||"");else if("o"==t[0]&&"n"==t[1]){var a=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),o?n||e.addEventListener(t,d,a):e.removeEventListener(t,d,a),(e.__l||(e.__l={}))[t]=o}else if("list"!==t&&"type"!==t&&!i&&t in e){try{e[t]=null==o?"":o}catch(e){}null!=o&&!1!==o||"spellcheck"==t||e.removeAttribute(t)}else{var u=i&&t!==(t=t.replace(/^xlink:?/,""));null==o||!1===o?u?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof o&&(u?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),o):e.setAttribute(t,o))}else e.className=o||""}function d(e){return this.__l[e.type](x.event&&x.event(e)||e)}function p(){for(var e;e=R.shift();)x.afterMount&&x.afterMount(e),e.componentDidMount&&e.componentDidMount()}function f(e,t,n,r,o,i){C++||(D=null!=o&&void 0!==o.ownerSVGElement,P=null!=e&&!("__preactattr_"in e));var s=h(e,t,n,r,i);return o&&s.parentNode!==o&&o.appendChild(s),--C||(P=!1,i||p()),s}function h(e,t,n,r,o){var i=e,d=D;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||o)?e.nodeValue!=t&&(e.nodeValue=t):(i=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(i,e),m(e,!0))),i.__preactattr_=!0,i;var p,f,g=t.nodeName;if("function"==typeof g)return function(e,t,n,r){for(var o=e&&e._component,i=o,s=e,a=o&&e._componentConstructor===t.nodeName,l=a,c=u(t);o&&!l&&(o=o.__u);)l=o.constructor===t.nodeName;return o&&l&&(!r||o._component)?(y(o,c,3,n,r),e=o.base):(i&&!a&&(j(i),e=s=null),o=v(t.nodeName,c,n),e&&!o.__b&&(o.__b=e,s=null),y(o,c,1,n,r),e=o.base,s&&e!==s&&(s._component=null,m(s,!1))),e}(e,t,n,r);if(D="svg"===g||"foreignObject"!==g&&D,g=String(g),(!e||!a(e,g))&&(p=g,(f=D?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p)).__n=p,i=f,e)){for(;e.firstChild;)i.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(i,e),m(e,!0)}var b=i.firstChild,_=i.__preactattr_,w=t.children;if(null==_){_=i.__preactattr_={};for(var S=i.attributes,x=S.length;x--;)_[S[x].name]=S[x].value}return!P&&w&&1===w.length&&"string"==typeof w[0]&&null!=b&&void 0!==b.splitText&&null==b.nextSibling?b.nodeValue!=w[0]&&(b.nodeValue=w[0]):(w&&w.length||null!=b)&&function(e,t,n,r,o){var i,a,u,c,d,p=e.childNodes,f=[],g={},v=0,b=0,y=p.length,_=0,j=t?t.length:0;if(0!==y)for(var w=0;w2?[].slice.call(arguments,2):e.children)},createRef:function(){return{}},Component:w,render:function(e,t,n){return f(n,e,{},!1,t,!1)},rerender:i,options:x};e.exports=I}()},"./node_modules/query-string/index.js":function(e,t,n){"use strict";var r=n("./node_modules/strict-uri-encode/index.js"),o=n("./node_modules/object-assign/index.js"),i=n("./node_modules/decode-uri-component/index.js");function s(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function a(e){var t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function u(e,t){var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t=o({arrayFormat:"none"},t)),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^[?#&]/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),o=t.shift(),s=t.length>0?t.join("="):void 0;s=void 0===s?null:i(s),n(i(o),s,r)})),Object.keys(r).sort().reduce((function(e,t){var n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((function(e,t){return Number(e)-Number(t)})).map((function(e){return t[e]})):t}(n):e[t]=n,e}),Object.create(null))):r}t.extract=a,t.parse=u,t.stringify=function(e,t){!1===(t=o({encode:!0,strict:!0,arrayFormat:"none"},t)).sort&&(t.sort=function(){});var n=function(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[s(t,e),"[",r,"]"].join(""):[s(t,e),"[",s(r,e),"]=",s(n,e)].join("")};case"bracket":return function(t,n){return null===n?s(t,e):[s(t,e),"[]=",s(n,e)].join("")};default:return function(t,n){return null===n?s(t,e):[s(t,e),"=",s(n,e)].join("")}}}(t);return e?Object.keys(e).sort(t.sort).map((function(r){var o=e[r];if(void 0===o)return"";if(null===o)return s(r,t);if(Array.isArray(o)){var i=[];return o.slice().forEach((function(e){void 0!==e&&i.push(n(r,e,i.length))})),i.join("&")}return s(r,t)+"="+s(o,t)})).filter((function(e){return e.length>0})).join("&"):""},t.parseUrl=function(e,t){return{url:e.split("?")[0]||"",query:u(a(e),t)}}},"./node_modules/regenerator-runtime/runtime.js":function(e,t,n){var r=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function u(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),s=new E(r||[]);return i._invoke=function(e,t,n){var r=c;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===f){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var a=x(s,n);if(a){if(a===h)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===c)throw r=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=l(e,t,n);if("normal"===u.type){if(r=n.done?f:d,u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=f,n.method="throw",n.arg=u.arg)}}}(e,n,s),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var c="suspendedStart",d="suspendedYield",p="executing",f="completed",h={};function m(){}function g(){}function v(){}var b={};b[i]=function(){return this};var y=Object.getPrototypeOf,_=y&&y(y(k([])));_&&_!==n&&r.call(_,i)&&(b=_);var j=v.prototype=m.prototype=Object.create(b);function w(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function S(e){var t;this._invoke=function(n,o){function i(){return new Promise((function(t,i){!function t(n,o,i,s){var a=l(e[n],e,o);if("throw"!==a.type){var u=a.arg,c=u.value;return c&&"object"==typeof c&&r.call(c,"__await")?Promise.resolve(c.__await).then((function(e){t("next",e,i,s)}),(function(e){t("throw",e,i,s)})):Promise.resolve(c).then((function(e){u.value=e,i(u)}),(function(e){return t("throw",e,i,s)}))}s(a.arg)}(n,o,t,i)}))}return t=t?t.then(i,i):i()}}function x(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,x(e,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,h;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function k(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function n(){for(;++o=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var u=r.call(s,"catchLoc"),l=r.call(s,"finallyLoc");if(u&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:k(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),h}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},"./node_modules/shallow-compare/lib/index.js":function(e,t,n){"use strict";function r(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}t.__esModule=!0,t.default=function(e,t,n){return r(e.props,t)||r(e.state,n)},e.exports=t.default},"./node_modules/strict-uri-encode/index.js":function(e,t,n){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}},"./node_modules/superagent/lib/agent-base.js":function(e,t,n){"use strict";function r(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach((function(e){r.prototype[e]=function(){for(var t=arguments.length,n=new Array(t),r=0;r0||e instanceof Object)?t(e):null)},b.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot ".concat(t," ").concat(n," (").concat(this.status,")"),o=new Error(r);return o.status=this.status,o.method=t,o.url=n,o},p.Response=b,i(y.prototype),a(y.prototype),y.prototype.type=function(e){return this.set("Content-Type",p.types[e]||e),this},y.prototype.accept=function(e){return this.set("Accept",p.types[e]||e),this},y.prototype.auth=function(e,t,n){1===arguments.length&&(t=""),"object"===r(t)&&null!==t&&(n=t,t=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});var o=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,n,o)},y.prototype.query=function(e){return"string"!=typeof e&&(e=h(e)),e&&this._query.push(e),this},y.prototype.attach=function(e,t,n){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},y.prototype._getFormData=function(){return this._formData||(this._formData=new o.FormData),this._formData},y.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},y.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},y.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},y.prototype.buffer=y.prototype.ca,y.prototype.ca=y.prototype.agent,y.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},y.prototype.pipe=y.prototype.write,y.prototype._isHost=function(e){return e&&"object"===r(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},y.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||d,this._finalizeQueryString(),this._end()},y.prototype._setUploadTimeout=function(){var e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},y.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var e=this;this.xhr=p.getXHR();var t=this.xhr,n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4===n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(e._uploadTimeoutTimer)),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.addEventListener("progress",r.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",r.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],i=this._serializer||p.serialize[o?o.split(";")[0]:""];!i&&v(o)&&(i=p.serialize["application/json"]),i&&(n=i(n))}for(var s in this.header)null!==this.header[s]&&Object.prototype.hasOwnProperty.call(this.header,s)&&t.setRequestHeader(s,this.header[s]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===n?null:n)},p.agent=function(){return new c},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(e){c.prototype[e.toLowerCase()]=function(t,n){var r=new p.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}})),c.prototype.del=c.prototype.delete,p.get=function(e,t,n){var r=p("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},p.head=function(e,t,n){var r=p("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},p.options=function(e,t,n){var r=p("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},p.del=_,p.delete=_,p.patch=function(e,t,n){var r=p("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},p.post=function(e,t,n){var r=p("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},p.put=function(e,t,n){var r=p("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},"./node_modules/superagent/lib/is-object.js":function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return null!==e&&"object"===r(e)}},"./node_modules/superagent/lib/request-base.js":function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n("./node_modules/superagent/lib/is-object.js");function i(e){if(e)return function(e){for(var t in i.prototype)Object.prototype.hasOwnProperty.call(i.prototype,t)&&(e[t]=i.prototype[t]);return e}(e)}e.exports=i,i.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},i.prototype.parse=function(e){return this._parser=e,this},i.prototype.responseType=function(e){return this._responseType=e,this},i.prototype.serialize=function(e){return this._serializer=e,this},i.prototype.timeout=function(e){if(!e||"object"!==r(e))return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload;break;default:console.warn("Unknown timeout option",t)}return this},i.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var s=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];i.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!==t.status)return!0;if(e){if(e.code&&-1!==s.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},i.prototype.then=function(e,t){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(e,t){r.on("abort",(function(){var e=new Error("Aborted");e.code="ABORTED",e.status=n.status,e.method=n.method,e.url=n.url,t(e)})),r.end((function(n,r){n?t(n):e(r)}))}))}return this._fullfilledPromise.then(e,t)},i.prototype.catch=function(e){return this.then(void 0,e)},i.prototype.use=function(e){return e(this),this},i.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},i.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},i.prototype.get=function(e){return this._header[e.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(e,t){if(o(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},i.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},i.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(o(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.field(e,t[r]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),this._getFormData().append(e,t),this},i.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},i.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(e,":").concat(t))));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer ".concat(e))}return this},i.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},i.prototype.redirects=function(e){return this._maxRedirects=e,this},i.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(e){var t=o(e),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&o(this._data))for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this._data[r]=e[r]);else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(e):e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(n||this.type("json"),this)},i.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},i.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.substring(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.substring(0,t)+"?"+n.join("&")}}},i.prototype._appendQueryString=function(){console.warn("Unsupported")},i.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error("".concat(e+t,"ms exceeded"));r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.abort(),this.callback(r)}},i.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},"./node_modules/superagent/lib/response-base.js":function(e,t,n){"use strict";var r=n("./node_modules/superagent/lib/utils.js");function o(e){if(e)return function(e){for(var t in o.prototype)Object.prototype.hasOwnProperty.call(o.prototype,t)&&(e[t]=o.prototype[t]);return e}(e)}e.exports=o,o.prototype.get=function(e){return this.header[e.toLowerCase()]},o.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=r.type(t);var n=r.params(t);for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(this[o]=n[o]);this.links={};try{e.link&&(this.links=r.parseLinks(e.link))}catch(e){}},o.prototype._setStatusProperties=function(e){var t=e/100|0;this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e}},"./node_modules/superagent/lib/utils.js":function(e,t,n){"use strict";t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce((function(e,t){var n=t.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(e[r]=o),e}),{})},t.parseLinks=function(e){return e.split(/ *, */).reduce((function(e,t){var n=t.split(/ *; */),r=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=r,e}),{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},"./node_modules/sysend/sysend.js":function(e,t,n){var r,o,i;"undefined"!=typeof window&&window,o=[n("./node_modules/sysend/sysend.js")],void 0===(i="function"==typeof(r=function(){var e="___sysend___",t=Math.random(),n=0,r=new RegExp("^"+e);for(var o in localStorage)o.match(r)&&localStorage.removeItem(o);var i,s,a=(i=document.createElement("a"),function(e){return i.href=e,i.host}),u={},l=[],c=0;return"function"==typeof window.BroadcastChannel?(s=new window.BroadcastChannel(e)).addEventListener("message",(function(t){if(t.target.name===e){var n=t.data&&t.data.name;u[n]&&u[n].forEach((function(e){e(t.data.data,n)}))}})):window.addEventListener("storage",(function(n){if(n.key.match(r)&&c++%2==0){var o=n.key.replace(r,"");if(u[o]){var i=n.newValue||function(t){return localStorage.getItem(e+t)}(o);if(i&&i!=t){var s=JSON.parse(i);s&&s[1]!=t&&u[o].forEach((function(e){e(s[2],o)}))}}}}),!1),function(){try{return window.self!==window.top}catch(e){return!0}}()&&window.addEventListener("message",(function(t){var n=JSON.parse(t.data);n.name===e&&sysend.broadcast(n.key,n.data)})),{broadcast:function(r,o){var i,a;s?s.postMessage({name:r,data:o}):(function(r,o){0==n&&localStorage.setItem(e+r,t),localStorage.setItem(e+r,o)}(r,(a=[n++,t],void 0!==(i=o)&&a.push(i),JSON.stringify(a))),setTimeout((function(){!function(t){localStorage.removeItem(e+t)}(r)}),0)),function(t,n){l.forEach((function(r){var o={name:e,key:t,data:n};r.window.postMessage(JSON.stringify(o),"*")}))}(r,o)},proxy:function(e){if("string"==typeof e&&a(e)!==window.location.host){var t=document.createElement("iframe");t.style.width=t.style.height=0,t.style.border="none";var n=e;e.match(/\.html$/)||(n=e.replace(/\/$/,"")+"/proxy.html"),t.addEventListener("error",(function n(){setTimeout((function(){throw new Error('html proxy file not found on "'+e+'" url')}),0),t.removeEventListener("error",n)})),t.addEventListener("load",(function e(){var n;try{n=t.contentWindow}catch(e){n=t.contentWindow}l.push({window:n,node:t}),t.removeEventListener("load",e)})),document.body.appendChild(t),t.src=n}},on:function(e,t){u[e]||(u[e]=[]),u[e].push(t)},off:function(e,t){if(u[e])if(t)for(var n=u[e].length;n--;)u[e][n]==t&&u[e].splice(n,1);else u[e]=[]}}})?r.apply(t,o):r)||(e.exports=i)},"./node_modules/webpack/buildin/amd-options.js":function(e,t){(function(t){e.exports=t}).call(this,{})},"./node_modules/webpack/buildin/global.js":function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},0:function(e,t,n){n("./node_modules/custom-event-polyfill/polyfill.js"),n("./app/config.js"),e.exports=n("./app/mainLoader.js")}});
Piotr Paterczyk
Prywatnie wielki fan twórczości Paulo Coelho. Dziennikarz z zamiłowania. Popełniam różne tematy. Nie boje się pisać odważnie i otwarcie.

ZOSTAW ODPOWIEDŹ

Please enter your comment!
Please enter your name here