/**
* Kaltura Player lib
* kaltura-ovp-player v0.46.0
* playkit-flash v1.4.4
* playkit-vr v1.3.2
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("KalturaPlayer",[],t):"object"==typeof exports?exports.KalturaPlayer=t():e.KalturaPlayer=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=148)}([function(e,t,n){var r=n(2),i=n(23),a=n(13),o=n(14),s=n(20),l=function(e,t,n){var u,c,p,f,d=e&l.F,h=e&l.G,y=e&l.S,v=e&l.P,g=e&l.B,m=h?r:y?r[t]||(r[t]={}):(r[t]||{}).prototype,b=h?i:i[t]||(i[t]={}),_=b.prototype||(b.prototype={});h&&(n=t);for(u in n)c=!d&&m&&void 0!==m[u],p=(c?m:n)[u],f=g&&c?s(p,r):v&&"function"==typeof p?s(Function.call,p):p,m&&o(m,u,p,e&l.U),b[u]!=p&&a(b,u,f),v&&_[u]!=p&&(_[u]=p)};r.core=i,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){var r=n(4);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(54)("wks"),i=n(34),a=n(2).Symbol,o="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=r},function(e,t,n){e.exports=!n(3)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(1),i=n(103),a=n(24),o=Object.defineProperty;t.f=n(6)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(26),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=40)}([function(e,t,n){"use strict";function r(e){l.setHandler(function(t,n){return e(t,n)})}function i(e){return e?l.get(e):l}function a(e){return i(e).getLevel()}function o(e,t){i(t).setLevel(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.setLogHandler=t.setLogLevel=t.getLogLevel=t.LogLevelType=t.LogLevel=void 0;var s=n(45),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),u={DEBUG:l.DEBUG,INFO:l.INFO,TIME:l.TIME,WARN:l.WARN,ERROR:l.ERROR,OFF:l.OFF},c={};Object.keys(u).forEach(function(e){c[e]=e}),l.useDefaults({defaultLevel:l.ERROR}),t.default=i,t.LogLevel=u,t.LogLevelType=c,t.getLogLevel=a,t.setLogLevel=o,t.setLogHandler=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t,n){r(this,e),this.bubbles=!1,this.cancelable=!1,this.defaultPrevented=!1,this.timeStamp=window.performance?window.performance.now():Date.now(),this.type=t,this.isTrusted=!1,this.currentTarget=null,this.target=null,this.stopped=!1,this.payload=n}return i(e,[{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.stopped=!0}},{key:"stopPropagation",value:function(){}}]),e}();t.default=a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=function(e){return e&&e.__esModule?e:{default:e}}(i),o=n(46),s=n(47),l=n(49),u=function e(t,n,a){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};r(this,e),this.severity=t,this.category=n,this.code=a,this.data=o,(0,i.getLogLevel)("Error")!==i.LogLevel.OFF&&e._logger.error("Category:"+n+" | Code:"+a+" |",o)};u.Severity=o.Severity,u.Category=l.Category,u.Code=s.Code,u._logger=(0,a.default)("Error"),t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomEventType=t.Html5EventType=t.EventType=void 0;var r=n(5),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(r),a=n(13),o={ABORT:"abort",CAN_PLAY:"canplay",CAN_PLAY_THROUGH:"canplaythrough",DURATION_CHANGE:"durationchange",EMPTIED:"emptied",ENDED:"ended",ERROR:"error",LOADED_DATA:"loadeddata",LOADED_METADATA:"loadedmetadata",LOAD_START:"loadstart",PAUSE:"pause",PLAY:"play",PLAYING:"playing",PROGRESS:"progress",RATE_CHANGE:"ratechange",SEEKED:"seeked",SEEKING:"seeking",STALLED:"stalled",SUSPEND:"suspend",TIME_UPDATE:"timeupdate",VOLUME_CHANGE:"volumechange",WAITING:"waiting",ENTER_PICTURE_IN_PICTURE:"enterpictureinpicture",LEAVE_PICTURE_IN_PICTURE:"leavepictureinpicture",PRESENTATION_MODE_CHANGED:"webkitpresentationmodechanged"},s={MEDIA_LOADED:"medialoaded",PLAYER_RESET:"playerreset",PLAYER_DESTROY:"playerdestroy",ENTER_FULLSCREEN:"enterfullscreen",EXIT_FULLSCREEN:"exitfullscreen",AUTOPLAY_FAILED:"autoplayfailed",FALLBACK_TO_MUTED_AUTOPLAY:"fallbacktomutedautoplay",CHANGE_SOURCE_STARTED:"changesourcestarted",CHANGE_SOURCE_ENDED:"changesourceended",MUTE_CHANGE:"mutechange",VIDEO_TRACK_CHANGED:"videotrackchanged",AUDIO_TRACK_CHANGED:"audiotrackchanged",TEXT_TRACK_CHANGED:"texttrackchanged",TEXT_CUE_CHANGED:"textcuechanged",TRACKS_CHANGED:"trackschanged",ABR_MODE_CHANGED:"abrmodechanged",PLAYER_STATE_CHANGED:"playerstatechanged",PLAYBACK_START:"playbackstart",FIRST_PLAY:"firstplay",FIRST_PLAYING:"firstplaying",PLAYBACK_ENDED:"playbackended",SOURCE_SELECTED:"sourceselected",TEXT_STYLE_CHANGED:"textstylechanged",MEDIA_RECOVERED:"mediarecovered",VR_STEREO_MODE_CHANGED:"vrstereomodechanged",FPS_DROP:"fpsdrop",BOOKMARK_ERROR:"bookmarkerror",CONCURRENCY_LIMIT:"concurrencylimit",RESIZE:"resize",TIMED_METADATA:"timedmetadata",FRAG_LOADED:"fragloaded",MANIFEST_LOADED:"manifestloaded"},l=i.Object.merge([o,s,a.AdEventType]);t.EventType=l,t.Html5EventType=o,t.CustomEventType=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(16),s=r(o),l=n(1),u=(r(l),function(){function e(){i(this,e),this._bindingMap=new s.default}return a(e,[{key:"destroy",value:function(){return this.removeAll(),this._bindingMap=null,Promise.resolve()}},{key:"listenOnce",value:function(e,t,n,r){var i=this,a=function r(a){i.unlisten(e,t,r),n.call(i,a)};this.listen(e,t,a,r)}},{key:"listen",value:function(e,t,n,r){var i=new c(e,t,n,r);this._bindingMap&&this._bindingMap.push(t,i)}},{key:"unlisten",value:function(e,t,n){if(this._bindingMap)for(var r=this._bindingMap.get(t),i=0;i<r.length;++i){var a=r[i];a.target!==e||a.listener!==n&&n||(a.unlisten(),this._bindingMap&&this._bindingMap.remove(t,a))}}},{key:"removeAll",value:function(){if(this._bindingMap){var e=this._bindingMap.getAll(),t=!0,n=!1,r=void 0;try{for(var i,a=e[Symbol.iterator]();!(t=(i=a.next()).done);t=!0)i.value.unlisten()}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}this._bindingMap&&this._bindingMap.clear()}}}]),e}()),c=function(){function e(t,n,r,a){i(this,e),this.target=t,this.type=n,this.listener=r,this.options=a,this.target.addEventListener(n,r,a)}return a(e,[{key:"unlisten",value:function(){this.target&&(this.target.removeEventListener(this.type,this.listener,this.options),this.target=null,this.listener=null,this.options=null)}}]),e}();t.default=u},function(e,t,n){"use strict";function r(e){return Array.isArray(e)?e:Array.from(e)}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=t.Http=t.Dom=t.Generator=t.Object=t.String=t.Number=void 0;var o="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},s=n(44),l={isNumber:function(e){return Number(e)===e},isInt:function(e){return this.isNumber(e)&&e%1==0},isFloat:function(e){return this.isNumber(e)&&e%1!=0}},u={capitlize:function(e){return"string"!=typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)},endsWith:function(e,t){return"string"==typeof e&&"string"==typeof t&&-1!=e.indexOf(t,e.length-t.length)}},c={merge:function(e){var t={},n=!0,r=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;Object.assign(t,s)}}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}return t},isObject:function(e){return e&&"object"===(void 0===e?"undefined":o(e))&&!Array.isArray(e)},mergeDeep:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!n.length)return e;var o=n.shift();if(this.isObject(e)&&this.isObject(o))for(var s in o)this.isObject(o[s])?(e[s]||Object.assign(e,a({},s,{})),this.mergeDeep(e[s],o[s])):Object.assign(e,a({},s,o[s]));return this.mergeDeep.apply(this,[e].concat(i(n)))},copyDeep:function(e){var t=this,n=void 0;return Array.isArray(e)?(n=e.length>0?e.slice(0):[],n.forEach(function(e,r){("object"===(void 0===e?"undefined":o(e))&&e!=={}||Array.isArray(e)&&e.length>0)&&(n[r]=t.copyDeep(e))})):null!==e&&"object"===(void 0===e?"undefined":o(e))?e.clone&&"function"==typeof e.clone?n=e.clone():(n=Object.assign({__proto__:e.__proto__},e),Object.keys(n).forEach(function(e){("object"===o(n[e])&&n[e]!=={}||Array.isArray(n[e])&&n[e].length>0)&&(n[e]=t.copyDeep(n[e]))})):n=e,n},isEmptyObject:function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},getPropertyPath:function(e,t){return t.split(".").reduce(function(e,t){return void 0===e||null===e?e:e[t]},e)},hasPropertyPath:function(e,t){if(!t)return!1;for(var n=t.split("."),r=0;r<n.length;r++){var i=n[r];if(!e||!e.hasOwnProperty(i))return!1;e=e[i]}return!0},createPropertyPath:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=t.split("."),a=e;i.length>1;){var o=i,s=r(o),l=s[0];i=s.slice(1),void 0===a[l]&&(a[l]={}),a=a[l]}return a[i[0]]=n,e},deletePropertyPath:function(e,t){if(e&&t){for(var n=t.split("."),r=0;r<n.length-1;r++)if(void 0===(e=e[n[r]]))return;delete e[n.pop()]}},defer:function(){var e=void 0,t=void 0,n=new Promise(function(n,r){e=n,t=r});return n.resolve=e,n.reject=t,n},bind:function(e,t){return function(){t.apply(e,arguments)}}},p={uniqueId:function(e){var t=2+(!e||e<0?0:e-2);return"_"+Math.random().toString(36).substr(2,t)},guid:function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}},f={addClassName:function(e,t){e.classList?e.classList.add(t):f.hasClassName(e,t)||(e.className+=t)},removeClassName:function(e,t){e.classList?e.classList.remove(t):f.hasClassName(e,t)&&(e.className=e.className.replace(new RegExp("(\\s|^)"+t+"(\\s|$)")," ").replace(/^\s+|\s+$/g,""))},hasClassName:function(e,t){return e.className&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},setAttribute:function(e,t,n){e.setAttribute(t,n)},removeAttribute:function(e,t){e.removeAttribute(t)},setStyle:function(e,t,n){void 0!==e.style.getPropertyValue(t)&&e.style.setProperty(t,n)},appendChild:function(e,t){e&&t&&e.appendChild&&e.appendChild(t)},removeChild:function(e,t){e&&t&&e.removeChild&&e.removeChild(t)},prependTo:function(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)},getElementById:function(e){return document.getElementById(e)},getElementsByTagName:function(e){return document.getElementsByTagName(e)},createElement:function(e){return document.createElement(e)},loadScriptAsync:function(e){var t=this;return new Promise(function(n,r){var i=!1,a=document.getElementsByTagName("script")[0],o=t.createElement("script");o.type="text/javascript",o.src=e,o.async=!0,o.onload=o.onreadystatechange=function(){i||this.readyState&&"complete"!==this.readyState||(i=!0,n(this))},o.onerror=o.onabort=r,a&&a.parentNode&&a.parentNode.insertBefore(o,a)})},getElementBySelector:function(e){try{return document.querySelector(e)}catch(e){return}},insertBefore:function(e,t,n){try{return e.insertBefore(t,n)}catch(e){return null}}},d={protocol:/^(https?:)/i.test(document.location.protocol)?document.location.protocol:"https:",execute:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"POST",r=arguments[3],i=new XMLHttpRequest;return new Promise(function(a,o){i.onreadystatechange=function(){if(4===i.readyState)if(200===i.status)try{var e=JSON.parse(i.responseText);a(e)}catch(e){a(i.responseText)}else o(i.responseText)},i.open(n,e),r&&r.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send(t)})},jsonp:s.jsonp},h={compare:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=c.merge([{lexicographical:!1,zeroExtend:!0},n]);var r=n.lexicographical,i=n.zeroExtend,a=(e||"0").split("."),o=(t||"0").split("."),s=function(e){return(r?/^\d+[A-Za-zαß]*$/:/^\d+[A-Za-zαß]?$/).test(e)},l=function(e){return e.map(function(e){var t=/[A-Za-zαß]/.exec(e);return Number(t?e.replace(t[0],"."+e.charCodeAt(t.index)):e)})};if(!a.every(s)||!o.every(s))return NaN;if(i){for(;a.length<o.length;)a.push("0");for(;o.length<a.length;)o.push("0")}r||(a=l(a),o=l(o));for(var u=0;u<a.length;++u){if(o.length===u)return 1;if(a[u]!==o[u])return a[u]>o[u]?1:-1}return a.length!==o.length?-1:0}};t.Number=l,t.String=u,t.Object=c,t.Generator=p,t.Dom=f,t.Http=d,t.VERSION=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(1),s=(r(o),n(16)),l=r(s),u=function(){function e(){i(this,e),this._listeners=new l.default,this.dispatchTarget=this}return a(e,[{key:"addEventListener",value:function(e,t){this._listeners.push(e,t)}},{key:"removeEventListener",value:function(e,t){this._listeners.remove(e,t)}},{key:"dispatchEvent",value:function(e){for(var t=this._listeners.get(e.type)||[],n=0;n<t.length;++n){e.target=this.dispatchTarget,e.currentTarget=this.dispatchTarget;var r=t[n];try{r.handleEvent?r.handleEvent(e):r.call(this,e)}catch(e){}if(e.stopped)break}return e.defaultPrevented}}]),e}();t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e),this._id=t.id,this._active=t.active,this._label=t.label,this._language=t.language,this._index=t.index,this.clone=e.clone.bind(null,this)}return i(e,[{key:"id",get:function(){return this._id}},{key:"active",get:function(){return this._active},set:function(e){this._active=e}},{key:"label",get:function(){return this._label},set:function(e){this._label=e}},{key:"language",get:function(){return this._language}},{key:"index",get:function(){return this._index},set:function(e){this._index=e}}],[{key:"langComparer",value:function(e,t){try{return e=e.toLowerCase(),t=t.toLowerCase(),!!e&&(e.startsWith(t)||t.startsWith(e))}catch(e){return!1}}},{key:"clone",value:function(e){return Object.assign(Object.create(Object.getPrototypeOf(e)),e)}}]),e}();t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s="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},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(12),c=r(u),p=n(4),f=r(p),d=n(43),h=r(d),y=n(1),v=r(y),g=n(6),m=r(g),b=n(3),_=n(5),E=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(_),k=n(50),T=r(k),A=n(0),w=r(A),S=n(17),P=r(S),O=n(18),C=(r(O),n(51)),x=r(C),R=n(7),I=r(R),D=n(10),M=r(D),L=n(11),N=r(L),j=n(9),U=r(j),F=n(20),B=r(F),V=(n(14),n(21)),G=n(19),H=n(15),K=n(53),z=n(25),Y=n(26),W=n(27),q=n(28),X=n(29),J=n(55),Q=r(J),$=n(57);n(58);var Z=n(2),ee=r(Z),te=n(30),ne=n(72),re=n(35),ie=n(36),ae=n(37),oe=n(13),se=n(73),le=n(74),ue=n(75),ce=n(76),pe="off",fe=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._activeTextCues=[],n._textDisplaySettings={},n._playbackAttributesState={muted:void 0,volume:void 0,rate:void 0,audioLanguage:"",textLanguage:""},n._setConfigLogLevel(e),n._playerId=E.Generator.uniqueId(5),n._prepareVideoElement(),t.runCapabilities(),n._env=c.default,n._tracks=[],n._firstPlay=!0,n._repositionCuesTimeout=!1,n._loadingMedia=!1,n._loading=!1,n._playbackStart=!1,n._firstPlaying=!1,n._reset=!0,n._destroyed=!1,n._fallbackToMutedAutoPlay=!1,n._config=t._defaultConfig,n._eventManager=new f.default,n._posterManager=new h.default,n._stateManager=new x.default(n),n._pluginManager=new P.default,n._controllerProvider=new se.ControllerProvider(n._pluginManager),n._resizeWatcher=new le.ResizeWatcher,n._playbackMiddleware=new Q.default,n._textStyle=new B.default,n._createReadyPromise(),n._createPlayerContainer(),n._appendDomElements(),n._externalCaptionsHandler=new ne.ExternalCaptionsHandler(n),n._fullscreenController=new ue.FullscreenController(n),n.configure(e),n}return o(t,e),l(t,null,[{key:"runCapabilities",value:function(){t._logger.debug("Running player capabilities"),te.EngineProvider.getEngines().forEach(function(e){return e.runCapabilities()})}},{key:"getCapabilities",value:function(e){t._logger.debug("Get player capabilities",e);var n=[];return te.EngineProvider.getEngines().forEach(function(e){return n.push(e.getCapabilities())}),Promise.all(n).then(function(n){var r={};return n.forEach(function(e){return Object.assign(r,e)}),E.Object.mergeDeep(r,t._playerCapabilities),e?r[e]:r})}},{key:"setCapabilities",value:function(e,n){t._logger.debug("Set player capabilities",e,n),t._playerCapabilities[e]=E.Object.mergeDeep({},t._playerCapabilities[e],n)}}]),l(t,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setConfigLogLevel(e),this._hasSources(e.sources)?(this._configureOrLoadPlugins(e.plugins),this._maybeCreateAdsController(),this.reset(),this._resizeWatcher.init(E.Dom.getElementById(this._playerId)),t._logger.debug("Change source started"),this.dispatchEvent(new v.default(b.CustomEventType.CHANGE_SOURCE_STARTED)),this._pluginManager.loadMedia(),E.Object.mergeDeep(this._config,e),this._reset=!1,this._selectEngineByPriority()?(this.dispatchEvent(new v.default(b.CustomEventType.SOURCE_SELECTED,{selectedSource:this._config.sources[this._streamType]})),this._attachMedia(),this._handlePlaybackOptions(),this._posterManager.setSrc(this._config.sources.poster),this._handlePreload(),this._handleAutoPlay(),t._logger.debug("Change source ended"),this.dispatchEvent(new v.default(b.CustomEventType.CHANGE_SOURCE_ENDED))):(t._logger.warn("No playable engines was found to play the given sources"),this.dispatchEvent(new v.default(b.Html5EventType.ERROR,new ee.default(ee.default.Severity.CRITICAL,ee.default.Category.PLAYER,ee.default.Code.NO_ENGINE_FOUND_TO_PLAY_THE_SOURCE,"No Engine Found To Play The Source"))))):(E.Object.mergeDeep(this._config,e),this._configureOrLoadPlugins(e.plugins),this._maybeCreateAdsController())}},{key:"ready",value:function(){return this._readyPromise?this._readyPromise:Promise.resolve()}},{key:"load",value:function(){var e=this,t=function(){e._engine?e._load():e._eventManager.listenOnce(e,b.CustomEventType.SOURCE_SELECTED,function(){return e._load()})};this._playbackMiddleware.load(function(){return t()})}},{key:"play",value:function(){var e=this;this._playbackStart||(this._playbackStart=!0,this.dispatchEvent(new v.default(b.CustomEventType.PLAYBACK_START)),this.load()),this._engine?this._playbackMiddleware.play(function(){return e._play()}):this._loadingMedia?(this._prepareVideoElement(),this._playbackMiddleware.play(function(){return e._playAfterAsyncMiddleware()})):this.dispatchEvent(new v.default(b.Html5EventType.ERROR,new ee.default(ee.default.Severity.CRITICAL,ee.default.Category.PLAYER,ee.default.Code.NO_SOURCE_PROVIDED,"No Source Provided")))}},{key:"pause",value:function(){this._engine&&this._playbackMiddleware.pause(this._pause.bind(this))}},{key:"getView",value:function(){return this._el}},{key:"getVideoElement",value:function(){if(this._engine)return this._engine.getVideoElement()}},{key:"reset",value:function(){this._reset||(this.pause(),this._externalCaptionsHandler.reset(),this._posterManager.reset(),this._pluginManager.reset(),this._stateManager.reset(),this._config.sources={},this._activeTextCues=[],this._updateTextDisplay([]),this._tracks=[],this._resetStateFlags(),this._engineType="",this._streamType="",this._engine&&this._engine.reset(),this._showBlackCover(),this._reset=!0,this.dispatchEvent(new v.default(b.CustomEventType.PLAYER_RESET)),this._eventManager.removeAll(),this._resizeWatcher.init(E.Dom.getElementById(this._playerId)),this._createReadyPromise())}},{key:"destroy",value:function(){this._destroyed||(this._externalCaptionsHandler.destroy(),t._playerCapabilities={},this._posterManager.destroy(),this._pluginManager.destroy(),this._stateManager.destroy(),this._clearRepositionTimeout(),this._activeTextCues=[],this._textDisplaySettings={},this._config={},this._tracks=[],this._engineType="",this._streamType="",this._readyPromise=null,this._resetStateFlags(),this._playbackAttributesState={},this._engine&&this._engine.destroy(),this._resizeWatcher.destroy(),this._el&&E.Dom.removeChild(this._el.parentNode,this._el),this._destroyed=!0,this.dispatchEvent(new v.default(b.CustomEventType.PLAYER_DESTROY)),this._eventManager.destroy())}},{key:"_attachMediaSource",value:function(){var e=this;this._engine&&(this._engine.attachMediaSource(),this._eventManager.listenOnce(this,b.Html5EventType.CAN_PLAY,function(){"number"==typeof e._playbackAttributesState.rate&&(e.playbackRate=e._playbackAttributesState.rate)}))}},{key:"_detachMediaSource",value:function(){this._engine&&(this._createReadyPromise(),this._engine.detachMediaSource())}},{key:"isLive",value:function(){return!(this._config.sources.type===W.MediaType.VOD||!(this._config.sources.type===W.MediaType.LIVE||this._engine&&this._engine.isLive()))}},{key:"isDvr",value:function(){return this.isLive()&&this._config.sources.dvr}},{key:"seekToLiveEdge",value:function(){this._engine&&this.isLive()&&this._engine.seekToLiveEdge()}},{key:"getStartTimeOfDvrWindow",value:function(){return this._engine?this._engine.getStartTimeOfDvrWindow():0}},{key:"getTracks",value:function(e){return E.Object.copyDeep(this._getTracksByType(e))}},{key:"getActiveTracks",value:function(){return E.Object.copyDeep({video:this._getTracksByType(H.TrackType.VIDEO).find(function(e){return e.active}),audio:this._getTracksByType(H.TrackType.AUDIO).find(function(e){return e.active}),text:this._getTracksByType(H.TrackType.TEXT).find(function(e){return e.active})})}},{key:"selectTrack",value:function(e){this._engine&&(e instanceof M.default?this._engine.selectVideoTrack(e):e instanceof N.default?this._engine.selectAudioTrack(e):e instanceof U.default&&(this._resetTextDisplay(),e.language===pe?(this.hideTextTrack(),this._externalCaptionsHandler.hideTextTrack(),this._playbackAttributesState.textLanguage=pe):e.external&&!this._config.playback.useNativeTextTrack?(this._engine.hideTextTrack(),this._externalCaptionsHandler.selectTextTrack(e)):(this._externalCaptionsHandler.hideTextTrack(),this._engine.selectTextTrack(e))))}},{key:"hideTextTrack",value:function(){if(this._engine){this._engine.hideTextTrack(),this._resetTextDisplay();var e=this._getTracksByType(H.TrackType.TEXT);e.map(function(e){return e.active=!1});var t=e.find(function(e){return e.language===pe});t&&(t.active=!0,this.dispatchEvent(new v.default(b.CustomEventType.TEXT_TRACK_CHANGED,{selectedTextTrack:t})))}}},{key:"enableAdaptiveBitrate",value:function(){this._engine&&this._engine.enableAdaptiveBitrate()}},{key:"isAdaptiveBitrateEnabled",value:function(){return!!this._engine&&this._engine.isAdaptiveBitrateEnabled()}},{key:"setTextDisplaySettings",value:function(e){this._textDisplaySettings=e,this._updateCueDisplaySettings();for(var t=0;t<this._activeTextCues.length;t++)this._activeTextCues[t].hasBeenReset=!0;this._updateTextDisplay(this._activeTextCues)}},{key:"isFullscreen",value:function(){return this._fullscreenController.isFullscreen()}},{key:"notifyEnterFullscreen",value:function(){this.isFullscreen()&&this.dispatchEvent(new v.default(b.CustomEventType.ENTER_FULLSCREEN))}},{key:"notifyExitFullscreen",value:function(){this.isFullscreen()||this.dispatchEvent(new v.default(b.CustomEventType.EXIT_FULLSCREEN))}},{key:"enterFullscreen",value:function(e){this._fullscreenController.enterFullscreen(e)}},{key:"exitFullscreen",value:function(){this._fullscreenController.exitFullscreen()}},{key:"enterPictureInPicture",value:function(){this.isFullscreen()&&this.exitFullscreen(),this._engine.isInPictureInPicture||this._engine.enterPictureInPicture()}},{key:"exitPictureInPicture",value:function(){this._engine.isInPictureInPicture&&this._engine.exitPictureInPicture()}},{key:"isInPictureInPicture",value:function(){return this._engine.isInPictureInPicture}},{key:"isPictureInPictureSupported",value:function(){return!!this._config.playback.pictureInPicture&&this._engine.isPictureInPictureSupported()}},{key:"isVr",value:function(){return!!this._config.sources.vr}},{key:"toggleVrStereoMode",value:function(){var e=this._pluginManager.get("vr");e&&"function"==typeof e.toggleVrStereoMode&&e.toggleVrStereoMode()}},{key:"isInVrStereoMode",value:function(){var e=this._pluginManager.get("vr");return!(!e||"function"!=typeof e.isInStereoMode)&&e.isInStereoMode()}},{key:"getLogLevel",value:function(e){return(0,A.getLogLevel)(e)}},{key:"setLogLevel",value:function(e,t){(0,A.setLogLevel)(e,t)}},{key:"_resetTextDisplay",value:function(){this._activeTextCues=[],this._updateTextDisplay([])}},{key:"_prepareVideoElement",value:function(){var e=this;te.EngineProvider.getEngines().forEach(function(t){t.prepareVideoElement(e._playerId)})}},{key:"_setConfigLogLevel",value:function(e){e.log&&e.log.level&&A.LogLevel[e.log.level]&&(0,A.setLogLevel)(A.LogLevel[e.log.level]),e.log&&"function"==typeof e.log.handler&&(0,A.setLogHandler)(e.log.handler)}},{key:"_hasSources",value:function(e){return!!e&&!!Object.values(z.StreamType).find(function(t){return e[t]&&e[t].length>0})}},{key:"_createPlayerContainer",value:function(){var e=this._el=E.Dom.createElement("div");E.Dom.addClassName(e,"playkit-container"),E.Dom.setAttribute(e,"id",this._playerId),E.Dom.setAttribute(e,"tabindex","-1")}},{key:"_appendEngineEl",value:function(){if(this._el){var e=this._engine.getVideoElement();E.Dom.addClassName(e,"playkit-engine");var t="playkit-engine-"+this._engine.id;E.Dom.addClassName(e,t),E.Dom.prependTo(e,this._el)}}},{key:"_appendDomElements",value:function(){this._textDisplayEl=E.Dom.createElement("div"),E.Dom.addClassName(this._textDisplayEl,"playkit-subtitles"),E.Dom.appendChild(this._el,this._textDisplayEl),this._blackCoverEl=E.Dom.createElement("div"),E.Dom.addClassName(this._blackCoverEl,"playkit-black-cover"),E.Dom.appendChild(this._el,this._blackCoverEl);var e=this._posterManager.getElement();E.Dom.addClassName(e,"playkit-poster"),E.Dom.appendChild(this._el,e)}},{key:"_configureOrLoadPlugins",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t){var n=[];Object.keys(t).forEach(function(r){var i=e._pluginManager.get(r);if(i)i.updateConfig(t[r]),e._config.plugins[r]=i.getConfig();else if(e._engine)delete e._config.plugins[r];else{try{e._pluginManager.load(r,e,t[r])}catch(t){e.dispatchEvent(t)}var a=e._pluginManager.get(r);a&&(e._config.plugins[r]=a.getConfig(),"function"==typeof a.getMiddlewareImpl&&("bumper"===a.name?n.push(a.getMiddlewareImpl()):n.unshift(a.getMiddlewareImpl())))}}),n.forEach(function(t){return e._playbackMiddleware.use(t)})}}},{key:"_createReadyPromise",value:function(){var e=this;this._readyPromise=new Promise(function(t,n){e._eventManager.listenOnce(e,b.CustomEventType.TRACKS_CHANGED,function(){e.dispatchEvent(new v.default(b.CustomEventType.MEDIA_LOADED)),t()}),e._eventManager.listen(e,b.Html5EventType.ERROR,n)}).catch(function(){})}},{key:"_selectEngineByPriority",value:function(){var e=this,n=this._config.playback.streamPriority,r=this._config.playback.preferNative,i=this._config.sources,a=!0,o=!1,l=void 0;try{for(var u,c=n[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var p=function(){var n=u.value,a="string"==typeof n.engine?n.engine.toLowerCase():"",o="string"==typeof n.format?n.format.toLowerCase():"",s=te.EngineProvider.getEngines().find(function(e){return e.id===a});if(s){var l=i[o];if(l&&l.length>0){var c=l[0];if(s.canPlaySource(c,r[o],e._config.drm))return t._logger.debug("Source selected: ",l),e._loadEngine(s,c),e._engineType=a,e._streamType=o,{v:!0}}}}();if("object"===(void 0===p?"undefined":s(p)))return p.v}}catch(e){o=!0,l=e}finally{try{!a&&c.return&&c.return()}finally{if(o)throw l}}return!1}},{key:"_loadEngine",value:function(e,t){this._engine?this._engine.id===e.id?this._engine.restore(t,this._config):(this._engine.destroy(),this._createEngine(e,t),this._appendEngineEl()):(this._createEngine(e,t),this._appendEngineEl())}},{key:"_createEngine",value:function(e,t){var n=e.createEngine(t,this._config),r=Object.values(this._pluginManager.getAll());this._engine=ce.EngineDecorator.getDecorator(n,r)||n}},{key:"_attachMedia",value:function(){var e=this;this._engine&&(Object.keys(b.Html5EventType).forEach(function(t){e._eventManager.listen(e._engine,b.Html5EventType[t],function(t){return e.dispatchEvent(t)})}),this._eventManager.listen(this._engine,b.Html5EventType.SEEKED,function(){var t=e._env.browser.name;"Edge"!==t&&"IE"!==t||e._removeTextCuePatch()}),this._eventManager.listen(this._engine,b.CustomEventType.VIDEO_TRACK_CHANGED,function(t){return e._markActiveTrack(t.payload.selectedVideoTrack),e.dispatchEvent(t)}),this._eventManager.listen(this._engine,b.CustomEventType.AUDIO_TRACK_CHANGED,function(t){e.ready().then(function(){return e._playbackAttributesState.audioLanguage=t.payload.selectedAudioTrack.language}),e._markActiveTrack(t.payload.selectedAudioTrack),e.dispatchEvent(t)}),this._eventManager.listen(this._engine,b.CustomEventType.TEXT_TRACK_CHANGED,function(t){return e._onTextTrackChanged(t)}),this._eventManager.listen(this._engine,b.CustomEventType.TRACKS_CHANGED,function(t){return e._onTracksChanged(t)}),this._eventManager.listen(this._engine,b.CustomEventType.TEXT_CUE_CHANGED,function(t){return e._onCueChange(t)}),this._eventManager.listen(this._engine,b.CustomEventType.ABR_MODE_CHANGED,function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this._engine,b.CustomEventType.TIMED_METADATA,function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this._engine,b.CustomEventType.AUTOPLAY_FAILED,function(t){e.pause(),e._firstPlay&&e._config.playback.autoplay&&e.dispatchEvent(t)}),this._eventManager.listen(this._engine,b.CustomEventType.FPS_DROP,function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this._engine,b.CustomEventType.FRAG_LOADED,function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this._engine,b.CustomEventType.MANIFEST_LOADED,function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this,b.Html5EventType.PLAY,this._onPlay.bind(this)),this._eventManager.listen(this,b.Html5EventType.PLAYING,this._onPlaying.bind(this)),this._eventManager.listen(this,b.Html5EventType.ENDED,this._onEnded.bind(this)),this._eventManager.listen(this,b.CustomEventType.PLAYBACK_ENDED,this._onPlaybackEnded.bind(this)),this._eventManager.listen(this,b.CustomEventType.MUTE_CHANGE,function(){e._playbackAttributesState.muted=e.muted}),this._eventManager.listen(this,b.Html5EventType.VOLUME_CHANGE,function(){e._playbackAttributesState.volume=e.volume}),this._eventManager.listen(this,b.Html5EventType.RATE_CHANGE,function(){e._playbackAttributesState.rate=e.playbackRate}),this._eventManager.listen(this,b.CustomEventType.ENTER_FULLSCREEN,function(){return e._resetTextCuesAndReposition()}),this._eventManager.listen(this,b.CustomEventType.EXIT_FULLSCREEN,function(){return e._resetTextCuesAndReposition()}),this._eventManager.listen(this._resizeWatcher,b.CustomEventType.RESIZE,function(t){e._resetTextCuesAndReposition(),e.dispatchEvent(t)}),this._eventManager.listen(this._engine,b.CustomEventType.MEDIA_RECOVERED,function(){return e._handleRecovered()}),this._eventManager.listen(this._externalCaptionsHandler,b.CustomEventType.TEXT_CUE_CHANGED,function(t){return e._onCueChange(t)}),this._eventManager.listen(this._externalCaptionsHandler,b.CustomEventType.TEXT_TRACK_CHANGED,function(t){return e._onTextTrackChanged(t)}),this._eventManager.listen(this._externalCaptionsHandler,b.Html5EventType.ERROR,function(t){return e.dispatchEvent(t)}),this._adsController&&this._eventManager.listen(this._adsController,oe.AdEventType.AD_BREAK_START,function(){e._firstPlay&&(e._posterManager.hide(),e._hideBlackCover())}),this.config.playback.playAdsWithMSE&&(this._eventManager.listen(this,oe.AdEventType.AD_LOADED,function(t){t.payload.ad.linear&&e._detachMediaSource()}),this._eventManager.listen(this,oe.AdEventType.AD_BREAK_END,this._attachMediaSource),this._eventManager.listen(this,oe.AdEventType.AD_ERROR,this._attachMediaSource)))}},{key:"_handleRecovered",value:function(){this._stateManager.currentState.type===G.StateType.PLAYING&&this.play()}},{key:"_onTextTrackChanged",value:function(e){var t=this;this.ready().then(function(){return t._playbackAttributesState.textLanguage=e.payload.selectedTextTrack.language}),this._markActiveTrack(e.payload.selectedTextTrack),this._config.playback.useNativeTextTrack&&this._externalCaptionsHandler.selectTextTrack(e.payload.selectedTextTrack),this.dispatchEvent(e)}},{key:"_resetTextCuesAndReposition",value:function(){var e=this;this._engine.resetAllCues(),this._updateTextDisplay([]);for(var t=0;t<this._activeTextCues.length;t++)this._activeTextCues[t].hasBeenReset=!0;this._clearRepositionTimeout(),this._repositionCuesTimeout=setTimeout(function(){e._updateTextDisplay(e._activeTextCues),e._repositionCuesTimeout=!1},1e3)}},{key:"_clearRepositionTimeout",value:function(){this._repositionCuesTimeout&&clearTimeout(this._repositionCuesTimeout)}},{key:"_removeTextCuePatch",value:function(){var e=this,t=this._activeTextCues.filter(function(t){var n=t._endTime,r=t._startTime,i=e.currentTime;if(i<n&&i>r)return t});this._updateTextDisplay(t)}},{key:"_handlePlaybackOptions",value:function(){if(this._config.playback=this._config.playback||{},"boolean"==typeof this._playbackAttributesState.muted?this.muted=this._playbackAttributesState.muted:"boolean"==typeof this._config.playback.muted&&(this.muted=this._config.playback.muted),"number"==typeof this._playbackAttributesState.volume?this.volume=this._playbackAttributesState.volume:"number"==typeof this._config.playback.volume&&(this.volume=this._config.playback.volume),"boolean"==typeof this._config.playback.playsinline&&(this.playsinline=this._config.playback.playsinline),"string"==typeof this._config.playback.crossOrigin&&(this.crossOrigin=this._config.playback.crossOrigin),Array.isArray(this._config.playback.playbackRates)){var e=this._config.playback.playbackRates.filter(function(e,t,n){return e>0&&e<=16&&n.indexOf(e)===t}).sort(function(e,t){return e-t});e&&(this._playbackRates=e)}}},{key:"_handlePreload",value:function(){"auto"!==this._config.playback.preload||this._config.playback.autoplay||this.load()}},{key:"_handleAutoPlay",value:function(){var e=this;if(!0===this._config.playback.autoplay){var n=this._config.playback.allowMutedAutoPlay;t.getCapabilities(this.engineType).then(function(t){t.autoplay?r():t.mutedAutoPlay?e.muted&&!e._fallbackToMutedAutoPlay?i():n?a():o():o()})}else this._posterManager.show();var r=function(){t._logger.debug("Start autoplay"),e._fallbackToMutedAutoPlay&&(e._fallbackToMutedAutoPlay=!1,e.muted=!1),e.play()},i=function(){t._logger.debug("Start muted autoplay"),e.play()},a=function(){t._logger.debug("Fallback to muted autoplay"),e._fallbackToMutedAutoPlay=!0,e.muted=!0,e.dispatchEvent(new v.default(b.CustomEventType.FALLBACK_TO_MUTED_AUTOPLAY)),e.play()},o=function(){t._logger.warn("Autoplay failed, pause player"),e._posterManager.show(),e.load(),e.ready().then(function(){return e.pause()}),e.dispatchEvent(new v.default(b.CustomEventType.AUTOPLAY_FAILED))}}},{key:"_maybeCreateAdsController",value:function(){var e=this;if(!this._adsController){var t=this._controllerProvider.getAdsControllers();t.length&&(this._adsController=new ae.AdsController(this,t),this._eventManager.listen(this._adsController,oe.AdEventType.ALL_ADS_COMPLETED,function(t){e.dispatchEvent(t)}))}}},{key:"_playAfterAsyncMiddleware",value:function(){var e=this;this._engine?this._play():this._eventManager.listenOnce(this,b.CustomEventType.SOURCE_SELECTED,function(){return e._play()})}},{key:"_load",value:function(){var e=this,t=function(){e._loading=!1,e._reset=!1};if(this._engine&&!this.src&&!this._loading){this._loading=!0;var n=this._config.playback.startTime;this._engine.load(n).then(function(n){e._updateTracks(n.tracks),e.dispatchEvent(new v.default(b.CustomEventType.TRACKS_CHANGED,{tracks:e._tracks})),t()}).catch(function(n){e.dispatchEvent(new v.default(b.Html5EventType.ERROR,n)),t()})}}},{key:"_play",value:function(){var e=this;this._engine.src||this._load(),this.ready().then(function(){e.isLive()&&!e.isDvr()&&e.seekToLiveEdge(),e._engine.play()}).catch(function(t){e.dispatchEvent(new v.default(b.Html5EventType.ERROR,t))})}},{key:"_pause",value:function(){this._engine.pause()}},{key:"_onPlay",value:function(){this._firstPlay&&(this._firstPlay=!1,this.dispatchEvent(new v.default(b.CustomEventType.FIRST_PLAY)),this._posterManager.hide(),this._hideBlackCover(),"number"==typeof this._playbackAttributesState.rate&&(this.playbackRate=this._playbackAttributesState.rate))}},{key:"_onPlaying",value:function(){this._firstPlaying||(this._firstPlaying=!0,this.dispatchEvent(new v.default(b.CustomEventType.FIRST_PLAYING)))}},{key:"_hideBlackCover",value:function(){this._blackCoverEl&&(this._blackCoverEl.style.visibility="hidden")}},{key:"_showBlackCover",value:function(){this._blackCoverEl&&(this._blackCoverEl.style.visibility="visible")}},{key:"_onEnded",value:function(){var e=this;this._adsController&&!this._adsController.allAdsCompleted?this._eventManager.listenOnce(this._adsController,oe.AdEventType.ALL_ADS_COMPLETED,function(){e.dispatchEvent(new v.default(b.CustomEventType.PLAYBACK_ENDED))}):setTimeout(function(){return e.dispatchEvent(new v.default(b.CustomEventType.PLAYBACK_ENDED))},0),this.paused||this._pause()}},{key:"_onPlaybackEnded",value:function(){this.config.playback.loop&&(this.currentTime=0,this.play())}},{key:"_resetStateFlags",value:function(){this._loading=!1,this._firstPlay=!0,this._loadingMedia=!1,this._playbackStart=!1,this._firstPlaying=!1}},{key:"_onTracksChanged",value:function(e){this._updateTracks(e.payload.tracks),this.dispatchEvent(e)}},{key:"_updateTracks",value:function(e){t._logger.debug("Tracks changed",e),this._tracks=e.concat(this._externalCaptionsHandler.getExternalTracks(e)),this._addTextTrackOffOption(),this._maybeSetTracksLabels(),this._maybeAdjustTextTracksIndexes(),this._setDefaultTracks()}},{key:"_maybeAdjustTextTracksIndexes",value:function(){var e=this;if(this._config.playback.useNativeTextTrack){var t=function(t){var n=e.getVideoElement();return n?Array.from(n.textTracks).findIndex(function(e){return!!e&&e.language===t.language}):-1};this._getTracksByType(H.TrackType.TEXT).forEach(function(e){return e.index=t(e)})}}},{key:"_getTracksByType",value:function(e){return e?this._tracks.filter(function(t){return e===H.TrackType.VIDEO?t instanceof M.default:e===H.TrackType.AUDIO?t instanceof N.default:e!==H.TrackType.TEXT||t instanceof U.default}):this._tracks}},{key:"_markActiveTrack",value:function(e){var t=void 0;if(e instanceof M.default?t=H.TrackType.VIDEO:e instanceof N.default?t=H.TrackType.AUDIO:e instanceof U.default&&(t=H.TrackType.TEXT),t)for(var n=this._getTracksByType(t),r=0;r<n.length;r++)n[r].active=e.index===n[r].index}},{key:"_onCueChange",value:function(e){t._logger.debug("Text cue changed",e.payload.cues),this._activeTextCues=e.payload.cues,this._updateCueDisplaySettings(),this._updateTextDisplay(this._activeTextCues)}},{key:"_updateCueDisplaySettings",value:function(){for(var e=this._activeTextCues,t=this._textDisplaySettings,n=0;n<e.length;n++){var r=e[n];for(var i in t)r[i]=t[i]}}},{key:"_updateTextDisplay",value:function(e){this._config.playback.useNativeTextTrack||(0,V.processCues)(window,e,this._textDisplayEl,this._textStyle)}},{key:"_addTextTrackOffOption",value:function(){var e=this._getTracksByType(H.TrackType.TEXT);e&&e.length&&this._tracks.push(new U.default({active:!1,index:e.length,kind:"subtitles",label:"Off",language:pe}))}},{key:"_setDefaultTracks",value:function(){var e=this.getActiveTracks(),t=this.config.playback,n=this._getTracksByType(H.TrackType.TEXT).find(function(e){return U.default.langComparer(pe,e.language)}),r=this._playbackAttributesState.textLanguage||this._getLanguage(t.textLanguage,e.text,H.TrackType.TEXT),i=this._playbackAttributesState.audioLanguage||t.audioLanguage;this._setDefaultTrack(H.TrackType.TEXT,r,n),this._setDefaultTrack(H.TrackType.AUDIO,i,e.audio)}},{key:"_getLanguage",value:function(e,t,n){var r=e;if("auto"===r){var i=this._getTracksByType(n),a=i.find(function(e){return I.default.langComparer(T.default.language,e.language)});a?r=a.language:t&&t.language!==pe?r=t.language:i&&i.length>0&&(r=i[0].language)}return r}},{key:"_setDefaultTrack",value:function(e,t,n){var r=this._getTracksByType(e).find(function(e){return I.default.langComparer(t,e.language)});r?(this.selectTrack(r),this._markActiveTrack(r)):n&&!n.active&&this.selectTrack(n)}},{key:"_maybeSetTracksLabels",value:function(){var e=this._config.customLabels;if(e)for(var t in e)this._setTracksCustomLabels(this._getTracksByType(K.LabelToTrackMap[t]),e[t])}},{key:"_setTracksCustomLabels",value:function(e,t){e.forEach(function(e){var n=t(E.Object.copyDeep(e));n&&(e.label=n)})}},{key:"buffered",get:function(){if(this._engine)return this._engine.buffered}},{key:"stats",get:function(){var e={targetBuffer:NaN,availableBuffer:NaN};return this._engine&&(e.targetBuffer=this._engine.targetBuffer,e.availableBuffer=this._engine.availableBuffer),e}},{key:"currentTime",set:function(e){if(this._engine&&E.Number.isNumber(e)){var t=e;e<0&&(t=0),t>this._engine.duration-.1&&(t=this._engine.duration-.1),this._engine.currentTime=t}},get:function(){if(this._engine)return this._engine.currentTime}},{key:"duration",get:function(){if(this._engine)return this._engine.duration}},{key:"volume",set:function(e){if(this._engine&&(E.Number.isFloat(e)||0===e||1===e)){var t=e;t<0&&(t=0),t>1&&(t=1),this._engine.volume=t}},get:function(){if(this._engine)return this._engine.volume}},{key:"paused",get:function(){if(this._engine)return this._engine.paused}},{key:"seeking",get:function(){if(this._engine)return this._engine.seeking}},{key:"playsinline",set:function(e){this._engine&&(this._engine.playsinline=e)},get:function(){if(this._engine)return this._engine.playsinline}},{key:"muted",set:function(e){this._engine&&(this._engine.muted=e,this.dispatchEvent(new v.default(b.CustomEventType.MUTE_CHANGE,{mute:e})),!1===e&&(this._fallbackToMutedAutoPlay=e))},get:function(){if(this._engine)return this._engine.muted}},{key:"src",get:function(){if(this._engine)return this._engine.src}},{key:"dimensions",get:function(){return{width:this._el.clientWidth,height:this._el.clientHeight}}},{key:"poster",get:function(){return this._posterManager.src}},{key:"playbackRate",set:function(e){this._engine&&(this._engine.playbackRate=e)},get:function(){if(this._engine)return this._engine.playbackRate}},{key:"playbackRates",get:function(){return this._playbackRates?this._playbackRates:this._engine?this._engine.playbackRates:[]}},{key:"defaultPlaybackRate",get:function(){return this._engine?this._engine.defaultPlaybackRate:1}},{key:"engineType",get:function(){return this._engineType}},{key:"streamType",get:function(){return this._streamType}},{key:"env",get:function(){return this._env}},{key:"config",get:function(){return E.Object.mergeDeep({},this._config)}},{key:"loadingMedia",set:function(e){this._loadingMedia=e}},{key:"crossOrigin",set:function(e){this._engine&&(this._engine.crossOrigin=e)},get:function(){if(this._engine)return this._engine.crossOrigin}},{key:"ended",get:function(){if(this._engine)return this._engine.ended}},{key:"textStyle",set:function(e){if(!(e instanceof B.default))throw new Error("Style must be instance of TextStyle");var n=E.Dom.getElementBySelector("."+this._playerId+".playkit-subtitles-style");n||(n=E.Dom.createElement("style"),E.Dom.addClassName(n,this._playerId),E.Dom.addClassName(n,"playkit-subtitles-style"),E.Dom.appendChild(document.head,n));for(var r=n.sheet;r.cssRules.length;)r.deleteRule(0);try{this._textStyle=e,this._config.playback.useNativeTextTrack?r.insertRule("#"+this._playerId+" video.playkit-engine::cue { "+e.toCSS()+" }",0):this._engine&&(this._engine.resetAllCues(),this._externalCaptionsHandler.resetAllCues(),this._updateTextDisplay(this._activeTextCues)),this.dispatchEvent(new v.default(b.CustomEventType.TEXT_STYLE_CHANGED))}catch(e){t._logger.error(e.message)}},get:function(){return this._textStyle.clone()}},{key:"ads",get:function(){return this._adsController}},{key:"plugins",get:function(){return this._pluginManager.getAll()}},{key:"Event",get:function(){return b.EventType}},{key:"TextStyle",get:function(){return B.default}},{key:"State",get:function(){return G.StateType}},{key:"Track",get:function(){return H.TrackType}},{key:"LogLevelType",get:function(){return A.LogLevelType}},{key:"LogLevel",get:function(){return A.LogLevel}},{key:"AbrMode",get:function(){return q.AbrMode}},{key:"MediaType",get:function(){return W.MediaType}},{key:"StreamType",get:function(){return z.StreamType}},{key:"EngineType",get:function(){return Y.EngineType}},{key:"CorsType",get:function(){return X.CorsType}},{key:"AdBreakType",get:function(){return re.AdBreakType}},{key:"AdTagType",get:function(){return ie.AdTagType}},{key:"Error",get:function(){return ee.default}}],[{key:"_defaultConfig",get:function(){return E.Object.copyDeep($.DefaultConfig)}}]),t}(m.default);fe._logger=(0,w.default)("Player"),fe._playerCapabilities={},t.default=fe},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.TextTrack=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(7),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n._label=n.label||n.language,n._kind=e.kind,n._external=e.external,n}return a(t,e),o(t,[{key:"kind",get:function(){return this._kind}},{key:"external",get:function(){return this._external}}]),t}(l.default);t.default=u,t.TextTrack=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(7),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n._bandwidth=e.bandwidth,n._width=e.width,n._height=e.height,n._label=e.label?e.label:n._height?n._height+"p":void 0,n}return a(t,e),o(t,[{key:"bandwidth",get:function(){return this._bandwidth}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}}]),t}(l.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),s=function(e){return e&&e.__esModule?e:{default:e}}(o),l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),t}(s.default);t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(41),i=function(e){return e&&e.__esModule?e:{default:e}}(r),a=/^.*(web0s).*(smarttv).*$/i,o=[[a],[i.default.OS.NAME]],s=/^.*(smart-tv).*(tizen).*$/i,l=[[s],[[i.default.BROWSER.NAME,"SAMSUNG_TV_BROWSER"],[i.default.BROWSER.MAJOR,""],[i.default.BROWSER.VERSION,""]]],u=[[a],[[i.default.DEVICE.VENDOR,"LG"],[i.default.DEVICE.TYPE,i.default.DEVICE.SMARTTV]],[s],[[i.default.DEVICE.TYPE,i.default.DEVICE.SMARTTV]]],c=new i.default(void 0,{browser:l,device:u,os:o}).getResult();c.isConsole=c.device.type===i.default.DEVICE.CONSOLE,c.isSmartTV=c.device.type===i.default.DEVICE.SMARTTV,c.isMobile=c.device.type===i.default.DEVICE.MOBILE,c.isTablet=c.device.type===i.default.DEVICE.TABLET,c.isWearable=c.device.type===i.default.DEVICE.WEARABLE,c.isEmbedded=c.device.type===i.default.DEVICE.EMBEDDED,t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={AD_CAN_SKIP:"adcanskip",AD_MANIFEST_LOADED:"admanifestloaded",AD_LOADED:"adloaded",AD_STARTED:"adstarted",AD_RESUMED:"adresumed",AD_PAUSED:"adpaused",AD_CLICKED:"adclicked",AD_SKIPPED:"adskipped",AD_COMPLETED:"adcompleted",AD_ERROR:"aderror",ADS_COMPLETED:"adscompleted",ALL_ADS_COMPLETED:"alladscompleted",AD_BREAK_START:"adbreakstart",AD_BREAK_END:"adbreakend",AD_FIRST_QUARTILE:"adfirstquartile",AD_MIDPOINT:"admidpoint",AD_THIRD_QUARTILE:"adthirdquartile",USER_CLOSED_AD:"userclosedad",AD_VOLUME_CHANGED:"advolumechanged",AD_MUTED:"admuted",AD_PROGRESS:"adprogress",AD_BUFFERING:"adbuffering"};t.AdEventType=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return"string"==typeof e&&!!l[e.toLowerCase()]&&e.toLowerCase()}function a(e){return"string"==typeof e&&!!u[e.toLowerCase()]&&e.toLowerCase()}Object.defineProperty(t,"__esModule",{value:!0}),t.Cue=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(21),l={"":!0,lr:!0,rl:!0},u={start:!0,center:!0,end:!0,left:!0,right:!0},c=function(){function e(t,n,i){r(this,e),this.hasBeenReset=!1,this.displayState=void 0,this._id="",this._pauseOnExit=!1,this._region=null,this._vertical="",this._snapToLines=!0,this._line="auto",this._lineAlign="start",this._position=50,this._positionAlign="center",this._size=50,this._align="center",this._startTime=t,this._endTime=n,this._text=i}return o(e,[{key:"resetCue",value:function(){this.hasBeenReset=!0}},{key:"getCueAsHTML",value:function(){return(0,s.convertCueToDOMTree)(window,this.text)}},{key:"id",get:function(){return this._id},set:function(e){this._id=""+e}},{key:"pauseOnExit",get:function(){return this._pauseOnExit},set:function(e){this._pauseOnExit=e}},{key:"startTime",get:function(){return this._startTime},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");this._startTime=e,this.resetCue()}},{key:"endTime",get:function(){return this._endTime},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");this._endTime=e,this.resetCue()}},{key:"text",get:function(){return this._text},set:function(e){this._text=""+e,this.resetCue()}},{key:"region",get:function(){return this._region},set:function(e){this._region=e,this.resetCue()}},{key:"vertical",get:function(){return this._vertical},set:function(e){var t=i(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");"string"==typeof t&&(this._vertical=t,this.resetCue())}},{key:"snapToLines",get:function(){return this._snapToLines},set:function(e){this._snapToLines=e,this.resetCue()}},{key:"line",get:function(){return this._line},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");this._line=e,this.resetCue()}},{key:"lineAlign",get:function(){return this._lineAlign},set:function(e){var t=a(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");"string"==typeof t&&(this._lineAlign=t,this.resetCue())}},{key:"position",get:function(){return this._position},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");this._position=e,this.resetCue()}},{key:"positionAlign",get:function(){return this._positionAlign},set:function(e){var t=a(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");"string"==typeof t&&(this._positionAlign=t,this.resetCue())}},{key:"size",get:function(){return this._size},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");this._size=e,this.resetCue()}},{key:"align",get:function(){return this._align},set:function(e){var t=a(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");"string"==typeof t&&(this._align=t,this.resetCue())}}]),e}(),p=void 0;"undefined"!=typeof window&&window.VTTCue?t.Cue=p=window.VTTCue:t.Cue=p=c,t.Cue=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={VIDEO:"video",AUDIO:"audio",TEXT:"text"};t.TrackType=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){r(this,e),this._map=new Map}return i(e,[{key:"push",value:function(e,t){if(this._map.has(e)){var n=this._map.get(e);Array.isArray(n)&&(n.push(t),this._map.set(e,n))}else this._map.set(e,[t])}},{key:"set",value:function(e,t){this._map.set(e,t)}},{key:"has",value:function(e){return this._map.has(e)}},{key:"get",value:function(e){var t=this._map.get(e);return t?t.slice():[]}},{key:"getAll",value:function(){var e=[],t=!0,n=!1,r=void 0;try{for(var i,a=this._map.values()[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var o=i.value;e=e.concat(o)}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}return e}},{key:"remove",value:function(e,t){if(this._map.has(e)){var n=this._map.get(e);if(Array.isArray(n))for(var r=0;r<n.length;++r)n[r]==t&&(n.splice(r,1),--r)}}},{key:"keys",value:function(){return this._map.keys()}},{key:"clear",value:function(){this._map.clear()}}]),e}();t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.registerPlugin=void 0;var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(18),s=r(o),l=n(2),u=r(l),c=n(8),p=(r(c),n(0)),f=r(p),d=(0,f.default)("PluginManager"),h=function(){function e(){i(this,e),this._plugins={},this._isDisabledPluginMap=new Map}return a(e,[{key:"load",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e._registry.has(t))throw d.warn("Plugin <"+t+"> loading failed, plugin is not registered"),new u.default(u.default.Severity.RECOVERABLE,u.default.Category.PLAYER,u.default.Code.RUNTIME_ERROR_NOT_REGISTERED_PLUGIN,t);var i=e._registry.get(t);"boolean"==typeof r.disable&&this._isDisabledPluginMap.set(t,r.disable);var a=!!this._isDisabledPluginMap.get(t),o=!!i&&i.isValid();return i&&o&&!a?(this._plugins[t]=i.createPlugin(t,n,r),this._isDisabledPluginMap.set(t,!1),d.debug("Plugin <"+t+"> has been loaded"),!0):(d.debug("Plugin <"+t+"> isn't loaded, isValid()="+o.toString()+", disabled="+a.toString()),!1)}},{key:"loadMedia",value:function(){var e=this;Object.keys(this._plugins).forEach(function(t){return e._plugins[t].loadMedia()})}},{key:"destroy",value:function(){var e=this;Object.keys(this._plugins).forEach(function(t){e._plugins[t].destroy(),delete e._plugins[t]})}},{key:"reset",value:function(){var e=this;Object.keys(this._plugins).forEach(function(t){return e._plugins[t].reset()})}},{key:"get",value:function(e){return this._plugins[e]}},{key:"getAll",value:function(){return this._plugins}}],[{key:"register",value:function(t,n){return"function"!=typeof n||n.prototype instanceof s.default==0?(d.error("Plugin <"+t+"> registration failed, either plugin is not an instance of BasePlugin or plugin handler is not a function"),!1):e._registry.has(t)?(d.debug("Plugin <"+t+"> is already registered, do not register again"),!1):(e._registry.set(t,n),d.debug("Plugin <"+t+"> has been registered successfully"),!0)}},{key:"unRegister",value:function(t){e._registry.has(t)&&(e._registry.delete(t),d.debug("Unregistered <"+t+"> plugin."))}}]),e}();h._registry=new Map,t.default=h;var y=h.register;t.registerPlugin=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(8),s=(r(o),n(0)),l=r(s),u=n(5),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),p=n(4),f=r(p),d=n(2),h=r(d),y=n(1),v=r(y),g=function(){function e(t,n,r){i(this,e),this.name=t,this.player=n,this.eventManager=new f.default,this.logger=(0,l.default)(c.String.capitlize(this.name)),this.config={},c.Object.mergeDeep(this.config,this.constructor.defaultConfig,r)}return a(e,null,[{key:"createPlugin",value:function(e,t){return new this(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}},{key:"isValid",value:function(){throw new h.default(h.default.Severity.CRITICAL,h.default.Category.PLAYER,h.default.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,"isValid()")}}]),a(e,[{key:"getConfig",value:function(e){return e?c.Object.copyDeep(this.config[e]):c.Object.copyDeep(this.config)}},{key:"updateConfig",value:function(e){c.Object.mergeDeep(this.config,e)}},{key:"loadMedia",value:function(){}},{key:"destroy",value:function(){}},{key:"reset",value:function(){}},{key:"getName",value:function(){return this.name}},{key:"dispatchEvent",value:function(e,t){this.logger.debug("Fire event: "+e,t),this.player.dispatchEvent(new v.default(e,t))}}]),e}();g.defaultConfig={},t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={IDLE:"idle",LOADING:"loading",PLAYING:"playing",PAUSED:"paused",BUFFERING:"buffering"};t.StateType=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){r(this,e),this.fontSize="100%",this.fontScale=1,this.fontFamily=e.FontFamily.SANS_SERIF,this.fontColor=e.StandardColors.WHITE,this.fontOpacity=e.StandardOpacities.OPAQUE,this.backgroundColor=e.StandardColors.BLACK,this.backgroundOpacity=e.StandardOpacities.OPAQUE,this.fontEdge=e.EdgeStyles.NONE}return i(e,[{key:"getTextShadow",value:function(){for(var t=[],n=0;n<this.fontEdge.length;n++){var r=this.fontEdge[n].slice(0,3),i=this.fontEdge[n].slice(3,6);t.push(e.toRGBA(r,this.fontOpacity)+" "+i.join("px ")+"px")}return t.join(",")}},{key:"toCSS",value:function(){var t=[];return t.push("font-family: "+this.fontFamily),t.push("color: "+e.toRGBA(this.fontColor,this.fontOpacity)),t.push("background-color: "+e.toRGBA(this.backgroundColor,this.backgroundOpacity)),t.push("text-shadow: "+this.getTextShadow()),t.join("!important; ")}},{key:"clone",value:function(){var t=new e;return t.fontEdge=this.fontEdge,t.fontSize=this.fontSize,t.fontScale=this.fontScale,t.fontColor=this.fontColor,t.fontOpacity=this.fontOpacity,t.backgroundColor=this.backgroundColor,t.backgroundOpacity=this.backgroundOpacity,t.fontFamily=this.fontFamily,t}},{key:"isEqual",value:function(e){return e.fontEdge===this.fontEdge&&e.fontSize===this.fontSize&&e.fontColor===this.fontColor&&e.fontOpacity===this.fontOpacity&&e.backgroundColor===this.backgroundColor&&e.backgroundOpacity===this.backgroundOpacity}},{key:"implicitFontScale",get:function(){return.25*this.fontScale+1}}],[{key:"toRGBA",value:function(e,t){return"rgba("+e.concat(t).join(",")+")"}}]),e}();a.FontFamily={ARIAL:"Arial",HELVETICA:"Helvetica",VERDANA:"Verdana",SANS_SERIF:"sans-serif"},a.StandardColors={WHITE:[255,255,255],BLACK:[0,0,0],RED:[255,0,0],GREEN:[0,255,0],BLUE:[0,0,255],YELLOW:[255,255,0],MAGENTA:[255,0,255],CYAN:[0,255,255]},a.StandardOpacities={OPAQUE:1,SEMI_HIGH:.75,SEMI_LOW:.25,TRANSPARENT:0},a.EdgeStyles={NONE:[],RAISED:[[34,34,34,1,1,0],[34,34,34,2,2,0],[34,34,34,3,3,0]],DEPRESSED:[[204,204,204,1,1,0],[204,204,204,0,1,0],[34,34,34,-1,-1,0],[34,34,34,0,-1,0]],UNIFORM:[[34,34,34,0,0,4],[34,34,34,0,0,4],[34,34,34,0,0,4],[34,34,34,0,0,4]],DROP:[[34,34,34,2,2,3],[34,34,34,2,2,4],[34,34,34,2,2,5]]},a.FontSizes=[{value:-2,label:"50%"},{value:-1,label:"75%"},{value:0,label:"100%"},{value:2,label:"200%"},{value:3,label:"300%"},{value:4,label:"400%"}],t.default=a},function(e,t,n){"use strict";function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function s(){this.values=N(null)}function l(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);if(2===o.length){var s=o[0],l=o[1];t(s,l)}}}function u(e,t,n){function r(){var t=o(e);if(null===t)throw new g(g.Errors.BadTimeStamp,"Malformed timestamp: "+a);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function i(){e=e.replace(/^\s+/,"")}var a=e;if(i(),t.startTime=r(),i(),"--\x3e"!==e.substr(0,3))throw new g(g.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+a);e=e.substr(3),i(),t.endTime=r(),i(),function(e,t){var r=new s;l(e,function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];r.integer(e,o),r.percent(e,o)&&r.set("snapToLines",!1),r.alt(e,o,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start","center","end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start","center","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","center","end","left","right"])}},/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical",""),t.line=r.get("line",t.line||"auto"),t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100);try{t.align=r.get("align","center")}catch(e){t.align=r.get("align","middle")}t.position=r.get("position",t.position||"auto"),t.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}function c(e,t){function n(e){return A[e]}for(var r=e.document.createElement("div"),i=r,a=void 0,s=[];null!==(a=function(){if(!t)return null;var e=t.match(/^([^<]*)(<[^>]+>?)?/);return function(e){return t=t.substr(e.length),e}(e[1]?e[1]:e[2])}());)if("<"!==a[0])i.appendChild(e.document.createTextNode(function(e){for(var t=void 0;t=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(t[0],n);return e}(a)));else{if("/"===a[1]){s.length&&s[s.length-1]===a.substr(2).replace(">","")&&(s.pop(),i=i.parentNode);continue}var l=o(a.substr(1,a.length-2)),u=void 0;if(l){u=e.document.createProcessingInstruction("timestamp",l),i.appendChild(u);continue}var c=a.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!c)continue;if(!(u=function(t,n){var r=w[t];if(!r)return null;var i=e.document.createElement(r),a=S[t];return a&&n&&(i[a]=n.trim()),i}(c[1],c[3])))continue;if(!function(e,t){return!P[t.localName]||P[t.localName]===e.localName}(i,u))continue;c[2]&&(u.className=c[2].substr(1).replace("."," ")),s.push(c[1]),i.appendChild(u),i=u}return r}function p(e){for(var t=0;t<O.length;t++){var n=O[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function f(e){function t(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function n(e){if(!e||!e.length)return null;var r=e.pop(),i=r.textContent||r.innerText;if(i){var a=i.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):i}return"ruby"===r.tagName?n(e):r.childNodes?(t(e,r),n(e)):void 0}var r=[],i="",a=void 0;if(!e||!e.childNodes)return"ltr";for(t(r,e);i=n(r);)for(var o=0;o<i.length;o++)if(a=i.charCodeAt(o),p(a))return"rtl";return"ltr"}function d(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)"showing"===n[i].mode&&r++;return-1*++r}function h(e,t,n){var r=new R(e),i=e.cue,a=d(i),o=[];if(i.snapToLines){var s=void 0;switch(i.vertical){case"":o=["+y","-y"],s="height";break;case"rl":o=["+x","-x"],s="width";break;case"lr":o=["-x","+x"],s="width"}var l=r.lineHeight,u=l*Math.round(a),c=t[s]+l,p=o[0];Math.abs(u)>c&&(u=u<0?-1:1,u*=Math.ceil(c/l)*l),a<0&&(u+=""===i.vertical?t.height:t.width,o=o.reverse()),r.move(p,u)}else{var f=r.lineHeight/t.height*100;switch(i.lineAlign){case"center":a-=f/2;break;case"end":a-=f}switch(i.vertical){case"":e.applyStyles({top:e.formatStyle(a,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(a,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(a,"%")})}o=["+y","-x","+x","-y"],r=new R(e)}var h=function(e,r){for(var i=void 0,a=new R(e),o=1,s=0;s<r.length;s++){for(;e.overlapsOppositeAxis(t,r[s])||e.within(t)&&e.overlapsAny(n);)e.move(r[s]);if(e.within(t))return e;var l=e.intersectPercentage(t);o>l&&(i=new R(e),o=l),e=new R(a)}return i||a}(r,o);e.move(h.toCSSCompatValues(t))}function y(e,t){return e&&t?c(e,t):null}function v(e,t,n,r){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var i=e.document.createElement("div");if(i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.margin=D,n.appendChild(i),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var a=[],o=R.getSimpleBoxPosition(i),s=o.height<o.width?o.height:o.width,l=Math.round(s*I*100)/100,u={font:l*T*r.implicitFontScale+"px "+r.fontFamily,color:k.default.toRGBA(r.fontColor,r.fontOpacity),backgroundColor:k.default.toRGBA(r.backgroundColor,r.backgroundOpacity),textShadow:r.getTextShadow()};!function(){for(var n=void 0,r=void 0,s=0;s<t.length;s++)r=t[s],n=new x(e,r,u),i.appendChild(n.div),h(n,o,a),r.displayState=n.div,a.push(R.getSimpleBoxPosition(n))}()}else for(var c=0;c<t.length;c++)i.appendChild(t[c].displayState)}function g(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}Object.defineProperty(t,"__esModule",{value:!0}),t.StringDecoder=t.Parser=t.convertCueToDOMTree=t.processCues=void 0;var m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),b=n(14),_=n(52),E=n(20),k=function(e){return e&&e.__esModule?e:{default:e}}(E),T=1,A={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},w={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},S={v:"title",lang:"lang"},P={rt:"ruby"};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<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var O=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]],C=function(){function e(){a(this,e)}return m(e,[{key:"applyStyles",value:function(e,t){t=t||this.div;for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n])}},{key:"formatStyle",value:function(e,t){return 0===e?0:e+t}}]),e}(),x=function(e){function t(e,n,i){a(this,t);var o=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),s="undefined"!=typeof navigator&&/MSIE\s8\.0/.test(navigator.userAgent);"undefined"!=typeof WebVTTSet&&(WebVTTSet.fontSet,WebVTTSet.backgroundSet,WebVTTSet.edgeSet),o.cue=n,o.cueDiv=c(e,n.text);var l={color:i.color,backgroundColor:i.backgroundColor,textShadow:i.textShadow,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};s||(l.writingMode=""===n.vertical?"horizontal-tb":"lr"===n.vertical?"vertical-lr":"vertical-rl",l.unicodeBidi="plaintext"),o.applyStyles(l,o.cueDiv),o.div=e.document.createElement("div"),l={textAlign:"middle"===n.align?"center":n.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},s||(l.direction=f(o.cueDiv),l.writingMode=""===n.vertical?"horizontal-tb":"lr"===n.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),o.applyStyles(l),o.div.appendChild(o.cueDiv);var u=0;switch(n.positionAlign){case"start":u=n.position;break;case"center":u=n.position-n.size/2;break;case"end":u=n.position-n.size}return""===n.vertical?o.applyStyles({left:o.formatStyle(u,"%"),width:o.formatStyle(n.size,"%")}):o.applyStyles({top:o.formatStyle(u,"%"),height:o.formatStyle(n.size,"%")}),o.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})},o}return i(t,e),t}(C),R=function(){function e(t){a(this,e),this.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top};var n="undefined"!=typeof navigator&&/MSIE\s8\.0/.test(navigator.userAgent),r=void 0,i=void 0,o=void 0,s=void 0;if(t.div){i=t.div.offsetHeight,o=t.div.offsetWidth,s=t.div.offsetTop;var l=(l=t.div.childNodes)&&(l=l[0])&&l.getClientRects&&l.getClientRects();t=t.div.getBoundingClientRect(),r=l?Math.max(l[0]&&l[0].height||0,t.height/l.length):0}this.left=t.left,this.right=t.right,this.top=t.top||s,this.height=t.height||i,this.bottom=t.bottom||s+(t.height||i),this.width=t.width||o,this.lineHeight=void 0!==r?r:t.lineHeight,n&&!this.lineHeight&&(this.lineHeight=13)}return m(e,[{key:"move",value:function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}}},{key:"overlapsAny",value:function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1}},{key:"within",value:function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right}},{key:"overlapsOppositeAxis",value:function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}}},{key:"intersectPercentage",value:function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)}},{key:"toCSSCompatValues",value:function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}}}],[{key:"getSimpleBoxPosition",value:function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e,{left:e.left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}}}]),e}(),I=.058,D="1.5%",M=function(e,t){this.window=e,this.state="INITIAL",this.buffer="",this.decoder=t||new TextDecoder("utf8"),this.regionList=[]},L=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},N=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();g.prototype=N(Error.prototype),g.prototype.constructor=g,g.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},M.prototype={reportOrThrowError:function(e){if(!(e instanceof g))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){function t(){for(var e=r.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var n=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,r.buffer=e.substr(t),n}function n(e){var t=new s;if(l(e,function(e,n){switch(e){case"id":t.set(e,n);break;case"width":t.percent(e,n);break;case"lines":t.integer(e,n);break;case"regionanchor":case"viewportanchor":var r=n.split(",");if(2!==r.length)break;var i=new s;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;t.set(e+"X",i.get("x")),t.set(e+"Y",i.get("y"));break;case"scroll":t.alt(e,n,["up"])}},/=/,/\s/),t.has("id")){var n=new _.Region;n.width=t.get("width",100),n.lines=t.get("lines",3),n.regionAnchorX=t.get("regionanchorX",0),n.regionAnchorY=t.get("regionanchorY",100),n.viewportAnchorX=t.get("viewportanchorX",0),n.viewportAnchorY=t.get("viewportanchorY",100),n.scroll=t.get("scroll",""),r.onregion&&r.onregion(n),r.regionList.push({id:t.get("id"),region:n})}}var r=this;e&&(r.buffer+=r.decoder.decode(e,{stream:!0}));try{var i;if("INITIAL"===r.state){if(!/\r\n|\n/.test(r.buffer))return this;i=t();var a=i.match(/^WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new g(g.Errors.BadSignature);r.state="HEADER"}for(var o=!1;r.buffer;){if(!/\r\n|\n/.test(r.buffer))return this;switch(o?o=!1:i=t(),r.state){case"HEADER":/:/.test(i)?function(e){l(e,function(e,t){switch(e){case"Region":n(t)}},/:/)}(i):i||(r.state="ID");continue;case"NOTE":i||(r.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){r.state="NOTE";break}if(!i)continue;if(r.cue=new b.Cue(0,0,""),r.state="CUE",-1===i.indexOf("--\x3e")){r.cue.id=i;continue}case"CUE":try{u(i,r.cue,r.regionList)}catch(e){r.reportOrThrowError(e),r.cue=null,r.state="BADCUE";continue}r.state="CUETEXT";continue;case"CUETEXT":var c=-1!==i.indexOf("--\x3e");if(!i||c&&(o=!0)){r.oncue&&r.oncue(r.cue),r.cue=null,r.state="ID";continue}r.cue.text&&(r.cue.text+="\n"),r.cue.text+=i;continue;case"BADCUE":i||(r.state="ID");continue}}}catch(e){r.reportOrThrowError(e),"CUETEXT"===r.state&&r.cue&&r.oncue&&r.oncue(r.cue),r.cue=null,r.state="INITIAL"===r.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new g(g.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},t.processCues=v,t.convertCueToDOMTree=y,t.Parser=M,t.StringDecoder=L},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){r(this,e)}return i(e,[{key:"callNext",value:function(e){e&&e()}}]),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={MANIFEST:0,SEGMENT:1,LICENSE:2};t.RequestType=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t){r(this,e),this.type=t,this._duration=0,this._timestamp=Date.now()/1e3}return i(e,[{key:"duration",get:function(){return this._duration},set:function(e){this._duration=e-this._timestamp}}]),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={DASH:"dash",HLS:"hls",PROGRESSIVE:"progressive"};t.StreamType=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={HTML5:"html5",FLASH:"flash",SILVERLIGHT:"silverlight",CAST:"cast"};t.EngineType=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={VOD:"Vod",LIVE:"Live",AUDIO:"Audio",UNKNOWN:"Unknown"};t.MediaType=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={MANUAL:"manual",AUTO:"auto"};t.AbrMode=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={ANONYMOUS:"anonymous",USE_CREDENTIALS:"use-credentials"};t.CorsType=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.EngineProvider=t.unRegisterEngine=t.registerEngine=void 0;var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),s=r(o),l=n(63),u=r(l),c=function(){function e(){i(this,e)}return a(e,null,[{key:"register",value:function(t,n){t&&!e._engineProviders[t]?(e._logger.debug("Engine <"+t+"> has been registered successfully"),e._engineProviders[t]=n):e._logger.debug("Engine <"+t+"> is already registered, do not register again")}},{key:"unRegister",value:function(t){e._engineProviders[t]&&(e._logger.debug("Unregistered <"+t+"> Engine"),delete e._engineProviders[t])}},{key:"getEngines",value:function(){return Object.keys(e._engineProviders).map(function(t){return e._engineProviders[t]})}},{key:"destroy",value:function(){e._engineProviders={}}}]),e}();c._logger=(0,s.default)("EngineProvider"),c._engineProviders={},u.default.isSupported()&&c.register(u.default.id,u.default);var p=c.register,f=c.unRegister;t.registerEngine=p,t.unRegisterEngine=f,t.EngineProvider=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.registerMediaSourceAdapter=void 0;var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(64),s=r(o),l=n(0),u=r(l),c=function(){function e(){i(this,e)}return a(e,null,[{key:"register",value:function(t){t&&(e._mediaSourceAdapters.includes(t)?e._logger.debug("Adapter <"+t.id+"> is already registered, do not register again"):(e._logger.debug("Adapter <"+t.id+"> has been registered successfully"),e._mediaSourceAdapters.push(t)))}},{key:"unRegister",value:function(t){var n=e._mediaSourceAdapters.indexOf(t);n>-1&&(e._logger.debug("Unregistered <"+t.id+"> adapter"),e._mediaSourceAdapters.splice(n,1))}},{key:"canPlaySource",value:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments[2];e._orderMediaSourceAdapters(n);var i=e._mediaSourceAdapters;if(t&&t.mimetype)for(var a=0;a<i.length;a++)if(i[a].canPlayType(t.mimetype)&&(!t.drmData||i[a].canPlayDrm(t.drmData,r)))return e._selectedAdapter=i[a],e._logger.debug("Selected adapter is <"+e._selectedAdapter.id+">"),!0;return!1}},{key:"_orderMediaSourceAdapters",value:function(t){e._mediaSourceAdapters=e._mediaSourceAdapters.filter(function(e){return"NativeAdapter"!==e.id}),t?e._mediaSourceAdapters.unshift(s.default):e._mediaSourceAdapters.push(s.default)}},{key:"getMediaSourceAdapter",value:function(t,n,r){return t&&n&&r?(e._selectedAdapter||e.canPlaySource(n,!0,r.drm),e._selectedAdapter?e._selectedAdapter.createAdapter(t,n,r):null):null}},{key:"destroy",value:function(){e._selectedAdapter=null}}]),e}();c._logger=(0,u.default)("MediaSourceProvider"),c._mediaSourceAdapters=[s.default],c._selectedAdapter=null,t.default=c;var p=c.register;t.registerMediaSourceAdapter=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(6),p=r(c),f=n(2),d=r(f),h=n(3),y=n(0),v=r(y),g=n(7),m=(r(g),n(10)),b=r(m),_=n(11),E=r(_),k=n(9),T=r(k),A=n(4),w=r(A),S=function(e){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i(this,t);var o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o._capabilities={fpsControl:!1},o._videoElement=e,o._sourceObj=n,o._config=r,o._eventManager=new w.default,o._handleLiveTimeUpdate(),o}return o(t,e),s(t,null,[{key:"isSupported",value:function(){return!0}}]),s(t,[{key:"destroy",value:function(){return this._sourceObj=null,this._config={},this._eventManager.destroy(),Promise.resolve()}},{key:"_onTrackChanged",value:function(e){e instanceof b.default?this._trigger(h.CustomEventType.VIDEO_TRACK_CHANGED,{selectedVideoTrack:e}):e instanceof E.default?this._trigger(h.CustomEventType.AUDIO_TRACK_CHANGED,{selectedAudioTrack:e}):e instanceof T.default&&this._trigger(h.CustomEventType.TEXT_TRACK_CHANGED,{selectedTextTrack:e})}},{key:"_trigger",value:function(e,t){this.dispatchEvent(new u.default(e,t))}},{key:"load",value:function(){return t._throwNotImplementedError("load")}},{key:"selectVideoTrack",value:function(e){return t._throwNotImplementedError("selectVideoTrack")}},{key:"selectAudioTrack",value:function(e){t._throwNotImplementedError("selectAudioTrack")}},{key:"selectTextTrack",value:function(e){t._throwNotImplementedError("selectTextTrack")}},{key:"hideTextTrack",value:function(){t._throwNotImplementedError("hideTextTrack")}},{key:"enableAdaptiveBitrate",value:function(){t._throwNotImplementedError("enableAdaptiveBitrate")}},{key:"isAdaptiveBitrateEnabled",value:function(){return t._throwNotImplementedError("isAdaptiveBitrateEnabled")}},{key:"_getLiveEdge",value:function(){return t._throwNotImplementedError("_getLiveEdge")}},{key:"seekToLiveEdge",value:function(){t._throwNotImplementedError("seekToLiveEdge")}},{key:"isLive",value:function(){return t._throwNotImplementedError("isLive")}},{key:"setMaxBitrate",value:function(e){}},{key:"attachMediaSource",value:function(){}},{key:"detachMediaSource",value:function(){}},{key:"_handleLiveTimeUpdate",value:function(){var e=this;this._videoElement.addEventListener(h.Html5EventType.DURATION_CHANGE,function(){e.isLive()&&e._videoElement.paused&&e._trigger(h.Html5EventType.TIME_UPDATE)})}},{key:"handleMediaError",value:function(e){return!1}},{key:"getStartTimeOfDvrWindow",value:function(){return t._throwNotImplementedError("getStartTimeOfDvrWindow")}},{key:"currentTime",get:function(){return this.isLive()?this._videoElement.currentTime-this.getStartTimeOfDvrWindow():this._videoElement.currentTime},set:function(e){this.isLive()&&(e+=this.getStartTimeOfDvrWindow()),this._videoElement.currentTime=e}},{key:"duration",get:function(){return this.isLive()?this._getLiveEdge()-this.getStartTimeOfDvrWindow():this._videoElement.duration}},{key:"src",get:function(){return this._loadPromise&&this._sourceObj?this._sourceObj.url:""},set:function(e){!this._loadPromise&&this._sourceObj&&(this._sourceObj.url=e)}},{key:"capabilities",get:function(){return this._capabilities}},{key:"targetBuffer",get:function(){return NaN}}],[{key:"canPlayType",value:function(e,n){return t._throwNotImplementedError("static canPlayType")}},{key:"_throwNotImplementedError",value:function(e){throw new d.default(d.default.Severity.CRITICAL,d.default.Category.PLAYER,d.default.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,e)}}]),t}(p.default);S.getLogger=v.default,t.default=S},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),s=r(o),l=n(2),u=r(l),c=n(34),p=function(){function e(){i(this,e)}return a(e,null,[{key:"isConfigured",value:function(e,t){throw new u.default(u.default.Severity.CRITICAL,u.default.Category.PLAYER,u.default.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,"static isConfigured")}},{key:"canPlayDrm",value:function(e){throw new u.default(u.default.Severity.CRITICAL,u.default.Category.PLAYER,u.default.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,"static canPlayDrm")}},{key:"setDrmPlayback",value:function(){throw new u.default(u.default.Severity.CRITICAL,u.default.Category.PLAYER,u.default.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,"static setDrmPlayback")}}]),e}();p.getLogger=s.default,p.DrmScheme=c.DrmScheme,t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrmScheme={WIDEVINE:"com.widevine.alpha",PLAYREADY:"com.microsoft.playready",FAIRPLAY:"com.apple.fairplay"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={PRE:"preroll",MID:"midroll",POST:"postroll",OVERLAY:"overlay"};t.AdBreakType=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={VAST:"vast",VMAP:"vmap"};t.AdTagType=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.AdsController=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(8),u=(r(l),n(13)),c=n(4),p=r(c),f=n(6),d=r(f),h=n(1),y=r(h),v=n(3),g=n(2),m=r(g),b=(n(38),n(39),function(e){function t(e,n){i(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._player=e,r._adsPluginControllers=n,r._initMembers(),r._addBindings(),r}return o(t,e),s(t,[{key:"isAdBreak",value:function(){return!!this._adBreak}},{key:"getAdBreaksLayout",value:function(){return this._adBreaksLayout}},{key:"getAdBreak",value:function(){return this._adBreak}},{key:"getAd",value:function(){return this._ad}},{key:"skipAd",value:function(){var e=this._adsPluginControllers.find(function(e){return e.active});e&&e.skipAd()}},{key:"playAdNow",value:function(e){var t=this._adsPluginControllers.find(function(e){return e.active});t&&t.playAdNow(e)}},{key:"_initMembers",value:function(){this._allAdsCompleted=!0,this._adBreaksLayout=[],this._adBreak=null,this._ad=null,this._adPlayed=!1}},{key:"_addBindings",value:function(){var e=this;this._eventManager=new p.default,this._eventManager.listen(this._player,u.AdEventType.AD_MANIFEST_LOADED,function(t){return e._onAdManifestLoaded(t)}),this._eventManager.listen(this._player,u.AdEventType.AD_BREAK_START,function(t){return e._onAdBreakStart(t)}),this._eventManager.listen(this._player,u.AdEventType.AD_LOADED,function(t){return e._onAdLoaded(t)}),this._eventManager.listen(this._player,u.AdEventType.AD_STARTED,function(t){return e._onAdStarted(t)}),this._eventManager.listen(this._player,u.AdEventType.AD_BREAK_END,function(){return e._onAdBreakEnd()}),this._eventManager.listen(this._player,u.AdEventType.ADS_COMPLETED,function(){return e._onAdsCompleted()}),this._eventManager.listen(this._player,u.AdEventType.AD_ERROR,function(t){return e._onAdError(t)}),this._eventManager.listen(this._player,v.CustomEventType.PLAYER_RESET,function(){return e._reset()}),this._eventManager.listen(this._player,v.Html5EventType.ENDED,function(){return e._onEnded()})}},{key:"_onAdManifestLoaded",value:function(e){this._adBreaksLayout=Array.from(new Set(this._adBreaksLayout.concat(e.payload.adBreaksPosition))).sort(),this._allAdsCompleted=!1}},{key:"_onAdBreakStart",value:function(e){this._adBreak=e.payload.adBreak,this.dispatchEvent(e)}},{key:"_onAdLoaded",value:function(e){this._ad=e.payload.ad}},{key:"_onAdStarted",value:function(e){this._ad=e.payload.ad,this._adPlayed=!0}},{key:"_onAdBreakEnd",value:function(){this._adBreak=null,this._ad=null}},{key:"_onAdsCompleted",value:function(){this._adsPluginControllers.every(function(e){return e.done})&&(this._allAdsCompleted=!0,this.dispatchEvent(new y.default(u.AdEventType.ALL_ADS_COMPLETED)))}},{key:"_onAdError",value:function(e){e.payload.severity===m.default.Severity.CRITICAL&&this._adsPluginControllers.every(function(e){return e.done})&&(this._allAdsCompleted=!0,this._adPlayed&&this.dispatchEvent(new y.default(u.AdEventType.ALL_ADS_COMPLETED)))}},{key:"_onEnded",value:function(){if(this._adBreaksLayout.includes(-1)){var e=function(e){return"bumper"===e.name},t=this._adsPluginControllers.find(function(t){return e(t)}),n=this._adsPluginControllers.find(function(t){return!e(t)});(t?t.onPlaybackEnded():Promise.resolve()).finally(function(){n&&n.onPlaybackEnded()})}else this._allAdsCompleted=!0}},{key:"_reset",value:function(){this._initMembers()}},{key:"allAdsCompleted",get:function(){return this._allAdsCompleted}}]),t}(d.default));t.AdsController=b},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t){r(this,e),this._type=t.type,this._position=t.position,this._numAds=t.numAds}return i(e,[{key:"toJSON",value:function(){return{type:this.type,position:this.position,numAds:this.numAds}}},{key:"type",get:function(){return this._type}},{key:"position",get:function(){return this._position}},{key:"numAds",get:function(){return this._numAds}}]),e}();t.AdBreak=a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t,n){r(this,e),this._id=t,this._system=n.system,this._url=n.url,this._contentType=n.contentType,this._title=n.title,this._position=n.position,this._duration=n.duration,this._clickThroughUrl=n.clickThroughUrl,this._posterUrl=n.posterUrl,this._skipOffset=n.skipOffset,this._linear=n.linear,this._width=n.width||0,this._height=n.height||0,this._bitrate=n.bitrate||0,this._bumper=n.bumper}return i(e,[{key:"toJSON",value:function(){return{id:this.id,system:this.system,url:this.url,contentType:this.contentType,title:this.title,position:this.position,duration:this.duration,clickThroughUrl:this.clickThroughUrl,posterUrl:this.posterUrl,skipOffset:this.skipOffset,linear:this.linear,skippable:this.skippable,width:this.width,height:this.height,bitrate:this.bitrate,bumper:this.bumper}}},{key:"id",get:function(){return this._id}},{key:"system",get:function(){return this._system}},{key:"contentType",get:function(){return this._contentType}},{key:"url",get:function(){return this._url}},{key:"title",get:function(){return this._title}},{key:"position",get:function(){return this._position}},{key:"duration",get:function(){return this._duration}},{key:"clickThroughUrl",get:function(){return this._clickThroughUrl}},{key:"posterUrl",get:function(){return this._posterUrl}},{key:"skipOffset",get:function(){return this._skipOffset}},{key:"linear",get:function(){return this._linear}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"bitrate",get:function(){return this._bitrate}},{key:"bumper",get:function(){return this._bumper}},{key:"skippable",get:function(){return!!(this.skipOffset&&this.skipOffset>0)}}]),e}();t.Ad=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return new o.default(e||{})}Object.defineProperty(t,"__esModule",{value:!0}),t.setLogLevel=t.getLogLevel=t.LogLevel=t.getLogger=t.RequestType=t.MimeType=t.DrmScheme=t.CorsType=t.LogLevelType=t.AbrMode=t.StreamType=t.MediaType=t.EngineType=t.TrackType=t.StateType=t.EventType=t.CustomEventType=t.Html5EventType=t.AdEventType=t.AdsController=t.AdTagType=t.AdBreakType=t.AdBreak=t.Ad=t.unRegisterEngine=t.registerEngine=t.setCapabilities=t.getCapabilities=t.BaseDrmProtocol=t.State=t.Env=t.PLAYER_NAME=t.VERSION=t.EventManager=t.FakeEventTarget=t.FakeEvent=t.Error=t.Utils=t.TextStyle=t.TextTrack=t.AudioTrack=t.VideoTrack=t.Track=t.BaseMiddleware=t.BasePlugin=t.registerPlugin=t.BaseMediaSourceAdapter=t.registerMediaSourceAdapter=void 0,t.loadPlayer=i;var a=n(8),o=r(a),s=n(32),l=r(s),u=n(31),c=n(30),p=n(17),f=n(33),d=r(f),h=n(22),y=r(h),v=n(18),g=r(v),m=n(24),b=r(m),_=n(7),E=r(_),k=n(10),T=r(k),A=n(11),w=r(A),S=n(9),P=r(S),O=n(20),C=r(O),x=n(12),R=r(x),I=n(5),D=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(I),M=n(2),L=r(M),N=n(1),j=r(N),U=n(6),F=r(U),B=n(4),V=r(B),G=n(19),H=n(15),K=n(25),z=n(26),Y=n(27),W=n(3),q=n(28),X=n(0),J=r(X),Q=n(29),$=n(34),Z=n(77),ee=n(23),te=n(39),ne=n(38),re=n(35),ie=n(36),ae=n(37),oe=n(13);t.registerMediaSourceAdapter=u.registerMediaSourceAdapter,t.BaseMediaSourceAdapter=l.default,t.registerPlugin=p.registerPlugin,t.BasePlugin=g.default,t.BaseMiddleware=y.default,t.Track=E.default,t.VideoTrack=T.default,t.AudioTrack=w.default,t.TextTrack=P.default,t.TextStyle=C.default,t.Utils=D,t.Error=L.default,t.FakeEvent=j.default,t.FakeEventTarget=F.default,t.EventManager=V.default,t.VERSION="0.53.0",t.PLAYER_NAME="@playkit-js/playkit-js",t.Env=R.default,t.State=b.default,t.BaseDrmProtocol=d.default;var se=o.default.getCapabilities,le=o.default.setCapabilities;t.getCapabilities=se,t.setCapabilities=le,t.registerEngine=c.registerEngine,t.unRegisterEngine=c.unRegisterEngine,t.Ad=te.Ad,t.AdBreak=ne.AdBreak,t.AdBreakType=re.AdBreakType,t.AdTagType=ie.AdTagType,t.AdsController=ae.AdsController,t.AdEventType=oe.AdEventType,t.Html5EventType=W.Html5EventType,t.CustomEventType=W.CustomEventType,t.EventType=W.EventType,t.StateType=G.StateType,t.TrackType=H.TrackType,t.EngineType=z.EngineType,t.MediaType=Y.MediaType,t.StreamType=K.StreamType,t.AbrMode=q.AbrMode,t.LogLevelType=X.LogLevelType,t.CorsType=Q.CorsType,t.DrmScheme=$.DrmScheme,t.MimeType=Z.MimeType,t.RequestType=ee.RequestType,t.getLogger=J.default,t.LogLevel=X.LogLevel,t.getLogLevel=X.getLogLevel,t.setLogLevel=X.setLogLevel,t.default=i},function(e,t,n){var r;!function(i,a){"use strict";var o="model",s="name",l="type",u="vendor",c="version",p="mobile",f="tablet",d={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},h={rgx:function(e,t){for(var n,r,i,a,o,s,l=0;l<t.length&&!o;){var u=t[l],c=t[l+1];for(n=r=0;n<u.length&&!o;)if(o=u[n++].exec(e))for(i=0;i<c.length;i++)s=o[++r],a=c[i],"object"==typeof a&&a.length>0?2==a.length?"function"==typeof a[1]?this[a[0]]=a[1].call(this,s):this[a[0]]=a[1]:3==a.length?"function"!=typeof a[1]||a[1].exec&&a[1].test?this[a[0]]=s?s.replace(a[1],a[2]):void 0:this[a[0]]=s?a[1].call(this,s,a[2]):void 0:4==a.length&&(this[a[0]]=s?a[3].call(this,s.replace(a[1],a[2])):void 0):this[a]=s||void 0;l+=2}},str:function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(d.has(t[n][r],e))return"?"===n?void 0:n}else if(d.has(t[n],e))return"?"===n?void 0:n;return e}},y={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},v={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[s,c],[/(opios)[\/\s]+([\w\.]+)/i],[[s,"Opera Mini"],c],[/\s(opr)\/([\w\.]+)/i],[[s,"Opera"],c],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]+)*/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]+)*/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser)\/([\w\.-]+)/i],[s,c],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[s,"IE"],c],[/(edge)\/((\d+)?[\w\.]+)/i],[s,c],[/(yabrowser)\/([\w\.]+)/i],[[s,"Yandex"],c],[/(puffin)\/([\w\.]+)/i],[[s,"Puffin"],c],[/(uc\s?browser)[\/\s]?([\w\.]+)/i,/ucweb.+(ucbrowser)[\/\s]?([\w\.]+)/i,/juc.+(ucweb)[\/\s]?([\w\.]+)/i,/(ucbrowser)\/([\w\.]+)/i],[[s,"UCBrowser"],c],[/(comodo_dragon)\/([\w\.]+)/i],[[s,/_/g," "],c],[/(micromessenger)\/([\w\.]+)/i],[[s,"WeChat"],c],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[s,c],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[c,[s,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[c,[s,"Facebook"]],[/(headlesschrome) ([\w\.]+)/i],[c,[s,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[s,/(.+)/,"$1 WebView"],c],[/android.+samsungbrowser\/([\w\.]+)/i,/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[c,[s,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[s,c],[/(dolfin)\/([\w\.]+)/i],[[s,"Dolphin"],c],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[s,"Chrome"],c],[/(coast)\/([\w\.]+)/i],[[s,"Opera Coast"],c],[/fxios\/([\w\.-]+)/i],[c,[s,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[c,[s,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[c,s],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[s,[c,h.str,y.browser.oldsafari.version]],[/(konqueror)\/([\w\.]+)/i,/(webkit|khtml)\/([\w\.]+)/i],[s,c],[/(navigator|netscape)\/([\w\.-]+)/i],[[s,"Netscape"],c],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]+)*/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[s,c]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",d.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",d.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+;))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",d.lowerize]]],device:[[/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i],[o,u,[l,f]],[/applecoremedia\/[\w\.]+ \((ipad)/],[o,[u,"Apple"],[l,f]],[/(apple\s{0,1}tv)/i],[[o,"Apple TV"],[u,"Apple"]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[u,o,[l,f]],[/(kf[A-z]+)\sbuild\/[\w\.]+.*silk\//i],[o,[u,"Amazon"],[l,f]],[/(sd|kf)[0349hijorstuw]+\sbuild\/[\w\.]+.*silk\//i],[[o,h.str,y.device.amazon.model],[u,"Amazon"],[l,p]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[o,u,[l,p]],[/\((ip[honed|\s\w*]+);/i],[o,[u,"Apple"],[l,p]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|huawei|meizu|motorola|polytron)[\s_-]?([\w-]+)*/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[u,o,[l,p]],[/\(bb10;\s(\w+)/i],[o,[u,"BlackBerry"],[l,p]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone)/i],[o,[u,"Asus"],[l,f]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[u,"Sony"],[o,"Xperia Tablet"],[l,f]],[/(?:sony)?(?:(?:(?:c|d)\d{4})|(?:so[-l].+))\sbuild\//i],[[u,"Sony"],[o,"Xperia Phone"],[l,p]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[u,o,[l,"console"]],[/android.+;\s(shield)\sbuild/i],[o,[u,"Nvidia"],[l,"console"]],[/(playstation\s[34portablevi]+)/i],[o,[u,"Sony"],[l,"console"]],[/(sprint\s(\w+))/i],[[u,h.str,y.device.sprint.vendor],[o,h.str,y.device.sprint.model],[l,p]],[/(lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i],[u,o,[l,f]],[/(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i,/(zte)-(\w+)*/i,/(alcatel|geeksphone|huawei|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]+)*/i],[u,[o,/_/g," "],[l,p]],[/(nexus\s9)/i],[o,[u,"HTC"],[l,f]],[/(nexus\s6p)/i],[o,[u,"Huawei"],[l,p]],[/(microsoft);\s(lumia[\s\w]+)/i],[u,o,[l,p]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[o,[u,"Microsoft"],[l,"console"]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[u,"Microsoft"],[l,p]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?(:?\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w+)*/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[o,[u,"Motorola"],[l,p]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[o,[u,"Motorola"],[l,f]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[u,d.trim],[o,d.trim],[l,"smarttv"]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[u,"Samsung"],[l,"smarttv"]],[/\(dtv[\);].+(aquos)/i],[o,[u,"Sharp"],[l,"smarttv"]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[u,"Samsung"],o,[l,f]],[/smart-tv.+(samsung)/i],[u,[l,"smarttv"],o],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)*/i,/sec-((sgh\w+))/i],[[u,"Samsung"],o,[l,p]],[/sie-(\w+)*/i],[o,[u,"Siemens"],[l,p]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]+)*/i],[[u,"Nokia"],o,[l,p]],[/android\s3\.[\s\w;-]{10}(a\d{3})/i],[o,[u,"Acer"],[l,f]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[u,"LG"],o,[l,f]],[/(lg) netcast\.tv/i],[u,o,[l,"smarttv"]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w+)*/i],[o,[u,"LG"],[l,p]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[o,[u,"Lenovo"],[l,f]],[/linux;.+((jolla));/i],[u,o,[l,p]],[/((pebble))app\/[\d\.]+\s/i],[u,o,[l,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[u,o,[l,p]],[/crkey/i],[[o,"Chromecast"],[u,"Google"]],[/android.+;\s(glass)\s\d/i],[o,[u,"Google"],[l,"wearable"]],[/android.+;\s(pixel c)\s/i],[o,[u,"Google"],[l,f]],[/android.+;\s(pixel xl|pixel)\s/i],[o,[u,"Google"],[l,p]],[/android.+(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:one|one[\s_]plus|note lte)?[\s_]*(?:\d\w)?)\s+build/i],[[o,/_/g," "],[u,"Xiaomi"],[l,p]],[/android.+a000(1)\s+build/i],[o,[u,"OnePlus"],[l,p]],[/\s(tablet)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[l,d.lowerize],u,o]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[c,[s,"EdgeHTML"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[s,c],[/rv\:([\w\.]+).*(gecko)/i],[c,s]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[s,c],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s]+\w)*/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[s,[c,h.str,y.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[s,"Windows"],[c,h.str,y.os.windows.version]],[/\((bb)(10);/i],[[s,"BlackBerry"],c],[/(blackberry)\w*\/?([\w\.]+)*/i,/(tizen)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i,/linux;.+(sailfish);/i],[s,c],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i],[[s,"Symbian"],c],[/\((series40);/i],[s],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[s,"Firefox OS"],c],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w+)*/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]+)*/i,/(hurd|linux)\s?([\w\.]+)*/i,/(gnu)\s?([\w\.]+)*/i],[s,c],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[s,"Chromium OS"],c],[/(sunos)\s?([\w\.]+\d)*/i],[[s,"Solaris"],c],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i],[s,c],[/(haiku)\s(\w+)/i],[s,c],[/(ip[honead]+)(?:.*os\s([\w]+)*\slike\smac|;\sopera)/i],[[s,"iOS"],[c,/_/g,"."]],[/(mac\sos\sx)\s?([\w\s\.]+\w)*/i,/(macintosh|mac(?=_powerpc)\s)/i],[[s,"Mac OS"],[c,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]+)*/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,/(unix)\s?([\w\.]+)*/i],[s,c]]},g=function(e,t){this[s]=e,this[c]=t},m=function(e){this.architecture=e},b=function(e,t,n){this[u]=e,this[o]=t,this[l]=n},_=g,E=g,k=function(e,t){if(!(this instanceof k))return new k(e,t).getResult();var n=e||(i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=t?d.extend(v,t):v,a=new g,o=new m,s=new b,l=new _,u=new E;return this.getBrowser=function(){return h.rgx.call(a,n,r.browser),a.major=d.major(a.version),a},this.getCPU=function(){return h.rgx.call(o,n,r.cpu),o},this.getDevice=function(){return h.rgx.call(s,n,r.device),s},this.getEngine=function(){return h.rgx.call(l,n,r.engine),l},this.getOS=function(){return h.rgx.call(u,n,r.os),u},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=e,a=new g,o=new m,s=new b,l=new _,u=new E,this},this};k.VERSION="0.7.13",k.BROWSER={NAME:s,MAJOR:"major",VERSION:c},k.CPU={ARCHITECTURE:"architecture"},k.DEVICE={MODEL:o,VENDOR:u,TYPE:l,CONSOLE:"console",MOBILE:p,SMARTTV:"smarttv",TABLET:f,WEARABLE:"wearable",EMBEDDED:"embedded"},k.ENGINE={NAME:s,VERSION:c},k.OS={NAME:s,VERSION:c},void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=k),t.UAParser=k):n(42)?void 0!==(r=function(){return k}.call(t,n,t,e))&&(e.exports=r):i.UAParser=k;var T=i.jQuery||i.Zepto;if(void 0!==T){var A=new k;T.ua=A.getResult(),T.ua.get=function(){return A.getUA()},T.ua.set=function(e){A.setUA(e);var t=A.getResult();for(var n in t)T.ua[n]=t[n]}}}("object"==typeof window?window:this)},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(5),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(a),s=function(){function e(){r(this,e),this._createEl()}return i(e,[{key:"setSrc",value:function(e){e&&(this._posterUrl=e,o.Dom.setStyle(this._el,"background-image",'url("'+this._posterUrl+'")'),this.hide())}},{key:"getElement",value:function(){return this._el}},{key:"_createEl",value:function(){if(!this._el){var e=this._el=o.Dom.createElement("div");o.Dom.setAttribute(e,"id",o.Generator.uniqueId(5)),o.Dom.setAttribute(e,"tabindex","-1")}}},{key:"_removeEl",value:function(){this._el&&o.Dom.removeChild(this._el.parentNode,this._el)}},{key:"show",value:function(){o.Dom.setStyle(this._el,"display","")}},{key:"hide",value:function(){o.Dom.setStyle(this._el,"display","none")}},{key:"reset",value:function(){this._posterUrl="",o.Dom.setStyle(this._el,"background-image","")}},{key:"destroy",value:function(){this.reset(),this._removeEl()}},{key:"src",get:function(){return this._posterUrl}}]),e}();t.default=s},function(e,t,n){"use strict";function r(e,t,n){n=n||{};var r=n.timeout?n.timeout:o,i=document.createElement("script"),u=s+Math.round(Date.now()+1000001*Math.random()),c=e,p=void 0,f=function(){i&&i.parentNode&&i.parentNode.removeChild(i),window[u]=function(){},p&&clearTimeout(p)};return new Promise(function(n,o){r&&(p=setTimeout(function(){f(),o(new a.default(a.default.Severity.CRITICAL,a.default.Category.NETWORK,a.default.Code.TIMEOUT,e))},r)),window[u]=function(r){var i=t(r,e);f(),n(i)},c.match(/\?/)?c+="&"+l+u:c+="?"+l+u,i.type="text/javascript",i.src=c,document.getElementsByTagName("head")[0].appendChild(i)})}Object.defineProperty(t,"__esModule",{value:!0}),t.jsonp=void 0;var i=n(2),a=function(e){return e&&e.__esModule?e:{default:e}}(i),o=5e3,s="jsonpcallback",l="responseFormat=jsonp&callback=";t.jsonp=r},function(e,t,n){var r,i;/*!
 * js-logger - http://github.com/jonnyreeves/js-logger
 * Jonny Reeves, http://jonnyreeves.co.uk/
 * js-logger may be freely distributed under the MIT license.
 */
!function(a){"use strict";var o={};o.VERSION="1.4.1";var s,l={},u=function(e,t){return function(){return t.apply(e,arguments)}},c=function(){var e,t,n=arguments,r=n[0];for(t=1;t<n.length;t++)for(e in n[t])e in r||!n[t].hasOwnProperty(e)||(r[e]=n[t][e]);return r},p=function(e,t){return{value:e,name:t}};o.DEBUG=p(1,"DEBUG"),o.INFO=p(2,"INFO"),o.TIME=p(3,"TIME"),o.WARN=p(4,"WARN"),o.ERROR=p(8,"ERROR"),o.OFF=p(99,"OFF");var f=function(e){this.context=e,this.setLevel(e.filterLevel),this.log=this.info};f.prototype={setLevel:function(e){e&&"value"in e&&(this.context.filterLevel=e)},getLevel:function(){return this.context.filterLevel},enabledFor:function(e){var t=this.context.filterLevel;return e.value>=t.value},debug:function(){this.invoke(o.DEBUG,arguments)},info:function(){this.invoke(o.INFO,arguments)},warn:function(){this.invoke(o.WARN,arguments)},error:function(){this.invoke(o.ERROR,arguments)},time:function(e){"string"==typeof e&&e.length>0&&this.invoke(o.TIME,[e,"start"])},timeEnd:function(e){"string"==typeof e&&e.length>0&&this.invoke(o.TIME,[e,"end"])},invoke:function(e,t){s&&this.enabledFor(e)&&s(t,c({level:e},this.context))}};var d=new f({filterLevel:o.OFF});!function(){var e=o;e.enabledFor=u(d,d.enabledFor),e.debug=u(d,d.debug),e.time=u(d,d.time),e.timeEnd=u(d,d.timeEnd),e.info=u(d,d.info),e.warn=u(d,d.warn),e.error=u(d,d.error),e.log=e.info}(),o.setHandler=function(e){s=e},o.setLevel=function(e){d.setLevel(e);for(var t in l)l.hasOwnProperty(t)&&l[t].setLevel(e)},o.getLevel=function(){return d.getLevel()},o.get=function(e){return l[e]||(l[e]=new f(c({name:e},d.context)))},o.createDefaultHandler=function(e){e=e||{},e.formatter=e.formatter||function(e,t){t.name&&e.unshift("["+t.name+"]")};var t={},n=function(e,t){Function.prototype.apply.call(e,console,t)};return"undefined"==typeof console?function(){}:function(r,i){r=Array.prototype.slice.call(r);var a,s=console.log;i.level===o.TIME?(a=(i.name?"["+i.name+"] ":"")+r[0],"start"===r[1]?console.time?console.time(a):t[a]=(new Date).getTime():console.timeEnd?console.timeEnd(a):n(s,[a+": "+((new Date).getTime()-t[a])+"ms"])):(i.level===o.WARN&&console.warn?s=console.warn:i.level===o.ERROR&&console.error?s=console.error:i.level===o.INFO&&console.info?s=console.info:i.level===o.DEBUG&&console.debug&&(s=console.debug),e.formatter(r,i),n(s,r))}},o.useDefaults=function(e){o.setLevel(e&&e.defaultLevel||o.DEBUG),o.setHandler(o.createDefaultHandler(e))},r=o,void 0!==(i="function"==typeof r?r.call(t,n,t,e):r)&&(e.exports=i)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={RECOVERABLE:1,CRITICAL:2};t.Severity=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Code=void 0;var r=n(48),i={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_CREATE_TEXT_CUE:2009,DASH_ADAPTER_ERROR_PARSE_ISSUE:2010,UNKNOWN_FILE_TYPE:2011,UNKNOWN_LANGUAGE:2012,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,HLS_FATAL_MEDIA_ERROR:3018,HLS_FRAG_PARSING_ERROR:3019,HLS_BUFFER_APPEND_ISSUE:3020,HLS_BUFFER_APPENDING_ISSUE:3021,NATIVE_ADAPTER_LOAD_FAILED:3022,HLS_BUFFER_STALLED_ERROR:3023,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_LIVE_CONTENT_NOT_SUPPORTED:4029,HLSJS_CANNOT_PARSE:4030,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,BAD_FAIRPLAY_RESPONSE:6015,COULD_NOT_CREATE_MEDIA_KEYS:6016,COULD_NOT_CREATE_KEY_SESSION:6017,LOAD_INTERRUPTED:7e3,BITRATE_SWITCH_ISSUE:7001,LOAD_FAILED:7002,RUNTIME_ERROR_NOT_REGISTERED_PLUGIN:7003,RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED:7004,RUNTIME_ERROR_NOT_VALID_HANDLER:7005,NO_SOURCE_PROVIDED:7006,NO_ENGINE_FOUND_TO_PLAY_THE_SOURCE:7007,ENTER_PICTURE_IN_PICTURE_FAILED:7008,EXIT_PICTURE_IN_PICTURE_FAILED:7009,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,CONTENT_UNSUPPORTED_BY_BROWSER:9009,CANNOT_ADD_ITEM:9010,DOWNLOAD_FAILED:9011,COULD_NOT_GET_INFO_FROM_MEDIA_PROVIDER:9012,ENTRY_DOES_NOT_EXIST:9013,PAUSE_FAILED:9014,RESUME_FAILED:9015,RENEW_LICENSE_FAILED:9016,ENTRY_ALREADY_EXISTS:9017,REMOVE_FAILED:9018,CAST_LOAD_MEDIA_FAILED:10001,CAST_CUSTOM_MESSAGE_PARSING_ERROR:100002,CAST_EDIT_TRACKS_INFO_ERROR:10003,VR_NOT_SUPPORTED:11e3};Object.assign(i,r.AdErrorCode),t.Code=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={XML_PARSING_ERROR:8100,VAST_SCHEMA_VALIDATION_ERROR:8101,VAST_RESPONSE_VERSION_NOT_SUPPORTED:8102,TRAFFICKING_ERROR:8200,VAST_UNEXPECTED_LINEARITY:8201,VAST_UNEXPECTED_DURATION_ERROR:8201,VAST_UNEXPECTED_SIZE_ERROR:8203,VAST_WRAPPER_ERROR:8300,VAST_URI_ERROR:8301,VAST_TOO_MANY_REDIRECTS:8302,NO_ADS_VAST_RESPONSE:8303,GENERAL_LINEAR_ERROR:8400,FILE_NOT_FOUND:8401,VAST_MEDIA_LOAD_TIMEOUT:8402,MEDIA_FILE_NOT_FOUND:8403,MEDIA_FILE_DISPLAY_ERROR:8405,MEZZANINE_FILE_NOT_PROVIDED:8406,MEZZANINE_DOWNLOADED_FOR_THE_FIRST_TIME:8407,VAST_RESPONSE_AD_REJECTED:8408,CREATIVE_WAS_NOT_EXECUTED:8409,CODE_REFERENCED_NOT_EXECUTED:8410,GENERAL_NON_LINEAR_AD_ERROR:8500,NON_LINEAR_CREATIVE_DIMENSIONS_NOT_ALIGN_ERROR:8501,NON_LINEAR_FETCH_ERROR:8502,NON_LINEAR_RESOURCE_NOT_FOUND:8503,GENERAL_COMPANION_ADS_ERROR:8600,COMPANION_DIMENSIONS_NOT_FIT:8601,COMPANION_CANNOT_BE_DISPLAY:8602,COMPANION_CANNOT_BE_FETCHED:8603,COMPANION_TYPE_NOT_FOUND:8604,AD_UNDEFINED_ERROR:8900,GENERAL_VPAID_ERROR:8901};t.AdErrorCode=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,ADS:8,STORAGE:9,CAST:10,VR:11};t.Category=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){r(this,e)}return i(e,null,[{key:"language",get:function(){var e=void 0;return e=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.userLanguage?navigator.userLanguage:navigator.language,e&&e.match("-")&&(e=e.split("-")[0]),e}}]),e}();t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(8),l=(r(s),n(4)),u=r(l),c=n(24),p=r(c),f=n(19),d=n(3),h=n(1),y=r(h),v=n(0),g=r(v),m=function(){function e(t){var n,r,o,s,l,c,h=this;a(this,e),this._transitions=(c={},i(c,f.StateType.IDLE,(n={},i(n,d.Html5EventType.LOAD_START,function(){h._updateState(f.StateType.LOADING),h._dispatchEvent()}),i(n,d.Html5EventType.PLAY,function(){h._updateState(f.StateType.BUFFERING),h._dispatchEvent()}),i(n,d.Html5EventType.SEEKED,function(){h._updateState(f.StateType.PAUSED),h._dispatchEvent()}),n)),i(c,f.StateType.LOADING,(r={},i(r,d.Html5EventType.LOADED_METADATA,function(){h._updateState(f.StateType.PAUSED),h._dispatchEvent()}),i(r,d.Html5EventType.ERROR,function(){h._updateState(f.StateType.IDLE),h._dispatchEvent()}),r)),i(c,f.StateType.PAUSED,(o={},i(o,d.Html5EventType.PLAY,function(){h._updateState(f.StateType.PLAYING),h._dispatchEvent()}),i(o,d.Html5EventType.PLAYING,function(){h._updateState(f.StateType.PLAYING),h._dispatchEvent()}),i(o,d.Html5EventType.ENDED,function(){h._updateState(f.StateType.IDLE),h._dispatchEvent()}),o)),i(c,f.StateType.PLAYING,(s={},i(s,d.Html5EventType.PAUSE,function(){h._updateState(f.StateType.PAUSED),h._dispatchEvent()}),i(s,d.Html5EventType.WAITING,function(){h._updateState(f.StateType.BUFFERING),h._lastWaitingTime=h._player.currentTime,h._dispatchEvent()}),i(s,d.Html5EventType.ENDED,function(){h._updateState(f.StateType.IDLE),h._dispatchEvent()}),i(s,d.Html5EventType.ERROR,function(){h._updateState(f.StateType.IDLE),h._dispatchEvent()}),s)),i(c,f.StateType.BUFFERING,(l={},i(l,d.Html5EventType.PLAYING,function(){h._updateState(f.StateType.PLAYING),h._dispatchEvent()}),i(l,d.Html5EventType.PAUSE,function(){h._updateState(f.StateType.PAUSED),h._dispatchEvent()}),i(l,d.Html5EventType.SEEKED,function(){h._prevState&&h._prevState.type===f.StateType.PLAYING&&(h._updateState(f.StateType.PLAYING),h._dispatchEvent())}),i(l,d.Html5EventType.TIME_UPDATE,function(){h._player.currentTime!==h._lastWaitingTime&&h._prevState&&h._prevState.type===f.StateType.PLAYING&&(h._lastWaitingTime=null,h._updateState(f.StateType.PLAYING),h._dispatchEvent())}),l)),c),this._player=t,this._logger=(0,g.default)("StateManager"),this._eventManager=new u.default,this._history=[],this._prevState=null,this._curState=new p.default(f.StateType.IDLE),this._attachListeners()}return o(e,[{key:"_attachListeners",value:function(){this._eventManager.listen(this._player,d.Html5EventType.ERROR,this._doTransition.bind(this)),this._eventManager.listen(this._player,d.Html5EventType.ENDED,this._doTransition.bind(this)),this._eventManager.listen(this._player,d.Html5EventType.PLAY,this._doTransition.bind(this)),this._eventManager.listen(this._player,d.Html5EventType.LOAD_START,this._doTransition.bind(this)),this._eventManager.listen(this._player,d.Html5EventType.PLAYING,this._doTransition.bind(this)),this._eventManager.listen(this._player,d.Html5EventType.LOADED_METADATA,this._doTransition.bind(this)),this._eventManager.listen(this._player,d.Html5EventType.PAUSE,this._doTransition.bind(this)),this._eventManager.listen(this._player,d.Html5EventType.WAITING,this._doTransition.bind(this)),this._eventManager.listen(this._player,d.Html5EventType.SEEKED,this._doTransition.bind(this)),this._eventManager.listen(this._player,d.Html5EventType.TIME_UPDATE,this._doTransition.bind(this))}},{key:"_doTransition",value:function(e){(e.type!==d.Html5EventType.TIME_UPDATE||this._curState===f.StateType.BUFFERING&&e.type===d.Html5EventType.TIME_UPDATE)&&this._logger.debug("Do transition request",e.type);var t=this._transitions[this._curState.type];"function"==typeof t[e.type]&&t[e.type]()}},{key:"_updateState",value:function(e){this._curState.type!==e&&(this._curState.duration=Date.now()/1e3,this._history.push(this._curState),this._prevState=this._curState,this._curState=new p.default(e),this._logger.debug("Switch player state: from "+this._prevState.type+" to "+this._curState.type))}},{key:"_dispatchEvent",value:function(){var e=new y.default(d.CustomEventType.PLAYER_STATE_CHANGED,{oldState:this._prevState,newState:this._curState});this._player.dispatchEvent(e)}},{key:"destroy",value:function(){this._history=[],this._eventManager.destroy()}},{key:"reset",value:function(){this._history=[]}},{key:"currentState",get:function(){return this._curState}},{key:"previousState",get:function(){return this._prevState}},{key:"history",get:function(){return this._history}}]),e}();t.default=m},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return"string"==typeof e&&!!s[e.toLowerCase()]&&e.toLowerCase()}function a(e){return"number"==typeof e&&e>=0&&e<=100}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s={"":!0,up:!0},l=function(){function e(){r(this,e),this._width=100,this._lines=3,this._regionAnchorX=0,this._regionAnchorY=100,this._viewportAnchorX=0,this._viewportAnchorY=100,this._scroll=""}return o(e,[{key:"width",get:function(){return this._width},set:function(e){if(!a(e))throw new Error("Width must be between 0 and 100.");this._width=e}},{key:"scroll",get:function(){return this._scroll},set:function(e){var t=i(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");this._scroll=t}},{key:"viewportAnchorY",get:function(){return this._viewportAnchorY},set:function(e){if(!a(e))throw new Error("ViewportAnchorY must be between 0 and 100.");this._viewportAnchorY=e}},{key:"viewportAnchorX",get:function(){return this._viewportAnchorX},set:function(e){if(!a(e))throw new Error("ViewportAnchorX must be between 0 and 100.");this._viewportAnchorX=e}},{key:"regionAnchorX",get:function(){return this._regionAnchorX},set:function(e){if(!a(e))throw new Error("RegionAnchorY must be between 0 and 100.");this._regionAnchorX=e}},{key:"lines",get:function(){return this._lines},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");this._lines=e}},{key:"regionAnchorY",get:function(){return this._regionAnchorY},set:function(e){if(!a(e))throw new Error("RegionAnchorX must be between 0 and 100.");this._regionAnchorY=e}}]),e}(),u=void 0;"undefined"!=typeof window&&window.VTTRegion?t.Region=u=window.VTTRegion:t.Region=u=l,t.Region=u},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.LabelToTrackMap=void 0;var i,a=n(15),o=n(54),s=(i={},r(i,o.LabelOptions.AUDIO,a.TrackType.AUDIO),r(i,o.LabelOptions.CAPTIONS,a.TrackType.TEXT),r(i,o.LabelOptions.QUALITIES,a.TrackType.VIDEO),i);t.LabelToTrackMap=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={AUDIO:"audio",CAPTIONS:"captions",QUALITIES:"qualities"};t.LabelOptions=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(56),s=r(o),l=n(22),u=(r(l),function(){function e(){i(this,e),this._middleware=new s.default(e.Actions)}return a(e,[{key:"use",value:function(e){this._middleware.use(e)}},{key:"load",value:function(t){this._middleware.run(e.Actions.LOAD,t)}},{key:"play",value:function(t){this._middleware.run(e.Actions.PLAY,t)}},{key:"pause",value:function(t){this._middleware.run(e.Actions.PAUSE,t)}}]),e}());u.Actions={LOAD:"load",PLAY:"play",PAUSE:"pause"},t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(16),s=r(o),l=n(22),u=(r(l),n(0)),c=r(u),p=function(){function e(t){i(this,e),this._actions=t,this._middlewares=new s.default,this._logger=(0,c.default)("Middleware")}return a(e,[{key:"use",value:function(e){for(var t in this._actions){var n=this._actions[t];"function"==typeof e[n]&&(this._logger.debug("Register <"+e.id+"> for action "+n),this._middlewares.push(n,e[n].bind(e)))}}},{key:"run",value:function(e,t){var n=this;this._logger.debug("Start middleware chain for action "+e);var r=this._middlewares.get(e);this._executeMiddleware(r,function(){n._logger.debug("Finish middleware chain for action "+e),t()})}},{key:"_executeMiddleware",value:function(e,t){e.reduceRight(function(e,t){return function(n){t(e)}},t)()}}]),e}();t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={log:{level:"ERROR"},sources:{options:{forceRedirectExternalStreams:!1},metadata:{}},plugins:{},playback:{audioLanguage:"",textLanguage:"",useNativeTextTrack:!1,enableCEA708Captions:!1,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",volume:1,startTime:-1,playsinline:!0,preload:"none",autoplay:!1,loop:!1,allowMutedAutoPlay:!0,muted:!1,pictureInPicture:!0,options:{html5:{hls:{},dash:{},native:{}}},preferNative:{hls:!1,dash:!1},inBrowserFullscreen:!1,playAdsWithMSE:!1,streamPriority:[{engine:"html5",format:"hls"},{engine:"html5",format:"dash"},{engine:"html5",format:"progressive"},{engine:"flash",format:"hls"}]},abr:{enabled:!0,fpsDroppedFramesInterval:5e3,fpsDroppedMonitoringThreshold:.2,capLevelOnFPSDrop:!0,capLevelToPlayerSize:!1,defaultBandwidthEstimate:5e5,restrictions:{minBitrate:0,maxBitrate:1/0}},drm:{keySystem:""},network:{}};t.DefaultConfig=r},function(e,t,n){var r=n(59);"string"==typeof r&&(r=[[e.i,r,""]]);var i={};i.transform=void 0,n(61)(r,i),r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(60)(void 0),t.push([e.i,".playkit-container {\n  position: relative;\n  width: 100%;\n  height: 100%;\n  color: #fff;\n  outline: none;\n  -webkit-touch-callout: none;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  -webkit-tap-highlight-color: transparent;\n}\n\n.playkit-engine {\n  width: 100%;\n  height: 100%;\n  position: absolute;\n  top: 0;\n  left: 0;\n  object-fit: contain;\n}\n\n.playkit-engine video::-webkit-media-controls-panel,\n.playkit-engine video::-webkit-media-controls-panel-container,\n.playkit-engine video::-webkit-media-controls-start-playback-button,\n.playkit-engine video::-webkit-media-controls-play-button {\n  display: none;\n  -webkit-appearance: none;\n}\n\n.playkit-poster {\n  position: absolute;\n  display: block;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  background-size: contain;\n  background-position: center center;\n  background-repeat: no-repeat;\n  background-color: #000;\n}\n\n.playkit-subtitles {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  right: 0;\n  left: 0;\n}\n\n.playkit-black-cover {\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  background-color: black;\n}\n\n.playkit-size-iframe {\n  width: 100%;\n  height: 100%;\n  position: absolute;\n  border: 0;\n  z-index: -100;\n}\n\n.playkit-in-browser-fullscreen-mode {\n  width: 100% !important;\n  height: 100% !important;\n  position: fixed !important;\n  top: 0 !important;\n  left: 0 !important;\n  /*added for blocking element with fixed position which could be on the top of the player */\n  z-index: 999999 !important;\n}\n",""])},function(e,t){function n(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var a=r(i);return[n].concat(i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"})).concat([a]).join("\n")}return[n].join("\n")}function r(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r=n(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var a=this[i][0];"number"==typeof a&&(r[a]=!0)}for(i=0;i<e.length;i++){var o=e[i];"number"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),t.push(o))}},t}},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=h[r.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](r.parts[a]);for(;a<r.parts.length;a++)i.parts.push(c(r.parts[a],t))}else{for(var o=[],a=0;a<r.parts.length;a++)o.push(c(r.parts[a],t));h[r.id]={id:r.id,refs:1,parts:o}}}}function i(e,t){for(var n=[],r={},i=0;i<e.length;i++){var a=e[i],o=t.base?a[0]+t.base:a[0],s=a[1],l=a[2],u=a[3],c={css:s,media:l,sourceMap:u};r[o]?r[o].parts.push(c):n.push(r[o]={id:o,parts:[c]})}return n}function a(e,t){var n=v(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=b[b.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),b.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function o(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=b.indexOf(e);t>=0&&b.splice(t,1)}function s(e){var t=document.createElement("style");return e.attrs.type="text/css",u(t,e.attrs),a(e,t),t}function l(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",u(t,e.attrs),a(e,t),t}function u(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function c(e,t){var n,r,i,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var u=m++;n=g||(g=s(t)),r=p.bind(null,n,u,!1),i=p.bind(null,n,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(t),r=d.bind(null,n,t),i=function(){o(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=f.bind(null,n),i=function(){o(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function p(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=E(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function f(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t,n){var r=n.css,i=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||a)&&(r=_(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var o=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(o),s&&URL.revokeObjectURL(s)}var h={},y=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),v=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e.call(this,n)),t[n]}}(function(e){return document.querySelector(e)}),g=null,m=0,b=[],_=n(62);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=y()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=i(e,t);return r(n,t),function(e){for(var a=[],o=0;o<n.length;o++){var s=n[o],l=h[s.id];l.refs--,a.push(l)}e&&r(i(e,t),t);for(var o=0;o<a.length;o++){var l=a[o];if(0===l.refs){for(var u=0;u<l.parts.length;u++)l.parts[u]();delete h[l.id]}}}};var E=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i))return e;var a;return a=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(a)+")"})}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(6),c=r(u),p=n(1),f=r(p),d=n(4),h=r(d),y=n(3),v=n(31),g=r(v),m=n(10),b=(r(m),n(11)),_=(r(b),n(9),n(14)),E=n(5),k=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(E),T=n(69),A=r(T),w=n(2),S=r(w),P=n(0),O=r(P),C=n(71),x=function(e){function t(e,n,r){a(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i._eventManager=new h.default,i._canLoadMediaSourceAdapterPromise=Promise.resolve(),i._createVideoElement(r),i._init(e,n),i}return s(t,e),l(t,null,[{key:"isSupported",value:function(){try{var e=k.Dom.createElement("video");return e.volume=.5,!!e.canPlayType}catch(e){return!1}}},{key:"createEngine",value:function(e,t,n){return new this(e,t,n)}},{key:"canPlaySource",value:function(e,t,n){return g.default.canPlaySource(e,t,n)}},{key:"runCapabilities",value:function(){t._capabilities.forEach(function(e){return e.runCapability()})}},{key:"getCapabilities",value:function(){var e=[];return t._capabilities.forEach(function(t){return e.push(t.getCapability())}),Promise.all(e).then(function(e){var n={};return e.forEach(function(e){return Object.assign(n,e)}),i({},t.id,n)})}},{key:"prepareVideoElement",value:function(e){if(!t.videoElementStore[e]){t._logger.debug("Create the video element for playing "+e);var n=k.Dom.createElement("video");t.videoElementStore[e]=n}t._logger.debug("Prepare the video element for playing "+e),t.videoElementStore[e].load()}}]),l(t,[{key:"restore",value:function(e,t){this.reset(),this._init(e,t)}},{key:"reset",value:function(){this._eventManager.removeAll(),this._mediaSourceAdapter&&(this._canLoadMediaSourceAdapterPromise=this._mediaSourceAdapter.destroy(),this._mediaSourceAdapter=null),this._el&&this._el.src&&(k.Dom.setAttribute(this._el,"src",""),k.Dom.removeAttribute(this._el,"src"))}},{key:"destroy",value:function(){this.detach(),this._droppedFramesWatcher.destroy(),this._el&&(this.pause(),k.Dom.removeAttribute(this._el,"src"),k.Dom.removeChild(this._el.parentNode,this._el)),this._eventManager.destroy(),g.default.destroy(),this._mediaSourceAdapter&&(this._mediaSourceAdapter.destroy(),this._mediaSourceAdapter=null)}},{key:"attachMediaSource",value:function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.attachMediaSource()}},{key:"detachMediaSource",value:function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.detachMediaSource()}},{key:"attach",value:function(){var e=this;Object.keys(y.Html5EventType).forEach(function(t){e._eventManager.listen(e._el,y.Html5EventType[t],function(){y.Html5EventType[t]===y.Html5EventType.ERROR?e._handleVideoError():e.dispatchEvent(new f.default(y.Html5EventType[t]))})}),this._handleMetadataTrackEvents(),this._mediaSourceAdapter&&(this._eventManager.listen(this._mediaSourceAdapter,y.CustomEventType.VIDEO_TRACK_CHANGED,function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this._mediaSourceAdapter,y.CustomEventType.AUDIO_TRACK_CHANGED,function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this._mediaSourceAdapter,y.CustomEventType.TEXT_TRACK_CHANGED,function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this._mediaSourceAdapter,y.CustomEventType.ABR_MODE_CHANGED,function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this._mediaSourceAdapter,y.CustomEventType.TEXT_CUE_CHANGED,function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this._mediaSourceAdapter,y.CustomEventType.TRACKS_CHANGED,function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this._mediaSourceAdapter,y.CustomEventType.FRAG_LOADED,function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this._mediaSourceAdapter,y.CustomEventType.MANIFEST_LOADED,function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this._mediaSourceAdapter,y.Html5EventType.ERROR,function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this._mediaSourceAdapter,y.Html5EventType.TIME_UPDATE,function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this._mediaSourceAdapter,y.Html5EventType.PLAYING,function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this._mediaSourceAdapter,y.Html5EventType.WAITING,function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this._mediaSourceAdapter,y.CustomEventType.MEDIA_RECOVERED,function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this._mediaSourceAdapter,"hlsFragParsingMetadata",function(t){return e.dispatchEvent(t)}),this._eventManager.listen(this._droppedFramesWatcher,y.CustomEventType.FPS_DROP,function(t){return e.dispatchEvent(t)}))}},{key:"detach",value:function(){var e=this;Object.keys(y.Html5EventType).forEach(function(t){e._eventManager.unlisten(e._el,y.Html5EventType[t])}),this._mediaSourceAdapter&&(this._eventManager.unlisten(this._mediaSourceAdapter,y.CustomEventType.VIDEO_TRACK_CHANGED),this._eventManager.unlisten(this._mediaSourceAdapter,y.CustomEventType.AUDIO_TRACK_CHANGED),this._eventManager.unlisten(this._mediaSourceAdapter,y.CustomEventType.TEXT_TRACK_CHANGED),this._eventManager.unlisten(this._mediaSourceAdapter,y.CustomEventType.TEXT_CUE_CHANGED))}},{key:"getVideoElement",value:function(){return this._el}},{key:"selectVideoTrack",value:function(e){this._mediaSourceAdapter&&this._mediaSourceAdapter.selectVideoTrack(e)}},{key:"selectAudioTrack",value:function(e){this._mediaSourceAdapter&&this._mediaSourceAdapter.selectAudioTrack(e)}},{key:"selectTextTrack",value:function(e){this._removeCueChangeListeners(),this._mediaSourceAdapter&&this._mediaSourceAdapter.selectTextTrack(e),this.resetAllCues(),this._addCueChangeListener()}},{key:"hideTextTrack",value:function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.hideTextTrack(),this._removeCueChangeListeners()}},{key:"enableAdaptiveBitrate",value:function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.enableAdaptiveBitrate()}},{key:"isAdaptiveBitrateEnabled",value:function(){return!!this._mediaSourceAdapter&&this._mediaSourceAdapter.isAdaptiveBitrateEnabled()}},{key:"seekToLiveEdge",value:function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.seekToLiveEdge()}},{key:"getStartTimeOfDvrWindow",value:function(){return this._mediaSourceAdapter?this._mediaSourceAdapter.getStartTimeOfDvrWindow():0}},{key:"isLive",value:function(){return!!this._mediaSourceAdapter&&this._mediaSourceAdapter.isLive()}},{key:"play",value:function(){var e=this,t=this._el.play();t&&t.catch(function(){return e.dispatchEvent(new f.default(y.CustomEventType.AUTOPLAY_FAILED))})}},{key:"pause",value:function(){return this._el.pause()}},{key:"load",value:function(e){var t=this;return this._el.load(),this._canLoadMediaSourceAdapterPromise.then(function(){return t._mediaSourceAdapter?t._mediaSourceAdapter.load(e).catch(function(e){return Promise.reject(e)}):Promise.resolve({})}).catch(function(e){return Promise.reject(e)})}},{key:"enterPictureInPicture",value:function(){var e=this;try{document.pictureInPictureEnabled&&"function"==typeof this._el.requestPictureInPicture?this._el.requestPictureInPicture().catch(function(t){e.dispatchEvent(new f.default(y.Html5EventType.ERROR,new S.default(S.default.Severity.RECOVERABLE,S.default.Category.PLAYER,S.default.Code.ENTER_PICTURE_IN_PICTURE_FAILED,t)))}):"function"==typeof this._el.webkitSetPresentationMode&&(this._el.webkitSetPresentationMode("picture-in-picture"),setTimeout(function(){return e.dispatchEvent(new f.default(y.Html5EventType.ENTER_PICTURE_IN_PICTURE))},0))}catch(e){this.dispatchEvent(new f.default(y.Html5EventType.ERROR,new S.default(S.default.Severity.RECOVERABLE,S.default.Category.PLAYER,S.default.Code.ENTER_PICTURE_IN_PICTURE_FAILED,e)))}}},{key:"exitPictureInPicture",value:function(){var e=this;try{document.pictureInPictureEnabled&&"function"==typeof document.exitPictureInPicture?document.exitPictureInPicture().catch(function(t){e.dispatchEvent(new f.default(y.Html5EventType.ERROR,new S.default(S.default.Severity.RECOVERABLE,S.default.Category.PLAYER,S.default.Code.EXIT_PICTURE_IN_PICTURE_FAILED,t)))}):"function"==typeof this._el.webkitSetPresentationMode&&(this._el.webkitSetPresentationMode("inline"),setTimeout(function(){return e.dispatchEvent(new f.default(y.Html5EventType.LEAVE_PICTURE_IN_PICTURE))},0))}catch(e){this.dispatchEvent(new f.default(y.Html5EventType.ERROR,new S.default(S.default.Severity.RECOVERABLE,S.default.Category.PLAYER,S.default.Code.EXIT_PICTURE_IN_PICTURE_FAILED,e)))}}},{key:"isPictureInPictureSupported",value:function(){return!!document.pictureInPictureEnabled||"function"==typeof this._el.webkitSupportsPresentationMode&&this._el.webkitSupportsPresentationMode("picture-in-picture")}},{key:"_init",value:function(e,t){this._config=t,this._loadMediaSourceAdapter(e),this.attach()}},{key:"_createVideoElement",value:function(e){this._el=t.videoElementStore[e]||k.Dom.createElement("video"),this._el.id=k.Generator.uniqueId(5),this._el.controls=!1}},{key:"_loadMediaSourceAdapter",value:function(e){this._mediaSourceAdapter=g.default.getMediaSourceAdapter(this.getVideoElement(),e,this._config),this._mediaSourceAdapter&&(this._droppedFramesWatcher=new C.DroppedFramesWatcher(this._mediaSourceAdapter,this._config.abr,this._el))}},{key:"_addCueChangeListener",value:function(){var e=this,t=Array.from(this._el.textTracks).find(function(e){return e&&"disabled"!==e.mode});t&&this._eventManager.listen(t,"cuechange",function(t){return e._onCueChange(t)})}},{key:"_removeCueChangeListeners",value:function(){for(var e=0;e<this._el.textTracks.length;e++)this._eventManager.unlisten(this._el.textTracks[e],"cuechange")}},{key:"_onCueChange",value:function(e){var t=e.currentTarget,n=[],r=!0,i=!1,a=void 0;try{for(var o,s=t.activeCues[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var l=o.value;if(window.VTTCue&&l instanceof window.VTTCue)n.push(l);else if(window.TextTrackCue&&l instanceof window.TextTrackCue)try{n.push(new _.Cue(l.startTime,l.endTime,l.text))}catch(e){new S.default(S.default.Severity.RECOVERABLE,S.default.Category.TEXT,S.default.Code.UNABLE_TO_CREATE_TEXT_CUE,e)}}}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}this.dispatchEvent(new f.default(y.CustomEventType.TEXT_CUE_CHANGED,{cues:n}))}},{key:"resetAllCues",value:function(){var e=Array.from(this._el.textTracks).find(function(e){return e&&"disabled"!==e.mode});if(e)for(var t=0;t<e.cues.length;t++)e.cues[t].hasBeenReset=!0}},{key:"_handleVideoError",value:function(){if(this._el.error){var e=this._el.error.code;if(e!==window.MediaError.MEDIA_ERR_ABORTED){var t=this._getMsExtendedError(),n=this._el.error.message;if(this._mediaSourceAdapter&&!this._mediaSourceAdapter.handleMediaError(this._el.error)){var r=new S.default(S.default.Severity.CRITICAL,S.default.Category.MEDIA,S.default.Code.VIDEO_ERROR,{code:e,extended:t,message:n});this.dispatchEvent(new f.default(y.Html5EventType.ERROR,r))}}}}},{key:"_getMsExtendedError",value:function(){var e=this._el.error.msExtendedCode;return e&&(e<0&&(e+=Math.pow(2,32)),e=e.toString(16)),e}},{key:"_handleMetadataTrackEvents",value:function(){var e=this,t=function(t){t.mode="hidden",t.addEventListener("cuechange",function(){e.dispatchEvent(new f.default(y.CustomEventType.TIMED_METADATA,{cues:Array.from(t.activeCues)}))})},n=Array.from(this._el.textTracks).find(function(e){return"metadata"===e.kind});n?t(n):this._eventManager.listen(this._el.textTracks,"addtrack",function(n){"metadata"===n.track.kind?t(n.track):Array.from(e._el.textTracks).forEach(function(e){"metadata"===e.kind&&setTimeout(function(){return e.mode="hidden"},100)})})}},{key:"id",get:function(){return t.id}},{key:"src",set:function(e){this._mediaSourceAdapter&&(this._mediaSourceAdapter.src=e)},get:function(){return this._mediaSourceAdapter?this._mediaSourceAdapter.src:""}},{key:"currentTime",get:function(){return this._mediaSourceAdapter?this._mediaSourceAdapter.currentTime:0},set:function(e){this._mediaSourceAdapter&&(this._mediaSourceAdapter.currentTime=e)}},{key:"duration",get:function(){return this._mediaSourceAdapter?this._mediaSourceAdapter.duration:NaN}},{key:"volume",set:function(e){this._el.volume=e},get:function(){return this._el.volume}},{key:"paused",get:function(){return this._el.paused}},{key:"seeking",get:function(){return this._el.seeking}},{key:"seekable",get:function(){return this._el.seekable}},{key:"played",get:function(){return this._el.played}},{key:"buffered",get:function(){return this._el.buffered}},{key:"muted",set:function(e){this._el.muted=e},get:function(){return this._el.muted}},{key:"defaultMuted",get:function(){return this._el.defaultMuted}},{key:"poster",set:function(e){this._el.poster=e},get:function(){return this._el.poster}},{key:"preload",set:function(e){this._el.preload=e},get:function(){return this._el.preload}},{key:"autoplay",set:function(e){this._el.autoplay=e},get:function(){return this._el.autoplay}},{key:"loop",set:function(e){this._el.loop=e},get:function(){return this._el.loop}},{key:"controls",set:function(e){this._el.controls=e},get:function(){return this._el.controls}},{key:"playbackRate",set:function(e){this._el.playbackRate=e},get:function(){return this._el.playbackRate}},{key:"defaultPlaybackRate",set:function(e){this._el.defaultPlaybackRate=e},get:function(){return this._el.defaultPlaybackRate}},{key:"ended",get:function(){return this._el.ended}},{key:"error",get:function(){return this._el.error}},{key:"networkState",get:function(){return this._el.networkState}},{key:"readyState",get:function(){return this._el.readyState}},{key:"videoHeight",get:function(){return this._el.videoHeight}},{key:"videoWidth",get:function(){return this._el.videoWidth}},{key:"playsinline",set:function(e){e?this._el.setAttribute("playsinline",""):this._el.removeAttribute("playsinline")},get:function(){return""===this._el.getAttribute("playsinline")}},{key:"crossOrigin",set:function(e){"string"==typeof e?this._el.setAttribute("crossorigin",e):this._el.removeAttribute("crossorigin")},get:function(){return this._el.getAttribute("crossorigin")}},{key:"playbackRates",get:function(){return t.PLAYBACK_RATES}},{key:"isInPictureInPicture",get:function(){return!!document.pictureInPictureElement&&null!=document.pictureInPictureElement&&this._el===document.pictureInPictureElement||!!this._el.webkitPresentationMode&&"picture-in-picture"===this._el.webkitPresentationMode}},{key:"targetBuffer",get:function(){return this._mediaSourceAdapter?this._mediaSourceAdapter.targetBuffer:NaN}},{key:"availableBuffer",get:function(){var e=0;if(this.buffered)for(var t=0;t<this.buffered.length;t++)this.buffered.start(t)<=this._el.currentTime&&this._el.currentTime<=this.buffered.end(t)&&(e=this.buffered.end(t)-this._el.currentTime);return e}}]),t}(c.default);x._logger=(0,O.default)("Html5"),x._capabilities=[A.default],x.id="html5",x.videoElementStore={},x.PLAYBACK_RATES=[.5,1,2,4],t.default=x},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in i)return i.value;var o=i.get;return void 0!==o?o.call(r):void 0},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(3),c=n(7),p=(r(c),n(10)),f=r(p),d=n(11),h=r(d),y=n(9),v=n(23),g=n(32),m=r(g),b=n(65),_=n(5),E=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(_),k=n(66),T=r(k),A=n(12),w=r(A),S=n(2),P=r(S),O=n(67),C=r(O),x=n(68),R=function(e){function t(e,n,r){i(this,t),t._logger.debug("Creating adapter");var o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r));return o._lastTimeUpdate=0,o._waitingEventTriggered=!1,o._mediaErrorRecoveryAttempts=0,o._config=E.Object.mergeDeep({},C.default,o._config),o._progressiveSources=r.progressiveSources,o._liveEdge=0,o}return o(t,e),l(t,null,[{key:"canPlayType",value:function(e){var n=!1;return"string"==typeof e&&(n=!!t.TEST_VIDEO.canPlayType(e.toLowerCase())),t._logger.debug("canPlayType result for mimeType:"+e+" is "+n.toString()),n}},{key:"canPlayDrm",value:function(e,n){var r=!0,i=!1,a=void 0;try{for(var o,s=t._drmProtocols[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var l=o.value;if(l.isConfigured(e,n)){t._drmProtocol=l;break}}}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}if(!t._drmProtocol){var u=!0,c=!1,p=void 0;try{for(var f,d=t._drmProtocols[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var h=f.value;h.canPlayDrm(e)&&(t._drmProtocol=h)}}catch(e){c=!0,p=e}finally{try{!u&&d.return&&d.return()}finally{if(c)throw p}}}return!!t._drmProtocol}},{key:"createAdapter",value:function(e,t,n){var r={displayTextTrack:!1,progressiveSources:[]};return E.Object.hasPropertyPath(n,"playback.useNativeTextTrack")&&(r.displayTextTrack=E.Object.getPropertyPath(n,"playback.useNativeTextTrack")),E.Object.hasPropertyPath(n,"sources.progressive")&&(r.progressiveSources=E.Object.getPropertyPath(n,"sources.progressive")),n.playback&&(r.enableCEA708Captions=n.playback.enableCEA708Captions,r.captionsTextTrack1Label=n.playback.captionsTextTrack1Label,r.captionsTextTrack1LanguageCode=n.playback.captionsTextTrack1LanguageCode,r.captionsTextTrack2Label=n.playback.captionsTextTrack2Label,r.captionsTextTrack2LanguageCode=n.playback.captionsTextTrack2LanguageCode,E.Object.hasPropertyPath(n.playback,"options.html5.native")&&E.Object.mergeDeep(r,n.playback.options.html5.native)),r.network=n.network,new this(e,t,r)}}]),l(t,[{key:"_dispatchErrorCallback",value:function(e){this._trigger(u.Html5EventType.ERROR,e)}},{key:"_maybeSetDrmPlayback",value:function(){var e=this;if(t._drmProtocol&&this._sourceObj&&this._sourceObj.drmData){var n={licenseUrl:"",certificate:"",network:this._config.network};t._drmProtocol.setDrmPlayback(n,this._sourceObj.drmData),this._drmHandler=new x.FairplayDrmHandler(this._videoElement,n,function(t){return e._dispatchErrorCallback(t)})}}},{key:"_setProgressiveSource",value:function(){var e=(0,b.getSuitableSourceForResolution)(this._progressiveSources,this._videoElement.offsetWidth,this._videoElement.offsetHeight);e&&(this._sourceObj=e)}},{key:"_isProgressivePlayback",value:function(){return!!this._sourceObj&&"video/mp4"===this._sourceObj.mimetype}},{key:"load",value:function(e){var t=this;return this._maybeSetDrmPlayback(),this._loadPromise||(this._loadPromise=new Promise(function(n,r){t._lastTimeUpdate=e||0,t._loadPromiseReject=r,t._eventManager.listenOnce(t._videoElement,u.Html5EventType.LOADED_DATA,function(){return t._onLoadedData(n,e)}),t._eventManager.listen(t._videoElement,u.Html5EventType.TIME_UPDATE,function(){return t._onTimeUpdate()}),t._eventManager.listen(t._videoElement,u.Html5EventType.PLAY,function(){return t._resetHeartbeatTimeout()}),t._eventManager.listen(t._videoElement,u.Html5EventType.PAUSE,function(){return t._clearHeartbeatTimeout()}),t._eventManager.listen(t._videoElement,u.Html5EventType.ENDED,function(){return t._clearHeartbeatTimeout()}),t._eventManager.listen(t._videoElement,u.Html5EventType.ABORT,function(){return t._clearHeartbeatTimeout()}),t._eventManager.listen(t._videoElement,u.Html5EventType.SEEKED,function(){return t._syncCurrentTime()}),t._eventManager.listen(window,"focus",function(){return setTimeout(function(){return t._syncCurrentTime()},1e3)}),t._isProgressivePlayback()&&t._setProgressiveSource(),t._sourceObj&&t._sourceObj.url&&(t._setSrc(),t._trigger(u.CustomEventType.ABR_MODE_CHANGED,{mode:t._isProgressivePlayback()?"manual":"auto"})),t._videoElement.load()})),this._loadPromise}},{key:"_handleDecodeError",value:function(e){var n=this;t._logger.debug("handleDecodeError",e);var r=this._videoElement.currentTime,i=this._getActivePKAudioTrack(),a=this._getActivePKTextTrack();this._videoElement.load(),this._eventManager.listenOnce(this._videoElement,u.Html5EventType.PLAYING,function(){n._mediaErrorRecoveryAttempts=0}),this._eventManager.listenOnce(this._videoElement,u.Html5EventType.CAN_PLAY,function(){n._videoElement.currentTime=r,n._videoElement.play(),n._videoElement.pause(),i&&n.selectAudioTrack(i),a?n.selectTextTrack(a):n._disableTextTracks()})}},{key:"handleMediaError",value:function(e){return this._loadPromiseReject?(this._loadPromiseReject(new P.default(P.default.Severity.CRITICAL,P.default.Category.MEDIA,P.default.Code.NATIVE_ADAPTER_LOAD_FAILED,e)),!0):!!(e&&e.code===window.MediaError.MEDIA_ERR_DECODE&&++this._mediaErrorRecoveryAttempts<=3)&&(this._handleDecodeError(e),!0)}},{key:"attachMediaSource",value:function(){}},{key:"detachMediaSource",value:function(){}},{key:"_setSrc",value:function(){var e={url:this._sourceObj?this._sourceObj.url:"",body:null,headers:{}};if("function"==typeof E.Object.getPropertyPath(this._config,"network.requestFilter"))try{t._logger.debug("Apply request filter"),this._config.network.requestFilter(v.RequestType.MANIFEST,e)}catch(e){return void this._trigger(u.Html5EventType.ERROR,new P.default(P.default.Severity.CRITICAL,P.default.Category.NETWORK,P.default.Code.REQUEST_FILTER_ERROR,e))}this._videoElement.src=e.url}},{key:"_onLoadedData",value:function(e,n){var r=this,i=function(){r._playerTracks=r._getParsedTracks(),r._addNativeAudioTrackChangeListener(),r._addNativeTextTrackChangeListener(),r._addNativeTextTrackAddedListener(),t._logger.debug("The source has been loaded successfully"),r._loadPromiseReject=null,e({tracks:r._playerTracks}),r.isLive()&&r._handleLiveDurationChange()};n&&n>-1&&(this._videoElement.currentTime=n),this._videoElement.textTracks.length>0?i():this._eventManager.listenOnce(this._videoElement,u.Html5EventType.CAN_PLAY,i.bind(this))}},{key:"_onTimeUpdate",value:function(){this._videoElement.paused||(this._videoElement.currentTime>this._lastTimeUpdate?(this._waitingEventTriggered&&(this._waitingEventTriggered=!1,this._trigger(u.Html5EventType.PLAYING)),this._resetHeartbeatTimeout()):this._videoElement.currentTime<this._lastTimeUpdate?this._syncCurrentTime():(this._waitingEventTriggered=!0,this._trigger(u.Html5EventType.WAITING)))}},{key:"_syncCurrentTime",value:function(){this._lastTimeUpdate=this._videoElement.currentTime}},{key:"_resetHeartbeatTimeout",value:function(){var e=this;this._lastTimeUpdate=this._videoElement.currentTime,this._clearHeartbeatTimeout();var t=function(){e._clearHeartbeatTimeout(),e._trigger(u.Html5EventType.ERROR,new P.default(P.default.Severity.CRITICAL,P.default.Category.NETWORK,P.default.Code.TIMEOUT,"The player exceeded max buffer time of "+e._config.heartbeatTimeout+" ms. No progress has been done during this time."))};this._heartbeatTimeoutId=setTimeout(t,this._config.heartbeatTimeout)}},{key:"_clearHeartbeatTimeout",value:function(){this._heartbeatTimeoutId&&(clearTimeout(this._heartbeatTimeoutId),this._heartbeatTimeoutId=null)}},{key:"destroy",value:function(){var e=this;return t._logger.debug("destroy"),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this).then(function(){e._drmHandler&&e._drmHandler.destroy(),e._waitingEventTriggered=!1,e._progressiveSources=[],e._loadPromise=null,e._loadPromiseReject=null,e._liveEdge=0,e._lastTimeUpdate=0,e._clearHeartbeatTimeout(),e._liveDurationChangeInterval&&(clearInterval(e._liveDurationChangeInterval),e._liveDurationChangeInterval=null)})}},{key:"_getParsedTracks",value:function(){var e=this._getParsedVideoTracks(),t=this._getParsedAudioTracks(),n=this._getParsedTextTracks();return e.concat(t).concat(n)}},{key:"_getParsedVideoTracks",value:function(){return this._isProgressivePlayback()?this._getParsedProgressiveVideoTracks():this._getParsedAdaptiveVideoTracks()}},{key:"_getParsedProgressiveVideoTracks",value:function(){var e=this._progressiveSources,t=[];if(e)for(var n=0;n<e.length;n++){var r={id:e[n].id,bandwidth:e[n].bandwidth,width:e[n].width,height:e[n].height,active:!!this._sourceObj&&e[n].id===this._sourceObj.id,index:n};t.push(new f.default(r))}return t}},{key:"_getParsedAdaptiveVideoTracks",value:function(){var e=this._videoElement.videoTracks,t=[];if(e)for(var n=0;n<e.length;n++){var r={id:e[n].id,active:e[n].selected,label:e[n].label,language:e[n].language,index:n};t.push(new f.default(r))}return t}},{key:"_getParsedAudioTracks",value:function(){var e=this._videoElement.audioTracks,t=[];if(e)for(var n=0;n<e.length;n++){var r={id:e[n].id,active:e[n].enabled,label:e[n].label,language:e[n].language,index:n};t.push(new h.default(r))}return t}},{key:"_getParsedTextTracks",value:function(){var e=[this._config.captionsTextTrack1Label,this._config.captionsTextTrack2Label],t=[this._config.captionsTextTrack1LanguageCode,this._config.captionsTextTrack2LanguageCode],n=this._videoElement.textTracks,r=[];if(n)for(var i=0;i<n.length;i++){var a={kind:n[i].kind,active:"showing"===n[i].mode,label:n[i].label,language:n[i].language,index:i};"subtitles"===a.kind?r.push(new y.TextTrack(a)):"captions"===a.kind&&this._config.enableCEA708Captions&&(a.label=a.label||e.shift(),a.language=a.language||t.shift(),r.push(new y.TextTrack(a)))}return r}},{key:"selectVideoTrack",value:function(e){this._isProgressivePlayback()?this._selectProgressiveVideoTrack(e):this.selectAdaptiveVideoTrack(e)}},{key:"_selectProgressiveVideoTrack",value:function(e){var t=this,n=this._progressiveSources;if(e instanceof f.default&&n&&n[e.index]){var r=this._videoElement.currentTime,i=this._videoElement.paused;this._sourceObj=n[e.index],this._eventManager.listenOnce(this._videoElement,u.Html5EventType.LOADED_DATA,function(){"Android Browser"===w.default.browser.name?(t._eventManager.listenOnce(t._videoElement,u.Html5EventType.DURATION_CHANGE,function(){t._videoElement.currentTime=r}),t._eventManager.listenOnce(t._videoElement,u.Html5EventType.SEEKED,function(){t._onTrackChanged(e),i&&t._videoElement.pause()}),t._videoElement.play()):(t._eventManager.listenOnce(t._videoElement,u.Html5EventType.SEEKED,function(){t._onTrackChanged(e)}),t._videoElement.currentTime=r,i||t._videoElement.play())}),this._setSrc()}}},{key:"selectAdaptiveVideoTrack",value:function(e){var t=this._videoElement.videoTracks;e instanceof f.default&&t&&t[e.index]&&(this._disableVideoTracks(),t[e.index].selected=!0,this._onTrackChanged(e))}},{key:"selectAudioTrack",value:function(e){var t=this._videoElement.audioTracks;e instanceof h.default&&t&&t[e.index]&&(this._removeNativeAudioTrackChangeListener(),this._disableAudioTracks(),t[e.index].enabled=!0,this._onTrackChanged(e),this._addNativeAudioTrackChangeListener())}},{key:"_removeNativeAudioTrackChangeListener",value:function(){this._videoElement.audioTracks&&this._eventManager.unlisten(this._videoElement.audioTracks,"change")}},{key:"_addNativeAudioTrackChangeListener",value:function(){var e=this;this._videoElement.audioTracks&&this._eventManager.listen(this._videoElement.audioTracks,"change",function(){return e._onNativeAudioTrackChange()})}},{key:"_getPKAudioTracks",value:function(){return this._playerTracks.filter(function(e){return e instanceof h.default})}},{key:"_getActivePKAudioTrack",value:function(){return this._getPKAudioTracks().find(function(e){return!0===e.active})}},{key:"_onNativeAudioTrackChange",value:function(){var e=this;t._logger.debug("Video element audio track change");var n=function(){for(var t=0;t<e._videoElement.audioTracks.length;t++)if(e._videoElement.audioTracks[t].enabled)return t;return-1}(),r=this._getActivePKAudioTrack(),i=r?r.index:-1;if(n!==i){var a=this._getPKAudioTracks(),o=a.find(function(e){return e.index===n});o&&(t._logger.debug("Native selection of track, update the player audio track ("+i+" -> "+n+")"),this._onTrackChanged(o))}}},{key:"selectTextTrack",value:function(e){var n=this._videoElement.textTracks;if(e instanceof y.TextTrack&&("subtitles"===e.kind||"captions"===e.kind)&&n){this._removeNativeTextTrackChangeListener();var r=Array.from(n).find(function(t,n){return e.index===n&&t&&("subtitles"===t.kind||"captions"===t.kind)});r&&(this._disableTextTracks(),r.mode=this._getDisplayTextTrackModeString(),t._logger.debug("Text track changed",r),this._onTrackChanged(e),this._addNativeTextTrackChangeListener())}}},{key:"_removeNativeTextTrackChangeListener",value:function(){this._videoElement.textTracks&&this._eventManager.unlisten(this._videoElement.textTracks,"change")}},{key:"_addNativeTextTrackChangeListener",value:function(){var e=this;this._videoElement.textTracks&&this._eventManager.listen(this._videoElement.textTracks,"change",function(){return e._onNativeTextTrackChange()})}},{key:"_getPKTextTracks",value:function(){return this._playerTracks.filter(function(e){return e instanceof y.TextTrack})}},{key:"_getActivePKTextTrack",value:function(){return this._getPKTextTracks().find(function(e){return!0===e.active})}},{key:"_onNativeTextTrackChange",value:function(){var e=this,n=this._getPKTextTracks(),r=n.find(function(e){return"off"===e.language});t._logger.debug("Video element text track change");var i=function(){for(var t=0;t<e._videoElement.textTracks.length;t++){var n=e._videoElement.textTracks[t];if(e._getDisplayTextTrackModeString()===n.mode)return t}return-1}(),a=this._getActivePKTextTrack(),o=a?a.index:-1;if(i!==o)if(-1==i)r&&(t._logger.debug("Native selection of track, update the player text track ("+o+" -> off)"),this._onTrackChanged(r));else{var s=n.find(function(e){return e.index===i});s&&(t._logger.debug("Native selection of track, update the player text track ("+o+" -> "+i+")"),this._onTrackChanged(s))}}},{key:"_getDisplayTextTrackModeString",value:function(){return this._config.displayTextTrack?"showing":"hidden"}},{key:"_addNativeTextTrackAddedListener",value:function(){var e=this;!this._config.displayTextTrack&&this._videoElement.textTracks&&this._eventManager.listen(this._videoElement.textTracks,"addtrack",function(){return e._onNativeTextTrackAdded()})}},{key:"_onNativeTextTrackAdded",value:function(){this._playerTracks=this._getParsedTracks(),this._trigger(u.CustomEventType.TRACKS_CHANGED,{tracks:this._playerTracks})}},{key:"hideTextTrack",value:function(){this._disableTextTracks()}},{key:"enableAdaptiveBitrate",value:function(){t._logger.warn("Enabling adaptive bitrate is not supported for native playback")}},{key:"isAdaptiveBitrateEnabled",value:function(){return!this._isProgressivePlayback()}},{key:"_disableVideoTracks",value:function(){var e=this._videoElement.videoTracks;if(e)for(var t=0;t<e.length;t++)e[t].selected=!1}},{key:"_disableAudioTracks",value:function(){var e=this._videoElement.audioTracks;if(e)for(var t=0;t<e.length;t++)e[t].enabled=!1}},{key:"_disableTextTracks",value:function(){var e=this._videoElement.textTracks;if(e)for(var t=0;t<e.length;t++)("subtitles"===e[t].kind||"captions"===e[t].kind)&&(e[t].mode="disabled")}},{key:"_getLiveEdge",value:function(){return this._videoElement.seekable.length?this._videoElement.seekable.end(this._videoElement.seekable.length-1):this._videoElement.buffered.length?this._videoElement.buffered.end(this._videoElement.buffered.length-1):this._videoElement.duration}},{key:"seekToLiveEdge",value:function(){try{this._videoElement.currentTime=this._getLiveEdge()}catch(e){return}}},{key:"isLive",value:function(){return this._videoElement.duration===1/0}},{key:"_handleLiveDurationChange",value:function(){var e=this;this._liveDurationChangeInterval=setInterval(function(){var t=e._getLiveEdge();e._liveEdge!==t&&(e._liveEdge=t,e._videoElement.dispatchEvent(new window.Event(u.Html5EventType.DURATION_CHANGE)))},2e3)}},{key:"getStartTimeOfDvrWindow",value:function(){return this.isLive()&&this._videoElement.seekable.length?this._videoElement.seekable.start(0):0}}]),t}(m.default);R.id="NativeAdapter",R._logger=m.default.getLogger(R.id),R.TEST_VIDEO=E.Dom.createElement("video"),R._drmProtocols=[T.default],R._drmProtocol=null,t.default=R},function(e,t,n){"use strict";function r(e,t,n){var r=null;if(n&&e){var i=[],a=1/0,o=!0,s=!1,l=void 0;try{for(var u,c=e[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var p=u.value,f=Math.abs(p.width-t);f<a?(a=f,i=[p]):f===a&&i.push(p)}}catch(e){s=!0,l=e}finally{try{!o&&c.return&&c.return()}finally{if(s)throw l}}var d=t/n,h=i,y=1/0,v=!0,g=!1,m=void 0;try{for(var b,_=i[Symbol.iterator]();!(v=(b=_.next()).done);v=!0){var E=b.value;if(E.height){var k=Math.abs(E.width/E.height-d);k<y?(y=k,h=[E]):k===y&&h.push(E)}}}catch(e){g=!0,m=e}finally{try{!v&&_.return&&_.return()}finally{if(g)throw m}}var T=0,A=!0,w=!1,S=void 0;try{for(var P,O=h[Symbol.iterator]();!(A=(P=O.next()).done);A=!0){var C=P.value;(C.bandwidth>T||!C.bandwidth)&&(T=C.bandwidth||T,r=C)}}catch(e){w=!0,S=e}finally{try{!A&&O.return&&O.return()}finally{if(w)throw S}}}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.getSuitableSourceForResolution=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(33),u=r(l),c=n(12),p=r(c),f=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,null,[{key:"isConfigured",value:function(e,t){return u.default.DrmScheme.FAIRPLAY===t.keySystem&&!!e.find(function(e){return e.scheme===t.keySystem})}},{key:"canPlayDrm",value:function(e){t._logger.debug("Can play DRM scheme of: "+u.default.DrmScheme.FAIRPLAY);var n=p.default.browser.name&&p.default.browser.name.includes("Safari");return!!e.find(function(e){return e.scheme===u.default.DrmScheme.FAIRPLAY})&&n}},{key:"setDrmPlayback",value:function(e,n){t._logger.debug("Sets drm playback");var r=n.find(function(e){return e.scheme===u.default.DrmScheme.FAIRPLAY});r&&(e.licenseUrl=r.licenseUrl,e.certificate=r.certificate)}}]),t}(u.default);f._logger=u.default.getLogger("FairPlay"),f._KeySystem="com.apple.fps.1_0",f._WebkitEvents={NEED_KEY:"webkitneedkey",KEY_MESSAGE:"webkitkeymessage",KEY_ADDED:"webkitkeyadded",KEY_ERROR:"webkitkeyerror"},t.default=f},function(e,t){e.exports={heartbeatTimeout:3e4}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.FairplayDrmHandler=void 0;var a=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(2),l=r(s),u=n(0),c=r(u),p=n(5),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(p),d=n(23),h={NEED_KEY:"webkitneedkey",KEY_MESSAGE:"webkitkeymessage",KEY_ADDED:"webkitkeyadded",KEY_ERROR:"webkitkeyerror"},y=function(){function e(t,n,r){var a=this;i(this,e),this._logger=(0,c.default)("FairPlayDrmHandler"),this._retryLicenseRequest=4,this._defaultConfig={licenseUrl:"",certificate:"",network:{responseFilter:function(t,n){var r={};try{var i=n.data.trim();r=JSON.parse(i)}catch(e){return void a._onError(l.default.Code.BAD_FAIRPLAY_RESPONSE,{error:e,responseText:n.data})}var o=e._validateResponse(r);o.valid?n.data=e._base64DecodeUint8Array(r.ckc):a._onError(l.default.Code.BAD_FAIRPLAY_RESPONSE,o)}}},this._config=f.Object.mergeDeep({},this._defaultConfig,n),this._errorCallback=r,this._videoElement=t,this._onWebkitNeedKeyHandler=function(e){return a._onWebkitNeedKey(e)},this._videoElement.addEventListener(h.NEED_KEY,this._onWebkitNeedKeyHandler,!1)}return o(e,[{key:"_onWebkitNeedKey",value:function(t){var n=this;this._logger.debug("Webkit need key triggered");var r=t.target,i=t.initData,a=e._extractContentId(i),o=e._base64DecodeUint8Array(this._config.certificate);if(i=e._concatInitDataIdAndCertificate(i,a,o),!r.webkitKeys){var s=this._selectKeySystem();this._logger.debug("Sets media keys"),r.webkitSetMediaKeys(new window.WebKitMediaKeys(s))}r.webkitKeys||this._onError(l.default.Code.COULD_NOT_CREATE_MEDIA_KEYS),this._logger.debug("Creates session"),this._keySession=r.webkitKeys.createSession("video/mp4",i),this._keySession||this._onError(l.default.Code.COULD_NOT_CREATE_KEY_SESSION),this._keySession.contentId=a,this._keySession.addEventListener(h.KEY_MESSAGE,function(e){return n._onWebkitKeyMessage(e)},!1),this._keySession.addEventListener(h.KEY_ADDED,function(){return n._onWebkitKeyAdded()},!1),this._keySession.addEventListener(h.KEY_ERROR,function(e){return n._onWebkitKeyError(e)},!1)}},{key:"destroy",value:function(){this._videoElement.removeEventListener(h.NEED_KEY,this._onWebkitNeedKeyHandler),this._keySession.close(),this._keySession=null}},{key:"_onWebkitKeyMessage",value:function(t){var n=this;this._logger.debug("Webkit key message triggered");var r=t.message,i=new XMLHttpRequest;i.responseType="text",i.addEventListener("load",function(e){return n._licenseRequestLoaded(e)},!1);var o={url:this._config.licenseUrl,body:e._base64EncodeUint8Array(r),headers:{}},s=this._config.network.requestFilter;if(s){this._logger.debug("Apply request filter");try{s(d.RequestType.LICENSE,o)}catch(e){return this._errorCallback(new l.default(l.default.Severity.CRITICAL,l.default.Category.NETWORK,l.default.Code.REQUEST_FILTER_ERROR,e)),void this.destroy()}}i.open("POST",o.url,!0);var u=!0;o.headers&&Object.entries(o.headers).forEach(function(e){var t=a(e,2),n=t[0],r=t[1];"string"==typeof r&&i.setRequestHeader(n,r),u&&(u="content-type"!==n.toLowerCase())}),u&&i.setRequestHeader("Content-type","application/json"),this._logger.debug("Ready for license request"),i.onerror=function(){n._onError(l.default.Code.LICENSE_REQUEST_FAILED,{status:i.status,responseText:i.responseText})},i.send(o.body)}},{key:"_onWebkitKeyAdded",value:function(){this._logger.debug("Decryption key was added to session")}},{key:"_onWebkitKeyError",value:function(e){this._logger.error("A decryption key error was encountered",e),this._retryLicenseRequest<=0&&this._onError(l.default.Code.LICENSE_REQUEST_FAILED,e.target.error),this._retryLicenseRequest--}},{key:"_licenseRequestLoaded",value:function(e){this._logger.debug("License request loaded");var t=e.target;if(t.status>299)return void this._onError(l.default.Code.LICENSE_REQUEST_FAILED,{status:t.status,error:t.responseText});var n={data:t.response};this._logger.debug("Apply response filter");try{this._config.network.responseFilter(d.RequestType.LICENSE,n),this._keySession.update(n.data)}catch(e){this._errorCallback(new l.default(l.default.Severity.CRITICAL,l.default.Category.NETWORK,l.default.Code.RESPONSE_FILTER_ERROR,e)),this.destroy()}}},{key:"_onError",value:function(e,t){this._errorCallback(new l.default(l.default.Severity.CRITICAL,l.default.Category.DRM,e,t))}},{key:"_selectKeySystem",value:function(){var e=null;return window.WebKitMediaKeys.isTypeSupported("com.apple.fps.1_0","video/mp4")?e="com.apple.fps.1_0":this._logger.warn("Key System not supported"),e}}],[{key:"_validateResponse",value:function(e){return e.message&&e.message.indexOf("error")>0||null===e.reference||500===e.status_code?{valid:!1,details:"internal server error"}:""===e.ckc?{valid:!1,details:"ckc is missing"}:{valid:!0}}},{key:"_extractContentId",value:function(t){var n=document.createElement("a");return n.href=e._arrayToString(t),n.hostname}},{key:"_arrayToString",value:function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))}},{key:"_base64DecodeUint8Array",value:function(e){for(var t=window.atob(e),n=t.length,r=new Uint8Array(new ArrayBuffer(n)),i=0;i<n;i++)r[i]=t.charCodeAt(i);return r}},{key:"_concatInitDataIdAndCertificate",value:function(t,n,r){"string"==typeof n&&(n=e._stringToArray(n));var i=0,a=new ArrayBuffer(t.byteLength+4+n.byteLength+4+r.byteLength),o=new DataView(a);new Uint8Array(a,i,t.byteLength).set(t),i+=t.byteLength,o.setUint32(i,n.byteLength,!0),i+=4;var s=new Uint8Array(a,i,n.byteLength);return s.set(n),i+=s.byteLength,o.setUint32(i,r.byteLength,!0),i+=4,new Uint8Array(a,i,r.byteLength).set(r),new Uint8Array(a,0,a.byteLength)}},{key:"_stringToArray",value:function(e){for(var t=new ArrayBuffer(2*e.length),n=new Uint16Array(t),r=0,i=e.length;r<i;r++)n[r]=e.charCodeAt(r);return n}},{key:"_base64EncodeUint8Array",value:function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="",r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,l=void 0,u=void 0,c=0;c<e.length;)r=e[c++],i=c<e.length?e[c++]:Number.NaN,a=c<e.length?e[c++]:Number.NaN,o=r>>2,s=(3&r)<<4|i>>4,l=(15&i)<<2|a>>6,u=63&a,isNaN(i)?l=u=64:isNaN(a)&&(u=64),n+=t.charAt(o)+t.charAt(s)+t.charAt(l)+t.charAt(u);return n}}]),e}();y.WebkitEvents=h,y.WebkitEvents=h,t.FairplayDrmHandler=y},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(5),s=r(o),l=n(3),u=n(0),c=function(e){return e&&e.__esModule?e:{default:e}}(u),p=n(70),f=r(p),d=function(){function e(){i(this,e)}return a(e,null,[{key:"runCapability",value:function(){e._vid||(e._vid=s.Dom.createElement("video"),e._vid.src=f.Base64Mp4Source,e._vid.setAttribute("playsinline","")),e._playPromiseResult=new Promise(function(t){e._setMuted(!1),e._getPlayPromise().then(function(){return t({autoplay:!0,mutedAutoPlay:!0})}).catch(function(){e._setMuted(!0),e._getPlayPromise().then(function(){return t({autoplay:!1,mutedAutoPlay:!0})}).catch(function(){return t({autoplay:!1,mutedAutoPlay:!1})})})})}},{key:"getCapability",value:function(){return e._playPromiseResult.then(function(t){return t.autoplay?t:(e.runCapability(),e._playPromiseResult)})}},{key:"_getPlayPromise",value:function(){return e._vid.play()||e._forcePromiseReturnValue()}},{key:"_setMuted",value:function(t){t?(e._vid.muted=!0,e._vid.setAttribute("muted","")):(e._vid.muted=!1,e._vid.removeAttribute("muted"))}},{key:"_forcePromiseReturnValue",value:function(){return new Promise(function(t,n){e._vid.addEventListener(l.Html5EventType.ERROR,function(){n()});var r=setTimeout(function(){e._logger.debug("Timeout 500 ms has been reached"),n()},500);!0===e._vid.paused?(clearTimeout(r),n()):(clearTimeout(r),t())})}}]),e}();d._logger=(0,c.default)("Html5AutoPlayCapability"),t.default=d},function(e,t){e.exports={Base64Mp4Source:"data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE="}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.DroppedFramesWatcher=void 0;var s=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(6),c=r(u),p=n(0),f=r(p),d=n(3),h=n(4),y=r(h),v=n(1),g=r(v),m=-1,b=function(e){function t(e,n,r){i(this,t);var o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o._droppedFramesInterval=null,o._lastDroppedFrames=0,o._lastDecodedFrames=0,o._lastTime=0,o._currentBitrate=0,o._eventManager=new y.default,o._mediaSourceAdapter=e,o._config=n,o._videoElement=r,o._mediaSourceAdapter.capabilities.fpsControl?(o._eventManager.listen(o._mediaSourceAdapter,d.CustomEventType.FPS_DROP,function(e){return o._triggerFPSDrop(e.payload.data)}),a(o)):(o._getDroppedAndDecodedFrames()[0]===m?t._logger.debug("Dropped frame watcher is not supported"):o._config.capLevelOnFPSDrop&&o._init(),o)}return o(t,e),l(t,[{key:"_init",value:function(){var e=this;this._eventManager.listen(this._mediaSourceAdapter,d.CustomEventType.VIDEO_TRACK_CHANGED,function(t){return e._currentBitrate=t.payload.selectedVideoTrack.bandwidth}),this._droppedFramesInterval=setInterval(function(){return e._checkFPS()},this._config.fpsDroppedFramesInterval)}},{key:"_triggerFPSDrop",value:function(e){this.dispatchEvent(new g.default(d.CustomEventType.FPS_DROP,e))}},{key:"_getDroppedAndDecodedFrames",value:function(){if("function"==typeof this._videoElement.getVideoPlaybackQuality){var e=this._videoElement.getVideoPlaybackQuality();return[e.droppedVideoFrames,e.totalVideoFrames]}return"number"==typeof this._videoElement.webkitDroppedFrameCount&&"number"==typeof this._videoElement.webkitDecodedFrameCount?[this._videoElement.webkitDroppedFrameCount,this._videoElement.webkitDecodedFrameCount]:[m,m]}},{key:"_checkFPS",value:function(){var e=this._getDroppedAndDecodedFrames(),n=s(e,2),r=n[0],i=n[1];try{var a=performance.now();if(i){if(this._lastTime){var o=a-this._lastTime,l=r-this._lastDroppedFrames,u=i-this._lastDecodedFrames,c=1e3*l/o;c>0&&(t._logger.debug("checkFPS : droppedFPS/decodedFPS:"+c/(1e3*u/o)),l>this._config.fpsDroppedMonitoringThreshold*u&&(this._mediaSourceAdapter.setMaxBitrate(this._currentBitrate-1),this._triggerFPSDrop({currentDropped:l,currentDecoded:u,totalDroppedFrames:c})))}this._lastTime=a,this._lastDroppedFrames=r,this._lastDecodedFrames=i}}catch(e){t._logger.error("Error occur while trying to check dropFrames: ",e)}}},{key:"destroy",value:function(){this._droppedFramesInterval&&clearInterval(this._droppedFramesInterval),this._droppedFramesInterval=null,this._eventManager.destroy()}}]),t}(c.default);b._logger=(0,f.default)("droppedFramesWatcher"),t.DroppedFramesWatcher=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ExternalCaptionsHandler=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(2),u=r(l),c=n(5),p=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(c),f=n(21),d=n(15),h=n(9),y=r(h),v=n(7),g=r(v),m=n(3),b=n(1),_=r(b),E=n(0),k=r(E),T=n(4),A=r(T),w=n(6),S=r(w),P=(n(14),n(8)),O=(r(P),{NOT_DOWNLOADED:1,DOWNLOADING:2,DOWNLOADED:3}),C=function(e){function t(e){i(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._externalCueIndex=0,n._textTrackModel={},n._activeTextCues=[],n._isTextTrackActive=!1,n._lastTimeUpdate=0,n._player=e,n._eventManager=new A.default,n}return o(t,e),s(t,[{key:"hideTextTrack",value:function(){this._isTextTrackActive&&(this._eventManager.unlisten(this._player,m.Html5EventType.TIME_UPDATE),this.dispatchEvent(new _.default(m.CustomEventType.TEXT_CUE_CHANGED,{cues:[]})),this._resetCurrentTrack())}},{key:"getExternalTracks",value:function(e){var t=this,n=this._player.config.sources.captions;if(!n)return[];var r=e.filter(function(e){return e instanceof y.default}),i=r.length||0,a=[];return n.forEach(function(e){if(e.language){var n=t._createTextTrack(e,i++);t._maybeAddTrack(n,e,r,a)}else{var o=new u.default(u.default.Severity.RECOVERABLE,u.default.Category.TEXT,u.default.Code.UNKNOWN_LANGUAGE,{caption:e});t.dispatchEvent(new _.default(m.Html5EventType.ERROR,o))}}),a}},{key:"_maybeAddTrack",value:function(e,n,r,i){var a=r.find(function(e){return g.default.langComparer(n.language,e.language)});a?t._logger.warn("duplicated language, taking the inband option. Language: ",a.language):(this._player.config.playback.useNativeTextTrack&&this._addNativeTextTrack(e),i.push(e),this._updateTextTracksModel(n))}},{key:"_createTextTrack",value:function(e,t){return new y.default({active:!!e.default,index:t,kind:"subtitles",label:e.label,language:e.language,external:!0})}},{key:"_updateTextTracksModel",value:function(e){this._textTrackModel[e.language]={cuesStatus:O.NOT_DOWNLOADED,cues:[],url:e.url,type:e.type}}},{key:"selectTextTrack",value:function(e){var t=this;this._textTrackModel[e.language]&&(this._textTrackModel[e.language].cuesStatus!==O.DOWNLOADED||this._player.config.playback.useNativeTextTrack?this._textTrackModel[e.language].cuesStatus===O.NOT_DOWNLOADED&&(e.active=!0,this._player.config.playback.useNativeTextTrack||this.dispatchEvent(new _.default(m.CustomEventType.TEXT_TRACK_CHANGED,{selectedTextTrack:e})),this._downloadAndParseCues(e).then(function(){t._textTrackModel[e.language].cuesStatus=O.DOWNLOADED,t._player.config.playback.useNativeTextTrack?t._addCuesToNativeTextTrack(e,t._textTrackModel[e.language].cues):(t.hideTextTrack(),t._setTextTrack(e))}).catch(function(e){return t.dispatchEvent(new _.default(m.Html5EventType.ERROR,e))})):(e.active=!0,this.dispatchEvent(new _.default(m.CustomEventType.TEXT_TRACK_CHANGED,{selectedTextTrack:e})),this.hideTextTrack(),this._setTextTrack(e)))}},{key:"resetAllCues",value:function(){for(var e in this._textTrackModel)this._textTrackModel[e].cues.forEach(function(e){e.hasBeenReset=!0})}},{key:"reset",value:function(){this._resetCurrentTrack(),this._textTrackModel={},this._eventManager.removeAll()}},{key:"destroy",value:function(){this._textTrackModel={},this._eventManager.destroy(),this._activeTextCues=[]}},{key:"_resetCurrentTrack",value:function(){this._activeTextCues=[],this._isTextTrackActive=!1,this._maybeSetExternalCueIndex()}},{key:"_getCuesString",value:function(e){var t=this;return new Promise(function(n,r){var i=t._textTrackModel[e.language],a=i.type||t._getFileType(i.url);["srt","vtt"].includes(a)||(t._textTrackModel[e.language].cuesStatus=O.NOT_DOWNLOADED,r(new u.default(u.default.Severity.RECOVERABLE,u.default.Category.TEXT,u.default.Code.UNKNOWN_FILE_TYPE,{captionType:a}))),p.Http.execute(i.url,{},"GET").then(function(e){n("srt"===a?t._convertSrtToVtt(e):e)}).catch(function(){t._textTrackModel[e.language].cuesStatus=O.NOT_DOWNLOADED,r(new u.default(u.default.Severity.RECOVERABLE,u.default.Category.TEXT,u.default.Code.HTTP_ERROR,{url:i.url}))})})}},{key:"_parseCues",value:function(e){return new Promise(function(n,r){var i=new f.Parser(window,(0,f.StringDecoder)()),a=[];i.oncue=function(e){return a.push(e)},i.onflush=function(){t._logger.debug("finished parsing external cues"),n(a)},i.parse(e),i.flush(),i.onparsingerror(function(e){return r(e)})})}},{key:"_convertSrtToVtt",value:function(e){return"WEBVTT\n\n"+e.replace(/(\d\d:\d\d:\d\d),(\d\d\d) --> (\d\d:\d\d:\d\d),(\d\d\d)/g,function(e,t,n,r,i){return t+"."+n+" --\x3e "+r+"."+i})}},{key:"_downloadAndParseCues",value:function(e){var t=this;return this._textTrackModel[e.language].cuesStatus=O.DOWNLOADING,new Promise(function(n,r){t._getCuesString(e).then(function(e){return t._parseCues(e)}).then(function(r){t._textTrackModel[e.language].cues=r,n()}).catch(function(e){return r(e)})})}},{key:"_getFileType",value:function(e){return e.split(/[#?]/)[0].split(".").pop().trim()}},{key:"_handleCaptionOnTimeUpdate",value:function(e){var t=this._player.currentTime;if(t){var n=!1;this._hadSeeked()&&(this._activeTextCues=[],n=this._maybeSetExternalCueIndex());var r=this._maybeRemoveActiveCues(),i=this._maybeAddToActiveCues(e);(n||i||r)&&this.dispatchEvent(new _.default(m.CustomEventType.TEXT_CUE_CHANGED,{cues:this._activeTextCues})),this._lastTimeUpdate=t}}},{key:"_hadSeeked",value:function(){return!!this._player.currentTime&&Math.abs(this._player.currentTime-this._lastTimeUpdate)>1}},{key:"_maybeRemoveActiveCues",value:function(){var e=this._player.currentTime;if(!e)return!1;for(var t=!1,n=0;n<this._activeTextCues.length;n++){var r=this._activeTextCues[n];(e<r.startTime||r.endTime<e)&&(this._activeTextCues.splice(n,1),t=!0)}return t}},{key:"_maybeAddToActiveCues",value:function(e){var t=this._player.currentTime;if(!t)return!1;for(var n=!1,r=this._textTrackModel[e.language].cues;this._externalCueIndex<r.length&&t>r[this._externalCueIndex].startTime;)this._activeTextCues.push(r[this._externalCueIndex]),this._externalCueIndex++,n=!0;return n}},{key:"_maybeSetExternalCueIndex",value:function(){var e=this._player.getTracks(d.TrackType.TEXT).find(function(e){return e instanceof y.default&&e.active&&e.external});if(e&&e.external){for(var t=this._textTrackModel[e.language]?this._textTrackModel[e.language].cues:[],n=0;n<t.length&&!(t[n].startTime<this._player.currentTime&&this._player.currentTime<t[n].endTime)&&!(t[n].endTime>this._player.currentTime&&t[n].startTime>this._player.currentTime);n++);return this._externalCueIndex=n,!0}return!1}},{key:"_addCuesToNativeTextTrack",value:function(e,t){var n=this._player.getVideoElement();if(n){var r=Array.from(n.textTracks).find(function(t){return!!t&&t.language===e.language});r&&t.forEach(function(e){return r.addCue(e)})}}},{key:"_addNativeTextTrack",value:function(e){var t=this._player.getVideoElement();if(t){var n=Array.from(t.textTracks).findIndex(function(t){return!!t&&t.language===e.language});if(n>-1){var r=t.textTracks[n];r.cues&&Object.values(r.cues).forEach(function(e){return r.removeCue(e)})}else t.addTextTrack("subtitles",e.label||e.language,e.language)}}},{key:"_setTextTrack",value:function(e){var n=this;this._player.config.playback.useNativeTextTrack||(this._isTextTrackActive=!0,t._logger.debug("External text track changed",e),this._activeTextCues=[],this.dispatchEvent(new _.default(m.CustomEventType.TEXT_CUE_CHANGED,{cues:this._activeTextCues})),this._eventManager.listen(this._player,m.Html5EventType.TIME_UPDATE,function(){return n._handleCaptionOnTimeUpdate(e)}))}}]),t}(S.default);C._logger=(0,k.default)("ExternalCaptionsHandler"),t.ExternalCaptionsHandler=C},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.ControllerProvider=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(17),o=(function(e){e&&e.__esModule}(a),function(){function e(t){r(this,e),this._pluginManager=t}return i(e,[{key:"getAdsControllers",value:function(){return Object.values(this._pluginManager.getAll()).filter(function(e){return"function"==typeof e.getAdsController}).map(function(e){return e.getAdsController()})}}]),e}());t.ControllerProvider=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ResizeWatcher=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(6),p=r(c),f=n(3),d=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return o(t,e),s(t,[{key:"destroy",value:function(){this._observer&&this._observer.disconnect(),this._observer=null,this._el=null}},{key:"init",value:function(e){this._observer||(this._el=e,window.ResizeObserver?this._createNativeObserver():this._createIframeObserver(),this._el instanceof HTMLElement&&this._observer&&this._observer.observe(this._el))}},{key:"_createNativeObserver",value:function(){var e=this;this._observer=new window.ResizeObserver(function(t){t.forEach(function(){e._triggerResize()})})}},{key:"_createIframeObserver",value:function(){this._observer=new h(this._triggerResize.bind(this))}},{key:"_triggerResize",value:function(){this.dispatchEvent(new u.default(f.CustomEventType.RESIZE))}}]),t}(p.default),h=function(){function e(t){i(this,e),this._observersStore={},this._onChangeCallback=t}return s(e,[{key:"observe",value:function(e){var t=this,n=this._createIframe(),r=e.getAttribute("id");this._observersStore[r]=n,e.appendChild(n),n.contentWindow.onresize=function(){return t._onChangeCallback()}}},{key:"disconnect",value:function(){for(var e in this._observersStore){var t=document.getElementById(e),n=this._observersStore[e];n.onresize=null,t&&(t.removeChild(n),delete this._observersStore[t.getAttribute("id")])}}},{key:"_createIframe",value:function(){var e=document.createElement("iframe");return e.className="playkit-size-iframe",e}}]),e}();t.ResizeWatcher=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.FullscreenController=void 0;var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(4),s=r(o),l=n(8),u=(r(l),n(1)),c=r(u),p=n(5),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(p),d=function(){function e(t){i(this,e),this._player=t,this._isInBrowserFullscreen=!1,this.registerFullScreenEvents()}return a(e,[{key:"_isNativeFullscreen",value:function(){var e="function"==typeof this._player.getVideoElement?this._player.getVideoElement():null;return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||"iOS"===this._player.env.os.name&&e&&e.webkitDisplayingFullscreen)}},{key:"isFullscreen",value:function(){return this._isNativeFullscreen()||this._isInBrowserFullscreen}},{key:"enterFullscreen",value:function(e){if(!this.isFullscreen()){var t=e&&f.Dom.getElementById(e),n=this._player.config.playback;if(t||(t=this._player.getView()),"iOS"===this._player.env.os.name)if(n.inBrowserFullscreen&&n.playsinline)this._enterInBrowserFullscreen(t);else{var r=this._player.getVideoElement();r&&"function"==typeof r.webkitEnterFullScreen&&r.webkitEnterFullScreen()}else this._requestFullscreen(t)}}},{key:"exitFullscreen",value:function(){if(this.isFullscreen())if("iOS"===this._player.env.os.name)if(this._isInBrowserFullscreen)this._exitInBrowserFullscreen();else{var e=this._player.getVideoElement();e&&"function"==typeof e.webkitExitFullscreen&&e.webkitExitFullscreen()}else this._requestExitFullscreen()}},{key:"_requestFullscreen",value:function(e){this._player.isInPictureInPicture()&&this._player.exitPictureInPicture(),"function"==typeof e.requestFullscreen?e.requestFullscreen():"function"==typeof e.mozRequestFullScreen?e.mozRequestFullScreen():"function"==typeof e.webkitRequestFullScreen?e.webkitRequestFullScreen():"function"==typeof e.msRequestFullscreen&&e.msRequestFullscreen()}},{key:"_requestExitFullscreen",value:function(){"function"==typeof document.exitFullscreen?document.exitFullscreen():"function"==typeof document.webkitExitFullscreen?document.webkitExitFullscreen():"function"==typeof document.mozCancelFullScreen?document.mozCancelFullScreen():"function"==typeof document.msExitFullscreen&&document.msExitFullscreen()}},{key:"_enterInBrowserFullscreen",value:function(e){f.Dom.addClassName(e,"playkit-in-browser-fullscreen-mode"),this._isInBrowserFullscreen=!0,this._fullscreenEnterHandler(),this._player.dispatchEvent(new c.default(this._player.Event.RESIZE))}},{key:"_exitInBrowserFullscreen",value:function(){var e=f.Dom.getElementBySelector(".playkit-in-browser-fullscreen-mode");e&&f.Dom.removeClassName(e,"playkit-in-browser-fullscreen-mode"),this._isInBrowserFullscreen=!1,this._fullscreenExitHandler(),this._player.dispatchEvent(new c.default(this._player.Event.RESIZE))}},{key:"registerFullScreenEvents",value:function(){var e=this,t=new s.default;t.listen(document,"webkitfullscreenchange",function(){return e._fullscreenChangeHandler()}),t.listen(document,"mozfullscreenchange",function(){return e._fullscreenChangeHandler()}),t.listen(document,"fullscreenchange",function(){return e._fullscreenChangeHandler()}),t.listen(document,"MSFullscreenChange",function(){return e._fullscreenChangeHandler()}),this._handleIosFullscreen(t)}},{key:"_handleIosFullscreen",value:function(e){var t=this;if("iOS"===this._player.env.os.name){var n=function(){e.listen(t._player.getVideoElement(),"webkitbeginfullscreen",function(){return t._fullscreenEnterHandler()}),e.listen(t._player.getVideoElement(),"webkitendfullscreen",function(){return t._fullscreenExitHandler()})};this._player.getVideoElement()?n():e.listenOnce(this._player,this._player.Event.SOURCE_SELECTED,function(){return n()})}}},{key:"_fullscreenChangeHandler",value:function(){this.isFullscreen()?this._fullscreenEnterHandler():this._fullscreenExitHandler()}},{key:"_fullscreenEnterHandler",value:function(){this.isFullscreen()&&this._player.dispatchEvent(new c.default(this._player.Event.ENTER_FULLSCREEN))}},{key:"_fullscreenExitHandler",value:function(){this.isFullscreen()||this._player.dispatchEvent(new c.default(this._player.Event.EXIT_FULLSCREEN))}}]),e}();t.FullscreenController=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.EngineDecorator=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in i)return i.value;var o=i.get;return void 0!==o?o.call(r):void 0},u=n(1),c=(r(u),n(3)),p=n(4),f=r(p),d=n(6),h=r(d),y=function(e){function t(e,n){var r;i(this,t);var o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o._eventManager=new f.default,o._pluginDecorators=n.map(function(n){return n.getEngineDecorator(e,l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"dispatchEvent",o).bind(o))}),Object.values(c.EventType).forEach(function(t){return o._eventManager.listen(e,t,function(e){return o.dispatchEvent(e)})}),r=new Proxy(e,{get:function(e,t){if("_listeners"===t)return o._listeners;var n=o._pluginDecorators.find(function(e){return t in e&&e.active});return n?n[t]:e[t]},set:function(e,t,n){var r=o._pluginDecorators.find(function(e){return t in e&&e.active});return r?r[t]=n:e[t]=n,!0}}),a(o,r)}return o(t,e),s(t,null,[{key:"getDecorator",value:function(e,t){var n=t.filter(function(e){return e.getEngineDecorator});return n.length?new this(e,n):null}}]),s(t,[{key:"dispatchEvent",value:function(e){var n=this._pluginDecorators.find(function(e){return e.active});return n?n.dispatchEvent&&n.dispatchEvent(e):l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"dispatchEvent",this).call(this,e)}},{key:"active",get:function(){return!0}}]),t}(h.default);t.EngineDecorator=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={HLS:["application/x-mpegurl","application/vnd.apple.mpegurl"],DASH:["application/dash+xml"],PROGRESSIVE:["video/mp4"],SMOOTH_STREAMING:["application/vnd.ms-sstr+xml"]};t.MimeType=r}])})},function(e,t,n){var r=n(25);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(7),i=n(33);e.exports=n(6)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(2),i=n(13),a=n(12),o=n(34)("src"),s=Function.toString,l=(""+s).split("toString");n(23).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var u="function"==typeof n;u&&(a(n,"name")||i(n,"name",t)),e[t]!==n&&(u&&(a(n,o)||i(n,o,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[o]||s.call(this)})},function(e,t,n){var r=n(0),i=n(3),a=n(25),o=/"/g,s=function(e,t,n,r){var i=String(a(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(o,"&quot;")+'"'),s+">"+i+"</"+t+">"};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*i(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t,n){var r=n(50),i=n(25);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(51),i=n(33),a=n(16),o=n(24),s=n(12),l=n(103),u=Object.getOwnPropertyDescriptor;t.f=n(6)?u:function(e,t){if(e=a(e),t=o(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(12),i=n(10),a=n(74)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t,n){"use strict";function r(e){l.setHandler(function(t,n){return e(t,n)})}function i(e){return e?l.get(e):l}function a(e){return i(e).getLevel()}function o(e,t){i(t).setLevel(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.setLogHandler=t.setLogLevel=t.getLogLevel=t.LogLevel=void 0;var s=n(149),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),u={DEBUG:l.DEBUG,INFO:l.INFO,TIME:l.TIME,WARN:l.WARN,ERROR:l.ERROR,OFF:l.OFF};l.useDefaults({defaultLevel:l.ERROR}),t.default=i,t.LogLevel=u,t.getLogLevel=a,t.setLogLevel=o,t.setLogHandler=r},function(e,t,n){var r=n(11);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){"use strict";var r=n(3);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t){var n=e.exports={version:"2.5.1"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(4);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(0),i=n(23),a=n(3);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],o={};o[e]=t(n),r(r.S+r.F*a(function(){n(1)}),"Object",o)}},function(e,t,n){var r=n(20),i=n(50),a=n(10),o=n(8),s=n(91);e.exports=function(e,t){var n=1==e,l=2==e,u=3==e,c=4==e,p=6==e,f=5==e||p,d=t||s;return function(t,s,h){for(var y,v,g=a(t),m=i(g),b=r(s,h,3),_=o(m.length),E=0,k=n?d(t,_):l?d(t,0):void 0;_>E;E++)if((f||E in m)&&(y=m[E],v=b(y,E,g),e))if(n)k[E]=v;else if(v)switch(e){case 3:return!0;case 5:return y;case 6:return E;case 2:k.push(y)}else if(c)return!1;return p?-1:u||c?c:k}}},function(e,t,n){"use strict";if(n(6)){var r=n(35),i=n(2),a=n(3),o=n(0),s=n(64),l=n(97),u=n(20),c=n(41),p=n(33),f=n(13),d=n(43),h=n(26),y=n(8),v=n(129),g=n(37),m=n(24),b=n(12),_=n(52),E=n(4),k=n(10),T=n(88),A=n(38),w=n(18),S=n(39).f,P=n(90),O=n(34),C=n(5),x=n(28),R=n(55),I=n(62),D=n(93),M=n(47),L=n(59),N=n(40),j=n(92),U=n(119),F=n(7),B=n(17),V=F.f,G=B.f,H=i.RangeError,K=i.TypeError,z=i.Uint8Array,Y=Array.prototype,W=l.ArrayBuffer,q=l.DataView,X=x(0),J=x(2),Q=x(3),$=x(4),Z=x(5),ee=x(6),te=R(!0),ne=R(!1),re=D.values,ie=D.keys,ae=D.entries,oe=Y.lastIndexOf,se=Y.reduce,le=Y.reduceRight,ue=Y.join,ce=Y.sort,pe=Y.slice,fe=Y.toString,de=Y.toLocaleString,he=C("iterator"),ye=C("toStringTag"),ve=O("typed_constructor"),ge=O("def_constructor"),me=s.CONSTR,be=s.TYPED,_e=s.VIEW,Ee=x(1,function(e,t){return Se(I(e,e[ge]),t)}),ke=a(function(){return 1===new z(new Uint16Array([1]).buffer)[0]}),Te=!!z&&!!z.prototype.set&&a(function(){new z(1).set({})}),Ae=function(e,t){var n=h(e);if(n<0||n%t)throw H("Wrong offset!");return n},we=function(e){if(E(e)&&be in e)return e;throw K(e+" is not a typed array!")},Se=function(e,t){if(!(E(e)&&ve in e))throw K("It is not a typed array constructor!");return new e(t)},Pe=function(e,t){return Oe(I(e,e[ge]),t)},Oe=function(e,t){for(var n=0,r=t.length,i=Se(e,r);r>n;)i[n]=t[n++];return i},Ce=function(e,t,n){V(e,t,{get:function(){return this._d[n]}})},xe=function(e){var t,n,r,i,a,o,s=k(e),l=arguments.length,c=l>1?arguments[1]:void 0,p=void 0!==c,f=P(s);if(void 0!=f&&!T(f)){for(o=f.call(s),r=[],t=0;!(a=o.next()).done;t++)r.push(a.value);s=r}for(p&&l>2&&(c=u(c,arguments[2],2)),t=0,n=y(s.length),i=Se(this,n);n>t;t++)i[t]=p?c(s[t],t):s[t];return i},Re=function(){for(var e=0,t=arguments.length,n=Se(this,t);t>e;)n[e]=arguments[e++];return n},Ie=!!z&&a(function(){de.call(new z(1))}),De=function(){return de.apply(Ie?pe.call(we(this)):we(this),arguments)},Me={copyWithin:function(e,t){return U.call(we(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return $(we(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return j.apply(we(this),arguments)},filter:function(e){return Pe(this,J(we(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Z(we(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(we(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){X(we(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(we(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(we(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ue.apply(we(this),arguments)},lastIndexOf:function(e){return oe.apply(we(this),arguments)},map:function(e){return Ee(we(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return se.apply(we(this),arguments)},reduceRight:function(e){return le.apply(we(this),arguments)},reverse:function(){for(var e,t=this,n=we(t).length,r=Math.floor(n/2),i=0;i<r;)e=t[i],t[i++]=t[--n],t[n]=e;return t},some:function(e){return Q(we(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return ce.call(we(this),e)},subarray:function(e,t){var n=we(this),r=n.length,i=g(e,r);return new(I(n,n[ge]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,y((void 0===t?r:g(t,r))-i))}},Le=function(e,t){return Pe(this,pe.call(we(this),e,t))},Ne=function(e){we(this);var t=Ae(arguments[1],1),n=this.length,r=k(e),i=y(r.length),a=0;if(i+t>n)throw H("Wrong length!");for(;a<i;)this[t+a]=r[a++]},je={entries:function(){return ae.call(we(this))},keys:function(){return ie.call(we(this))},values:function(){return re.call(we(this))}},Ue=function(e,t){return E(e)&&e[be]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},Fe=function(e,t){return Ue(e,t=m(t,!0))?p(2,e[t]):G(e,t)},Be=function(e,t,n){return!(Ue(e,t=m(t,!0))&&E(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?V(e,t,n):(e[t]=n.value,e)};me||(B.f=Fe,F.f=Be),o(o.S+o.F*!me,"Object",{getOwnPropertyDescriptor:Fe,defineProperty:Be}),a(function(){fe.call({})})&&(fe=de=function(){return ue.call(this)});var Ve=d({},Me);d(Ve,je),f(Ve,he,je.values),d(Ve,{slice:Le,set:Ne,constructor:function(){},toString:fe,toLocaleString:De}),Ce(Ve,"buffer","b"),Ce(Ve,"byteOffset","o"),Ce(Ve,"byteLength","l"),Ce(Ve,"length","e"),V(Ve,ye,{get:function(){return this[be]}}),e.exports=function(e,t,n,l){l=!!l;var u=e+(l?"Clamped":"")+"Array",p="get"+e,d="set"+e,h=i[u],g=h||{},m=h&&w(h),b=!h||!s.ABV,k={},T=h&&h.prototype,P=function(e,n){var r=e._d;return r.v[p](n*t+r.o,ke)},O=function(e,n,r){var i=e._d;l&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[d](n*t+i.o,r,ke)},C=function(e,t){V(e,t,{get:function(){return P(this,t)},set:function(e){return O(this,t,e)},enumerable:!0})};b?(h=n(function(e,n,r,i){c(e,h,u,"_d");var a,o,s,l,p=0,d=0;if(E(n)){if(!(n instanceof W||"ArrayBuffer"==(l=_(n))||"SharedArrayBuffer"==l))return be in n?Oe(h,n):xe.call(h,n);a=n,d=Ae(r,t);var g=n.byteLength;if(void 0===i){if(g%t)throw H("Wrong length!");if((o=g-d)<0)throw H("Wrong length!")}else if((o=y(i)*t)+d>g)throw H("Wrong length!");s=o/t}else s=v(n),o=s*t,a=new W(o);for(f(e,"_d",{b:a,o:d,l:o,e:s,v:new q(a)});p<s;)C(e,p++)}),T=h.prototype=A(Ve),f(T,"constructor",h)):a(function(){h(1)})&&a(function(){new h(-1)})&&L(function(e){new h,new h(null),new h(1.5),new h(e)},!0)||(h=n(function(e,n,r,i){c(e,h,u);var a;return E(n)?n instanceof W||"ArrayBuffer"==(a=_(n))||"SharedArrayBuffer"==a?void 0!==i?new g(n,Ae(r,t),i):void 0!==r?new g(n,Ae(r,t)):new g(n):be in n?Oe(h,n):xe.call(h,n):new g(v(n))}),X(m!==Function.prototype?S(g).concat(S(m)):S(g),function(e){e in h||f(h,e,g[e])}),h.prototype=T,r||(T.constructor=h));var x=T[he],R=!!x&&("values"==x.name||void 0==x.name),I=je.values;f(h,ve,!0),f(T,be,u),f(T,_e,!0),f(T,ge,h),(l?new h(1)[ye]==u:ye in T)||V(T,ye,{get:function(){return u}}),k[u]=h,o(o.G+o.W+o.F*(h!=g),k),o(o.S,u,{BYTES_PER_ELEMENT:t}),o(o.S+o.F*a(function(){g.of.call(h,1)}),u,{from:xe,of:Re}),"BYTES_PER_ELEMENT"in T||f(T,"BYTES_PER_ELEMENT",t),o(o.P,u,Me),N(u),o(o.P+o.F*Te,u,{set:Ne}),o(o.P+o.F*!R,u,je),r||T.toString==fe||(T.toString=fe),o(o.P+o.F*a(function(){new h(1).slice()}),u,{slice:Le}),o(o.P+o.F*(a(function(){return[1,2].toLocaleString()!=new h([1,2]).toLocaleString()})||!a(function(){T.toLocaleString.call([1,2])})),u,{toLocaleString:De}),M[u]=R?x:I,r||R||f(T,he,I)}}else e.exports=function(){}},function(e,t,n){var r=n(124),i=n(0),a=n(54)("metadata"),o=a.store||(a.store=new(n(127))),s=function(e,t,n){var i=o.get(e);if(!i){if(!n)return;o.set(e,i=new r)}var a=i.get(t);if(!a){if(!n)return;i.set(t,a=new r)}return a},l=function(e,t,n){var r=s(t,n,!1);return void 0!==r&&r.has(e)},u=function(e,t,n){var r=s(t,n,!1);return void 0===r?void 0:r.get(e)},c=function(e,t,n,r){s(n,r,!0).set(e,t)},p=function(e,t){var n=s(e,t,!1),r=[];return n&&n.forEach(function(e,t){r.push(t)}),r},f=function(e){return void 0===e||"symbol"==typeof e?e:String(e)},d=function(e){i(i.S,"Reflect",e)};e.exports={store:o,map:s,has:l,get:u,set:c,keys:p,key:f,exp:d}},function(e,t,n){var r=n(34)("meta"),i=n(4),a=n(12),o=n(7).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(3)(function(){return l(Object.preventExtensions({}))}),c=function(e){o(e,r,{value:{i:"O"+ ++s,w:{}}})},p=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},f=function(e,t){if(!a(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},d=function(e){return u&&h.NEED&&l(e)&&!a(e,r)&&c(e),e},h=e.exports={KEY:r,NEED:!1,fastKey:p,getWeak:f,onFreeze:d}},function(e,t,n){var r=n(5)("unscopables"),i=Array.prototype;void 0==i[r]&&n(13)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports=!1},function(e,t,n){var r=n(105),i=n(75);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(26),i=Math.max,a=Math.min;e.exports=function(e,t){return e=r(e),e<0?i(e+t,0):a(e,t)}},function(e,t,n){var r=n(1),i=n(106),a=n(75),o=n(74)("IE_PROTO"),s=function(){},l=function(){var e,t=n(72)("iframe"),r=a.length;for(t.style.display="none",n(76).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;r--;)delete l.prototype[a[r]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[o]=e):n=l(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(105),i=n(75).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){"use strict";var r=n(2),i=n(7),a=n(6),o=n(5)("species");e.exports=function(e){var t=r[e];a&&t&&!t[o]&&i.f(t,o,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(20),i=n(117),a=n(88),o=n(1),s=n(8),l=n(90),u={},c={},t=e.exports=function(e,t,n,p,f){var d,h,y,v,g=f?function(){return e}:l(e),m=r(n,p,t?2:1),b=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(a(g)){for(d=s(e.length);d>b;b++)if((v=t?m(o(h=e[b])[0],h[1]):m(e[b]))===u||v===c)return v}else for(y=g.call(e);!(h=y.next()).done;)if((v=i(y,m,h.value,t))===u||v===c)return v};t.BREAK=u,t.RETURN=c},function(e,t,n){var r=n(14);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaPlayer=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(68),u=n(137),c=n(139),p=n(19),f=function(e){return e&&e.__esModule?e:{default:e}}(p),d=n(101),h=n(144),y=n(145);n(371);var v=n(142),g=n(376),m=n(102),b=n(100),_=n(98),E=(n(70),n(53),n(9)),k=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));n._mediaInfo=null,n._remotePlayer=null,n._eventManager=new E.EventManager;var a=e.sources,o=E.Utils.Object.mergeDeep({},e,{sources:null});return n._localPlayer=(0,E.loadPlayer)(o),n._logger=(0,f.default)("KalturaPlayer"+E.Utils.Generator.uniqueId(5)),n._uiWrapper=new v.UIWrapper(n,e),n._provider=new u.Provider(e.provider,"0.46.0"),n._playlistManager=new g.PlaylistManager(n,e),n._playlistManager.configure(e.playlist),Object.values(E.EventType).forEach(function(e){return n._eventManager.listen(n._localPlayer,e,function(e){return n.dispatchEvent(e)})}),n._localPlayer.configure({sources:a}),n}return a(t,e),s(t,[{key:"loadMedia",value:function(e){var t=this;this._logger.debug("loadMedia",e),this._mediaInfo=e,this.reset(),this._localPlayer.loadingMedia=!0,this._uiWrapper.setLoadingSpinnerState(!0);var n=this._provider.getMediaConfig(e);return n.then(function(e){return t.setMedia(e)},function(e){return t._localPlayer.dispatchEvent(new E.FakeEvent(E.EventType.ERROR,new E.Error(E.Error.Severity.CRITICAL,E.Error.Category.PLAYER,E.Error.Code.LOAD_FAILED,e)))}).then(function(){t._maybeSetEmbedConfig()}),n}},{key:"setMedia",value:function(e){this._logger.debug("setMedia",e);var t=E.Utils.Object.copyDeep(e);E.Utils.Object.mergeDeep(t.sources,this._localPlayer.config.sources),E.Utils.Object.mergeDeep(t.session,this._localPlayer.config.session),Object.keys(this._localPlayer.config.plugins).forEach(function(e){t.plugins[e]=t.plugins[e]||{}}),(0,y.addKalturaPoster)(t.sources,e.sources,this._localPlayer.dimensions),(0,d.addKalturaParams)(this,t),(0,c.maybeSetStreamPriority)(this,t),(0,c.hasYoutubeSource)(t.sources)||this._uiWrapper.setSeekbarConfig(e,this._localPlayer.config.ui),this.configure(t)}},{key:"loadPlaylist",value:function(e,t){var n=this;this._logger.debug("loadPlaylist",e),this._uiWrapper.setLoadingSpinnerState(!0);var r=this._provider.getPlaylistConfig(e);return r.then(function(e){return n.setPlaylist(e,t)},function(e){return n._localPlayer.dispatchEvent(new E.FakeEvent(E.EventType.ERROR,new E.Error(E.Error.Severity.CRITICAL,E.Error.Category.PLAYER,E.Error.Code.LOAD_FAILED,e)))}),r}},{key:"loadPlaylistByEntryList",value:function(e,t){var n=this;this._logger.debug("loadPlaylistByEntryList",e),this._uiWrapper.setLoadingSpinnerState(!0);var r=this._provider.getEntryListConfig(e);return r.then(function(r){return n.setPlaylist(r,t,e)},function(e){return n._localPlayer.dispatchEvent(new E.FakeEvent(E.EventType.ERROR,new E.Error(E.Error.Severity.CRITICAL,E.Error.Category.PLAYER,E.Error.Code.LOAD_FAILED,e)))}),r}},{key:"setPlaylist",value:function(e,t,n){this._logger.debug("setPlaylist",e);var r={playlist:e,plugins:{}};Object.keys(this._localPlayer.config.plugins).forEach(function(e){r.plugins[e]={}}),(0,h.evaluatePluginsConfig)(r.plugins,r),this._localPlayer.configure({plugins:r.plugins}),this._playlistManager.load(e,t,n)}},{key:"getMediaInfo",value:function(){return E.Utils.Object.copyDeep(this._mediaInfo)}},{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=(0,c.supportLegacyOptions)(e);var t=E.Utils.Object.mergeDeep({},this.config,e);(0,h.evaluatePluginsConfig)(e.plugins,t),this._localPlayer.configure(e);var n=e.ui;n&&((0,h.evaluateUIConfig)(n,this.config),this._uiWrapper.setConfig(n)),e.playlist&&this._playlistManager.configure(e.playlist)}},{key:"ready",value:function(){return this._localPlayer.ready()}},{key:"load",value:function(){this._localPlayer.load()}},{key:"play",value:function(){this._localPlayer.play()}},{key:"pause",value:function(){this._localPlayer.pause()}},{key:"getView",value:function(){return this._localPlayer.getView()}},{key:"getVideoElement",value:function(){return this._localPlayer.getVideoElement()}},{key:"reset",value:function(){this._localPlayer.reset(),this._uiWrapper.reset()}},{key:"destroy",value:function(){var e=this.config.ui.targetId;this._localPlayer.destroy(),this._uiWrapper.destroy(),this._eventManager.destroy();var t=document.getElementById(e);t&&t.parentNode&&E.Utils.Dom.removeChild(t.parentNode,t)}},{key:"isLive",value:function(){return this._localPlayer.isLive()}},{key:"isDvr",value:function(){return this._localPlayer.isDvr()}},{key:"seekToLiveEdge",value:function(){this._localPlayer.seekToLiveEdge()}},{key:"getStartTimeOfDvrWindow",value:function(){return this._localPlayer.getStartTimeOfDvrWindow()}},{key:"getTracks",value:function(e){return this._localPlayer.getTracks(e)}},{key:"getActiveTracks",value:function(){return this._localPlayer.getActiveTracks()}},{key:"selectTrack",value:function(e){this._localPlayer.selectTrack(e)}},{key:"hideTextTrack",value:function(){this._localPlayer.hideTextTrack()}},{key:"enableAdaptiveBitrate",value:function(){this._localPlayer.enableAdaptiveBitrate()}},{key:"isAdaptiveBitrateEnabled",value:function(){return this._localPlayer.isAdaptiveBitrateEnabled()}},{key:"setTextDisplaySettings",value:function(e){this._localPlayer.setTextDisplaySettings(e)}},{key:"isFullscreen",value:function(){return this._localPlayer.isFullscreen()}},{key:"notifyEnterFullscreen",value:function(){this._localPlayer.notifyEnterFullscreen()}},{key:"notifyExitFullscreen",value:function(){this._localPlayer.notifyExitFullscreen()}},{key:"enterFullscreen",value:function(e){var t=e||this.config.ui.targetId;this._localPlayer.enterFullscreen(t)}},{key:"exitFullscreen",value:function(){this._localPlayer.exitFullscreen()}},{key:"enterPictureInPicture",value:function(){this._localPlayer.enterPictureInPicture()}},{key:"exitPictureInPicture",value:function(){this._localPlayer.exitPictureInPicture()}},{key:"isInPictureInPicture",value:function(){return this._localPlayer.isInPictureInPicture()}},{key:"isPictureInPictureSupported",value:function(){return this._localPlayer.isPictureInPictureSupported()}},{key:"getLogLevel",value:function(e){return this._localPlayer.getLogLevel(e)}},{key:"startCasting",value:function(e){return _.RemotePlayerManager.startCasting(e)}},{key:"isCastAvailable",value:function(e){return _.RemotePlayerManager.isCastAvailable(e)}},{key:"getCastSession",value:function(){return null}},{key:"stopCasting",value:function(){}},{key:"isCasting",value:function(){return!1}},{key:"isVr",value:function(){return this._localPlayer.isVr()}},{key:"toggleVrStereoMode",value:function(){this._localPlayer.toggleVrStereoMode()}},{key:"isInVrStereoMode",value:function(){return this._localPlayer.isInVrStereoMode()}},{key:"setLogLevel",value:function(e,t){this._localPlayer.setLogLevel(e,t)}},{key:"_maybeSetEmbedConfig",value:function(){var e=this.config.ui;e&&e.components&&e.components.share&&((0,h.evaluateUIConfig)(e,this.config),this._uiWrapper.setConfig(e))}},{key:"textStyle",set:function(e){this._localPlayer.textStyle=e},get:function(){return this._localPlayer.textStyle}},{key:"buffered",get:function(){return this._localPlayer.buffered}},{key:"currentTime",set:function(e){this._localPlayer.currentTime=e},get:function(){return this._localPlayer.currentTime}},{key:"duration",get:function(){return this._localPlayer.duration}},{key:"volume",set:function(e){this._localPlayer.volume=e},get:function(){return this._localPlayer.volume}},{key:"paused",get:function(){return this._localPlayer.paused}},{key:"seeking",get:function(){return this._localPlayer.seeking}},{key:"playsinline",set:function(e){this._localPlayer.playsinline=e},get:function(){return this._localPlayer.playsinline}},{key:"muted",set:function(e){this._localPlayer.muted=e},get:function(){return this._localPlayer.muted}},{key:"src",get:function(){return this._localPlayer.src}},{key:"dimensions",get:function(){return this._localPlayer.dimensions}},{key:"poster",get:function(){return this._localPlayer.poster}},{key:"ended",get:function(){return this._localPlayer.ended}},{key:"playbackRate",set:function(e){this._localPlayer.playbackRate=e},get:function(){return this._localPlayer.playbackRate}},{key:"playbackRates",get:function(){return this._localPlayer.playbackRates}},{key:"defaultPlaybackRate",get:function(){return this._localPlayer.defaultPlaybackRate}},{key:"engineType",get:function(){return this._localPlayer.engineType}},{key:"streamType",get:function(){return this._localPlayer.streamType}},{key:"env",get:function(){return this._localPlayer.env}},{key:"config",get:function(){return this._localPlayer.config}},{key:"loadingMedia",set:function(e){this._localPlayer.loadingMedia=e}},{key:"ads",get:function(){return this._localPlayer.ads}},{key:"plugins",get:function(){return this._localPlayer.plugins}},{key:"playlist",get:function(){return this._playlistManager}},{key:"Event",get:function(){return o({Cast:b.CastEventType,Core:E.EventType,Playlist:m.PlaylistEventType,UI:l.EventType},E.EventType)}},{key:"TextStyle",get:function(){return this._localPlayer.TextStyle}},{key:"State",get:function(){return this._localPlayer.State}},{key:"Track",get:function(){return this._localPlayer.Track}},{key:"LogLevelType",get:function(){return this._localPlayer.LogLevelType}},{key:"LogLevel",get:function(){return this._localPlayer.LogLevel}},{key:"AbrMode",get:function(){return this._localPlayer.AbrMode}},{key:"MediaType",get:function(){return this._localPlayer.MediaType}},{key:"StreamType",get:function(){return this._localPlayer.StreamType}},{key:"EngineType",get:function(){return this._localPlayer.EngineType}},{key:"Error",get:function(){return this._localPlayer.Error}}]),t}(E.FakeEventTarget);t.KalturaPlayer=k},function(e,t,n){var r=n(7).f,i=n(12),a=n(5)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){var r=n(0),i=n(25),a=n(3),o=n(78),s="["+o+"]",l="​",u=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),p=function(e,t,n){var i={},s=a(function(){return!!o[e]()||l[e]()!=l}),u=i[e]=s?t(f):o[e];n&&(i[n]=u),r(r.P+r.F*s,"String",i)},f=p.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(u,"")),2&t&&(e=e.replace(c,"")),e};e.exports=p},function(e,t){e.exports={}},function(e,t,n){var r=n(4);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(21);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(21),i=n(5)("toStringTag"),a="Arguments"==r(function(){return arguments}()),o=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=o(t=Object(e),i))?n:a?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t,n,i){r(this,e),this._id=t,this._friendlyName=n,this._resuming=i}return i(e,[{key:"deviceFriendlyName",get:function(){return this._friendlyName}},{key:"id",get:function(){return this._id}},{key:"resuming",get:function(){return this._resuming}}]),e}();t.RemoteSession=a},function(e,t,n){var r=n(2),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t,n){var r=n(16),i=n(8),a=n(37);e.exports=function(e){return function(t,n,o){var s,l=r(t),u=i(l.length),c=a(o,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(21);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(4),i=n(21),a=n(5)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(5)("iterator"),i=!1;try{var a=[7][r]();a.return=function(){i=!0},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var a=[7],o=a[r]();o.next=function(){return{done:n=!0}},a[r]=function(){return o},e(a)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(1);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r=n(13),i=n(14),a=n(3),o=n(25),s=n(5);e.exports=function(e,t,n){var l=s(e),u=n(o,l,""[e]),c=u[0],p=u[1];a(function(){var t={};return t[l]=function(){return 7},7!=""[e](t)})&&(i(String.prototype,e,c),r(RegExp.prototype,l,2==t?function(e,t){return p.call(e,this,t)}:function(e){return p.call(e,this)}))}},function(e,t,n){var r=n(1),i=n(11),a=n(5)("species");e.exports=function(e,t){var n,o=r(e).constructor;return void 0===o||void 0==(n=r(o)[a])?t:i(n)}},function(e,t,n){"use strict";var r=n(2),i=n(0),a=n(14),o=n(43),s=n(31),l=n(42),u=n(41),c=n(4),p=n(3),f=n(59),d=n(45),h=n(79);e.exports=function(e,t,n,y,v,g){var m=r[e],b=m,_=v?"set":"add",E=b&&b.prototype,k={},T=function(e){var t=E[e];a(E,e,"delete"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!c(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof b&&(g||E.forEach&&!p(function(){(new b).entries().next()}))){var A=new b,w=A[_](g?{}:-0,1)!=A,S=p(function(){A.has(1)}),P=f(function(e){new b(e)}),O=!g&&p(function(){for(var e=new b,t=5;t--;)e[_](t,t);return!e.has(-0)});P||(b=t(function(t,n){u(t,b,e);var r=h(new m,t,b);return void 0!=n&&l(n,v,r[_],r),r}),b.prototype=E,E.constructor=b),(S||O)&&(T("delete"),T("has"),v&&T("get")),(O||w)&&T(_),g&&E.clear&&delete E.clear}else b=y.getConstructor(t,e,v,_),o(b.prototype,n),s.NEED=!0;return d(b,e),k[e]=b,i(i.G+i.W+i.F*(b!=m),k),g||y.setStrong(b,e,v),b}},function(e,t,n){for(var r,i=n(2),a=n(13),o=n(34),s=o("typed_array"),l=o("view"),u=!(!i.ArrayBuffer||!i.DataView),c=u,p=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");p<9;)(r=i[f[p++]])?(a(r.prototype,s,!0),a(r.prototype,l,!0)):c=!1;e.exports={ABV:u,CONSTR:c,TYPED:s,VIEW:l}},function(e,t,n){"use strict";e.exports=n(35)||!n(3)(function(){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete n(2)[e]})},function(e,t,n){"use strict";var r=n(0);e.exports=function(e){r(r.S,e,{of:function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,n){"use strict";var r=n(0),i=n(11),a=n(20),o=n(42);e.exports=function(e){r(r.S,e,{from:function(e){var t,n,r,s,l=arguments[1];return i(this),t=void 0!==l,t&&i(l),void 0==e?new this:(n=[],t?(r=0,s=a(l,arguments[2],2),o(e,!1,function(e){n.push(s(e,r++))})):o(e,!1,n.push,n),new this(n))}})}},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=90)}([function(e,t,n){!function(){"use strict";function t(){}function n(e,n){var r,i,a,o,s=D;for(o=arguments.length;o-- >2;)I.push(arguments[o]);for(n&&null!=n.children&&(I.length||I.push(n.children),delete n.children);I.length;)if((i=I.pop())&&void 0!==i.pop)for(o=i.length;o--;)I.push(i[o]);else!0!==i&&!1!==i||(i=null),(a="function"!=typeof e)&&(null==i?i="":"number"==typeof i?i=String(i):"string"!=typeof i&&(a=!1)),a&&r?s[s.length-1]+=i:s===D?s=[i]:s.push(i),r=a;var l=new t;return l.nodeName=e,l.children=s,l.attributes=null==n?void 0:n,l.key=null==n?void 0:n.key,void 0!==R.vnode&&R.vnode(l),l}function r(e,t){for(var n in t)e[n]=t[n];return e}function i(e,t){return n(e.nodeName,r(r({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}function a(e){!e.__d&&(e.__d=!0)&&1==L.push(e)&&(R.debounceRendering||setTimeout)(o)}function o(){var e,t=L;for(L=[];e=t.pop();)e.__d&&S(e)}function s(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&l(e,t.nodeName):n||e._componentConstructor===t.nodeName}function l(e,t){return e.__n===t||e.nodeName.toLowerCase()===t.toLowerCase()}function u(e){var t=r({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var i in n)void 0===t[i]&&(t[i]=n[i]);return t}function c(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.__n=e,n}function p(e){e.parentNode&&e.parentNode.removeChild(e)}function f(e,t,n,r,i){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),r&&r(e);else if("class"!==t||i)if("style"===t){if(r&&"string"!=typeof r&&"string"!=typeof n||(e.style.cssText=r||""),r&&"object"==typeof r){if("string"!=typeof n)for(var a in n)a in r||(e.style[a]="");for(var a in r)e.style[a]="number"==typeof r[a]&&!1===M.test(a)?r[a]+"px":r[a]}}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var o=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),r?n||e.addEventListener(t,h,o):e.removeEventListener(t,h,o),(e.__l||(e.__l={}))[t]=r}else if("list"!==t&&"type"!==t&&!i&&t in e)d(e,t,null==r?"":r),null!=r&&!1!==r||e.removeAttribute(t);else{var s=i&&t!==(t=t.replace(/^xlink\:?/,""));null==r||!1===r?s?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof r&&(s?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function d(e,t,n){try{e[t]=n}catch(e){}}function h(e){return this.__l[e.type](R.event&&R.event(e)||e)}function y(){for(var e;e=N.pop();)R.afterMount&&R.afterMount(e),e.componentDidMount&&e.componentDidMount()}function v(e,t,n,r,i,a){j++||(U=null!=i&&void 0!==i.ownerSVGElement,F=null!=e&&!("__preactattr_"in e));var o=g(e,t,n,r,a);return i&&o.parentNode!==i&&i.appendChild(o),--j||(F=!1,a||y()),o}function g(e,t,n,r,i){var a=e,o=U;if(null==t&&(t=""),"string"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||i)?e.nodeValue!=t&&(e.nodeValue=t):(a=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(a,e),b(e,!0))),a.__preactattr_=!0,a;if("function"==typeof t.nodeName)return P(e,t,n,r);if(U="svg"===t.nodeName||"foreignObject"!==t.nodeName&&U,(!e||!l(e,String(t.nodeName)))&&(a=c(String(t.nodeName),U),e)){for(;e.firstChild;)a.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(a,e),b(e,!0)}var s=a.firstChild,u=a.__preactattr_||(a.__preactattr_={}),p=t.children;return!F&&p&&1===p.length&&"string"==typeof p[0]&&null!=s&&void 0!==s.splitText&&null==s.nextSibling?s.nodeValue!=p[0]&&(s.nodeValue=p[0]):(p&&p.length||null!=s)&&m(a,p,n,r,F||null!=u.dangerouslySetInnerHTML),E(a,t.attributes,u),U=o,a}function m(e,t,n,r,i){var a,o,l,u,c=e.childNodes,f=[],d={},h=0,y=0,v=c.length,m=0,_=t?t.length:0;if(0!==v)for(var E=0;E<v;E++){var k=c[E],T=k.__preactattr_,A=_&&T?k._component?k._component.__k:T.key:null;null!=A?(h++,d[A]=k):(T||(void 0!==k.splitText?!i||k.nodeValue.trim():i))&&(f[m++]=k)}if(0!==_)for(var E=0;E<_;E++){l=t[E],u=null;var A=l.key;if(null!=A)h&&void 0!==d[A]&&(u=d[A],d[A]=void 0,h--);else if(!u&&y<m)for(a=y;a<m;a++)if(void 0!==f[a]&&s(o=f[a],l,i)){u=o,f[a]=void 0,a===m-1&&m--,a===y&&y++;break}(u=g(u,l,n,r))&&u!==e&&(E>=v?e.appendChild(u):u!==c[E]&&(u===c[E+1]?p(c[E]):e.insertBefore(u,c[E]||null)))}if(h)for(var E in d)void 0!==d[E]&&b(d[E],!1);for(;y<=m;)void 0!==(u=f[m--])&&b(u,!1)}function b(e,t){var n=e._component;n?O(n):(null!=e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),!1!==t&&null!=e.__preactattr_||p(e),_(e))}function _(e){for(e=e.lastChild;e;){var t=e.previousSibling;b(e,!0),e=t}}function E(e,t,n){var r;for(r in n)t&&null!=t[r]||null==n[r]||f(e,r,n[r],n[r]=void 0,U);for(r in t)"children"===r||"innerHTML"===r||r in n&&t[r]===("value"===r||"checked"===r?e[r]:n[r])||f(e,r,n[r],n[r]=t[r],U)}function k(e){var t=e.constructor.name;(B[t]||(B[t]=[])).push(e)}function T(e,t,n){var r,i=B[e.name];if(e.prototype&&e.prototype.render?(r=new e(t,n),C.call(r,t,n)):(r=new C(t,n),r.constructor=e,r.render=A),i)for(var a=i.length;a--;)if(i[a].constructor===e){r.__b=i[a].__b,i.splice(a,1);break}return r}function A(e,t,n){return this.constructor(e,n)}function w(e,t,n,r,i){e.__x||(e.__x=!0,(e.__r=t.ref)&&delete t.ref,(e.__k=t.key)&&delete t.key,!e.base||i?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,r),r&&r!==e.context&&(e.__c||(e.__c=e.context),e.context=r),e.__p||(e.__p=e.props),e.props=t,e.__x=!1,0!==n&&(1!==n&&!1===R.syncComponentUpdates&&e.base?a(e):S(e,1,i)),e.__r&&e.__r(e))}function S(e,t,n,i){if(!e.__x){var a,o,s,l=e.props,c=e.state,p=e.context,f=e.__p||l,d=e.__s||c,h=e.__c||p,g=e.base,m=e.__b,_=g||m,E=e._component,k=!1;if(g&&(e.props=f,e.state=d,e.context=h,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(l,c,p)?k=!0:e.componentWillUpdate&&e.componentWillUpdate(l,c,p),e.props=l,e.state=c,e.context=p),e.__p=e.__s=e.__c=e.__b=null,e.__d=!1,!k){a=e.render(l,c,p),e.getChildContext&&(p=r(r({},p),e.getChildContext()));var A,P,C=a&&a.nodeName;if("function"==typeof C){var x=u(a);o=E,o&&o.constructor===C&&x.key==o.__k?w(o,x,1,p,!1):(A=o,e._component=o=T(C,x,p),o.__b=o.__b||m,o.__u=e,w(o,x,0,p,!1),S(o,1,n,!0)),P=o.base}else s=_,A=E,A&&(s=e._component=null),(_||1===t)&&(s&&(s._component=null),P=v(s,a,p,n||!g,_&&_.parentNode,!0));if(_&&P!==_&&o!==E){var I=_.parentNode;I&&P!==I&&(I.replaceChild(P,_),A||(_._component=null,b(_,!1)))}if(A&&O(A),e.base=P,P&&!i){for(var D=e,M=e;M=M.__u;)(D=M).base=P;P._component=D,P._componentConstructor=D.constructor}}if(!g||n?N.unshift(e):k||(y(),e.componentDidUpdate&&e.componentDidUpdate(f,d,h),R.afterUpdate&&R.afterUpdate(e)),null!=e.__h)for(;e.__h.length;)e.__h.pop().call(e);j||i||y()}}function P(e,t,n,r){for(var i=e&&e._component,a=i,o=e,s=i&&e._componentConstructor===t.nodeName,l=s,c=u(t);i&&!l&&(i=i.__u);)l=i.constructor===t.nodeName;return i&&l&&(!r||i._component)?(w(i,c,3,n,r),e=i.base):(a&&!s&&(O(a),e=o=null),i=T(t.nodeName,c,n),e&&!i.__b&&(i.__b=e,o=null),w(i,c,1,n,r),e=i.base,o&&e!==o&&(o._component=null,b(o,!1))),e}function O(e){R.beforeUnmount&&R.beforeUnmount(e);var t=e.base;e.__x=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?O(n):t&&(t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),e.__b=t,p(t),k(e),_(t)),e.__r&&e.__r(null)}function C(e,t){this.__d=!0,this.context=t,this.props=e,this.state=this.state||{}}function x(e,t,n){return v(n,e,{},!1,t,!1)}var R={},I=[],D=[],M=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,L=[],N=[],j=0,U=!1,F=!1,B={};r(C.prototype,{setState:function(e,t){var n=this.state;this.__s||(this.__s=r({},n)),r(n,"function"==typeof e?e(n,this.props):e),t&&(this.__h=this.__h||[]).push(t),a(this)},forceUpdate:function(e){e&&(this.__h=this.__h||[]).push(e),S(this,2)},render:function(){}});var V={h:n,createElement:n,cloneElement:i,Component:C,render:x,rerender:o,options:R};e.exports=V}()},function(e,t,n){var r=n(125);"string"==typeof r&&(r=[[e.i,r,""]]);var i={};i.transform=void 0,n(127)(r,i),r.locals&&(e.exports=r.locals)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){function r(){}function i(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function a(){X||(X=!0,i("<Provider> does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/reactjs/react-redux/releases/tag/v2.0.0 for the migration instructions."))}function o(){var e=[],t=[];return{clear:function(){t=ne,e=ne},notify:function(){for(var n=e=t,r=0;r<n.length;r++)n[r]()},subscribe:function(n){var r=!0;return t===e&&(t=e.slice()),t.push(n),function(){r&&e!==ne&&(r=!1,t===e&&(t=e.slice()),t.splice(t.indexOf(n),1))}}}}function s(){}function l(e,t){var n={run:function(r){try{var i=e(t.getState(),r);(i!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=i,n.error=null)}catch(e){n.shouldComponentUpdate=!0,n.error=e}}};return n}function u(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.getDisplayName,a=void 0===i?function(e){return"ConnectAdvanced("+e+")"}:i,o=r.methodName,u=void 0===o?"connectAdvanced":o,c=r.renderCountProp,p=void 0===c?void 0:c,f=r.shouldHandleStateChanges,d=void 0===f||f,h=r.storeKey,y=void 0===h?"store":h,v=r.withRef,g=void 0!==v&&v,m=W(r,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),b=y+"Subscription",_=ae++,E=(t={},t[y]=G,t[b]=V,t),k=(n={},n[b]=V,n);return function(t){te("function"==typeof t,"You must pass a component to the function returned by connect. Instead received "+JSON.stringify(t));var n=t.displayName||t.name||"Component",r=a(n),i=z({},m,{getDisplayName:a,methodName:u,renderCountProp:p,shouldHandleStateChanges:d,storeKey:y,withRef:g,displayName:r,wrappedComponentName:n,WrappedComponent:t}),o=function(n){function a(e,t){K(this,a);var i=q(this,n.call(this,e,t));return i.version=_,i.state={},i.renderCount=0,i.store=e[y]||t[y],i.propsMode=Boolean(e[y]),i.setWrappedInstance=i.setWrappedInstance.bind(i),te(i.store,'Could not find "'+y+'" in either the context or props of "'+r+'". Either wrap the root component in a <Provider>, or explicitly pass "'+y+'" as a prop to "'+r+'".'),i.initSelector(),i.initSubscription(),i}return Y(a,n),a.prototype.getChildContext=function(){var e,t=this.propsMode?null:this.subscription;return e={},e[b]=t||this.context[b],e},a.prototype.componentDidMount=function(){d&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},a.prototype.componentWillReceiveProps=function(e){this.selector.run(e)},a.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},a.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=s,this.store=null,this.selector.run=s,this.selector.shouldComponentUpdate=!1},a.prototype.getWrappedInstance=function(){return te(g,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+u+"() call."),this.wrappedInstance},a.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},a.prototype.initSelector=function(){var t=e(this.store.dispatch,i);this.selector=l(t,this.store),this.selector.run(this.props)},a.prototype.initSubscription=function(){if(d){var e=(this.propsMode?this.props:this.context)[b];this.subscription=new ie(this.store,e,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},a.prototype.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(oe)):this.notifyNestedSubs()},a.prototype.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},a.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},a.prototype.addExtraProps=function(e){if(!(g||p||this.propsMode&&this.subscription))return e;var t=z({},e);return g&&(t.ref=this.setWrappedInstance),p&&(t[p]=this.renderCount++),this.propsMode&&this.subscription&&(t[b]=this.subscription),t},a.prototype.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return Object(j.h)(t,this.addExtraProps(e.props))},a}(j.Component);return o.WrappedComponent=t,o.displayName=r,o.childContextTypes=k,o.contextTypes=E,o.prototype.componentWillUpdate=function(){this.version!==_&&(this.version=_,this.initSelector(),this.subscription&&this.subscription.tryUnsubscribe(),this.initSubscription(),d&&this.subscription.trySubscribe())},ee(o,t)}}function c(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!==e&&t!==t}function p(e,t){if(c(e,t))return!0;if("object"!==(void 0===e?"undefined":H(e))||null===e||"object"!==(void 0===t?"undefined":H(t))||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!se.call(t,n[i])||!c(e[n[i]],t[n[i]]))return!1;return!0}function f(e){var t=de.call(e,ye),n=e[ye];try{e[ye]=void 0;var r=!0}catch(e){}var i=he.call(e);return r&&(t?e[ye]=n:delete e[ye]),i}function d(e){return ge.call(e)}function h(e){return null==e?void 0===e?be:me:_e&&_e in Object(e)?f(e):d(e)}function y(e){return null!=e&&"object"==(void 0===e?"undefined":H(e))}function v(e){if(!y(e)||h(e)!=ke)return!1;var t=Ee(e);if(null===t)return!0;var n=Se.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&we.call(n)==Pe}function g(e,t,n){v(e)||i(n+"() in "+t+" must return a plain object. Instead received "+e+".")}function m(e){return function(t,n){function r(){return i}var i=e(t,n);return r.dependsOnOwnProps=!1,r}}function b(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function _(e,t){return function(n,r){var i=r.displayName,a=function(e,t){return a.dependsOnOwnProps?a.mapToProps(e,t):a.mapToProps(e)};return a.dependsOnOwnProps=!0,a.mapToProps=function(n,r){a.mapToProps=e,a.dependsOnOwnProps=b(e);var o=a(n,r);return"function"==typeof o&&(a.mapToProps=o,a.dependsOnOwnProps=b(o),o=a(n,r)),g(o,i,t),o},a}}function E(e){return"function"==typeof e?_(e,"mapDispatchToProps"):void 0}function k(e){return e?void 0:m(function(e){return{dispatch:e}})}function T(e){return e&&"object"===(void 0===e?"undefined":H(e))?m(function(t){return Object(U.bindActionCreators)(e,t)}):void 0}function A(e){return"function"==typeof e?_(e,"mapStateToProps"):void 0}function w(e){return e?void 0:m(function(){return{}})}function S(e,t,n){return z({},n,e,t)}function P(e){return function(t,n){var r=n.displayName,i=n.pure,a=n.areMergedPropsEqual,o=!1,s=void 0;return function(t,n,l){var u=e(t,n,l);return o?i&&a(u,s)||(s=u):(o=!0,s=u,g(s,r,"mergeProps")),s}}}function O(e){return"function"==typeof e?P(e):void 0}function C(e){return e?void 0:function(){return S}}function x(e,t,n){if(!e)throw new Error("Unexpected value for "+t+" in "+n+".");"mapStateToProps"!==t&&"mapDispatchToProps"!==t||e.hasOwnProperty("dependsOnOwnProps")||i("The selector for "+t+" of "+n+" did not specify a value for dependsOnOwnProps.")}function R(e,t,n,r){x(e,"mapStateToProps",r),x(t,"mapDispatchToProps",r),x(n,"mergeProps",r)}function I(e,t,n,r){return function(i,a){return n(e(i,a),t(r,a),a)}}function D(e,t,n,r,i){function a(i,a){return h=i,y=a,v=e(h,y),g=t(r,y),m=n(v,g,y),d=!0,m}function o(){return v=e(h,y),t.dependsOnOwnProps&&(g=t(r,y)),m=n(v,g,y)}function s(){return e.dependsOnOwnProps&&(v=e(h,y)),t.dependsOnOwnProps&&(g=t(r,y)),m=n(v,g,y)}function l(){var t=e(h,y),r=!f(t,v);return v=t,r&&(m=n(v,g,y)),m}function u(e,t){var n=!p(t,y),r=!c(e,h);return h=e,y=t,n&&r?o():n?s():r?l():m}var c=i.areStatesEqual,p=i.areOwnPropsEqual,f=i.areStatePropsEqual,d=!1,h=void 0,y=void 0,v=void 0,g=void 0,m=void 0;return function(e,t){return d?u(e,t):a(e,t)}}function M(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,a=W(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),o=n(e,a),s=r(e,a),l=i(e,a);return R(o,s,l,a.displayName),(a.pure?D:I)(o,s,l,e,a)}function L(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+(void 0===e?"undefined":H(e))+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function N(e,t){return e===t}n.d(t,"Provider",function(){return J}),n.d(t,"connect",function(){return Re}),n.d(t,"connectAdvanced",function(){return u});var j=n(0),U=(n.n(j),n(13)),F={only:function(e){return e&&e[0]||null}};r.isRequired=r;var B={element:r,func:r,shape:function(){return r},instanceOf:function(){return r}},V=B.shape({trySubscribe:B.func.isRequired,tryUnsubscribe:B.func.isRequired,notifyNestedSubs:B.func.isRequired,isSubscribed:B.func.isRequired}),G=B.shape({subscribe:B.func.isRequired,dispatch:B.func.isRequired,getState:B.func.isRequired}),H="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},K=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Y=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},W=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},q=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},X=!1,J=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"store",n=arguments[1],r=n||t+"Subscription",i=function(e){function n(r,i){K(this,n);var a=q(this,e.call(this,r,i));return a[t]=r.store,a}return Y(n,e),n.prototype.getChildContext=function(){var e;return e={},e[t]=this[t],e[r]=null,e},n.prototype.render=function(){return F.only(this.props.children)},n}(j.Component);return i.prototype.componentWillReceiveProps=function(e){this[t]!==e.store&&a()},i.childContextTypes=(e={},e[t]=G.isRequired,e[r]=V,e),i.displayName="Provider",i}(),Q={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},$={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},Z="function"==typeof Object.getOwnPropertySymbols,ee=function(e,t,n){if("string"!=typeof t){var r=Object.getOwnPropertyNames(t);Z&&(r=r.concat(Object.getOwnPropertySymbols(t)));for(var i=0;i<r.length;++i)if(!(Q[r[i]]||$[r[i]]||n&&n[r[i]]))try{e[r[i]]=t[r[i]]}catch(e){}}return e},te=function(){},ne=null,re={notify:function(){}},ie=function(){function e(t,n,r){K(this,e),this.store=t,this.parentSub=n,this.onStateChange=r,this.unsubscribe=null,this.listeners=re}return e.prototype.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},e.prototype.notifyNestedSubs=function(){this.listeners.notify()},e.prototype.isSubscribed=function(){return Boolean(this.unsubscribe)},e.prototype.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=o())},e.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=re)},e}(),ae=0,oe={},se=Object.prototype.hasOwnProperty,le="object"==(void 0===e?"undefined":H(e))&&e&&e.Object===Object&&e,ue="object"==("undefined"==typeof self?"undefined":H(self))&&self&&self.Object===Object&&self,ce=le||ue||Function("return this")(),pe=ce.Symbol,fe=Object.prototype,de=fe.hasOwnProperty,he=fe.toString,ye=pe?pe.toStringTag:void 0,ve=Object.prototype,ge=ve.toString,me="[object Null]",be="[object Undefined]",_e=pe?pe.toStringTag:void 0,Ee=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object),ke="[object Object]",Te=Function.prototype,Ae=Object.prototype,we=Te.toString,Se=Ae.hasOwnProperty,Pe=we.call(Object),Oe=[E,k,T],Ce=[A,w],xe=[O,C],Re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.connectHOC,n=void 0===t?u:t,r=e.mapStateToPropsFactories,i=void 0===r?Ce:r,a=e.mapDispatchToPropsFactories,o=void 0===a?Oe:a,s=e.mergePropsFactories,l=void 0===s?xe:s,c=e.selectorFactory,f=void 0===c?M:c;return function(e,t,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=a.pure,u=void 0===s||s,c=a.areStatesEqual,d=void 0===c?N:c,h=a.areOwnPropsEqual,y=void 0===h?p:h,v=a.areStatePropsEqual,g=void 0===v?p:v,m=a.areMergedPropsEqual,b=void 0===m?p:m,_=W(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),E=L(e,i,"mapStateToProps"),k=L(t,o,"mapDispatchToProps"),T=L(r,l,"mergeProps");return n(f,z({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:E,initMapDispatchToProps:k,initMergeProps:T,pure:u,areStatesEqual:d,areOwnPropsEqual:y,areStatePropsEqual:g,areMergedPropsEqual:b},_))}}(),Ie={Provider:J,connect:Re,connectAdvanced:u};t.default=Ie}.call(t,n(28))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.BaseComponent=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),l=n(30),u=function(e){return e&&e.__esModule?e:{default:e}}(l),c=n(62),p=n(123),f=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{config:{}};r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.name=e.name,n.player=e.player,n.config=e.config,n.eventManager=new p.EventManager,n.logger=(0,u.default)("UI "+n.name),n.logger.debug("Initialized"),n}return a(t,e),o(t,[{key:"notifyClick",value:function(e){this.context.store.dispatch({type:c.types.COMPONENT_CLICKED,name:this.name,payload:e})}},{key:"notifyChange",value:function(e){this.context.store.dispatch({type:c.types.COMPONENT_CHANGED,name:this.name,payload:e})}},{key:"componentWillUnmount",value:function(){this.eventManager.removeAll()}}]),t}(s.Component);f.defaultProps={},t.default=f,t.BaseComponent=f},function(e,t,n){function r(e){return null!==e&&void 0!==e}function i(e,t){var n=a({},e);for(var r in t)t.hasOwnProperty(r)&&(n[r]=e[r]&&t[r]&&"object"==typeof e[r]&&"object"==typeof t[r]?i(e[r],t[r]):e[r]||t[r]);return n}function a(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function o(e){if(e=e||{},"string"==typeof e&&(e=e.split(",")),"join"in e){for(var t={},n=0;n<e.length;n++){var r=e[n].trim();r&&(t[r.split(".").pop()]=r)}return t}return e}function s(e,t){return p=t||m,e&&e.replace(/\{\{([\w.-]+)\}\}/g,l)}function l(e,t){for(var n=t.split("."),r=p,i=0;i<n.length;i++)if(null==(r=r[n[i]]))return"";return"string"==typeof r&&r.match(/\{\{/)&&(r=s(r,p)),r}function u(e,t,n,i,a,o){t&&(e=t+"."+e);var l=n&&d(n,e);return(a||0===a)&&l&&"object"==typeof l&&(l=l.splice?l[a]||l[0]:0===a&&r(l.none)?l.none:1===a&&r(l.one||l.singular)?l.one||l.singular:l.some||l.many||l.plural||l.other||l),l&&s(l,i)||o||null}function c(e,t,n){var r={};t=t||{},e=o(e);for(var i in e)if(e.hasOwnProperty(i)&&e[i]){var s=e[i];n||"string"!=typeof s?s.nodeName===b&&(s=a({fallback:s.children&&s.children[0]},s.attributes),r[i]=u(s.id,t.scope,t.dictionary,s.fields,s.plural,s.fallback)):r[i]=u(s,t.scope,t.dictionary)}return r}var p,f=n(0),d=function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(n(107)),h=/[?&#]intl=show/,y=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getChildContext=function(){var e=this.props,t=e.scope,n=e.definition,r=e.mark,o=a({},this.context.intl||{});return t&&(o.scope=t),n&&(o.dictionary=i(o.dictionary||{},n)),(r||"undefined"!=typeof location&&String(location).match(h))&&(o.mark=!0),{intl:o}},t.prototype.render=function(e){var t=e.children;return t&&t[0]||null},t}(f.Component),v=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e.length>1)return g(e[0],e[1]);var n=e[0];return function(e){return g(e,n)}},g=function(e,t){return function(n){return f.h(y,t||{},f.h(e,n))}},m={},b=function(e,t){var n=e.id,r=e.children,i=e.plural,a=e.fields,o=t.intl,s=r&&r[0],l=u(n,o&&o.scope,o&&o.dictionary,a,i,s);if(o&&o.mark){var c="dictionary"+(o&&o.scope?"."+o.scope:"")+"."+n;return f.h("mark",{style:"background: "+(l?d(o,c)?"rgba(119,231,117,.5)":"rgba(229,226,41,.5)":"rgba(228,147,51,.5)"),title:n},l)}return l},_=function(e,t){var n=e.children,r=t.intl,i=n&&n[0];return i&&f.cloneElement(i,c(i.attributes,r,!0))},E=function(e){return function(t){return function(n,r){var i="function"==typeof e?e(n):e,a=c(i,r.intl);return f.h(t,assign({},n,a))}}};v.intl=v,v.IntlProvider=y,v.Text=b,v.Localizer=_,v.withText=E,e.exports=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IconType=t.Icon=t.default=void 0;var r=n(16);Object.defineProperty(t,"Icon",{enumerable:!0,get:function(){return r.Icon}}),Object.defineProperty(t,"IconType",{enumerable:!0,get:function(){return r.IconType}});var i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=i.default},function(e,t,n){"use strict";function r(e){u.SEMI_COLON="firefox"===e.browser.name.toLowerCase()?59:186}function i(e){for(var t in u)if(u[t]===e)return t;return"NOT_FOUND"}function a(e){return l(e,u.TAB)}function o(e){return l(e,u.ENTER)}function s(e){return l(e,u.ESC)}function l(e,t){return e===t}Object.defineProperty(t,"__esModule",{value:!0}),t.setEnv=r,t.getKeyName=i,t.isTab=a,t.isEnter=o,t.isEsc=s;var u=t.KeyMap={TAB:9,ENTER:13,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,P:80,C:67,F:70,M:77,SEMI_COLON:186,COMMA:188,PERIOD:190}},function(e,t,n){"use strict";function r(e){return function(t){return i({},(0,a.bindActionCreators)(e,t))}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.bindActions=r;var a=n(13)},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=t.types={ADD_PLAYER_CLASS:"shell/ADD_PLAYER_CLASS",REMOVE_PLAYER_CLASS:"shell/REMOVE_PLAYER_CLASS",UPDATE_IS_MOBILE:"shell/UPDATE_IS_MOBILE",UPDATE_PLAYER_SIZE:"shell/UPDATE_PLAYER_SIZE",UPDATE_PLAYER_CLIENT_RECT:"shell/UPDATE_PLAYER_CLIENT_RECT",UPDATE_DOCUMENT_WIDTH:"shell/UPDATE_DOCUMENT_WIDTH",UPDATE_PLAYER_HOVER_STATE:"shell/UPDATE_PLAYER_HOVER_STATE",UPDATE_PLAYER_NAV_STATE:"shell/UPDATE_PLAYER_NAV_STATE",UPDATE_BOTTOM_BAR_HOVER_ACTIVE:"shell/UPDATE_BOTTOM_BAR_HOVER_ACTIVE",UPDATE_SMART_CONTAINER_OPEN:"shell/UPDATE_SMART_CONTAINER_OPEN"},o=t.initialState={playerClasses:[],playerHover:!1,playerNav:!1,smartContainerOpen:!1};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments[1];switch(t.type){case a.ADD_PLAYER_CLASS:return e.playerClasses.includes(t.className)?e:i({},e,{playerClasses:[].concat(r(e.playerClasses),[t.className])});case a.REMOVE_PLAYER_CLASS:return i({},e,{playerClasses:e.playerClasses.filter(function(e){return e!==t.className})});case a.UPDATE_IS_MOBILE:return i({},e,{isMobile:t.isMobile});case a.UPDATE_PLAYER_SIZE:return i({},e,{playerSize:t.playerSize});case a.UPDATE_PLAYER_CLIENT_RECT:return i({},e,{playerClientRect:t.playerClientRect});case a.UPDATE_DOCUMENT_WIDTH:return i({},e,{documentWidth:t.documentWidth});case a.UPDATE_PLAYER_HOVER_STATE:return i({},e,{playerHover:t.hover});case a.UPDATE_PLAYER_NAV_STATE:return i({},e,{playerNav:t.nav});case a.UPDATE_BOTTOM_BAR_HOVER_ACTIVE:return i({},e,{bottomBarHoverActive:t.active});case a.UPDATE_SMART_CONTAINER_OPEN:return i({},e,{smartContainerOpen:t.open});default:return e}},t.actions={addPlayerClass:function(e){return{type:a.ADD_PLAYER_CLASS,className:e}},removePlayerClass:function(e){return{type:a.REMOVE_PLAYER_CLASS,className:e}},updateIsMobile:function(e){return{type:a.UPDATE_IS_MOBILE,isMobile:e}},updatePlayerSize:function(e){return{type:a.UPDATE_PLAYER_SIZE,playerSize:e}},updatePlayerClientRect:function(e){return{type:a.UPDATE_PLAYER_CLIENT_RECT,playerClientRect:e}},updateDocumentWidth:function(e){return{type:a.UPDATE_DOCUMENT_WIDTH,documentWidth:e}},updatePlayerHoverState:function(e){return{type:a.UPDATE_PLAYER_HOVER_STATE,hover:e}},updatePlayerNavState:function(e){return{type:a.UPDATE_PLAYER_NAV_STATE,nav:e}},updateBottomBarHoverActive:function(e){return{type:a.UPDATE_BOTTOM_BAR_HOVER_ACTIVE,active:e}},updateSmartContainerOpen:function(e){return{type:a.UPDATE_SMART_CONTAINER_OPEN,open:e}}}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.FakeEvent=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(31),o=function(){function e(t,n){r(this,e),this.bubbles=!1,this.cancelable=!1,this.defaultPrevented=!1,this.timeStamp=window.performance?window.performance.now():Date.now(),this.type=t,this.isTrusted=!1,this.currentTarget=null,this.target=null,this.stopped=!1,n&&(this.payload=n)}return i(e,[{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.stopped=!0}},{key:"stopPropagation",value:function(){}}]),e}();o.Type=a.EventType,t.FakeEvent=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.PLAYER_SIZE=t.CONTROL_BAR_HOVER_DEFAULT_TIMEOUT=t.Shell=void 0;var l,u,c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in i)return i.value;var o=i.get;return void 0!==o?o.call(r):void 0},f=n(1),d=r(f),h=n(0),y=n(3),v=r(y),g=n(2),m=n(7),b=n(8),_=n(11),E=n(6),k=function(e){return{targetId:e.config.targetId,forceTouchUI:e.config.forceTouchUI,metadataLoaded:e.engine.metadataLoaded,currentState:e.engine.playerState.currentState,playerClasses:e.shell.playerClasses,isMobile:e.shell.isMobile,playerSize:e.shell.playerSize,isCasting:e.engine.isCasting,playerClientRect:e.shell.playerClientRect,playerHover:e.shell.playerHover,playerNav:e.shell.playerNav,seekbarDraggingActive:e.seekbar.draggingActive,seekbarHoverActive:e.seekbar.hoverActive,bottomBarHoverActive:e.shell.bottomBarHoverActive,volumeHoverActive:e.volume.hover,adBreak:e.engine.adBreak,prePlayback:e.engine.prePlayback,smartContainerOpen:e.shell.smartContainerOpen,fullscreen:e.engine.fullscreen,fallbackToMutedAutoPlay:e.engine.fallbackToMutedAutoPlay,playlist:e.engine.playlist}},T={TINY:"tiny",EXTRA_SMALL:"extrasmall",SMALL:"small",MEDIUM:"medium",LARGE:"large",EXTRA_LARGE:"extralarge"},A={TINY:280,EXTRA_SMALL:380,SMALL:480,MEDIUM:768,LARGE:1024},w=(l=(0,g.connect)(k,(0,m.bindActions)(Object.assign({},b.actions,_.actions))))(u=function(e){function t(e){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"Shell",player:e.player}));return n._environmentClasses=["playkit-"+n.player.env.os.name.replace(/ /g,"-"),"playkit-"+n.player.env.browser.name.replace(/ /g,"-")],n}return s(t,e),c(t,[{key:"onMouseOver",value:function(){this.props.isMobile||(this.state.nav&&(this.setState({nav:!1}),this.props.updatePlayerNavState(!1)),this.props.bottomBarHoverActive||this._updatePlayerHoverState())}},{key:"onMouseLeave",value:function(e){e.toElement&&(this.props.isMobile||this.state.hover&&(this.setState({hover:!1}),this.props.updatePlayerHoverState(!1)))}},{key:"onMouseMove",value:function(){this.props.isMobile||this._updatePlayerHoverState()}},{key:"onClick",value:function(){this.props.fallbackToMutedAutoPlay&&(this.player.muted=!1),this.notifyClick()}},{key:"onTouchEnd",value:function(e){this.props.prePlayback||(this.props.fallbackToMutedAutoPlay&&(this.player.muted=!1),this.state.hover||e.stopPropagation(),this._updatePlayerHoverState())}},{key:"onKeyDown",value:function(e){this.state.nav||e.keyCode!==E.KeyMap.TAB||(this.setState({nav:!0}),this.props.updatePlayerNavState(!0))}},{key:"componentDidMount",value:function(){var e=this;this.props.updateIsMobile(this.player.env.isTablet||this.player.env.isMobile||this.props.forceTouchUI),this._onWindowResize(),this.eventManager.listen(this.player,this.player.Event.RESIZE,function(){return e._onWindowResize()}),this.eventManager.listen(this.player,this.player.Event.FIRST_PLAY,function(){return e._onWindowResize()})}},{key:"_onWindowResize",value:function(){var e=document.getElementById(this.props.targetId);e&&this.props.updatePlayerClientRect(e.getBoundingClientRect()),document.body&&this.props.updateDocumentWidth(document.body.clientWidth)}},{key:"componentWillUnmount",value:function(){p(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this).call(this),this._clearHoverTimeout()}},{key:"_updatePlayerHoverState",value:function(){this.props.prePlayback||(this.state.hover||(this.props.updatePlayerHoverState(!0),this.setState({hover:!0})),this._startHoverTimeout())}},{key:"_canEndHoverState",value:function(){return!(this.props.seekbarDraggingActive||this.props.seekbarHoverActive||this.props.volumeHoverActive||this.props.smartContainerOpen||this.player.paused)}},{key:"_startHoverTimeout",value:function(){var e=this;this._clearHoverTimeout(),this.hoverTimeout=setTimeout(function(){e._canEndHoverState()&&(e.props.updatePlayerHoverState(!1),e.setState({hover:!1}))},this.props.hoverTimeout||3e3)}},{key:"_clearHoverTimeout",value:function(){this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=null)}},{key:"componentDidUpdate",value:function(e){(!this.props.prePlayback&&e.prePlayback||!this.props.adBreak&&e.adBreak)&&this._updatePlayerHoverState()}},{key:"render",value:function(e){var t=this,n=[d.default.player,d.default.skinDefault].concat(i(this._environmentClasses));return n.push(e.playerClasses),this.props.prePlayback&&n.push(d.default.prePlayback),this.props.isCasting&&n.push("playkit-casting"),this.props.isMobile&&n.push(d.default.touch),this.props.playerNav&&n.push(d.default.nav),(this.props.playerHover||this.props.playerNav)&&n.push(d.default.hover),this.props.metadataLoaded&&n.push(d.default.metadataLoaded),this.props.adBreak&&n.push(d.default.adBreak),this.props.metadataLoaded&&n.push(d.default["state-"+this.props.currentState]),this.props.seekbarDraggingActive&&n.push(d.default.hover),this.props.fullscreen&&n.push(d.default.fullscreen),this.props.playlist&&n.push(d.default.playlist),this.props.playerClientRect&&(this.props.playerClientRect.width<=A.TINY?(n.push(d.default.sizeTy),this.props.updatePlayerSize(T.TINY)):this.props.playerClientRect.width<=A.EXTRA_SMALL?(n.push(d.default.sizeXs),this.props.updatePlayerSize(T.EXTRA_SMALL)):this.props.playerClientRect.width<=A.SMALL?(n.push(d.default.sizeSm),this.props.updatePlayerSize(T.SMALL)):this.props.playerClientRect.width<=A.MEDIUM?(n.push(d.default.sizeMd),this.props.updatePlayerSize(T.MEDIUM)):this.props.playerClientRect.width<=A.LARGE?(n.push(d.default.sizeLg),this.props.updatePlayerSize(T.LARGE)):this.props.updatePlayerSize(T.EXTRA_LARGE)),n=n.join(" "),(0,h.h)("div",{tabIndex:"0",className:n,onClick:function(){return t.onClick()},onTouchEnd:function(e){return t.onTouchEnd(e)},onMouseOver:function(){return t.onMouseOver()},onMouseMove:function(){return t.onMouseMove()},onMouseLeave:function(e){return t.onMouseLeave(e)},onKeyDown:function(e){return t.onKeyDown(e)}},e.children)}}]),t}(v.default))||u;t.Shell=w,t.CONTROL_BAR_HOVER_DEFAULT_TIMEOUT=3e3,t.PLAYER_SIZE=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.actions=t.initialState=t.types=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(32),a=n(12),o=t.types={UPDATE_PLAYER_STATE:"engine/UPDATE_PLAYER_STATE",UPDATE_PRE_PLAYBACK:"engine/UPDATE_PRE_PLAYBACK",UPDATE_IS_PLAYING:"engine/UPDATE_IS_PLAYING",UPDATE_IS_PAUSED:"engine/UPDATE_IS_PAUSED",UPDATE_IS_SEEKING:"engine/UPDATE_IS_SEEKING",UPDATE_LAST_SEEK_POINT:"engine/UPDATE_LAST_SEEK_POINT",UPDATE_IS_CHANGING_SOURCE:"engine/UPDATE_IS_CHANGING_SOURCE",UPDATE_IS_ENDED:"engine/UPDATE_IS_ENDED",UPDATE_IS_PLAYBACK_STARTED:"engine/UPDATE_IS_PLAYBACK_STARTED",UPDATE_IS_PLAYBACK_ENDED:"engine/UPDATE_IS_PLAYBACK_ENDED",UPDATE_CURRENT_TIME:"engine/UPDATE_CURRENT_TIME",UPDATE_DURATION:"engine/UPDATE_DURATION",UPDATE_VOLUME:"engine/UPDATE_VOLUME",UPDATE_MUTED:"engine/UPDATE_MUTED",UPDATE_METADATA_LOADING_STATUS:"engine/UPDATE_METADATA_LOADING_STATUS",UPDATE_AUDIO_TRACKS:"engine/UPDATE_AUDIO_TRACKS",UPDATE_VIDEO_TRACKS:"engine/UPDATE_VIDEO_TRACKS",UPDATE_TEXT_TRACKS:"engine/UPDATE_TEXT_TRACKS",UPDATE_AD_BREAK:"engine/UPDATE_AD_BREAK",UPDATE_AD_BREAK_PROGRESS:"engine/UPDATE_AD_BREAK_PROGRESS",UPDATE_AD_BREAK_COMPLETED:"engine/UPDATE_AD_BREAK_COMPLETED",UPDATE_AD_IS_PLAYING:"engine/UPDATE_AD_IS_PLAYING",UPDATE_AD_SKIP_TIME_OFFSET:"engine/UPDATE_AD_SKIP_TIME_OFFSET",UPDATE_AD_SKIPPABLE_STATE:"engine/UPDATE_AD_SKIPPABLE_STATE",UPDATE_AD_URL:"engine/UPDATE_AD_URL",UPDATE_AD_IS_LINEAR:"engine/UPDATE_AD_IS_LINEAR",UPDATE_PLAYER_POSTER:"engine/UPDATE_PLAYER_POSTER",UPDATE_IS_LIVE:"engine/UPDATE_IS_LIVE",UPDATE_IS_DVR:"engine/UPDATE_IS_DVR",UPDATE_ERROR:"engine/ERROR",UPDATE_IS_IDLE:"engine/UPDATE_IS_IDLE",UPDATE_FALLBACK_TO_MUTED_AUTOPLAY:"engine/UPDATE_FALLBACK_TO_MUTED_AUTOPLAY",UPDATE_IS_VR:"engine/UPDATE_IS_VR",UPDATE_VR_STEREO_MODE:"engine/UPDATE_VR_STEREO_MODE",UPDATE_IS_CASTING:"engine/UPDATE_IS_CASTING",UPDATE_CAST_SESSION:"engine/UPDATE_CAST_SESSION",UPDATE_IS_CAST_AVAILABLE:"engine/UPDATE_IS_CAST_AVAILABLE",UPDATE_PLAYLIST:"engine/UPDATE_PLAYLIST",UPDATE_PICTURE_IN_PICTURE_SUPPORTED:"engine/UPDATE_PICTURE_IN_PICTURE_SUPPORTED",UPDATE_PICTURE_IN_PICTURE_MODE:"engine/UPDATE_PICTURE_IN_PICTURE_MODE",UPDATE_FULLSCREEN:"engine/UPDATE_FULLSCREEN"},s=t.initialState={isIdle:!1,isPlaying:!1,isPaused:!1,isSeeking:!1,isEnded:!1,isPlaybackStarted:!1,isPlaybackEnded:!1,isChangingSource:!1,prePlayback:!0,metadataLoaded:!1,playerState:{previousState:"",currentState:""},fallbackToMutedAutoPlay:!1,poster:"",currentTime:0,lastSeekPoint:0,duration:0,volume:1,muted:!1,videoTracks:[],audioTracks:[],textTracks:[],adIsLinear:!1,adBreak:!1,adIsPlaying:!1,adSkipTimeOffset:0,adSkippableState:!1,isLive:!1,isDvr:!1,adProgress:{currentTime:0,duration:0},adUrl:"",hasError:!1,isVr:!1,vrStereoMode:!1,isCasting:!1,castSession:null,isCastAvailable:!1,pictureInPictureSupported:!1,isInPictureInPicture:!1,playlist:null,fullscreen:!1};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments[1];switch(t.type){case a.types.UPDATE:return(0,i.getComponentStateFromConfig)("engine",e,t);case a.types.UPDATE_COMPONENT:return(0,i.getComponentStateFromComponentConfig)("engine",e,t);case o.UPDATE_ERROR:return r({},e,{hasError:t.hasError});case o.UPDATE_PLAYER_STATE:return r({},e,{playerState:t.playerState});case o.UPDATE_PRE_PLAYBACK:return r({},e,{prePlayback:t.prePlayback});case o.UPDATE_IS_PLAYING:return r({},e,{isPlaying:t.isPlaying});case o.UPDATE_IS_PAUSED:return r({},e,{isPaused:t.isPaused});case o.UPDATE_IS_SEEKING:return r({},e,{isSeeking:t.isSeeking});case o.UPDATE_LAST_SEEK_POINT:return r({},e,{lastSeekPoint:t.lastSeekPoint});case o.UPDATE_IS_ENDED:return r({},e,{isEnded:t.isEnded});case o.UPDATE_IS_PLAYBACK_STARTED:return r({},e,{isPlaybackStarted:t.isPlaybackStarted});case o.UPDATE_IS_PLAYBACK_ENDED:return r({},e,{isPlaybackEnded:t.isPlaybackEnded});case o.UPDATE_CURRENT_TIME:return r({},e,{currentTime:t.currentTime});case o.UPDATE_DURATION:return r({},e,{duration:t.duration});case o.UPDATE_VOLUME:return r({},e,{volume:t.volume});case o.UPDATE_MUTED:return r({},e,{muted:t.muted});case o.UPDATE_METADATA_LOADING_STATUS:return r({},e,{metadataLoaded:t.metadataLoaded});case o.UPDATE_AUDIO_TRACKS:return r({},e,{audioTracks:t.tracks});case o.UPDATE_VIDEO_TRACKS:return r({},e,{videoTracks:t.tracks});case o.UPDATE_TEXT_TRACKS:return r({},e,{textTracks:t.tracks});case o.UPDATE_AD_BREAK:return r({},e,{adBreak:t.adBreak});case o.UPDATE_AD_BREAK_PROGRESS:return r({},e,{adProgress:t.adProgress});case o.UPDATE_AD_BREAK_COMPLETED:return r({},e,{adProgress:{currentTime:e.adProgress.duration,duration:e.adProgress.duration}});case o.UPDATE_AD_IS_PLAYING:return r({},e,{adIsPlaying:t.adIsPlaying});case o.UPDATE_AD_IS_LINEAR:return r({},e,{adIsLinear:t.adIsLinear});case o.UPDATE_AD_SKIP_TIME_OFFSET:return r({},e,{adSkipTimeOffset:t.adSkipTimeOffset});case o.UPDATE_AD_SKIPPABLE_STATE:return r({},e,{adSkippableState:t.adSkippableState});case o.UPDATE_AD_URL:return r({},e,{adUrl:t.adUrl});case o.UPDATE_PLAYER_POSTER:return r({},e,{poster:t.poster});case o.UPDATE_IS_LIVE:return r({},e,{isLive:t.isLive});case o.UPDATE_IS_DVR:return r({},e,{isDvr:t.isDvr});case o.UPDATE_IS_IDLE:return r({},e,{isIdle:t.IsIdle});case o.UPDATE_FALLBACK_TO_MUTED_AUTOPLAY:return r({},e,{fallbackToMutedAutoPlay:t.fallback});case o.UPDATE_IS_VR:return r({},e,{isVr:t.isVr});case o.UPDATE_VR_STEREO_MODE:return r({},e,{vrStereoMode:t.vrStereoMode});case o.UPDATE_IS_CASTING:return r({},e,{isCasting:t.isCasting});case o.UPDATE_CAST_SESSION:return r({},e,{castSession:t.castSession});case o.UPDATE_IS_CAST_AVAILABLE:return r({},e,{isCastAvailable:t.isCastAvailable});case o.UPDATE_IS_CHANGING_SOURCE:return r({},e,{isChangingSource:t.isChangingSource});case o.UPDATE_PLAYLIST:return r({},e,{playlist:t.playlist});case o.UPDATE_PICTURE_IN_PICTURE_SUPPORTED:return r({},e,{isPictureInPictureSupported:t.isPictureInPictureSupported});case o.UPDATE_PICTURE_IN_PICTURE_MODE:return r({},e,{isInPictureInPicture:t.isInPictureInPicture});case o.UPDATE_FULLSCREEN:return r({},e,{fullscreen:t.fullscreen});default:return e}},t.actions={updateHasError:function(e){return{type:o.UPDATE_ERROR,hasError:e}},updatePlayerState:function(e,t){return{type:o.UPDATE_PLAYER_STATE,playerState:{prevoiusState:e,currentState:t}}},updatePrePlayback:function(e){return{type:o.UPDATE_PRE_PLAYBACK,prePlayback:e}},updateIsPlaying:function(e){return{type:o.UPDATE_IS_PLAYING,isPlaying:e}},updateIsPaused:function(e){return{type:o.UPDATE_IS_PAUSED,isPaused:e}},updateIsSeeking:function(e){return{type:o.UPDATE_IS_SEEKING,isSeeking:e}},updateLastSeekPoint:function(e){return{type:o.UPDATE_LAST_SEEK_POINT,lastSeekPoint:e}},updateIsEnded:function(e){return{type:o.UPDATE_IS_ENDED,isEnded:e}},updateIsPlaybackStarted:function(e){return{type:o.UPDATE_IS_PLAYBACK_STARTED,isPlaybackStarted:e}},updateIsPlaybackEnded:function(e){return{type:o.UPDATE_IS_PLAYBACK_ENDED,isPlaybackEnded:e}},updateCurrentTime:function(e){return{type:o.UPDATE_CURRENT_TIME,currentTime:e}},updateDuration:function(e){return{type:o.UPDATE_DURATION,duration:e}},updateVolume:function(e){return{type:o.UPDATE_VOLUME,volume:e}},updateMuted:function(e){return{type:o.UPDATE_MUTED,muted:e}},updateMetadataLoadingStatus:function(e){return{type:o.UPDATE_METADATA_LOADING_STATUS,metadataLoaded:e}},updateAudioTracks:function(e){return{type:o.UPDATE_AUDIO_TRACKS,tracks:e}},updateVideoTracks:function(e){return{type:o.UPDATE_VIDEO_TRACKS,tracks:e}},updateTextTracks:function(e){return{type:o.UPDATE_TEXT_TRACKS,tracks:e}},updateAdBreak:function(e){return{type:o.UPDATE_AD_BREAK,adBreak:e}},updateAdBreakProgress:function(e,t){return{type:o.UPDATE_AD_BREAK_PROGRESS,adProgress:{currentTime:e,duration:t}}},updateAdBreakCompleted:function(){return{type:o.UPDATE_AD_BREAK_COMPLETED}},updateAdIsPlaying:function(e){return{type:o.UPDATE_AD_IS_PLAYING,adIsPlaying:e}},updateAdSkipTimeOffset:function(e){return{type:o.UPDATE_AD_SKIP_TIME_OFFSET,adSkipTimeOffset:e}},updateAdSkippableState:function(e){return{type:o.UPDATE_AD_SKIPPABLE_STATE,adSkippableState:e}},updateAdClickUrl:function(e){return{type:o.UPDATE_AD_URL,adUrl:e}},updateAdIsLinear:function(e){return{type:o.UPDATE_AD_IS_LINEAR,adIsLinear:e}},updatePlayerPoster:function(e){return{type:o.UPDATE_PLAYER_POSTER,poster:e}},updateIsLive:function(e){return{type:o.UPDATE_IS_LIVE,isLive:e}},updateIsDvr:function(e){return{type:o.UPDATE_IS_DVR,isDvr:e}},updateIsIdle:function(e){return{type:o.UPDATE_IS_IDLE,IsIdle:e}},updateFallbackToMutedAutoPlay:function(e){return{type:o.UPDATE_FALLBACK_TO_MUTED_AUTOPLAY,fallback:e}},updateIsVr:function(e){return{type:o.UPDATE_IS_VR,isVr:e}},updateVrStereoMode:function(e){return{type:o.UPDATE_VR_STEREO_MODE,vrStereoMode:e}},updateIsCasting:function(e){return{type:o.UPDATE_IS_CASTING,isCasting:e}},updateCastSession:function(e){return{type:o.UPDATE_CAST_SESSION,castSession:e}},updateIsCastAvailable:function(e){return{type:o.UPDATE_IS_CAST_AVAILABLE,isCastAvailable:e}},updateIsChangingSource:function(e){return{type:o.UPDATE_IS_CHANGING_SOURCE,isChangingSource:e}},updatePlaylist:function(e){return{type:o.UPDATE_PLAYLIST,playlist:e}},updatePictureInPictureSupport:function(e){return{type:o.UPDATE_PICTURE_IN_PICTURE_SUPPORTED,isPictureInPictureSupported:e}},updateIsInPictureInPicture:function(e){return{type:o.UPDATE_PICTURE_IN_PICTURE_MODE,isInPictureInPicture:e}},updateFullscreen:function(e){return{type:o.UPDATE_FULLSCREEN,fullscreen:e}}}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.actions=t.initialState=t.types=void 0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(29),o=t.types={UPDATE:"config/UPDATE",UPDATE_COMPONENT:"config/UPDATE_COMPONENT",RESET:"config/RESET"},s=t.initialState={forceTouchUI:!1,components:{watermark:{},seekbar:{},vrStereo:{},share:{},logo:{}}};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments[1];switch(t.type){case o.UPDATE:var n=(0,a.mergeDeep)({},e,t.config);return i({},e,n);case o.UPDATE_COMPONENT:return i({},e,{components:i({},e.components,r({},t.componentAlias,(0,a.mergeDeep)({},e.components[t.componentAlias],t.config)))});default:return e}},t.actions={updateConfig:function(e){return{type:o.UPDATE,config:e}},updateComponentConfig:function(e,t){return{type:o.UPDATE_COMPONENT,componentAlias:e,config:t}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(56),i=n(104),a=n(105),o=n(106),s=n(60);n(59),n.d(t,"createStore",function(){return r.b}),n.d(t,"combineReducers",function(){return i.a}),n.d(t,"bindActionCreators",function(){return a.a}),n.d(t,"applyMiddleware",function(){return o.a}),n.d(t,"compose",function(){return s.a})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.actions=t.initialState=t.types=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(12),a=n(32),o=t.types={UPDATE_LOADING_SPINNER_STATE:"loading/UPDATE_LOADING_SPINNER_STATE"},s=t.initialState={show:!1};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments[1];switch(t.type){case i.types.UPDATE:return(0,a.getComponentStateFromConfig)("loading",e,t);case i.types.UPDATE_COMPONENT:return(0,a.getComponentStateFromComponentConfig)("loading",e,t);case o.UPDATE_LOADING_SPINNER_STATE:return r({},e,{show:t.show});default:return e}},t.actions={updateLoadingSpinnerState:function(e){return{type:o.UPDATE_LOADING_SPINNER_STATE,show:e}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(132);Object.defineProperty(t,"Loading",{enumerable:!0,get:function(){return r.Loading}})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.IconType=t.Icon=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=n(0),c={Maximize:"maximize",Minimize:"minimize",Play:"play",Pause:"pause",VolumeBase:"volume-base",VolumeWaves:"volume-waves",VolumeWave:"volume-wave",VolumeMute:"volume-mute",Close:"close",Share:"share",Settings:"settings",Check:"check",Language:"language",Quality:"quality",Captions:"captions",Speed:"speed",SpeedDown:"speed-down",SpeedUp:"speed-up",Audio:"audio",Copy:"copy",Facebook:"facebook",Twitter:"twitter",GooglePlus:"google-plus",Linkedin:"linkedin",Email:"email",Embed:"embed",Link:"link",ArrowDown:"arrow-down",StartOver:"start-over",SeekEnd:"seek-end",Rewind:"rewind",Rewind10:"rewind10",Forward:"forward",Forward10:"forward10",vrStereo:"vr-stereo",vrStereoFull:"vr-stereo-full",Cast:"cast",CastBrand:"cast-brand",Next:"next",Prev:"prev",PictureInPicture:"picture-in-picture"},p=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),o(t,[{key:"render",value:function(e){switch(e.type){case c.Maximize:return(0,u.h)("i",{className:[l.default.icon,l.default.iconMaximize].join(" ")});case c.Minimize:return(0,u.h)("i",{className:[l.default.icon,l.default.iconMinimize].join(" ")});case c.Play:return(0,u.h)("i",{className:[l.default.icon,l.default.iconPlay].join(" ")});case c.Pause:return(0,u.h)("i",{className:[l.default.icon,l.default.iconPause].join(" ")});case c.VolumeBase:return(0,u.h)("i",{className:[l.default.icon,l.default.iconVolumeBase].join(" ")});case c.VolumeWaves:return(0,u.h)("i",{className:[l.default.icon,l.default.iconVolumeWaves].join(" ")});case c.VolumeWave:return(0,u.h)("i",{className:[l.default.icon,l.default.iconVolumeWave].join(" ")});case c.VolumeMute:return(0,u.h)("i",{className:[l.default.icon,l.default.iconVolumeMute].join(" ")});case c.Close:return(0,u.h)("i",{className:[l.default.icon,l.default.iconClose].join(" ")});case c.Share:return(0,u.h)("i",{className:[l.default.icon,l.default.iconShare].join(" ")});case c.Settings:return(0,u.h)("i",{className:[l.default.icon,l.default.iconSettings].join(" ")});case c.Check:return(0,u.h)("i",{className:[l.default.icon,l.default.iconCheck].join(" ")});case c.Language:return(0,u.h)("i",{className:[l.default.icon,l.default.iconLanguage].join(" ")});case c.Quality:return(0,u.h)("i",{className:[l.default.icon,l.default.iconQuality].join(" ")});case c.Captions:return(0,u.h)("i",{className:[l.default.icon,l.default.iconCaptions].join(" ")});case c.Speed:return(0,u.h)("i",{className:[l.default.icon,l.default.iconSpeed].join(" ")});case c.SpeedDown:return(0,u.h)("i",{className:[l.default.icon,l.default.iconSpeedDown].join(" ")});case c.SpeedUp:return(0,u.h)("i",{className:[l.default.icon,l.default.iconSpeedUp].join(" ")});case c.Audio:return(0,u.h)("i",{className:[l.default.icon,l.default.iconAudio].join(" ")});case c.Copy:return(0,u.h)("i",{className:[l.default.icon,l.default.iconCopy].join(" ")});case c.Facebook:return(0,u.h)("i",{className:[l.default.icon,l.default.iconFacebook].join(" ")});case c.Twitter:return(0,u.h)("i",{className:[l.default.icon,l.default.iconTwitter].join(" ")});case c.GooglePlus:return(0,u.h)("i",{className:[l.default.icon,l.default.iconGooglePlus].join(" ")});case c.Linkedin:return(0,u.h)("i",{className:[l.default.icon,l.default.iconLinkedin].join(" ")});case c.Email:return(0,u.h)("i",{className:[l.default.icon,l.default.iconEmail].join(" ")});case c.Embed:return(0,u.h)("i",{className:[l.default.icon,l.default.iconEmbed].join(" ")});case c.Link:return(0,u.h)("i",{className:[l.default.icon,l.default.iconLink].join(" ")});case c.ArrowDown:return(0,u.h)("i",{className:[l.default.icon,l.default.iconArrowDown].join(" ")});case c.StartOver:return(0,u.h)("i",{className:[l.default.icon,l.default.iconStartOver].join(" ")});case c.SeekEnd:return(0,u.h)("i",{className:[l.default.icon,l.default.iconSeekEnd].join(" ")});case c.Rewind:return(0,u.h)("i",{className:[l.default.icon,l.default.iconRewind].join(" ")});case c.Rewind10:return(0,u.h)("i",{className:[l.default.icon,l.default.iconRewind10].join(" ")});case c.Forward:return(0,u.h)("i",{className:[l.default.icon,l.default.iconForward].join(" ")});case c.Forward10:return(0,u.h)("i",{className:[l.default.icon,l.default.iconForward10].join(" ")});case c.vrStereo:return(0,u.h)("i",{className:[l.default.icon,l.default.iconVrStereo].join(" ")});case c.vrStereoFull:return(0,u.h)("i",{className:[l.default.icon,l.default.iconVrStereoFull].join(" ")});case c.Cast:return(0,u.h)("i",{className:[l.default.icon,l.default.iconChromecast].join(" ")});case c.CastBrand:return(0,u.h)("i",{className:[l.default.icon,l.default.iconChromecastBrand].join(" ")});case c.Next:return(0,u.h)("i",{className:[l.default.icon,l.default.iconNext].join(" ")});case c.Prev:return(0,u.h)("i",{className:[l.default.icon,l.default.iconPrev].join(" ")});case c.PictureInPicture:return(0,u.h)("i",{className:[l.default.icon,l.default.iconPictureInPicture].join(" ")})}}}]),t}(u.Component);t.default=p,t.Icon=p,t.IconType=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(143);Object.defineProperty(t,"Overlay",{enumerable:!0,get:function(){return r.Overlay}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=t.types={UPDATE_SEEKBAR_DRAGGING_STATUS:"seekbar/UPDATE_SEEKBAR_DRAGGING_STATUS",UPDATE_SEEKBAR_HOVER_ACTIVE:"seekbar/UPDATE_SEEKBAR_HOVER_ACTIVE",UPDATE_CURRENT_TIME:"seekbar/UPDATE_CURRENT_TIME",UPDATE_DURATION:"seekbar/UPDATE_DURATION"},a=t.initialState={currentTime:0,duration:0,draggingActive:!1,hoverActive:!1};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,t=arguments[1];switch(t.type){case i.UPDATE_SEEKBAR_DRAGGING_STATUS:return r({},e,{draggingActive:t.draggingActive});case i.UPDATE_SEEKBAR_HOVER_ACTIVE:return r({},e,{hoverActive:t.hoverActive});case i.UPDATE_CURRENT_TIME:return r({},e,{currentTime:t.currentTime});case i.UPDATE_DURATION:return r({},e,{duration:t.duration});default:return e}},t.actions={updateSeekbarDraggingStatus:function(e){return{type:i.UPDATE_SEEKBAR_DRAGGING_STATUS,draggingActive:e}},updateSeekbarHoverActive:function(e){return{type:i.UPDATE_SEEKBAR_HOVER_ACTIVE,hoverActive:e}},updateDuration:function(e){return{type:i.UPDATE_DURATION,duration:e}},updateCurrentTime:function(e){return{type:i.UPDATE_CURRENT_TIME,currentTime:e}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.actions=t.initialState=t.types=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(12),a=n(32),o=t.types={TOGGLE_SHARE_OVERLAY:"share/TOGGLE_SHARE_OVERLAY"},s=t.initialState={overlayOpen:!1};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments[1];switch(t.type){case i.types.UPDATE:return(0,a.getComponentStateFromConfig)("share",e,t);case i.types.UPDATE_COMPONENT:return(0,a.getComponentStateFromComponentConfig)("share",e,t);case o.TOGGLE_SHARE_OVERLAY:return r({},e,{overlayOpen:t.show});default:return e}},t.actions={toggleShareOverlay:function(e){return{type:o.TOGGLE_SHARE_OVERLAY,show:e}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=t.types={TOGGLE_CVAA_OVERLAY:"cvaa/TOGGLE_CVAA_OVERLAY",UPDATE_CAPTIONS_STYLE:"cvaa/UPDATE_CAPTIONS_STYLE"},a=t.initialState={overlayOpen:!1,style:"default"};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,t=arguments[1];switch(t.type){case i.TOGGLE_CVAA_OVERLAY:return r({},e,{overlayOpen:t.show});case i.UPDATE_CAPTIONS_STYLE:return r({},e,{style:t.style});default:return e}},t.actions={toggleCVAAOverlay:function(e){return{type:i.TOGGLE_CVAA_OVERLAY,show:e}},updateCaptionsStyle:function(e){return{type:i.UPDATE_CAPTIONS_STYLE,style:e}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=t.types={UPDATE_ACTION_ICON:"overlay-action/UPDATE_ACTION_ICON"},a=t.initialState={iconType:null};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,t=arguments[1];switch(t.type){case i.UPDATE_ACTION_ICON:return r({},e,{iconType:t.iconType});default:return e}},t.actions={updateOverlayActionIcon:function(e){return{type:i.UPDATE_ACTION_ICON,iconType:e}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(140);Object.defineProperty(t,"VolumeControl",{enumerable:!0,get:function(){return r.VolumeControl}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(150);Object.defineProperty(t,"FullscreenControl",{enumerable:!0,get:function(){return r.FullscreenControl}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(154);Object.defineProperty(t,"BottomBar",{enumerable:!0,get:function(){return r.BottomBar}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(41);Object.defineProperty(t,"KeyboardControl",{enumerable:!0,get:function(){return r.KeyboardControl}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(156);Object.defineProperty(t,"UnmuteIndication",{enumerable:!0,get:function(){return r.UnmuteIndication}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(158);Object.defineProperty(t,"PlaybackControls",{enumerable:!0,get:function(){return r.PlaybackControls}})},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){return e&&"object"===(void 0===e?"undefined":s(e))&&!Array.isArray(e)}function o(e){for(var t=arguments.length,n=Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];if(!n.length)return e;var l=n.shift();if(a(e)&&a(l))for(var u in l)a(l[u])?(e[u]||Object.assign(e,i({},u,{})),o(e[u],l[u])):Object.assign(e,i({},u,l[u]));return o.apply(void 0,[e].concat(r(n)))}Object.defineProperty(t,"__esModule",{value:!0});var s="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};t.mergeDeep=o,t.isObject=a},function(e,t,n){"use strict";function r(e){l.setHandler(function(t,n){return e(t,n)})}function i(e){return e?l.get(e):l}function a(e){return i(e).getLevel()}function o(e,t){i(t).setLevel(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.setLogHandler=t.setLogLevel=t.getLogLevel=t.LogLevel=void 0;var s=n(109),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),u={DEBUG:l.DEBUG,INFO:l.INFO,TIME:l.TIME,WARN:l.WARN,ERROR:l.ERROR,OFF:l.OFF};l.useDefaults({defaultLevel:l.ERROR}),t.default=i,t.LogLevel=u,t.getLogLevel=a,t.setLogLevel=o,t.setLogHandler=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={UI_CLICKED:"playkit-ui-uiclicked",UI_VISIBILITY_CHANGED:"playkit-ui-uivisibilitychanged",USER_CLICKED_PLAY:"playkit-ui-userclickedplay",USER_CLICKED_PAUSE:"playkit-ui-userclickedpause",USER_CLICKED_REWIND:"playkit-ui-userclickedrewind",USER_CLICKED_FORWARD:"playkit-ui-userclickedforward",USER_CLICKED_LIVE_TAG:"playkit-ui-userclickedlivetag",USER_CLICKED_MUTE:"playkit-ui-userclickedmute",USER_CLICKED_UNMUTE:"playkit-ui-userclickedunmute",USER_CHANGED_VOLUME:"playkit-ui-userchangedvolume",USER_SELECTED_CAPTION_TRACK:"playkit-ui-userselectedcaptiontrack",USER_SELECTED_AUDIO_TRACK:"playkit-ui-userselectedaudiotrack",USER_SELECTED_QUALITY_TRACK:"playkit-ui-userselectedqualitytrack",USER_ENTERED_FULL_SCREEN:"playkit-ui-userenteredfullscreen",USER_EXITED_FULL_SCREEN:"playkit-ui-userexitedfullscreen",USER_ENTERED_PICTURE_IN_PICTURE:"playkit-ui-userenteredpictureinpicture",USER_EXITED_PICTURE_IN_PICTURE:"playkit-ui-userexitedpictureinpicture",USER_SELECTED_CAPTIONS_STYLE:"playkit-ui-userselectedcaptionsstyle",USER_SELECTED_SPEED:"playkit-ui-userselectedspeed",USER_SEEKED:"playkit-ui-userseeked"};t.EventType=r},function(e,t,n){"use strict";function r(e,t,n){var r=n.config.components&&n.config.components[e];return r?(0,a.mergeDeep)(t,r):t}function i(e,t,n){return n.componentAlias===e?(0,a.mergeDeep)(t,n.config):t}Object.defineProperty(t,"__esModule",{value:!0}),t.getComponentStateFromComponentConfig=t.getComponentStateFromConfig=void 0;var a=n(29);t.getComponentStateFromConfig=r,t.getComponentStateFromComponentConfig=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=t.types={UPDATE_VOLUME_DRAGGING_STATUS:"volume/UPDATE_VOLUME_DRAGGING_STATUS",UPDATE_HOVER:"volume/UPDATE_HOVER"},a=t.initialState={draggingActive:!1,hover:!1};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,t=arguments[1];switch(t.type){case i.UPDATE_VOLUME_DRAGGING_STATUS:return r({},e,{draggingActive:t.draggingActive});case i.UPDATE_HOVER:return r({},e,{hover:t.hover});default:return e}},t.actions={updateVolumeDraggingStatus:function(e){return{type:i.UPDATE_VOLUME_DRAGGING_STATUS,draggingActive:e}},updateVolumeHover:function(e){return{type:i.UPDATE_HOVER,hover:e}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=t.types={UPDATE_QUALITY:"settings/UPDATE_QUALITY",UPDATE_SPEED:"settings/UPDATE_SPEED"},a=t.initialState={quality:1,speed:2};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,t=arguments[1];switch(t.type){case i.UPDATE_QUALITY:return r({},e,{quality:t.quality});case i.UPDATE_SPEED:return r({},e,{speed:t.speed});default:return e}},t.actions={updateQuality:function(e){return{type:i.UPDATE_QUALITY,quality:e}},updateSpeed:function(e){return{type:i.UPDATE_SPEED,speed:e}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=t.types={UPDATE_BACKDROP_VISIBILITY:"backdrop/UPDATE_BACKDROP_VISIBILITY"},a=t.initialState={show:!1};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,t=arguments[1];switch(t.type){case i.UPDATE_BACKDROP_VISIBILITY:return r({},e,{show:t.show});default:return e}},t.actions={updateBackdropVisibility:function(e){return{type:i.UPDATE_BACKDROP_VISIBILITY,show:e}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(134);Object.defineProperty(t,"OverlayAction",{enumerable:!0,get:function(){return r.OverlayAction}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPlayingAdOrPlayback=function(e){return e.adBreak&&e.adIsPlaying||!e.adBreak&&e.isPlaying}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(135);Object.defineProperty(t,"PrePlaybackPlayOverlay",{enumerable:!0,get:function(){return r.PrePlaybackPlayOverlay}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(139);Object.defineProperty(t,"SeekBarControl",{enumerable:!0,get:function(){return r.SeekBarControl}})},function(e,t,n){"use strict";function r(e){var t=parseInt(e,10),n=Math.floor(t/3600),r=Math.floor((t-3600*n)/60),i=t-3600*n-60*r;return n<10&&(n="0"+n),r<10&&(r="0"+r),i<10&&(i="0"+i),("00"!==n?n+":":"")+r+":"+i}function i(e){var t=e.split(":"),n=0;if(2===t.length){if(parseInt(t[0])>59||parseInt(t[1])>59)return 0;n+=60*parseInt(t[0]),n+=parseInt(t[1])}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.toHHMMSS=r,t.toSecondsFromHHMMSS=i},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardControl=t.KEYBOARD_DEFAULT_VOLUME_JUMP=t.KEYBOARD_DEFAULT_SEEK_JUMP=void 0;var s,l,u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(3),f=function(e){return e&&e.__esModule?e:{default:e}}(p),d=n(2),h=n(8),y=n(21),v=n(7),g=n(6),m=n(5),b=n(10),_=n(37),E=function(e){return{isPlayingAdOrPlayback:(0,_.isPlayingAdOrPlayback)(e.engine),playerNav:e.shell.playerNav,textTracks:e.engine.textTracks,shareOverlay:e.share.overlayOpen}},k=t.KEYBOARD_DEFAULT_SEEK_JUMP=5,T=t.KEYBOARD_DEFAULT_VOLUME_JUMP=5,A=(s=(0,d.connect)(E,(0,v.bindActions)(Object.assign({},h.actions,y.actions))))(l=function(e){function t(e){var n;i(this,t);var o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"Keyboard",player:e.player,config:e.config}));o._lastActiveTextLanguage="",o._hoverTimeout=null,o.keyboardHandlers=(n={},r(n,g.KeyMap.SPACE,function(){return o.props.isPlayingAdOrPlayback?(o.player.pause(),o.props.updateOverlayActionIcon(m.IconType.Pause)):(o.player.play(),o.props.updateOverlayActionIcon(m.IconType.Play)),o.toggleHoverState(),!0}),r(n,g.KeyMap.UP,function(){var e=(Math.round(100*o.player.volume)+T)/100;return e=e>1?1:e,o.logger.debug("Changing volume. "+o.player.volume+" => "+e),o.player.muted&&(o.player.muted=!1),o.player.volume=e,o.props.updateOverlayActionIcon([m.IconType.VolumeBase,m.IconType.VolumeWaves]),{volume:o.player.volume}}),r(n,g.KeyMap.DOWN,function(){var e=(Math.round(100*o.player.volume)-T)/100;return e=e<0?0:e,o.logger.debug("Changing volume. "+o.player.volume+" => "+e),o.player.volume=e,0===e?(o.player.muted=!0,o.props.updateOverlayActionIcon([m.IconType.VolumeBase,m.IconType.VolumeMute])):o.props.updateOverlayActionIcon([m.IconType.VolumeBase,m.IconType.VolumeWave]),{volume:o.player.volume}}),r(n,g.KeyMap.F,function(){if(!o.player.isFullscreen())return o.logger.debug("Enter fullscreen"),o.player.enterFullscreen(),!0}),r(n,g.KeyMap.P,function(){return o.player.isInPictureInPicture()?(o.logger.debug("Exit Picture In Picture"),o.player.exitPictureInPicture()):(o.logger.debug("Enter Picture In Picture"),o.player.enterPictureInPicture()),o.toggleHoverState(),!0}),r(n,g.KeyMap.ESC,function(){if(o.player.isFullscreen())return o.logger.debug("Exit fullscreen"),o.player.exitFullscreen(),!0}),r(n,g.KeyMap.LEFT,function(){if(!o.player.ads||!o.player.ads.isAdBreak()){var e=o.player.currentTime-k,t=o.player.currentTime,n=e>0?e:0;return o.logger.debug("Seek. "+t+" => "+n),o.player.currentTime=n,o.props.updateOverlayActionIcon(m.IconType.Rewind),o.toggleHoverState(),{from:t,to:n}}}),r(n,g.KeyMap.RIGHT,function(){if(!o.player.ads||!o.player.ads.isAdBreak()){var e=o.player.currentTime+k,t=o.player.currentTime,n=e>o.player.duration?o.player.duration:e;return o.logger.debug("Seek. "+t+" => "+n),o.player.currentTime=e>o.player.duration?o.player.duration:e,o.props.updateOverlayActionIcon(m.IconType.Forward),o.toggleHoverState(),{from:t,to:n}}}),r(n,g.KeyMap.HOME,function(){if(!o.player.ads||!o.player.ads.isAdBreak()){var e=o.player.currentTime;return o.logger.debug("Seek. "+e+" => 0"),o.player.currentTime=0,o.props.updateOverlayActionIcon(m.IconType.StartOver),o.toggleHoverState(),{from:e,to:0}}}),r(n,g.KeyMap.END,function(){if(!o.player.ads||!o.player.ads.isAdBreak()){var e=o.player.currentTime,t=o.player.duration;return o.logger.debug("Seek. "+e+" => "+t),o.player.currentTime=t,o.props.updateOverlayActionIcon(m.IconType.SeekEnd),o.toggleHoverState(),{from:e,to:t}}}),r(n,g.KeyMap.M,function(){return o.logger.debug(o.player.muted?"Umnute":"Mute"),o.player.muted=!o.player.muted,o.player.muted?o.props.updateOverlayActionIcon([m.IconType.VolumeBase,m.IconType.VolumeMute]):o.props.updateOverlayActionIcon([m.IconType.VolumeBase,m.IconType.VolumeWaves]),!0}),r(n,g.KeyMap.SEMI_COLON,function(e){if(e&&o.player.playbackRate!==o.player.defaultPlaybackRate)return o.logger.debug("Changing playback rate. "+o.player.playbackRate+" => "+o.player.defaultPlaybackRate),o.player.playbackRate=o.player.defaultPlaybackRate,o.props.updateOverlayActionIcon(m.IconType.Speed),{speed:o.player.defaultPlaybackRate}}),r(n,g.KeyMap.PERIOD,function(e){if(e){var t=o.player.playbackRate,n=o.player.playbackRates.indexOf(t);if(n<o.player.playbackRates.length-1)return o.logger.debug("Changing playback rate. "+t+" => "+o.player.playbackRates[n+1]),o.player.playbackRate=o.player.playbackRates[n+1],o.props.updateOverlayActionIcon(m.IconType.SpeedUp),{speed:o.player.playbackRates[n+1]}}}),r(n,g.KeyMap.COMMA,function(e){if(e){var t=o.player.playbackRate,n=o.player.playbackRates.indexOf(t);if(n>0)return o.logger.debug("Changing playback rate. "+t+" => "+o.player.playbackRates[n-1]),o.player.playbackRate=o.player.playbackRates[n-1],o.props.updateOverlayActionIcon(m.IconType.SpeedDown),{speed:o.player.playbackRates[n-1]}}}),r(n,g.KeyMap.C,function(){var e=o.player.getActiveTracks().text;if("off"===e.language&&o._lastActiveTextLanguage){o.logger.debug("Changing text track to language",o._lastActiveTextLanguage);var t=o.player.getTracks("text").find(function(e){return e.language===o._lastActiveTextLanguage});return o.player.selectTrack(t),{track:t}}"off"===e.language||o._lastActiveTextLanguage||(o.logger.debug("Hiding text track"),o._lastActiveTextLanguage=e.language,o.player.hideTextTrack())}),n);var s=document.getElementById(o.config.targetId);return s?(s.onkeydown=function(e){if(!o.props.shareOverlay&&!o.props.playerNav&&"function"==typeof o.keyboardHandlers[e.keyCode]){e.preventDefault(),o.logger.debug("KeyDown -> keyName: "+(0,g.getKeyName)(e.keyCode)+", shiftKey: "+e.shiftKey.toString());var t=o.keyboardHandlers[e.keyCode](e.shiftKey);t&&o.notifyClick(u({key:e.keyCode},t))}},o):a(o)}return o(t,e),c(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.props.textTracks.find(function(e){return e.active}),n=e.textTracks.find(function(e){return e.active});t&&"off"!==t.language&&n&&"off"===n.language?this._lastActiveTextLanguage=t.language:n&&"off"!==n.language&&(this._lastActiveTextLanguage="")}},{key:"toggleHoverState",value:function(){var e=this;null!==this._hoverTimeout&&(clearTimeout(this._hoverTimeout),this._hoverTimeout=null),this.props.updatePlayerHoverState(!0),this._hoverTimeout=setTimeout(function(){e.props.updatePlayerHoverState(!1)},b.CONTROL_BAR_HOVER_DEFAULT_TIMEOUT)}}]),t}(f.default))||l;t.KeyboardControl=A},function(e,t,n){"use strict";function r(e,t){return function(){t.apply(e,arguments)}}Object.defineProperty(t,"__esModule",{value:!0}),t.bindMethod=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(141);Object.defineProperty(t,"SettingsControl",{enumerable:!0,get:function(){return r.SettingsControl}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(142);Object.defineProperty(t,"SmartContainer",{enumerable:!0,get:function(){return r.SmartContainer}})},function(e,t,n){!function(t,r){e.exports=function(e){"use strict";var t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},i=function(i){function o(){return t(this,o),r(this,i.apply(this,arguments))}return n(o,i),o.prototype.componentDidUpdate=function(e){for(var t in e)if(e[t]!==this.props[t])return this.renderLayer()},o.prototype.componentDidMount=function(){this.renderLayer()},o.prototype.componentWillUnmount=function(){this.renderLayer(!1),this.remote&&this.remote.parentNode.removeChild(this.remote)},o.prototype.findNode=function(e){return"string"==typeof e?document.querySelector(e):e},o.prototype.renderLayer=function(){var t=arguments.length<=0||void 0===arguments[0]||arguments[0];this.props.into!==this.intoPointer&&(this.intoPointer=this.props.into,this.into&&this.remote&&(this.remote=e.render(e.h(a,null),this.into,this.remote)),this.into=this.findNode(this.props.into)),this.remote=e.render(e.h(a,{context:this.context},t&&this.props.children||null),this.into,this.remote)},o.prototype.render=function(){return null},o}(e.Component),a=function(e){function i(){return t(this,i),r(this,e.apply(this,arguments))}return n(i,e),i.prototype.getChildContext=function(){return this.props.context},i.prototype.render=function(e){var t=e.children;return t&&t[0]||null},i}(e.Component);return i}(n(0))}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(144);Object.defineProperty(t,"DropDown",{enumerable:!0,get:function(){return r.DropDown}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(146);Object.defineProperty(t,"LanguageControl",{enumerable:!0,get:function(){return r.LanguageControl}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(151);Object.defineProperty(t,"VrStereoToggleControl",{enumerable:!0,get:function(){return r.VrStereoToggleControl}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(153);Object.defineProperty(t,"TimeDisplay",{enumerable:!0,get:function(){return r.TimeDisplay}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(155);Object.defineProperty(t,"OverlayPortal",{enumerable:!0,get:function(){return r.OverlayPortal}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Watermark=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(3),h=r(d),y=n(2),v=function(e){return{config:Object.assign({placement:"top-left",timeout:0},e.config.components.watermark)}},g=(s=(0,y.connect)(v))(l=function(e){function t(e){i(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"Watermark",player:e.player}));return n.setState({show:!0}),n}return o(t,e),u(t,null,[{key:"shouldRender",value:function(e){var t=e.config.components[this.displayName];return!(0===Object.keys(t).length&&t.constructor===Object)}}]),u(t,[{key:"componentDidMount",value:function(){var e=this,t=function(){e.props.config.timeout>0&&setTimeout(function(){return e.setState({show:!1})},e.props.config.timeout)};this.eventManager.listenOnce(this.player,this.player.Event.PLAYING,t),this.eventManager.listen(this.player,this.player.Event.CHANGE_SOURCE_ENDED,function(){e.setState({show:!0}),e.eventManager.listenOnce(e.player,e.player.Event.PLAYING,t)})}},{key:"render",value:function(e){if(e.config.img){var t=[p.default.watermark];return e.config.placement.split("-").forEach(function(e){t.push(p.default[e])}),this.state.show||t.push(p.default.hideWatermark),(0,f.h)("div",{className:t.join(" ")},(0,f.h)("a",{href:e.config.url,target:"_blank",rel:"noopener noreferrer"},(0,f.h)("img",{src:e.config.img})))}}}]),t}(h.default))||l;g.displayName="watermark",t.Watermark=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(157);Object.defineProperty(t,"CastControl",{enumerable:!0,get:function(){return r.CastControl}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.CastBeforePlay=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(3),h=r(d),y=n(2),v=n(5),g=n(35),m=n(16),b=n(4),_=function(e){return{isPlaybackEnded:e.engine.isPlaybackEnded,prePlayback:e.engine.prePlayback,loading:e.loading.show,isCastAvailable:e.engine.isCastAvailable}},E=(s=(0,y.connect)(_,g.actions))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"CastBeforePlay",player:e.player}))}return o(t,e),u(t,[{key:"onClick",value:function(){var e=this;this.props.updateBackdropVisibility(!0),this.player.startCasting().catch(function(){return e.props.updateBackdropVisibility(!1)})}},{key:"componentDidMount",value:function(){var e=this;setTimeout(function(){e.setState({show:!0})},700)}},{key:"render",value:function(e){var t=this;if(e.isCastAvailable&&!e.loading&&e.prePlayback){var n=[p.default.castOnTvButtonContainer];return this.state.show&&n.push(p.default.showCastOnTv),(0,f.h)("div",null,(0,f.h)("div",{className:n.join(" "),onClick:function(){return t.onClick()}},(0,f.h)("a",{className:[p.default.btn,p.default.btnDarkTransparent,p.default.castOnTvButton].join(" ")},(0,f.h)("div",{className:p.default.castOnTvIconContainer},(0,f.h)(m.Icon,{type:e.icon})),(0,f.h)(b.Localizer,null,(0,f.h)("span",null,(0,f.h)(b.Text,{id:"cast.play_on_tv"}))))))}}}]),t}(h.default))||l;E.defaultProps={icon:v.IconType.Cast},t.CastBeforePlay=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(164);Object.defineProperty(t,"PictureInPicture",{enumerable:!0,get:function(){return r.PictureInPicture}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(166);Object.defineProperty(t,"ShareControl",{enumerable:!0,get:function(){return r.ShareControl}})},function(e,t,n){"use strict";function r(e,t,n){function a(){g===v&&(g=v.slice())}function l(){return y}function u(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return a(),g.push(e),function(){if(t){t=!1,a();var n=g.indexOf(e);g.splice(n,1)}}}function c(e){if(!Object(i.a)(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(m)throw new Error("Reducers may not dispatch actions.");try{m=!0,y=h(y,e)}finally{m=!1}for(var t=v=g,n=0;n<t.length;n++)(0,t[n])();return e}function p(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");h=e,c({type:s.INIT})}function f(){var e,t=u;return e={subscribe:function(e){function n(){e.next&&e.next(l())}if("object"!=typeof e)throw new TypeError("Expected the observer to be an object.");return n(),{unsubscribe:t(n)}}},e[o.a]=function(){return this},e}var d;if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(r)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var h=e,y=t,v=[],g=v,m=!1;return c({type:s.INIT}),d={dispatch:c,subscribe:u,getState:l,replaceReducer:p},d[o.a]=f,d}n.d(t,"a",function(){return s}),t.b=r;var i=n(57),a=n(100),o=n.n(a),s={INIT:"@@redux/INIT"}},function(e,t,n){"use strict";function r(e){if(!Object(o.a)(e)||Object(i.a)(e)!=s)return!1;var t=Object(a.a)(e);if(null===t)return!0;var n=p.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==f}var i=n(92),a=n(97),o=n(99),s="[object Object]",l=Function.prototype,u=Object.prototype,c=l.toString,p=u.hasOwnProperty,f=c.call(Object);t.a=r},function(e,t,n){"use strict";var r=n(93),i=r.a.Symbol;t.a=i},function(e,t,n){"use strict"},function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}t.a=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(112);Object.defineProperty(t,"EngineConnector",{enumerable:!0,get:function(){return r.EngineConnector}})},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t,n){var r=e.getState().engine,i=e.getState().shell;!r.adBreak&&r.isPlaying&&i.playerHover!==t.hover&&n.dispatchEvent(new T.UIVisibilityChangedEvent(t.hover))}function a(e,t,n){switch(t.name){case"Volume":n.dispatchEvent(new S.VolumeChangedEvent(t.payload.volume));break;case"SeekBarPlaybackContainer":n.dispatchEvent(new E.SeekedEvent(t.payload.from,t.payload.to))}}function o(e,t,n){switch(t.name){case"Keyboard":x[t.payload.key](e,t,n);break;case"OverlayAction":d(e,t,n);break;case"Settings":f(e,t,n);break;case"CVAAOverlay":n.dispatchEvent(new b.CaptionsStyleSelectedEvent(t.payload.textStyle));break;case"Fullscreen":c(e,t,n);break;case"LanguageControl":u(e,t,n);break;case"Shell":n.dispatchEvent(new y.FakeEvent(y.FakeEvent.Type.UI_CLICKED));break;case"Rewind":n.dispatchEvent(new A.RewindClickedEvent(t.payload.from,t.payload.to));break;case"Forward":n.dispatchEvent(new w.ForwardClickedEvent(t.payload.from,t.payload.to));break;case"LiveTag":n.dispatchEvent(new y.FakeEvent(y.FakeEvent.Type.USER_CLICKED_LIVE_TAG));break;case"PrePlaybackPlayOverlay":case"PlayPause":s(e,t,n);break;case"Volume":l(e,t,n)}}function s(e,t,n){var r=e.getState().engine;r.adBreak?r.adIsPlaying?n.dispatchEvent(new y.FakeEvent(y.FakeEvent.Type.USER_CLICKED_PAUSE)):n.dispatchEvent(new y.FakeEvent(y.FakeEvent.Type.USER_CLICKED_PLAY)):r.isPlaying?n.dispatchEvent(new y.FakeEvent(y.FakeEvent.Type.USER_CLICKED_PAUSE)):n.dispatchEvent(new y.FakeEvent(y.FakeEvent.Type.USER_CLICKED_PLAY))}function l(e,t,n){e.getState().engine.muted?n.dispatchEvent(new y.FakeEvent(y.FakeEvent.Type.USER_CLICKED_MUTE)):n.dispatchEvent(new y.FakeEvent(y.FakeEvent.Type.USER_CLICKED_UNMUTE))}function u(e,t,n){t.payload.type===n.Track.AUDIO?n.dispatchEvent(new g.AudioSelectedEvent(t.payload.track)):t.payload.type===n.Track.TEXT&&n.dispatchEvent(new m.CaptionSelectedEvent(t.payload.track))}function c(e,t,n){n.isFullscreen()?n.dispatchEvent(new y.FakeEvent(y.FakeEvent.Type.USER_EXITED_FULL_SCREEN)):n.dispatchEvent(new y.FakeEvent(y.FakeEvent.Type.USER_ENTERED_FULL_SCREEN))}function p(e,t,n){n.isInPictureInPicture()?n.dispatchEvent(new y.FakeEvent(y.FakeEvent.Type.USER_EXITED_PICTURE_IN_PICTURE)):n.dispatchEvent(new y.FakeEvent(y.FakeEvent.Type.USER_ENTERED_PICTURE_IN_PICTURE))}function f(e,t,n){t.payload.type===n.Track.VIDEO?n.dispatchEvent(new _.QualitySelectedEvent(t.payload.track)):n.dispatchEvent(new k.SpeedSelectedEvent(t.payload.speed))}function d(e,t,n){"PlayPause"===t.payload.type?s(e,t,n):"Fullscreen"===t.payload.type&&c(e,t,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.eventDispatcherMiddleware=t.types=void 0;var h,y=n(9),v=n(8),g=n(113),m=n(114),b=n(115),_=n(116),E=n(117),k=n(118),T=n(119),A=n(120),w=n(121),S=n(122),P=n(6),O={COMPONENT_CLICKED:"event-dispatcher-middleware/COMPONENT_CLICKED",COMPONENT_CHANGED:"event-dispatcher-middleware/COMPONENT_CHANGED"},C=function(e){return function(t){return function(n){return function(r){switch(r.type){case O.COMPONENT_CLICKED:o(t,r,e);break;case O.COMPONENT_CHANGED:a(t,r,e);break;case v.types.UPDATE_PLAYER_HOVER_STATE:i(t,r,e)}n(r)}}}},x=(h={},r(h,P.KeyMap.SPACE,function(e,t,n){s(e,t,n)}),r(h,P.KeyMap.UP,function(e,t,n){n.dispatchEvent(new S.VolumeChangedEvent(t.payload.volume))}),r(h,P.KeyMap.DOWN,function(e,t,n){n.dispatchEvent(new S.VolumeChangedEvent(t.payload.volume))}),r(h,P.KeyMap.F,function(e,t,n){c(e,t,n)}),r(h,P.KeyMap.P,function(e,t,n){p(e,t,n)}),r(h,P.KeyMap.ESC,function(e,t,n){c(e,t,n)}),r(h,P.KeyMap.LEFT,function(e,t,n){n.dispatchEvent(new E.SeekedEvent(t.payload.from,t.payload.to))}),r(h,P.KeyMap.RIGHT,function(e,t,n){n.dispatchEvent(new E.SeekedEvent(t.payload.from,t.payload.to))}),r(h,P.KeyMap.HOME,function(e,t,n){n.dispatchEvent(new E.SeekedEvent(t.payload.from,t.payload.to))}),r(h,P.KeyMap.END,function(e,t,n){n.dispatchEvent(new E.SeekedEvent(t.payload.from,t.payload.to))}),r(h,P.KeyMap.M,function(e,t,n){l(e,t,n)}),r(h,P.KeyMap.SEMI_COLON,function(e,t,n){n.dispatchEvent(new k.SpeedSelectedEvent(t.payload.speed))}),r(h,P.KeyMap.PERIOD,function(e,t,n){n.dispatchEvent(new k.SpeedSelectedEvent(t.payload.speed))}),r(h,P.KeyMap.COMMA,function(e,t,n){n.dispatchEvent(new k.SpeedSelectedEvent(t.payload.speed))}),r(h,P.KeyMap.C,function(e,t,n){n.dispatchEvent(new m.CaptionSelectedEvent(t.payload.track))}),h);t.types=O,t.eventDispatcherMiddleware=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10);Object.defineProperty(t,"Shell",{enumerable:!0,get:function(){return r.Shell}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(129);Object.defineProperty(t,"VideoPlayer",{enumerable:!0,get:function(){return r.VideoPlayer}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(131);Object.defineProperty(t,"idleUI",{enumerable:!0,get:function(){return r.idleUI}});var i=n(133);Object.defineProperty(t,"playbackUI",{enumerable:!0,get:function(){return i.playbackUI}});var a=n(169);Object.defineProperty(t,"adsUI",{enumerable:!0,get:function(){return a.adsUI}});var o=n(174);Object.defineProperty(t,"errorUI",{enumerable:!0,get:function(){return o.errorUI}});var s=n(177);Object.defineProperty(t,"liveUI",{enumerable:!0,get:function(){return s.liveUI}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(136);Object.defineProperty(t,"RewindControl",{enumerable:!0,get:function(){return r.RewindControl}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(137);Object.defineProperty(t,"Forward",{enumerable:!0,get:function(){return r.Forward}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(138);Object.defineProperty(t,"SeekBarPlaybackContainer",{enumerable:!0,get:function(){return r.SeekBarPlaybackContainer}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.SmartContainerItem=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(0),p=n(46),f=n(5),d=r(f),h=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"render",value:function(e){var t=e.label&&e.label.toLowerCase();return(0,c.h)("div",{className:[u.default.smartContainerItem,u.default.selectMenuItem].join(" ")},(0,c.h)("label",{htmlFor:t},e.icon?(0,c.h)("div",{className:u.default.labelIcon},(0,c.h)(d.default,{type:e.icon})):void 0,e.label),(0,c.h)(p.DropDown,{name:t,onSelect:function(t){return e.onSelect(t)},options:e.options}))}}]),t}(c.Component);t.SmartContainerItem=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(145);Object.defineProperty(t,"Menu",{enumerable:!0,get:function(){return r.Menu}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(147);Object.defineProperty(t,"CVAAOverlay",{enumerable:!0,get:function(){return r.CVAAOverlay}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(149);Object.defineProperty(t,"Slider",{enumerable:!0,get:function(){return r.Slider}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(152);Object.defineProperty(t,"TimeDisplayPlaybackContainer",{enumerable:!0,get:function(){return r.TimeDisplayPlaybackContainer}})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Backdrop=void 0;var o,s,l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=function(e){return e&&e.__esModule?e:{default:e}}(u),p=n(0),f=n(2),d=function(e){return{show:e.backdrop.show}},h=(o=(0,f.connect)(d,null))(s=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),l(t,[{key:"render",value:function(e){if(e.show)return(0,p.h)("div",{className:c.default.backdrop})}}]),t}(p.Component))||s;t.Backdrop=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(159);Object.defineProperty(t,"PlaylistButton",{enumerable:!0,get:function(){return r.PlaylistButton}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(160);Object.defineProperty(t,"PlayPauseControl",{enumerable:!0,get:function(){return r.PlayPauseControl}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(163);Object.defineProperty(t,"PlaylistNextScreen",{enumerable:!0,get:function(){return r.PlaylistNextScreen}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(165);Object.defineProperty(t,"PictureInPictureOverlay",{enumerable:!0,get:function(){return r.PictureInPictureOverlay}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(167);Object.defineProperty(t,"ShareOverlay",{enumerable:!0,get:function(){return r.ShareOverlay}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.CopyButton=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(0),p=n(3),f=r(p),d=n(5),h=n(16),y=n(4),v=function(e){function t(e){i(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setState({copySuccess:!1}),n}return o(t,e),s(t,[{key:"copy",value:function(){var e=this;try{this.props.copy(),this.setState({copySuccess:!0}),setTimeout(function(){e.setState({copySuccess:!1})},2e3)}catch(e){this.setState({copySuccess:!1})}}},{key:"render",value:function(){var e=this,t=[u.default.btnCopyUrl].join(" ");return t+=this.state.copySuccess?" "+u.default.copied:"",(0,c.h)(y.Localizer,null,(0,c.h)("a",{className:t,onClick:function(){return e.copy()},title:(0,c.h)(y.Text,{id:"copy.button"})},(0,c.h)(h.Icon,{type:d.IconType.Copy}),(0,c.h)(h.Icon,{type:d.IconType.Check})))}}]),t}(f.default);v.defaultProps={icon:d.IconType.Copy},t.CopyButton=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(2),h=n(3),y=r(h),v=n(4),g=n(10),m="Logo",b=function(e){return{isMobile:e.shell.isMobile,playerSize:e.shell.playerSize,config:e.config.components.logo}},_=(s=(0,d.connect)(b))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:m,player:e.player}))}return o(t,e),u(t,null,[{key:"shouldRender",value:function(e){var t=e.config.components[m.toLocaleLowerCase()];return!(0===Object.keys(t).length&&t.constructor===Object)}}]),u(t,[{key:"render",value:function(e){var t=[g.PLAYER_SIZE.TINY,g.PLAYER_SIZE.EXTRA_SMALL,g.PLAYER_SIZE.SMALL].includes(this.props.playerSize);if(e.config.img&&!t)return(0,f.h)("div",{className:[p.default.controlButtonContainer,p.default.controlLogo].join(" "),"aria-label":(0,f.h)(v.Text,{id:"controls.logo"}),title:e.config.text},(0,f.h)("a",{className:p.default.controlButton,href:e.config.url,target:"_blank",rel:"noopener noreferrer"},(0,f.h)("img",{className:p.default.icon,src:e.config.img})))}}]),t}(y.default))||l;_.displayName=m,t.Logo=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(170);Object.defineProperty(t,"TimeDisplayAdsContainer",{enumerable:!0,get:function(){return r.TimeDisplayAdsContainer}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(171);Object.defineProperty(t,"AdSkip",{enumerable:!0,get:function(){return r.AdSkip}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(172);Object.defineProperty(t,"AdLearnMore",{enumerable:!0,get:function(){return r.AdLearnMore}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(173);Object.defineProperty(t,"TopBar",{enumerable:!0,get:function(){return r.TopBar}})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.AdNotice=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=n(0),c=n(4),p=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),o(t,[{key:"render",value:function(){return(0,u.h)("span",{className:l.default.adNotice},(0,u.h)(c.Text,{id:"ads.ad_notice"}))}}]),t}(u.Component);t.AdNotice=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(175);Object.defineProperty(t,"ErrorOverlay",{enumerable:!0,get:function(){return r.ErrorOverlay}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(178);Object.defineProperty(t,"SeekBarLivePlaybackContainer",{enumerable:!0,get:function(){return r.SeekBarLivePlaybackContainer}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(179);Object.defineProperty(t,"LiveTag",{enumerable:!0,get:function(){return r.LiveTag}})},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.NAME=t.VERSION=t.UIManager=t.EventType=t.Utils=t.Components=t.Presets=t.Reducers=t.style=t.redux=t.preact=t.h=void 0;var i=n(0);Object.defineProperty(t,"h",{enumerable:!0,get:function(){return i.h}});var a=n(91),o=r(i),s=n(31),l=n(2),u=r(l),c=n(182),p=r(c),f=n(65),d=r(f),h=n(183),y=r(h),v=n(192),g=r(v),m=n(1),b=function(e){return e&&e.__esModule?e:{default:e}}(m);t.preact=o,t.redux=u,t.style=b.default,t.Reducers=p,t.Presets=d,t.Components=y,t.Utils=g,t.EventType=s.EventType,t.UIManager=a.UIManager,t.VERSION="0.44.0",t.NAME="@playkit-js/playkit-js-ui"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.UIManager=void 0;var a=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),l=n(2),u=n(4),c=n(13),p=n(108),f=n(29),d=n(30),h=n(31),y=n(6),v=n(110),g=r(v),m=n(111),b=r(m),_=n(12),E=n(61),k=n(63),T=n(64),A=n(130),w=n(65),S=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(w),P=n(180);n(1);var O=function(){function e(t,n){i(this,e),this._translations={en:b.default},this._locale="en",n.log&&n.log.level&&this.LogLevel[n.log.level]&&(0,d.setLogLevel)(this.LogLevel[n.log.level]),n.log&&"function"==typeof n.log.handler&&(0,d.setLogHandler)(n.log.handler),this.player=t,this.targetId=n.targetId,this._createStore(n),this.setConfig(n),this._setLocaleTranslations(n),(0,y.setEnv)(this.player.env)}return o(e,[{key:"setConfig",value:function(e,t){t?this.store.dispatch(_.actions.updateComponentConfig(t,e)):this.store.dispatch(_.actions.updateConfig(e))}},{key:"buildDefaultUI",value:function(){var e=[{template:function(e){return S.idleUI(e)},condition:function(e){return e.engine.isIdle}},{template:function(e){return S.errorUI(e)},condition:function(e){return e.engine.hasError}},{template:function(e){return S.adsUI(e)},condition:function(e){return e.engine.adBreak}},{template:function(e){return S.liveUI(e)},condition:function(e){return e.engine.isLive}},{template:function(e){return S.playbackUI(e)}}];this._buildUI(e)}},{key:"buildCustomUI",value:function(e){if(e.length>0)this._buildUI(e);else{var t=[{template:function(e){return S.playbackUI(e)}}];this._buildUI(t)}}},{key:"_setLocaleTranslations",value:function(e){var t=this;e.translations&&Object.entries(e.translations).forEach(function(e){var n=a(e,2),r=n[0],i=n[1];i=(0,f.mergeDeep)({},t._translations.en,i),t._translations[r]=i}),e.locale&&this._translations[e.locale]&&(this._locale=e.locale)}},{key:"_createStore",value:function(e){this.store=(0,c.createStore)(g.default,window.devToolsExtension&&window.devToolsExtension({name:"playkit #"+this.targetId,instanceId:this.targetId}),(0,P.middleware)(this.player,e))}},{key:"_buildUI",value:function(e){if(this.player&&(this.container=document.getElementById(this.targetId),this.container)){var t=(0,s.h)(l.Provider,{store:this.store},(0,s.h)(u.IntlProvider,{definition:this._translations[this._locale]},(0,s.h)(k.Shell,{player:this.player},(0,s.h)(E.EngineConnector,{player:this.player}),(0,s.h)(T.VideoPlayer,{player:this.player}),(0,s.h)(A.PlayerGUI,{uis:e,player:this.player,playerContainer:this.container}))));this.root=(0,s.render)(t,this.container)}}},{key:"destroy",value:function(){this.container&&(this.container.prepend(this.player.getView()),(0,s.render)("",this.container,this.root))}},{key:"getLogLevel",value:function(e){return(0,d.getLogLevel)(e)}},{key:"setLogLevel",value:function(e,t){(0,d.setLogLevel)(e,t)}},{key:"config",get:function(){return(0,p.copyDeep)(this.store.getState().config)}},{key:"LogLevel",get:function(){return d.LogLevel}},{key:"Event",get:function(){return h.EventType}}]),e}();t.UIManager=O},function(e,t,n){"use strict";function r(e){return null==e?void 0===e?l:s:u&&u in Object(e)?Object(a.a)(e):Object(o.a)(e)}var i=n(58),a=n(95),o=n(96),s="[object Null]",l="[object Undefined]",u=i.a?i.a.toStringTag:void 0;t.a=r},function(e,t,n){"use strict";var r=n(94),i="object"==typeof self&&self&&self.Object===Object&&self,a=r.a||i||Function("return this")();t.a=a},function(e,t,n){"use strict";(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.a=n}).call(t,n(28))},function(e,t,n){"use strict";function r(e){var t=o.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[l]=n:delete e[l]),i}var i=n(58),a=Object.prototype,o=a.hasOwnProperty,s=a.toString,l=i.a?i.a.toStringTag:void 0;t.a=r},function(e,t,n){"use strict";function r(e){return a.call(e)}var i=Object.prototype,a=i.toString;t.a=r},function(e,t,n){"use strict";var r=n(98),i=Object(r.a)(Object.getPrototypeOf,Object);t.a=i},function(e,t,n){"use strict";function r(e,t){return function(n){return e(t(n))}}t.a=r},function(e,t,n){"use strict";function r(e){return null!=e&&"object"==typeof e}t.a=r},function(e,t,n){e.exports=n(101)},function(e,t,n){"use strict";(function(e,r){Object.defineProperty(t,"__esModule",{value:!0});var i,a=n(103),o=function(e){return e&&e.__esModule?e:{default:e}}(a);i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var s=(0,o.default)(i);t.default=s}).call(t,n(28),n(102)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e,t){var n=t&&t.type;return"Given action "+(n&&'"'+n.toString()+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function i(e){Object.keys(e).forEach(function(t){var n=e[t];if(void 0===n(void 0,{type:o.a.INIT}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:"@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".")}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+o.a.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}function a(e){for(var t=Object.keys(e),n={},a=0;a<t.length;a++){var o=t[a];"function"==typeof e[o]&&(n[o]=e[o])}var s=Object.keys(n),l=void 0;try{i(n)}catch(e){l=e}return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(l)throw l;for(var i=!1,a={},o=0;o<s.length;o++){var u=s[o],c=n[u],p=e[u],f=c(p,t);if(void 0===f){var d=r(u,t);throw new Error(d)}a[u]=f,i=i||f!==p}return i?a:e}}t.a=a;var o=n(56);n(57),n(59)},function(e,t,n){"use strict";function r(e,t){return function(){return t(e.apply(void 0,arguments))}}function i(e,t){if("function"==typeof e)return r(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(e),i={},a=0;a<n.length;a++){var o=n[a],s=e[o];"function"==typeof s&&(i[o]=r(s,t))}return i}t.a=i},function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(n,r,o){var s=e(n,r,o),l=s.dispatch,u=[],c={getState:s.getState,dispatch:function(e){return l(e)}};return u=t.map(function(e){return e(c)}),l=i.a.apply(void 0,u)(s.dispatch),a({},s,{dispatch:l})}}}t.a=r;var i=n(60),a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}},function(e,t,n){!function(t,n){e.exports=function(){function e(e,t,n,r){for(r=0,t=t.split?t.split("."):t;e&&r<t.length;)e=e[t[r++]];return void 0===e?n:e}return e}()}()},function(e,t,n){"use strict";function r(e){var t=void 0;return Array.isArray(e)?(t=e.length>0?e.slice(0):[],t.forEach(function(e,n){("object"===(void 0===e?"undefined":i(e))&&e!=={}||Array.isArray(e)&&e.length>0)&&(t[n]=r(e))})):"object"===(void 0===e?"undefined":i(e))?(t=Object.assign({},e),Object.keys(t).forEach(function(e){("object"===i(t[e])&&t[e]!=={}||Array.isArray(t[e])&&t[e].length>0)&&(t[e]=r(t[e]))})):t=e,t}Object.defineProperty(t,"__esModule",{value:!0});var i="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};t.copyDeep=r},function(e,t,n){var r,i;/*!
 * js-logger - http://github.com/jonnyreeves/js-logger
 * Jonny Reeves, http://jonnyreeves.co.uk/
 * js-logger may be freely distributed under the MIT license.
 */
!function(a){"use strict";var o={};o.VERSION="1.4.1";var s,l={},u=function(e,t){return function(){return t.apply(e,arguments)}},c=function(){var e,t,n=arguments,r=n[0];for(t=1;t<n.length;t++)for(e in n[t])e in r||!n[t].hasOwnProperty(e)||(r[e]=n[t][e]);return r},p=function(e,t){return{value:e,name:t}};o.DEBUG=p(1,"DEBUG"),o.INFO=p(2,"INFO"),o.TIME=p(3,"TIME"),o.WARN=p(4,"WARN"),o.ERROR=p(8,"ERROR"),o.OFF=p(99,"OFF");var f=function(e){this.context=e,this.setLevel(e.filterLevel),this.log=this.info};f.prototype={setLevel:function(e){e&&"value"in e&&(this.context.filterLevel=e)},getLevel:function(){return this.context.filterLevel},enabledFor:function(e){var t=this.context.filterLevel;return e.value>=t.value},debug:function(){this.invoke(o.DEBUG,arguments)},info:function(){this.invoke(o.INFO,arguments)},warn:function(){this.invoke(o.WARN,arguments)},error:function(){this.invoke(o.ERROR,arguments)},time:function(e){"string"==typeof e&&e.length>0&&this.invoke(o.TIME,[e,"start"])},timeEnd:function(e){"string"==typeof e&&e.length>0&&this.invoke(o.TIME,[e,"end"])},invoke:function(e,t){s&&this.enabledFor(e)&&s(t,c({level:e},this.context))}};var d=new f({filterLevel:o.OFF});!function(){var e=o;e.enabledFor=u(d,d.enabledFor),e.debug=u(d,d.debug),e.time=u(d,d.time),e.timeEnd=u(d,d.timeEnd),e.info=u(d,d.info),e.warn=u(d,d.warn),e.error=u(d,d.error),e.log=e.info}(),o.setHandler=function(e){s=e},o.setLevel=function(e){d.setLevel(e);for(var t in l)l.hasOwnProperty(t)&&l[t].setLevel(e)},o.getLevel=function(){return d.getLevel()},o.get=function(e){return l[e]||(l[e]=new f(c({name:e},d.context)))},o.createDefaultHandler=function(e){e=e||{},e.formatter=e.formatter||function(e,t){t.name&&e.unshift("["+t.name+"]")};var t={},n=function(e,t){Function.prototype.apply.call(e,console,t)};return"undefined"==typeof console?function(){}:function(r,i){r=Array.prototype.slice.call(r);var a,s=console.log;i.level===o.TIME?(a=(i.name?"["+i.name+"] ":"")+r[0],"start"===r[1]?console.time?console.time(a):t[a]=(new Date).getTime():console.timeEnd?console.timeEnd(a):n(s,[a+": "+((new Date).getTime()-t[a])+"ms"])):(i.level===o.WARN&&console.warn?s=console.warn:i.level===o.ERROR&&console.error?s=console.error:i.level===o.INFO&&console.info?s=console.info:i.level===o.DEBUG&&console.debug&&(s=console.debug),e.formatter(r,i),n(s,r))}},o.useDefaults=function(e){o.setLevel(e&&e.defaultLevel||o.DEBUG),o.setHandler(o.createDefaultHandler(e))},r=o,void 0!==(i="function"==typeof r?r.call(t,n,t,e):r)&&(e.exports=i)}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),a=n(12),o=r(a),s=n(11),l=r(s),u=n(8),c=r(u),p=n(18),f=r(p),d=n(33),h=r(d),y=n(14),v=r(y),g=n(19),m=r(g),b=n(20),_=r(b),E=n(34),k=r(E),T=n(21),A=r(T),w=n(35),S=r(w),P=(0,i.combineReducers)({config:o.default,engine:l.default,shell:c.default,seekbar:f.default,volume:h.default,loading:v.default,share:m.default,cvaa:_.default,settings:k.default,overlayAction:A.default,backdrop:S.default});t.default=P},function(e,t){e.exports={controls:{play:"Play",pause:"Pause",share:"Share",language:"Language",settings:"Settings",fullscreen:"Fullscreen",rewind:"Rewind",forward:"Forward",vrStereo:"vrStereo",live:"Live",unmute:"Unmute",next:"Next",prev:"Prev",startOver:"Start over",pictureInPicture:"Picture in picture",logo:"Logo"},unmute:{unmute:"Unmute"},copy:{button:"Copy"},settings:{title:"Settings",quality:"Quality",speed:"Speed"},language:{title:"Language",audio:"Audio",captions:"Captions",advanced_captions_settings:"Advanced captions settings"},share:{title:"Share",embed_options:"Embed Options",start_video_at:"Start video at",email:"Share on Email",embed:"Get embed code"},overlay:{close:"Close"},error:{default_error:"Something went wrong",default_session_text:"Session ID",retry:"Retry"},ads:{ad_notice:"Advertisement",learn_more:"Learn more",skip_ad:"Skip ad",skip_in:"Skip in"},cvaa:{title:"Advanced captions settings",sample_caption_tag:"Sample",set_custom_caption:"Set custom caption",edit_caption:"Edit caption",size_label:"Size",font_color_label:"Font color",font_family_label:"Font family",font_style_label:"Font style",font_opacity_label:"Font opacity",background_color_label:"Background color",background_opacity_label:"Background opacity",apply:"Apply",caption_preview:"This is your caption preview"},cast:{play_on_tv:"Play on TV",disconnect_from_tv:"Disconnect from TV",status:{connecting_to:"Connecting to",connected_to:"Connected to",playing_on:"Playing on"}},playlist:{prev:"Previous",next:"Next",up_next:"Up Next",cancel:"Cancel"},pictureInPicture:{overlay_text:"Playing in Picture In Picture mode",overlay_button:"Play Here"}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.EngineConnector=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=n(0),f=n(2),d=n(7),h=n(11),y=r(h),v=n(14),g=n(8),m=n(3),b=r(m),_=(s=(0,f.connect)(y.default,(0,d.bindActions)(c({},h.actions,v.actions,g.actions))))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"EngineConnector",player:e.player}))}return o(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this,t=this.player.Track;this.props.updatePrePlayback(!this.player.config.playback.autoplay),this.eventManager.listen(this.player,this.player.Event.PLAYER_RESET,function(){e.props.updateCurrentTime(0),e.props.updateIsIdle(!0),e.props.updateIsPlaybackStarted(!1)}),this.eventManager.listen(this.player,this.player.Event.SOURCE_SELECTED,function(){e.props.updateIsVr(e.player.isVr()),e.props.updateIsInPictureInPicture(e.player.isInPictureInPicture()),e.player.config.playback.autoplay?e.props.updateLoadingSpinnerState(!0):e.props.updateLoadingSpinnerState(!1)}),this.eventManager.listen(this.player,this.player.Event.CHANGE_SOURCE_STARTED,function(){e.props.updatePrePlayback(!e.player.config.playback.autoplay&&!e.props.engine.isPlaybackStarted),e.props.updateIsChangingSource(!0),e.props.updateFallbackToMutedAutoPlay(!1),e.props.updateAdBreak(!1),e.props.updateAdIsPlaying(!1),e.props.updateIsPlaying(!1),e.props.updateIsEnded(!1),e.props.updateIsPlaybackEnded(!1),e.props.updateLastSeekPoint(0),e.props.updateIsPaused(!1),e.props.engine.isCasting&&e.props.updateLoadingSpinnerState(!0)}),this.eventManager.listen(this.player,this.player.Event.CHANGE_SOURCE_ENDED,function(){e.props.updateIsChangingSource(!1),e.props.updatePlayerPoster(e.player.poster),e.props.updateIsIdle(!1)}),this.eventManager.listen(this.player,this.player.Event.PLAYER_STATE_CHANGED,function(t){e.props.updatePlayerState(t.payload.oldState.type,t.payload.newState.type)}),this.eventManager.listen(this.player,this.player.Event.TIME_UPDATE,function(){e.props.updateCurrentTime(e.player.currentTime)}),this.eventManager.listen(this.player,this.player.Event.DURATION_CHANGE,function(){e.props.updateDuration(e.player.duration)}),this.eventManager.listen(this.player,this.player.Event.LOADED_DATA,function(){e.props.updateDuration(e.player.duration),e.props.updatePictureInPictureSupport(e.player.isPictureInPictureSupported())}),this.eventManager.listen(this.player,this.player.Event.LOADED_METADATA,function(){e.props.updateMuted(e.player.muted),e.props.updateMetadataLoadingStatus(!0),e.props.updateIsLive(e.player.isLive()),e.props.updateIsDvr(e.player.isDvr()),e.props.updatePlayerPoster(e.player.poster)}),this.eventManager.listen(this.player,this.player.Event.VOLUME_CHANGE,function(){e.props.updateVolume(e.player.volume)}),this.eventManager.listen(this.player,this.player.Event.MUTE_CHANGE,function(){e.props.updateMuted(e.player.muted),e.props.engine.fallbackToMutedAutoPlay&&e.props.updateFallbackToMutedAutoPlay(e.player.muted)}),this.eventManager.listen(this.player,this.player.Event.PLAYBACK_START,function(){e.props.updatePrePlayback(!1),e.props.updateIsPlaybackStarted(!0),e.props.updateLoadingSpinnerState(!0)}),this.eventManager.listen(this.player,this.player.Event.AUTOPLAY_FAILED,function(){e.props.updatePrePlayback(!0)}),this.eventManager.listen(this.player,this.player.Event.PLAY,function(){e.props.updateIsPlaying(!0),e.props.updateIsEnded(!1),e.props.updateIsPaused(!1),e.props.updateIsPlaybackEnded(!1)}),this.eventManager.listen(this.player,this.player.Event.PAUSE,function(){e.props.updateIsPlaying(!1),e.props.updateIsPaused(!0)}),this.eventManager.listen(this.player,this.player.Event.SEEKING,function(){e.props.updateIsSeeking(!0)}),this.eventManager.listen(this.player,this.player.Event.SEEKED,function(){e.props.updateIsSeeking(!1),e.props.updateLastSeekPoint(e.player.currentTime),e.props.updateIsPlaybackEnded(!1)}),this.eventManager.listen(this.player,this.player.Event.ENDED,function(){e.props.updateIsEnded(!0),e.props.updateIsPlaying(!1),e.props.updateIsPaused(!0)}),this.eventManager.listen(this.player,this.player.Event.PLAYBACK_ENDED,function(){e.props.updateIsPlaybackEnded(!0)}),this.eventManager.listen(this.player,this.player.Event.TRACKS_CHANGED,function(){var n=e.player.getTracks(t.AUDIO),r=e.player.getTracks(t.VIDEO),i=e.player.getTracks(t.TEXT);e.props.updateAudioTracks(n),e.props.updateVideoTracks(r),e.props.updateTextTracks(i)}),this.eventManager.listen(this.player,this.player.Event.TEXT_TRACK_CHANGED,function(){var n=e.player.getTracks(t.TEXT);e.props.updateTextTracks(n)}),this.eventManager.listen(this.player,this.player.Event.AUDIO_TRACK_CHANGED,function(){var n=e.player.getTracks(t.AUDIO);e.props.updateAudioTracks(n)}),this.eventManager.listen(this.player,this.player.Event.VIDEO_TRACK_CHANGED,function(){var n=e.player.getTracks(t.VIDEO);e.props.updateVideoTracks(n)}),this.eventManager.listen(this.player,this.player.Event.AD_BREAK_START,function(){e.props.updateHasError(!1),e.props.updateAdBreak(!0)}),this.eventManager.listen(this.player,this.player.Event.AD_BREAK_END,function(){e.props.updateAdBreak(!1)}),this.eventManager.listen(this.player,this.player.Event.ALL_ADS_COMPLETED,function(){e.props.updateAdBreak(!1)}),this.eventManager.listen(this.player,this.player.Event.AD_PROGRESS,function(t){var n=t.payload.adProgress.currentTime,r=t.payload.adProgress.duration;e.props.updateAdBreakProgress(n,r)}),this.eventManager.listen(this.player,this.player.Event.AD_COMPLETED,function(){e.props.updateAdBreakCompleted()}),this.eventManager.listen(this.player,this.player.Event.AD_STARTED,function(){e.props.updateLoadingSpinnerState(!1),e.props.updateAdIsPlaying(!0)}),this.eventManager.listen(this.player,this.player.Event.AD_RESUMED,function(){e.props.updateAdIsPlaying(!0)}),this.eventManager.listen(this.player,this.player.Event.AD_PAUSED,function(){e.props.updateAdIsPlaying(!1)}),this.eventManager.listen(this.player,this.player.Event.AD_ERROR,function(t){t.payload.severity===e.player.Error.Severity.CRITICAL&&e.props.updateAdBreak(!1)}),this.eventManager.listen(this.player,this.player.Event.FALLBACK_TO_MUTED_AUTOPLAY,function(){e.props.updateFallbackToMutedAutoPlay(!0)}),this.eventManager.listen(this.player,this.player.Event.AD_LOADED,function(t){var n=t.payload.ad;e.props.updateAdIsLinear(n.linear),e.props.updateAdClickUrl(n.clickThroughUrl),e.props.updateAdSkipTimeOffset(n.skipOffset),e.props.updateAdSkippableState(n.skippable)}),this.eventManager.listen(this.player,this.player.Event.VR_STEREO_MODE_CHANGED,function(t){e.props.updateVrStereoMode(t.payload.mode)}),this.eventManager.listen(this.player,this.player.Event.ERROR,function(t){t.payload.severity===e.player.Error.Severity.CRITICAL&&(e.props.updateIsIdle(!1),e.props.updateHasError(!0))}),this.eventManager.listen(this.player,this.player.Event.Cast.CAST_SESSION_STARTED,function(t){var n=t.payload.session;e.props.updateIsCasting(!0),e.props.updateCastSession(n),n.resuming&&e.props.updateLoadingSpinnerState(!1)}),this.eventManager.listen(this.player,this.player.Event.Cast.CAST_SESSION_ENDED,function(){e.props.updateIsCasting(!1),e.props.updateCastSession(null)}),this.eventManager.listen(this.player,this.player.Event.Cast.CAST_AVAILABLE,function(t){var n=t.payload.available;e.props.updateIsCastAvailable(n)}),this.eventManager.listen(this.player,this.player.Event.Playlist.PLAYLIST_ITEM_CHANGED,function(){e.props.updatePlaylist({next:e.player.playlist.next,prev:e.player.playlist.prev})}),this.eventManager.listen(this.player,this.player.Event.ENTER_PICTURE_IN_PICTURE,function(){e.props.updateIsInPictureInPicture(!0)}),this.eventManager.listen(this.player,this.player.Event.LEAVE_PICTURE_IN_PICTURE,function(){e.props.updateIsInPictureInPicture(!1)}),this.eventManager.listen(this.player,this.player.Event.PRESENTATION_MODE_CHANGED,function(){e.player.isInPictureInPicture()?e.props.updateIsInPictureInPicture(!0):e.props.updateIsInPictureInPicture(!1)}),this.eventManager.listen(this.player,this.player.Event.ENTER_FULLSCREEN,function(){e.props.updateFullscreen(!0)}),this.eventManager.listen(this.player,this.player.Event.EXIT_FULLSCREEN,function(){e.props.updateFullscreen(!1)})}},{key:"shouldComponentUpdate",value:function(){return!1}},{key:"render",value:function(){return(0,p.h)("span",null)}}]),t}(b.default))||l;t.EngineConnector=_},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.AudioSelectedEvent=void 0;var o=n(9),s=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,o.FakeEvent.Type.USER_SELECTED_AUDIO_TRACK));return n.payload={audioTrack:e},n}return a(t,e),t}(o.FakeEvent);t.AudioSelectedEvent=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.CaptionSelectedEvent=void 0;var o=n(9),s=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,o.FakeEvent.Type.USER_SELECTED_CAPTION_TRACK));return n.payload={captionTrack:e},n}return a(t,e),t}(o.FakeEvent);t.CaptionSelectedEvent=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.CaptionsStyleSelectedEvent=void 0;var o=n(9),s=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,o.FakeEvent.Type.USER_SELECTED_CAPTIONS_STYLE));return n.payload={captionsStyle:e},n}return a(t,e),t}(o.FakeEvent);t.CaptionsStyleSelectedEvent=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.QualitySelectedEvent=void 0;var o=n(9),s=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,o.FakeEvent.Type.USER_SELECTED_QUALITY_TRACK));return n.payload={qualityTrack:e},n}return a(t,e),t}(o.FakeEvent);t.QualitySelectedEvent=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.SeekedEvent=void 0;var o=n(9),s=function(e){function t(e,n){r(this,t);var a=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,o.FakeEvent.Type.USER_SEEKED));return a.payload={from:e,to:n},a}return a(t,e),t}(o.FakeEvent);t.SeekedEvent=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.SpeedSelectedEvent=void 0;var o=n(9),s=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,o.FakeEvent.Type.USER_SELECTED_SPEED));return n.payload={speed:e},n}return a(t,e),t}(o.FakeEvent);t.SpeedSelectedEvent=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.UIVisibilityChangedEvent=void 0;var o=n(9),s=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,o.FakeEvent.Type.UI_VISIBILITY_CHANGED));return n.payload={visible:e},n}return a(t,e),t}(o.FakeEvent);t.UIVisibilityChangedEvent=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.RewindClickedEvent=void 0;var o=n(9),s=function(e){function t(e,n){r(this,t);var a=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,o.FakeEvent.Type.USER_CLICKED_REWIND));return a.payload={from:e,to:n},a}return a(t,e),t}(o.FakeEvent);t.RewindClickedEvent=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ForwardClickedEvent=void 0;var o=n(9),s=function(e){function t(e,n){r(this,t);var a=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,o.FakeEvent.Type.USER_CLICKED_FORWARD));return a.payload={from:e,to:n},a}return a(t,e),t}(o.FakeEvent);t.ForwardClickedEvent=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.VolumeChangedEvent=void 0;var o=n(9),s=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,o.FakeEvent.Type.USER_CHANGED_VOLUME));return n.payload={volume:e},n}return a(t,e),t}(o.FakeEvent);t.VolumeChangedEvent=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.EventManager=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(124),o=(n(9),function(){function e(){r(this,e),this._bindingMap=new a.MultiMap}return i(e,[{key:"destroy",value:function(){return this.removeAll(),this._bindingMap=null,Promise.resolve()}},{key:"listenOnce",value:function(e,t,n){var r=this,i=function i(a){r.unlisten(e,t,i),n.call(r,a)};this.listen(e,t,i)}},{key:"listen",value:function(e,t,n){var r=new s(e,t,n);this._bindingMap&&this._bindingMap.push(t,r)}},{key:"unlisten",value:function(e,t,n){if(this._bindingMap)for(var r=this._bindingMap.get(t),i=0;i<r.length;++i){var a=r[i];a.target!==e||a.listener!==n&&n||(a.unlisten(),this._bindingMap&&this._bindingMap.remove(t,a))}}},{key:"removeAll",value:function(){if(this._bindingMap){var e=this._bindingMap.getAll(),t=!0,n=!1,r=void 0;try{for(var i,a=e[Symbol.iterator]();!(t=(i=a.next()).done);t=!0)i.value.unlisten()}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}this._bindingMap&&this._bindingMap.clear()}}}]),e}()),s=function(){function e(t,n,i){r(this,e),this.target=t,this.type=n,this.listener=i,this.target.addEventListener(n,i,!1)}return i(e,[{key:"unlisten",value:function(){this.target&&(this.target.removeEventListener(this.type,this.listener,!1),this.target=null,this.listener=null)}}]),e}();t.EventManager=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){r(this,e),this._map=new Map}return i(e,[{key:"push",value:function(e,t){if(this._map.has(e)){var n=this._map.get(e);Array.isArray(n)&&(n.push(t),this._map.set(e,n))}else this._map.set(e,[t])}},{key:"set",value:function(e,t){this._map.set(e,t)}},{key:"has",value:function(e){return this._map.has(e)}},{key:"get",value:function(e){var t=this._map.get(e);return t?t.slice():[]}},{key:"getAll",value:function(){var e=[],t=!0,n=!1,r=void 0;try{for(var i,a=this._map.values()[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var o=i.value;e=e.concat(o)}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}return e}},{key:"remove",value:function(e,t){if(this._map.has(e)){var n=this._map.get(e);if(Array.isArray(n))for(var r=0;r<n.length;++r)n[r]===t&&(n.splice(r,1),--r)}}},{key:"keys",value:function(){return this._map.keys()}},{key:"clear",value:function(){this._map.clear()}}]),e}();t.MultiMap=a},function(e,t,n){t=e.exports=n(126)(void 0),t.push([e.i,"@charset \"UTF-8\";\n.playkit-row {\n  display: block; }\n  .playkit-row:after {\n    content: '';\n    clear: both;\n    display: block; }\n\n.playkit-d-inline-block {\n  display: inline-block; }\n\n.playkit-mobile-hidden-select {\n  display: block;\n  opacity: 0;\n  position: absolute;\n  top: 0;\n  left: 0px;\n  width: 100%;\n  height: 100%; }\n\n.playkit-font-size-base, .playkit-ad-notice {\n  font-size: 15px; }\n\n.playkit-player .playkit-form-group {\n  margin: 10px 0;\n  position: relative;\n  max-width: 100%; }\n  .playkit-player .playkit-form-group.playkit-has-error .playkit-form-control {\n    border-color: #db1f26; }\n    .playkit-player .playkit-form-group.playkit-has-error .playkit-form-control:focus {\n      border-color: #fff; }\n  .playkit-player .playkit-form-group.playkit-has-icon .playkit-form-control {\n    padding-left: 34px; }\n  .playkit-player .playkit-form-group .playkit-icon {\n    position: absolute;\n    top: 2px;\n    left: 2px;\n    width: 32px;\n    height: 32px;\n    fill: rgba(255, 255, 255, 0.4); }\n\n.playkit-player .playkit-form-control {\n  height: 36px;\n  width: 100%;\n  min-width: 72px;\n  border: 2px solid rgba(255, 255, 255, 0.2);\n  border-radius: 4px;\n  background-color: rgba(0, 0, 0, 0.4);\n  font-size: 15px;\n  line-height: 18px;\n  color: #fff;\n  padding: 8px 10px;\n  text-overflow: ellipsis; }\n  .playkit-player .playkit-form-control::-webkit-input-placeholder {\n    color: rgba(255, 255, 255, 0.6); }\n  .playkit-player .playkit-form-control:focus {\n    background-color: #fff;\n    border-color: #fff;\n    color: #333; }\n    .playkit-player .playkit-form-control:focus::-webkit-input-placeholder {\n      color: #ccc; }\n    .playkit-player .playkit-form-control:focus + .playkit-icon {\n      fill: #999; }\n\n.playkit-player textarea.playkit-form-control {\n  min-height: 72px; }\n\n.playkit-player select {\n  font-size: 15px;\n  font-family: sans-serif;\n  color: #fff;\n  -webkit-appearance: none;\n  border: 0;\n  background: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23FFFFFF' viewBox='0 0 1024 1024'><path d='M301.255 338.745c-24.994-24.994-65.516-24.994-90.51 0s-24.994 65.516 0 90.51l256 256c24.994 24.994 65.516 24.994 90.51 0l256-256c24.994-24.994 24.994-65.516 0-90.51s-65.516-24.994-90.51 0l-210.745 210.745-210.745-210.745z' /></svg>\") no-repeat;\n  background-size: 16px;\n  background-position: 100% center;\n  background-repeat: no-repeat;\n  padding-right: 24px; }\n\n.playkit-checkbox {\n  font-size: 15px;\n  position: relative; }\n  .playkit-checkbox input {\n    display: none; }\n  .playkit-checkbox label:before {\n    height: 16px;\n    width: 16px;\n    border: 1px solid rgba(255, 255, 255, 0.2);\n    border-radius: 4px;\n    background-color: rgba(0, 0, 0, 0.4);\n    margin-right: 8px;\n    display: inline-block;\n    content: '';\n    vertical-align: middle; }\n  .playkit-checkbox input:checked + label:before {\n    content: '\\2714'; }\n\n.playkit-form-group-row {\n  font-size: 15px;\n  margin: 24px 0; }\n  .playkit-form-group-row:after {\n    clear: both;\n    content: ' ';\n    display: block; }\n  .playkit-form-group-row label {\n    float: left;\n    color: rgba(244, 244, 244, 0.8); }\n  .playkit-form-group-row .playkit-dropdown {\n    float: right; }\n\n.playkit-btn {\n  text-decoration: none;\n  height: 36px;\n  border-radius: 18px;\n  color: #fff;\n  line-height: 36px;\n  font-weight: bold;\n  cursor: pointer;\n  display: inline-block;\n  padding: 0 24px; }\n  .playkit-btn.playkit-btn-block {\n    display: block; }\n  .playkit-btn.playkit-btn-dark-transparent {\n    background-color: rgba(0, 0, 0, 0.5);\n    border: 2px solid rgba(255, 255, 255, 0.2);\n    line-height: 32px; }\n    .playkit-btn.playkit-btn-dark-transparent:hover {\n      color: #fff;\n      border: 2px solid rgba(255, 255, 255, 0.4); }\n  .playkit-btn.playkit-btn-branded {\n    background-color: #01accd; }\n    .playkit-btn.playkit-btn-branded:hover {\n      color: #fff; }\n\n.playkit-btn-rounded {\n  height: 36px;\n  width: 36px;\n  min-width: 36px;\n  min-height: 36px;\n  border-radius: 18px;\n  background-color: rgba(0, 0, 0, 0.4);\n  display: inline-block;\n  padding: 2px; }\n\n.playkit-player button:focus {\n  outline: none; }\n\n.playkit-icon {\n  display: inline-block;\n  font-size: 0;\n  width: 100%;\n  height: 100%;\n  margin: 0 auto;\n  background-size: cover;\n  background-repeat: no-repeat;\n  background-position: 50% 50%; }\n\n.playkit-icon-maximize {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M800 269.255v114.745c0 17.673 14.327 32 32 32s32-14.327 32-32v-192c0-17.673-14.327-32-32-32h-192c-17.673 0-32 14.327-32 32s14.327 32 32 32h114.745l-137.373 137.373c-12.497 12.497-12.497 32.758 0 45.255s32.758 12.497 45.255 0l137.373-137.373z' /%3E %3Cpath fill='%23fff' d='M224 754.745v-114.745c0-17.673-14.327-32-32-32s-32 14.327-32 32v192c0 17.673 14.327 32 32 32h192c17.673 0 32-14.327 32-32s-14.327-32-32-32h-114.745l137.373-137.373c12.497-12.497 12.497-32.758 0-45.255s-32.758-12.497-45.255 0l-137.373 137.373z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-minimize {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M672 306.745v-114.745c0-17.673-14.327-32-32-32s-32 14.327-32 32v192c0 17.673 14.327 32 32 32h192c17.673 0 32-14.327 32-32s-14.327-32-32-32h-114.745l137.373-137.373c12.497-12.497 12.497-32.758 0-45.255s-32.758-12.497-45.255 0l-137.373 137.373z' /%3E%3Cpath fill='%23fff' d='M352 717.255v114.745c0 17.673 14.327 32 32 32s32-14.327 32-32v-192c0-17.673-14.327-32-32-32h-192c-17.673 0-32 14.327-32 32s14.327 32 32 32h114.745l-137.373 137.373c-12.497 12.497-12.497 32.758 0 45.255s32.758 12.497 45.255 0l137.373-137.373z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-play {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M796.806 461.202c44.919 28.075 44.739 73.706 0 101.668l-459.472 287.171c-44.919 28.075-81.334 7.915-81.334-45.305v-585.4c0-53.096 36.595-73.266 81.334-45.305l459.472 287.171z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-pause {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M256 287.843c0-35.259 28.407-63.843 64-63.843 35.346 0 64 28.564 64 63.843v448.314c0 35.259-28.407 63.843-64 63.843-35.346 0-64-28.564-64-63.843v-448.314zM640 287.843c0-35.259 28.407-63.843 64-63.843 35.346 0 64 28.564 64 63.843v448.314c0 35.259-28.407 63.843-64 63.843-35.346 0-64-28.564-64-63.843v-448.314z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-volume-base {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M128 416v192h96v-192h-96zM64 383.853c0-17.592 14.012-31.853 32.094-31.853h159.813c17.725 0 32.094 14.581 32.094 31.853v256.295c0 17.592-14.012 31.853-32.094 31.853h-159.813c-17.725 0-32.094-14.581-32.094-31.853v-256.295z' /%3E%3Cpath fill='%23fff' d='M288 634.342l160 88.889v-422.462l-160 88.889v244.684zM224 352l231.787-128.771c31.046-17.248 56.213-2.487 56.213 32.476v512.589c0 35.184-25.054 49.786-56.213 32.476l-231.787-128.771v-320z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-volume-waves {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M802.017 837.177c82.359-86.627 129.183-201.774 129.183-324.26 0-123.976-47.976-240.409-132.127-327.329-12.293-12.697-32.552-13.025-45.249-0.732s-13.025 32.552-0.732 45.249c72.692 75.084 114.109 175.597 114.109 282.812 0 105.928-40.422 205.331-111.566 280.162-12.177 12.808-11.666 33.063 1.143 45.24s33.063 11.666 45.24-1.143z' /%3E%3Cpath fill='%23fff' d='M667.436 743.221c67.761-60.884 107.273-147.888 107.273-241.233 0-87.318-34.552-169.203-94.836-229.446-12.501-12.493-32.762-12.486-45.255 0.015s-12.486 32.762 0.015 45.255c48.375 48.342 76.075 113.989 76.075 184.176 0 75.021-31.679 144.776-86.048 193.627-13.146 11.812-14.227 32.044-2.416 45.19s32.044 14.227 45.19 2.416z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-volume-wave {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M667.436 743.221c67.761-60.884 107.273-147.888 107.273-241.233 0-87.318-34.552-169.203-94.836-229.446-12.501-12.493-32.762-12.486-45.255 0.015s-12.486 32.762 0.015 45.255c48.375 48.342 76.075 113.989 76.075 184.176 0 75.021-31.679 144.776-86.048 193.627-13.146 11.812-14.227 32.044-2.416 45.19s32.044 14.227 45.19 2.416z'/%3E%3C/svg%3E\"); }\n\n.playkit-icon-volume-mute {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M768 466.745l-67.986-67.986c-12.213-12.213-32.654-12.393-45.151 0.104-12.584 12.584-12.543 32.711-0.104 45.151l67.986 67.986-67.986 67.986c-12.213 12.213-12.393 32.654 0.104 45.151 12.584 12.584 32.711 12.543 45.151 0.104l67.986-67.986 67.986 67.986c12.213 12.213 32.654 12.393 45.151-0.104 12.584-12.584 12.543-32.711 0.104-45.151l-67.986-67.986 67.986-67.986c12.213-12.213 12.393-32.654-0.104-45.151-12.584-12.584-32.711-12.543-45.151-0.104l-67.986 67.986z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-close {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M573.162 512l214.269-214.269c16.772-16.772 16.688-44.071-0.202-60.96-17.007-17.007-44.182-16.98-60.96-0.202l-214.269 214.269-214.269-214.269c-16.772-16.772-44.071-16.688-60.96 0.202-17.007 17.007-16.98 44.182-0.202 60.96l214.269 214.269-214.269 214.269c-16.772 16.772-16.688 44.071 0.202 60.96 17.007 17.007 44.182 16.98 60.96 0.202l214.269-214.269 214.269 214.269c16.772 16.772 44.071 16.688 60.96-0.202 17.007-17.007 16.98-44.182 0.202-60.96l-214.269-214.269z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-share {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M318.641 446.219l236.155-142.257c-0.086-1.754-0.129-3.52-0.129-5.295 0-58.91 47.756-106.667 106.667-106.667s106.667 47.756 106.667 106.667c0 58.91-47.756 106.667-106.667 106.667-33.894 0-64.095-15.808-83.633-40.454l-236.467 142.445c-0.132-3.064-0.394-6.095-0.779-9.087l7.271-12.835-0.117 53.333-7.183-12.743c0.399-3.046 0.67-6.131 0.806-9.252l236.467 142.383c19.538-24.648 49.741-40.457 83.636-40.457 58.91 0 106.667 47.756 106.667 106.667s-47.756 106.667-106.667 106.667c-58.91 0-106.667-47.756-106.667-106.667 0-1.775 0.043-3.539 0.129-5.293l-236.19-142.216c-19.528 24.867-49.868 40.841-83.939 40.841-58.91 0-106.667-47.756-106.667-106.667s47.756-106.667 106.667-106.667c34.091 0 64.447 15.993 83.974 40.886zM234.667 554.667c23.564 0 42.667-19.103 42.667-42.667s-19.103-42.667-42.667-42.667c-23.564 0-42.667 19.103-42.667 42.667s19.103 42.667 42.667 42.667zM661.333 341.333c23.564 0 42.667-19.103 42.667-42.667s-19.103-42.667-42.667-42.667c-23.564 0-42.667 19.103-42.667 42.667s19.103 42.667 42.667 42.667zM661.333 768c23.564 0 42.667-19.103 42.667-42.667s-19.103-42.667-42.667-42.667c-23.564 0-42.667 19.103-42.667 42.667s19.103 42.667 42.667 42.667z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-settings {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M803.451 546.033c2.552-22.107 2.552-44.408 0.246-64.81-1.084-6.208-6.499-10.721-12.535-10.671-30.286 0.533-57.727-17.773-68.866-45.941s-3.64-60.291 18.795-80.593c3.935-3.569 4.416-9.583 0.92-13.959-13.595-17.35-29.146-33.073-46.311-46.83-4.23-3.38-10.359-2.886-14.783 1.966-14.421 14.721-34.212 22.938-54.434 22.761-9.009 0.041-17.942-1.652-26.865-5.212-28.414-11.992-46.226-40.546-44.49-71.542 0.335-5.319-3.547-9.972-8.785-10.588-21.926-2.538-44.068-2.595-65.961-0.176-5.349 0.6-9.341 5.207-9.175 10.514 1.027 30.384-16.802 58.251-45.764 70.431-8.238 3.138-16.993 4.701-25.207 4.609-20.599 0.206-40.395-7.982-55.482-23.363-2.014-2.187-4.849-3.435-7.553-3.445-2.441 0.015-4.811 0.83-6.513 2.139-17.541 13.798-33.455 29.547-47.262 46.729-3.418 4.337-2.922 10.575 0.97 14.162 22.816 20.692 30.19 53.479 17.807 83.351-13.035 27.396-41.135 44.394-71.446 43.222-5.112-0.197-9.499 3.606-10.086 9.179-2.673 22.023-2.673 44.289-0.212 64.867 1.080 6.27 6.559 10.824 13.309 10.737l2.225 0.006c28.935 0.604 54.726 18.391 65.634 45.374 11.22 28.205 3.921 60.407-18.565 81.204-3.866 3.509-4.341 9.418-0.895 13.742 13.545 17.354 29.027 33.106 46.042 46.867 4.303 3.449 10.547 2.954 14.986-1.907 14.414-14.76 34.226-23.001 54.43-22.82 9.070-0.052 18.063 1.668 27.041 5.299 28.19 12.071 45.891 40.41 44.347 71.468-0.342 5.312 3.536 9.962 8.802 10.578 21.915 2.548 44.049 2.605 65.929 0.176 5.364-0.604 9.364-5.227 9.191-10.598-0.997-30.358 16.84-58.183 45.452-70.201 8.263-3.256 17.070-4.908 25.521-4.865 20.676-0.206 40.533 8.070 55.398 23.38 2.039 2.195 4.898 3.446 7.673 3.455 2.268-0.011 4.468-0.776 6.321-2.228 17.625-13.724 33.599-29.444 47.415-46.611 3.426-4.348 2.928-10.6-0.863-14.097-22.358-20.082-30.057-51.85-19.372-79.939s37.55-46.71 67.745-46.857h5.229c5.12-0.026 9.413-3.875 9.996-8.962zM861.733 552.735c-3.961 34.572-33.157 60.748-68.129 60.926h-5.235c-5.803 0.028-10.991 3.624-13.054 9.048s-0.577 11.558 4.020 15.69c26.602 24.519 29.853 65.381 7.275 94.034-16.847 20.934-36.063 39.845-57.197 56.302-12.034 9.427-26.861 14.584-42.368 14.658-19.254-0.051-37.623-8.090-50.269-21.718-3.221-3.315-7.66-5.165-12.712-5.118-1.425-0.007-2.839 0.258-3.554 0.532-5.581 2.346-9.136 7.892-8.937 13.966 1.152 35.958-25.509 66.771-61.307 70.804-26.332 2.923-52.909 2.854-79.246-0.208-36.286-4.245-62.897-36.157-60.576-72.186 0.304-6.123-3.235-11.788-8.302-13.964-1.328-0.536-2.748-0.808-4.606-0.8-4.651-0.041-9.118 1.817-11.635 4.367-24.544 27.036-65.886 30.311-94.481 7.394-20.587-16.65-39.207-35.595-55.308-56.226-22.552-28.277-19.261-69.208 7.317-93.334 4.474-4.138 5.939-10.604 3.748-16.115-2.052-5.076-6.932-8.442-11.794-8.55-36.436 0.464-66.759-24.741-72.949-60.89-3.243-26.718-3.243-53.731-0.055-79.964 3.744-35.827 34.642-62.605 70.642-61.219 6.877 0.266 13.251-3.59 15.584-8.401 2.309-5.59 0.861-12.028-3.789-16.247-26.603-24.51-29.856-65.368-7.293-93.994 16.767-20.868 35.856-39.76 57.129-56.491 12.099-9.322 26.921-14.42 42.463-14.513 19.308 0.059 37.717 8.166 50.145 21.684 3.263 3.322 7.737 5.172 12.994 5.126 1.471 0.015 2.933-0.245 3.363-0.39 5.601-2.359 9.165-7.93 8.957-14.077-1.126-35.941 25.542-66.721 61.322-70.731 26.322-2.909 52.889-2.84 79.251 0.212 36.244 4.265 62.828 36.125 60.546 72.343-0.339 6.047 3.159 11.654 8.186 13.782 1.381 0.55 2.855 0.829 4.726 0.823 4.663 0.040 9.142-1.819 11.615-4.312 24.439-26.99 65.656-30.312 94.137-7.557 20.721 16.607 39.456 35.549 55.655 56.225 22.667 28.35 19.38 69.439-7.531 93.846-4.33 3.918-5.776 10.112-3.628 15.542s7.438 8.96 13.543 8.854c34.999-0.298 65.076 24.766 71.337 60.925 3.065 26.552 3.065 53.368 0 79.92zM511.956 589.951c43.215-0.108 78.137-35.17 78.072-78.385 0-31.732-19.132-60.334-48.461-72.448s-63.068-5.35-85.461 17.133c-22.393 22.483-29.022 56.249-16.791 85.529s40.909 48.298 72.641 48.171zM512.146 648.617c-55.438 0.221-105.58-33.029-126.965-84.224s-9.796-110.233 29.358-149.543c39.153-39.31 98.144-51.136 149.424-29.956s84.731 71.189 84.732 126.627c0.114 75.549-60.999 136.907-136.548 137.096z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-check {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M342.481 563.894c-12.577-12.416-32.838-12.285-45.254 0.292s-12.285 32.838 0.292 45.254l118.857 117.333c13.275 13.105 34.901 12.123 46.933-2.131l297.143-352c11.4-13.505 9.694-33.694-3.811-45.094s-33.694-9.694-45.094 3.811l-274.828 325.566-94.238-93.030z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-language {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M512 800c159.058 0 288-128.942 288-288s-128.942-288-288-288c-159.058 0-288 128.942-288 288s128.942 288 288 288zM512 864c-194.404 0-352-157.596-352-352s157.596-352 352-352c194.404 0 352 157.596 352 352s-157.596 352-352 352z' /%3E%3Cpath fill='%23fff' d='M441.231 173.324c-76.632 84.62-121.231 207.208-121.231 338.676 0 134.304 46.556 259.282 126.083 343.936l46.646-43.82c-68.041-72.429-108.728-181.651-108.728-300.116 0-116.001 39.001-223.203 104.669-295.716l-47.438-42.96z' /%3E%3Cpath fill='%23fff' d='M584.297 173.324c76.632 84.62 121.231 207.208 121.231 338.676 0 134.304-46.556 259.282-126.083 343.936l-46.646-43.82c68.041-72.429 108.728-181.651 108.728-300.116 0-116.001-39.001-223.203-104.669-295.716l47.438-42.96z' /%3E%3Cpath fill='%23fff' d='M840.432 419.786c-81.65-22.637-200.551-35.786-328.432-35.786-128.056 0-247.103 13.185-328.758 35.876l17.136 61.663c75.47-20.972 188.938-33.539 311.622-33.539 122.521 0 235.854 12.533 311.334 33.459l17.099-61.674z' /%3E%3Cpath fill='%23fff' d='M840.432 605.754c-81.65 22.637-200.551 35.786-328.432 35.786-128.056 0-247.103-13.185-328.758-35.876l17.136-61.663c75.47 20.972 188.938 33.539 311.622 33.539 122.521 0 235.854-12.533 311.334-33.459l17.099 61.674z' /%3E%3Cpath fill='%23fff' d='M480 192h64v640h-64v-640z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-quality {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M159.904 192h288.234c17.277 0 31.862 14.323 31.862 31.992 0 17.792-14.261 31.993-31.853 31.994l-288.147 0.014v544.174c-0.017-0.18 704-0.174 704-0.174v-128.006c0-17.795 14.327-31.994 32-31.994 17.796 0 32 14.34 32 32.029v128.145c0 35.25-28.639 63.826-63.904 63.826h-704.192c-35.293 0-63.904-28.875-63.904-63.826v-544.348c0-35.25 28.639-63.826 63.904-63.826zM501.818 378.182c108.449 0 196.364-87.915 196.364-196.364 0-29.091 43.636-29.091 43.636 0 0 108.449 87.915 196.364 196.364 196.364 29.091 0 29.091 43.636 0 43.636-108.449 0-196.364 87.915-196.364 196.364 0 29.091-43.636 29.091-43.636 0 0-108.449-87.915-196.364-196.364-196.364-29.091 0-29.091-43.636 0-43.636z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-captions {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M160 771.213c-0.017-0.172 704-0.166 704-0.166v-518.261c0.017 0.172-704 0.166-704 0.166v518.261zM96 252.787c0-33.572 28.639-60.787 63.904-60.787h704.192c35.293 0 63.904 27.5 63.904 60.787v518.427c0 33.572-28.639 60.787-63.904 60.787h-704.192c-35.293 0-63.904-27.5-63.904-60.787v-518.427z' /%3E%3Cpath fill='%23fff' d='M490.583 568.655c0 7.729-2.311 15.987-6.933 24.777s-11.668 17.162-21.14 25.118c-9.471 7.956-21.405 14.358-35.801 19.208s-30.611 7.274-48.644 7.274c-38.34 0-68.268-11.176-89.787-33.528s-32.278-52.319-32.278-89.901c0-25.459 4.925-47.962 14.775-67.511s24.095-34.665 42.734-45.348c18.639-10.684 40.916-16.025 66.829-16.025 16.063 0 30.8 2.349 44.212 7.047s24.777 10.759 34.096 18.185c9.32 7.425 16.442 15.343 21.367 23.754s7.388 16.253 7.388 23.527c0 7.425-2.766 13.714-8.297 18.867s-12.237 7.729-20.117 7.729c-5.152 0-9.433-1.326-12.843-3.978s-7.236-6.933-11.479-12.843c-7.577-11.517-15.495-20.155-23.754-25.913s-18.753-8.638-31.482-8.638c-18.336 0-33.111 7.16-44.325 21.481s-16.821 33.907-16.821 58.759c0 11.669 1.44 22.39 4.319 32.164s7.047 18.109 12.502 25.004c5.455 6.895 12.047 12.123 19.776 15.684s16.215 5.342 25.459 5.342c12.426 0 23.072-2.879 31.937-8.638s16.707-14.548 23.527-26.368c3.789-6.971 7.88-12.426 12.275-16.366s9.774-5.91 16.139-5.91c7.577 0 13.866 2.879 18.867 8.638s7.501 11.896 7.501 18.412zM767.219 568.655c0 7.729-2.311 15.987-6.933 24.777s-11.668 17.162-21.14 25.118c-9.471 7.956-21.405 14.358-35.801 19.208s-30.611 7.274-48.644 7.274c-38.34 0-68.268-11.176-89.787-33.528s-32.278-52.319-32.278-89.901c0-25.459 4.925-47.962 14.775-67.511s24.095-34.665 42.734-45.348c18.639-10.684 40.916-16.025 66.829-16.025 16.063 0 30.8 2.349 44.212 7.047s24.777 10.759 34.096 18.185c9.32 7.425 16.442 15.343 21.367 23.754s7.388 16.253 7.388 23.527c0 7.425-2.766 13.714-8.297 18.867s-12.237 7.729-20.117 7.729c-5.152 0-9.433-1.326-12.843-3.978s-7.236-6.933-11.479-12.843c-7.577-11.517-15.495-20.155-23.754-25.913s-18.753-8.638-31.482-8.638c-18.336 0-33.111 7.16-44.325 21.481s-16.821 33.907-16.821 58.759c0 11.669 1.44 22.39 4.319 32.164s7.047 18.109 12.502 25.004c5.455 6.895 12.047 12.123 19.776 15.684s16.215 5.342 25.459 5.342c12.426 0 23.072-2.879 31.937-8.638s16.707-14.548 23.527-26.368c3.789-6.971 7.88-12.426 12.275-16.366s9.774-5.91 16.139-5.91c7.577 0 13.866 2.879 18.867 8.638s7.501 11.896 7.501 18.412z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-speed {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M512 832c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM480.239 643.971c-0.158-1.272-0.239-2.566-0.239-3.876v-192.19c0-17.621 14.204-31.905 32-31.905 17.673 0 32 14.497 32 31.905v192.19c0 1.313-0.079 2.607-0.232 3.878 55.325 14.128 96.232 64.301 96.232 124.027 0 70.692-57.308 128-128 128s-128-57.308-128-128c0-59.729 40.91-109.903 96.239-124.029zM928 576c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-194.404-157.596-352-352-352s-352 157.596-352 352c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-229.75 186.25-416 416-416s416 186.25 416 416z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-speed-down {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M512 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM401.852 670.758c-1.056-0.826-2.077-1.728-3.055-2.706l-113.005-113.005c-12.533-12.533-12.65-32.737-0.066-45.321 12.497-12.497 32.536-12.719 45.321 0.066l113.005 113.005c0.976 0.976 1.876 1.998 2.701 3.059 19.106-11.343 41.416-17.855 65.248-17.855 70.692 0 128 57.308 128 128s-57.308 128-128 128c-70.692 0-128-57.308-128-128 0-23.829 6.511-46.137 17.852-65.242zM928 576c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-194.404-157.596-352-352-352s-352 157.596-352 352c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-229.75 186.25-416 416-416s416 186.25 416 416z'/%3E%3C/svg%3E\"); }\n\n.playkit-icon-speed-up {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M512 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM546.516 612.708c0.524-1.23 1.129-2.446 1.819-3.64l79.906-138.402c8.862-15.35 28.348-20.692 43.76-11.794 15.305 8.837 20.707 28.135 11.666 43.794l-79.906 138.402c-0.693 1.201-1.451 2.34-2.268 3.416 23.761 23.238 38.508 55.655 38.508 91.516 0 70.692-57.308 128-128 128s-128-57.308-128-128c0-70.692 57.308-128 128-128 11.959 0 23.535 1.64 34.516 4.708zM928 576c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-194.404-157.596-352-352-352s-352 157.596-352 352c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-229.75 186.25-416 416-416s416 186.25 416 416z'/%3E%3C/svg%3E\"); }\n\n.playkit-icon-audio {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M768 625.124v-354.531l-352 135.385v330.022c0 70.692-57.308 128-128 128s-128-57.308-128-128c0-70.692 57.308-128 128-128 23.314 0 45.173 6.233 64 17.124v-241.124c0-13.241 8.155-25.114 20.513-29.867l416-160c20.96-8.062 43.487 7.41 43.487 29.867v512c0 70.692-57.308 128-128 128s-128-57.308-128-128c0-70.692 57.308-128 128-128 23.314 0 45.173 6.233 64 17.124zM288 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM704 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-copy {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M703.727 320c35.497 0 64.273 28.482 64.273 64.003v351.993c0 35.348-28.862 64.003-64.273 64.003h-191.454c-35.496 0-64.271-28.48-64.273-64.001l255.727 0.001v-352c0 0-28.356 0.147-63.727 0.001v-63.912l63.727-0.088zM256 288.187c0-35.45 28.398-64.187 63.988-64.187h192.025c35.339 0 63.988 28.706 63.988 64.187v319.625c0 35.45-28.398 64.187-63.988 64.187h-192.025c-35.339 0-63.988-28.706-63.988-64.187v-319.625zM320 288v320h192v-320h-192z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-facebook {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M432 405.333h-80v106.667h80v320h133.333v-320h97.12l9.547-106.667h-106.667v-44.453c0-25.467 5.12-35.547 29.733-35.547h76.933v-133.333h-101.547c-95.893 0-138.453 42.213-138.453 123.067v90.267z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-twitter {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M832 316.614c-23.547 10.29-48.853 17.221-75.413 20.345 27.12-15.987 47.947-41.319 57.733-71.508-25.36 14.806-53.467 25.568-83.387 31.37-23.92-25.122-58.080-40.82-95.84-40.82-84.773 0-147.067 77.861-127.92 158.687-109.093-5.381-205.84-56.833-270.613-135.035-34.4 58.094-17.84 134.090 40.613 172.574-21.493-0.683-41.76-6.484-59.44-16.171-1.44 59.879 42.16 115.898 105.307 128.368-18.48 4.935-38.72 6.090-59.307 2.205 16.693 51.347 65.173 88.702 122.667 89.752-55.2 42.605-124.747 61.637-194.4 53.552 58.107 36.673 127.147 58.067 201.28 58.067 243.787 0 381.52-202.684 373.2-384.473 25.653-18.244 47.92-41.004 65.52-66.914v0z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-linkedin {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M324.8 290.087c0 36.506-29.6 66.087-66.133 66.087s-66.133-29.581-66.133-66.087c0-36.48 29.6-66.087 66.133-66.087s66.133 29.607 66.133 66.087zM325.333 409.043h-133.333v422.957h133.333v-422.957zM538.187 409.043h-132.48v422.957h132.507v-222.026c0-123.45 160.773-133.549 160.773 0v222.026h133.013v-267.811c0-208.306-237.92-200.719-293.813-98.179v-56.967z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-email {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M256 768c-35.346 0-64-28.654-64-64v-352c0-35.346 28.654-64 64-64h512c35.346 0 64 28.654 64 64v352c0 35.346-28.654 64-64 64h-512zM512 467.488l147.52-115.488h-295.040l147.52 115.488zM748.48 352l-211.2 179.2c-0.713 1.308-1.572 2.532-2.56 3.648-12.707 12.158-32.733 12.158-45.44 0-0.988-1.116-1.847-2.34-2.56-3.648l-211.2-179.2h-19.52v352h512v-352h-19.52z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-embed {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M377.989 579.335c12.669 12.904 12.669 33.777 0 46.68-12.733 12.969-33.427 12.969-46.16 0l-104.727-106.667c-12.669-12.904-12.669-33.777 0-46.68l104.727-106.667c12.733-12.969 33.427-12.969 46.16 0 12.669 12.904 12.669 33.777 0 46.68l-81.812 83.327 81.812 83.327zM646.011 412.68c-12.669-12.904-12.669-33.777 0-46.68 12.733-12.969 33.427-12.969 46.16 0l104.727 106.667c12.669 12.904 12.669 33.777 0 46.68l-104.727 106.667c-12.733 12.969-33.427 12.969-46.16 0-12.669-12.904-12.669-33.777 0-46.68l81.812-83.327-81.812-83.327zM572.293 250.6c17.455 4.445 28.025 22.388 23.686 40.066l-104.727 426.669c-4.349 17.719-22.048 28.535-39.545 24.079-17.455-4.445-28.025-22.388-23.686-40.066l104.727-426.669c4.349-17.719 22.048-28.535 39.545-24.079z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-link {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M355.028 445.537c12.497 12.497 12.497 32.758 0 45.255s-32.758 12.497-45.255 0l-24.141-24.141c-49.92-49.92-49.832-130.999 0.094-180.925 49.984-49.984 130.995-50.025 180.955-0.064l113.266 113.266c49.964 49.964 49.935 130.955-0.064 180.955-12.497 12.497-32.758 12.497-45.255 0s-12.497-32.758 0-45.255c25.013-25.013 25.027-65.482 0.064-90.445l-113.266-113.266c-24.957-24.957-65.445-24.936-90.445 0.064-24.955 24.955-24.998 65.511-0.094 90.416l24.141 24.141zM668.972 578.463c-12.497-12.497-12.497-32.758 0-45.255s32.758-12.497 45.255 0l24.141 24.141c49.92 49.92 49.832 130.999-0.094 180.925-49.984 49.984-130.995 50.025-180.955 0.064l-113.266-113.266c-49.964-49.964-49.935-130.955 0.064-180.955 12.497-12.497 32.758-12.497 45.255 0s12.497 32.758 0 45.255c-25.013 25.013-25.027 65.482-0.064 90.445l113.266 113.266c24.957 24.957 65.445 24.936 90.445-0.064 24.955-24.955 24.998-65.511 0.094-90.416l-24.141-24.141z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-arrow-down {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M301.255 338.745c-24.994-24.994-65.516-24.994-90.51 0s-24.994 65.516 0 90.51l256 256c24.994 24.994 65.516 24.994 90.51 0l256-256c24.994-24.994 24.994-65.516 0-90.51s-65.516-24.994-90.51 0l-210.745 210.745-210.745-210.745z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-start-over {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M255.271 339.053c94.182-126.513 270.298-165.203 410.222-84.418 150.758 87.040 202.411 279.813 115.371 430.571s-279.813 202.411-430.571 115.371c-61.424-35.463-107.948-89.4-134.169-153.673-7.677-18.818-29.156-27.85-47.974-20.173s-27.85 29.156-20.173 47.974c32.339 79.269 89.818 145.906 165.517 189.611 185.96 107.364 423.747 43.649 531.111-142.311s43.649-423.747-142.311-531.111c-172.433-99.554-389.428-52.014-505.682 103.69l-27.226-78.49c-6.66-19.202-27.626-29.368-46.828-22.708s-29.368 27.626-22.708 46.828l52.434 151.164c5.36 15.452 20.275 25.513 36.61 24.694l159.799-8.011c20.299-1.018 35.929-18.298 34.911-38.596s-18.298-35.929-38.596-34.911l-89.738 4.499z' /%3E%3C/svg%3E\"); }\n\n.playkit-icon-seek-end {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M742.494 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z'/%3E%3C/svg%3E\"); }\n\n.playkit-icon-rewind {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' opacity='0.5' d='M258.471 323.053c94.182-126.513 270.298-165.203 410.222-84.418 150.758 87.040 202.411 279.813 115.371 430.571s-279.813 202.411-430.571 115.371c-61.424-35.463-107.948-89.4-134.169-153.673-7.677-18.818-29.156-27.85-47.974-20.173s-27.85 29.156-20.173 47.974c32.339 79.269 89.818 145.906 165.517 189.611 185.96 107.364 423.747 43.649 531.111-142.311s43.649-423.747-142.311-531.111c-172.433-99.554-389.428-52.014-505.682 103.69l-27.226-78.49c-6.66-19.202-27.626-29.368-46.828-22.708s-29.368 27.626-22.708 46.828l52.434 151.164c5.36 15.452 20.275 25.513 36.61 24.694l159.799-8.011c20.299-1.018 35.929-18.298 34.911-38.596s-18.298-35.929-38.596-34.911l-89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M816.068 431.974c-20.553-78.699-71.369-149.456-147.375-193.338-139.923-80.785-316.040-42.095-410.222 84.418l89.738-4.499c20.299-1.018 37.579 14.613 38.596 34.911s-14.613 37.579-34.911 38.596l-159.799 8.011c-16.335 0.819-31.25-9.242-36.61-24.694l-52.434-151.164c-6.66-19.202 3.506-40.167 22.708-46.828s40.167 3.506 46.828 22.708l27.226 78.49c116.254-155.703 333.248-203.244 505.682-103.69 91.184 52.645 152.976 136.648 179.618 230.523l-69.044 26.555z'%3E%3C/path%3E%3C/svg%3E\"); }\n\n.playkit-icon-rewind-10 {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M258.471 323.053c94.182-126.513 270.298-165.203 410.222-84.418 150.758 87.040 202.411 279.813 115.371 430.571s-279.813 202.411-430.571 115.371c-61.424-35.463-107.948-89.4-134.169-153.673-7.677-18.818-29.156-27.85-47.974-20.173s-27.85 29.156-20.173 47.974c32.339 79.269 89.818 145.906 165.517 189.611 185.96 107.364 423.747 43.649 531.111-142.311s43.649-423.747-142.311-531.111c-172.433-99.554-389.428-52.014-505.682 103.69l-27.226-78.49c-6.66-19.202-27.626-29.368-46.828-22.708s-29.368 27.626-22.708 46.828l52.434 151.164c5.36 15.452 20.275 25.513 36.61 24.694l159.799-8.011c20.299-1.018 35.929-18.298 34.911-38.596s-18.298-35.929-38.596-34.911l-89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M413.327 636.083h67.358v-252.083h-48.527c-2.173 7.358-4.949 13.589-8.329 18.693s-7.726 9.139-13.037 12.106c-5.311 2.967-11.709 5.103-19.193 6.409s-16.417 1.958-26.798 1.958v41.302h48.527v171.616zM596.807 554.192c0 17.803 1.569 29.849 4.708 36.139s8.208 9.435 15.21 9.435c7.001 0 12.071-3.145 15.21-9.435s4.708-18.336 4.708-36.139v-83.316c0-17.803-1.569-29.849-4.708-36.139s-8.208-9.435-15.21-9.435c-7.001 0-12.071 3.145-15.21 9.435s-4.708 18.336-4.708 36.139v83.316zM529.449 512.534c0-25.398 1.75-46.405 5.251-63.021s8.812-29.789 15.934-39.522c7.122-9.732 16.176-16.497 27.16-20.295s23.962-5.697 38.93-5.697c14.969 0 27.945 1.899 38.93 5.697s20.038 10.563 27.16 20.295c7.122 9.732 12.433 22.906 15.934 39.522s5.251 37.622 5.251 63.021c0 25.636-1.75 46.702-5.251 63.199s-8.812 29.552-15.934 39.166c-7.122 9.613-16.176 16.2-27.16 19.761s-23.962 5.341-38.93 5.341c-14.969 0-27.945-1.78-38.93-5.341s-20.038-10.147-27.16-19.761c-7.122-9.613-12.433-22.668-15.934-39.166s-5.251-37.563-5.251-63.199z'%3E%3C/path%3E%3C/svg%3E\"); }\n\n.playkit-icon-forward {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' opacity='0.5' d='M765.529 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M207.932 431.974c20.553-78.699 71.369-149.456 147.375-193.338 139.923-80.785 316.040-42.095 410.222 84.418l-89.738-4.499c-20.299-1.018-37.579 14.613-38.596 34.911s14.613 37.579 34.911 38.596l159.799 8.011c16.335 0.819 31.25-9.242 36.61-24.694l52.434-151.164c6.66-19.202-3.506-40.167-22.708-46.828s-40.167 3.506-46.828 22.708l-27.226 78.49c-116.254-155.703-333.248-203.244-505.682-103.69-91.184 52.645-152.976 136.648-179.618 230.523l69.044 26.555z'%3E%3C/path%3E%3C/svg%3E\"); }\n\n.playkit-icon-forward-10 {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M765.529 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M365.327 636.083h67.358v-252.083h-48.527c-2.173 7.358-4.949 13.589-8.329 18.693s-7.726 9.139-13.037 12.106c-5.311 2.967-11.709 5.103-19.193 6.409s-16.417 1.958-26.798 1.958v41.302h48.527v171.616zM548.807 554.192c0 17.803 1.569 29.849 4.708 36.139s8.208 9.435 15.21 9.435c7.001 0 12.071-3.145 15.21-9.435s4.708-18.336 4.708-36.139v-83.316c0-17.803-1.569-29.849-4.708-36.139s-8.208-9.435-15.21-9.435c-7.001 0-12.071 3.145-15.21 9.435s-4.708 18.336-4.708 36.139v83.316zM481.449 512.534c0-25.398 1.75-46.405 5.251-63.021s8.812-29.789 15.934-39.522c7.122-9.732 16.176-16.497 27.16-20.295s23.962-5.697 38.93-5.697c14.969 0 27.945 1.899 38.93 5.697s20.038 10.563 27.16 20.295c7.122 9.732 12.433 22.906 15.934 39.522s5.251 37.622 5.251 63.021c0 25.636-1.75 46.702-5.251 63.199s-8.812 29.552-15.934 39.166c-7.122 9.613-16.176 16.2-27.16 19.761s-23.962 5.341-38.93 5.341c-14.969 0-27.945-1.78-38.93-5.341s-20.038-10.147-27.16-19.761c-7.122-9.613-12.433-22.668-15.934-39.166s-5.251-37.563-5.251-63.199z'%3E%3C/path%3E%3C/svg%3E\"); }\n\n.playkit-icon-vr-stereo {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M864 255.996c53.019 0 96 42.981 96 96v384.004c0 53.019-42.981 96-96 96h-219.764c-33.721 0-64.97-17.693-82.319-46.608l-49.917-83.195-49.917 83.195c-17.349 28.916-48.598 46.608-82.319 46.608h-219.764c-53.019 0-96-42.981-96-96v-384.003c0-53.019 42.981-96 96-96h704zM128 351.997v384.003c0 17.673 14.327 32 32 32h219.764c11.24 0 21.657-5.898 27.44-15.536l49.917-83.195c5.405-9.008 12.944-16.547 21.952-21.952 30.309-18.185 69.622-8.357 87.807 21.952l49.917 83.195c5.783 9.639 16.199 15.536 27.44 15.536h219.764c17.673 0 32-14.327 32-32v-384.004c0-17.673-14.327-32-32-32h-704c-17.673 0-32 14.327-32 32zM304 624c-44.183 0-80-35.817-80-80s35.817-80 80-80c44.183 0 80 35.817 80 80s-35.817 80-80 80zM720 624c-44.183 0-80-35.817-80-80s35.817-80 80-80c44.183 0 80 35.817 80 80s-35.817 80-80 80z'%3E%3C/path%3E%3C/svg%3E\"); }\n\n.playkit-icon-vr-stereo-full {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%2301ACCD' d='M864 255.996c53.019 0 96 42.981 96 96v384.004c0 53.019-42.981 96-96 96h-219.764c-33.721 0-64.97-17.693-82.319-46.608l-49.917-83.195-49.917 83.195c-17.349 28.916-48.598 46.608-82.319 46.608h-219.764c-53.019 0-96-42.981-96-96v-384.003c0-53.019 42.981-96 96-96h704zM304 624c44.183 0 80-35.817 80-80s-35.817-80-80-80c-44.183 0-80 35.817-80 80s35.817 80 80 80zM720 624c44.183 0 80-35.817 80-80s-35.817-80-80-80c-44.183 0-80 35.817-80 80s35.817 80 80 80z'%3E%3C/path%3E%3C/svg%3E\"); }\n\n.playkit-icon-chromecast {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M160 704v96h96c0-53.12-42.88-96-96-96zM160 576v64c88.32 0 160 71.68 160 160h64c0-123.84-100.16-224-224-224zM736 352h-448v52.16c126.72 40.96 226.88 141.12 267.84 267.84h180.16v-320zM160 448v64c159.040 0 288 128.96 288 288h64c0-194.56-157.76-352-352-352zM800 224h-576c-35.2 0-64 28.8-64 64v96h64v-96h576v448h-224v64h224c35.2 0 64-28.8 64-64v-448c0-35.2-28.8-64-64-64z'%3E%3C/path%3E%3C/svg%3E\"); }\n\n.playkit-icon-chromecast-brand {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%2301accd' d='M160 704v96h96c0-53.12-42.88-96-96-96zM160 576v64c88.32 0 160 71.68 160 160h64c0-123.84-100.16-224-224-224zM736 352h-448v52.16c126.72 40.96 226.88 141.12 267.84 267.84h180.16v-320zM160 448v64c159.040 0 288 128.96 288 288h64c0-194.56-157.76-352-352-352zM800 224h-576c-35.2 0-64 28.8-64 64v96h64v-96h576v448h-224v64h224c35.2 0 64-28.8 64-64v-448c0-35.2-28.8-64-64-64z'%3E%3C/path%3E%3C/svg%3E\"); }\n\n.playkit-icon-next {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M640 549.333l-264.982 154.573c-30.386 17.725-55.018 3.388-55.018-32.094v-319.625c0-35.45 24.605-49.835 55.018-32.094l264.982 154.573v-154.448c0-17.794 14.204-32.219 32-32.219 17.673 0 32 14.398 32 32.219v383.562c0 17.794-14.204 32.219-32 32.219-17.673 0-32-14.398-32-32.219v-154.448z'%3E%3C/path%3E%3C/svg%3E\"); }\n\n.playkit-icon-prev {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M384 549.333l264.982 154.573c30.386 17.725 55.018 3.388 55.018-32.094v-319.625c0-35.45-24.605-49.835-55.018-32.094l-264.982 154.573v-154.448c0-17.794-14.204-32.219-32-32.219-17.673 0-32 14.398-32 32.219v383.562c0 17.794 14.204 32.219 32 32.219 17.673 0 32-14.398 32-32.219v-154.448z'%3E%3C/path%3E%3C/svg%3E\"); }\n\n.playkit-icon-picture-in-picture {\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%23fff' d='M224 256c-17.673 0-32 14.327-32 32v448c0 17.673 14.327 32 32 32h576c17.673 0 32-14.327 32-32v-448c0-17.673-14.327-32-32-32h-576zM224 192h576c53.019 0 96 42.981 96 96v448c0 53.019-42.981 96-96 96h-576c-53.019 0-96-42.981-96-96v-448c0-53.019 42.981-96 96-96z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M544 512h192c17.673 0 32 14.327 32 32v128c0 17.673-14.327 32-32 32h-192c-17.673 0-32-14.327-32-32v-128c0-17.673 14.327-32 32-32z'%3E%3C/path%3E%3C/svg%3E\"); }\n\n@keyframes playkit-openDropmenu {\n  from {\n    opacity: 0;\n    transform: translateY(10px); }\n  to {\n    opacity: 1;\n    transform: translateY(0); } }\n\n.playkit-dropdown {\n  position: relative;\n  font-size: 15px; }\n  .playkit-dropdown.playkit-active .playkit-dropdown-menu {\n    display: block;\n    opacity: 1; }\n  .playkit-dropdown.playkit-active .playkit-dropdown-button .playkit-icon {\n    transform: rotate(180deg); }\n  .playkit-dropdown .playkit-dropdown-button {\n    font-weight: bold;\n    line-height: 18px;\n    color: #fff;\n    cursor: pointer;\n    padding-left: 20px; }\n    .playkit-dropdown .playkit-dropdown-button .playkit-icon {\n      width: 16px;\n      height: 16px;\n      vertical-align: middle;\n      margin-left: 6px;\n      transition: 150ms transform;\n      will-change: transform; }\n\n.playkit-dropdown-menu {\n  display: block;\n  opacity: 1;\n  position: absolute;\n  background-color: #333333;\n  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.3);\n  border-radius: 4px;\n  padding: 6px 0;\n  z-index: 5;\n  animation: playkit-openDropmenu 100ms ease-out forwards;\n  max-height: 220px;\n  overflow-y: auto;\n  font-size: 15px;\n  text-align: left; }\n  .playkit-dropdown-menu.playkit-top {\n    margin-bottom: 10px;\n    bottom: 100%; }\n  .playkit-dropdown-menu.playkit-bottom {\n    margin-top: 10px;\n    top: 100%; }\n  .playkit-dropdown-menu.playkit-right {\n    left: 0; }\n  .playkit-dropdown-menu.playkit-left {\n    right: 0; }\n  .playkit-dropdown-menu.playkit-stick-bottom {\n    bottom: -95px;\n    margin: 5px 0; }\n  .playkit-dropdown-menu .playkit-dropdown-menu-item {\n    padding: 2px 10px 2px 16px;\n    white-space: nowrap;\n    min-height: 30px;\n    cursor: pointer; }\n    .playkit-dropdown-menu .playkit-dropdown-menu-item:hover {\n      color: #fff; }\n    .playkit-dropdown-menu .playkit-dropdown-menu-item.playkit-active {\n      color: #01accd; }\n      .playkit-dropdown-menu .playkit-dropdown-menu-item.playkit-active .playkit-icon-check {\n        background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36'%3E%3Cpath fill='%2301accd' d='M342.481 563.894c-12.577-12.416-32.838-12.285-45.254 0.292s-12.285 32.838 0.292 45.254l118.857 117.333c13.275 13.105 34.901 12.123 46.933-2.131l297.143-352c11.4-13.505 9.694-33.694-3.811-45.094s-33.694-9.694-45.094 3.811l-274.828 325.566-94.238-93.030z' /%3E%3C/svg%3E\"); }\n    .playkit-dropdown-menu .playkit-dropdown-menu-item .playkit-icon-check {\n      display: inline-block;\n      margin-left: 16px;\n      vertical-align: middle;\n      width: 24px;\n      height: 24px; }\n    .playkit-dropdown-menu .playkit-dropdown-menu-item span {\n      vertical-align: middle;\n      line-height: 26px; }\n\n.playkit-player .playkit-control-button {\n  width: 32px;\n  height: 32px;\n  background: transparent;\n  display: inline-block;\n  opacity: 0.8;\n  border: none;\n  padding: 0;\n  cursor: pointer; }\n  .playkit-player .playkit-control-button i {\n    width: 32px;\n    height: 32px; }\n  .playkit-player .playkit-control-button.playkit-active {\n    opacity: 1; }\n  .playkit-player .playkit-control-button:disabled {\n    opacity: 0.4;\n    cursor: default; }\n  .playkit-player .playkit-control-button.playkit-control-button-rounded {\n    width: 36px;\n    height: 36px;\n    padding: 2px; }\n\n.playkit-player:not(.playkit-touch) .playkit-control-button:not(:disabled):hover {\n  opacity: 1; }\n\n.playkit-player:not(.playkit-touch) .playkit-control-button:not(:disabled).playkit-control-button-rounded:hover {\n  background-color: rgba(0, 0, 0, 0.4);\n  border-radius: 18px; }\n\n.playkit-player .playkit-control-button-container {\n  display: inline-block;\n  position: relative;\n  vertical-align: top; }\n\n.playkit-player.playkit-touch .playkit-player .playkit-control-button-container {\n  position: static; }\n\n.playkit-player.playkit-touch .playkit-control-button {\n  position: relative; }\n\n.playkit-player.playkit-state-idle .playkit-no-idle-control {\n  display: none; }\n\n.playkit-rotate {\n  -moz-animation: playkit-spin 0.3s 1 linear;\n  -o-animation: playkit-spin 0.3s 1 linear;\n  -webkit-animation: playkit-spin 0.3s 1 linear;\n  animation: playkit-spin 0.3s 1 linear; }\n\n.playkit-reverse-rotate {\n  -moz-animation: playkit-reverse-spin 0.3s 1 linear;\n  -o-animation: playkit-reverse-spin 0.3s 1 linear;\n  -webkit-animation: playkit-reverse-spin 0.3s 1 linear;\n  animation: playkit-reverse-spin 0.3s 1 linear; }\n\n@-webkit-keyframes playkit-spin {\n  0% {\n    -webkit-transform: rotate(359deg); }\n  100% {\n    -webkit-transform: rotate(0deg); } }\n\n@-moz-keyframes playkit-spin {\n  0% {\n    -moz-transform: rotate(359deg); }\n  100% {\n    -moz-transform: rotate(0deg); } }\n\n@-o-keyframes playkit-spin {\n  0% {\n    -o-transform: rotate(359deg); }\n  100% {\n    -o-transform: rotate(0deg); } }\n\n@-ms-keyframes playkit-spin {\n  0% {\n    -ms-transform: rotate(359deg); }\n  100% {\n    -ms-transform: rotate(0deg); } }\n\n@keyframes playkit-spin {\n  0% {\n    transform: rotate(359deg); }\n  100% {\n    transform: rotate(0deg); } }\n\n@-webkit-keyframes playkit-reverse-spin {\n  0% {\n    transform: rotate(0deg); }\n  100% {\n    transform: rotate(359deg); } }\n\n@-moz-keyframes playkit-reverse-spin {\n  0% {\n    transform: rotate(0deg); }\n  100% {\n    transform: rotate(359deg); } }\n\n@-o-keyframes playkit-reverse-spin {\n  0% {\n    transform: rotate(0deg); }\n  100% {\n    transform: rotate(359deg); } }\n\n@-ms-keyframes playkit-reverse-spin {\n  0% {\n    transform: rotate(0deg); }\n  100% {\n    transform: rotate(359deg); } }\n\n@keyframes playkit-reverse-spin {\n  0% {\n    transform: rotate(0deg); }\n  100% {\n    transform: rotate(359deg); } }\n\n.playkit-player a {\n  font-size: 15px;\n  line-height: 18px;\n  cursor: pointer; }\n  .playkit-player a:hover {\n    color: #01819a; }\n  .playkit-player a:active {\n    opacity: 0.7; }\n\n.playkit-player {\n  overflow: hidden;\n  user-select: none;\n  width: 100%;\n  height: 100%;\n  position: relative;\n  outline: none;\n  -webkit-touch-callout: none;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  -webkit-tap-highlight-color: transparent; }\n  .playkit-player:-webkit-full-screen {\n    width: 100%;\n    height: 100%;\n    max-width: none; }\n  .playkit-player * {\n    box-sizing: border-box;\n    outline: none; }\n  .playkit-player ::selection {\n    background-color: rgba(0, 0, 0, 0.1); }\n  .playkit-player video {\n    width: 100%; }\n  .playkit-player .playkit-player-gui {\n    opacity: 0;\n    overflow: hidden;\n    font-size: 0;\n    font-family: sans-serif; }\n    .playkit-player .playkit-player-gui label {\n      margin-bottom: initial; }\n    .playkit-player .playkit-player-gui input,\n    .playkit-player .playkit-player-gui textarea {\n      font-family: sans-serif; }\n  .playkit-player .overlay-portal {\n    position: absolute;\n    top: 0;\n    left: 0;\n    width: 100%;\n    height: 100%; }\n  .playkit-player.playkit-overlay-active .overlay-portal {\n    z-index: 11; }\n  .playkit-player.playkit-casting .playkit-player-gui,\n  .playkit-player.playkit-metadata-loaded .playkit-player-gui,\n  .playkit-player.playkit-state-paused .playkit-player-gui,\n  .playkit-player.playkit-state-idle .playkit-player-gui,\n  .playkit-player.playkit-ad-break .playkit-player-gui,\n  .playkit-player.playkit-overlay-active .playkit-player-gui,\n  .playkit-player.playkit-menu-active .playkit-player-gui {\n    opacity: 1; }\n\n.playkit-player.playkit-nav .playkit-control-button:focus,\n.playkit-player.playkit-nav .playkit-seek-bar:focus,\n.playkit-player.playkit-nav .playkit-dropdown-button:focus,\n.playkit-player.playkit-nav .playkit-smart-container-item:focus,\n.playkit-player.playkit-nav .playkit-dropdown-menu-item:focus,\n.playkit-player.playkit-nav .playkit-pre-playback-play-button:focus,\n.playkit-player.playkit-nav .playkit-sample:focus,\n.playkit-player.playkit-nav .playkit-custom-captions-applied > a:focus,\n.playkit-player.playkit-nav .playkit-form-group-row > a:focus,\n.playkit-player.playkit-nav .playkit-button-save-cvaa:focus,\n.playkit-player.playkit-nav .playkit-slider:focus,\n.playkit-player.playkit-nav .playkit-unmute-button-container:focus,\n.playkit-player.playkit-nav .playkit-live-tag:focus {\n  outline: 1px solid #00cbff; }\n\n.playkit-player [id^='playkit-ads-container'] {\n  transition: transform 100ms; }\n  .playkit-player [id^='playkit-ads-container'][data-adtype='overlay'] {\n    z-index: 1; }\n\n.playkit-player:not(.playkit-ad-break).playkit-metadata-loaded.playkit-hover [id^='playkit-ads-container'],\n.playkit-player:not(.playkit-ad-break).playkit-metadata-loaded.playkit-state-paused [id^='playkit-ads-container'],\n.playkit-player:not(.playkit-ad-break).playkit-metadata-loaded.playkit-state-idle [id^='playkit-ads-container'] {\n  transform: translateY(-60px);\n  -webkit-transform: translateY(-60px);\n  -ms-transform: translateY(-60px); }\n\nvideo {\n  left: 0; }\n  video::-webkit-media-controls-panel-container, video::-webkit-media-controls {\n    display: none !important;\n    -webkit-appearance: none; }\n  video::-webkit-media-controls-start-playback-button {\n    display: none !important;\n    -webkit-appearance: none; }\n\n.playkit-player video::-webkit-media-text-track-container {\n  max-height: none; }\n\n.playkit-player.playkit-iOS video::-webkit-media-text-track-container {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0; }\n\n.playkit-player.playkit-state-paused video::-webkit-media-text-track-container, .playkit-player.playkit-state-idle video::-webkit-media-text-track-container, .playkit-player.playkit-hover video::-webkit-media-text-track-container {\n  padding: 0 0 50px 0; }\n\n.playkit-player.playkit-state-paused.playkit-Safari video::-webkit-media-text-track-container, .playkit-player.playkit-state-paused.playkit-iOS video::-webkit-media-text-track-container, .playkit-player.playkit-state-idle.playkit-Safari video::-webkit-media-text-track-container, .playkit-player.playkit-state-idle.playkit-iOS video::-webkit-media-text-track-container, .playkit-player.playkit-hover.playkit-Safari video::-webkit-media-text-track-container, .playkit-player.playkit-hover.playkit-iOS video::-webkit-media-text-track-container {\n  padding: initial;\n  max-height: calc(100% - 50px); }\n\n.playkit-player.playkit-state-paused.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-display, .playkit-player.playkit-state-idle.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-display, .playkit-player.playkit-hover.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-display {\n  transform: translateY(-50px);\n  -webkit-transform: translateY(-50px);\n  -ms-transform: translateY(-50px); }\n\n.playkit-player.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-container {\n  max-height: none; }\n\n.playkit-player.playkit-overlay-active .playkit-subtitles {\n  visibility: hidden; }\n\n.playkit-player .playkit-subtitles {\n  top: 50px;\n  transform: translateY(0px);\n  -webkit-transform: translateY(0px);\n  -ms-transform: translateY(0px);\n  transition: ease-in 100ms; }\n\n.playkit-player:not(.playkit-overlay-active).playkit-state-paused .playkit-subtitles,\n.playkit-player:not(.playkit-overlay-active).playkit-state-idle .playkit-subtitles,\n.playkit-player:not(.playkit-overlay-active).playkit-hover .playkit-subtitles {\n  transform: translateY(-50px);\n  -webkit-transform: translateY(-50px);\n  -ms-transform: translateY(-50px); }\n\n.playkit-player:not(.playkit-overlay-active).playkit-fullscreen.playkit-iOS .playkit-subtitles {\n  transform: translateY(0px);\n  -webkit-transform: translateY(0px);\n  -ms-transform: translateY(0px); }\n\n.playkit-video-player {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background: black; }\n\n@keyframes playkit-openOverlay {\n  from {\n    opacity: 0; }\n  to {\n    opacity: 1; } }\n\n.playkit-overlay {\n  position: relative;\n  width: 100%;\n  height: 100%;\n  display: none;\n  opacity: 0;\n  animation: playkit-openOverlay 100ms ease-in-out forwards;\n  z-index: 11; }\n  .playkit-overlay.playkit-active {\n    display: block;\n    opacity: 1; }\n  .playkit-overlay .playkit-overlay-contents {\n    position: absolute;\n    top: 0;\n    left: 0;\n    width: 100%;\n    height: 100%;\n    background-color: rgba(0, 0, 0, 0.42);\n    z-index: 4;\n    text-align: center;\n    color: #fff;\n    padding: 60px 20px 30px 20px;\n    overflow-y: auto; }\n  .playkit-overlay .playkit-title {\n    font-size: 24px;\n    font-weight: bold;\n    line-height: 29px;\n    margin-bottom: 60px; }\n  .playkit-overlay .playkit-close-overlay {\n    position: absolute;\n    top: 48px;\n    right: 48px;\n    z-index: 5;\n    cursor: pointer; }\n    .playkit-overlay .playkit-close-overlay .playkit-icon-close {\n      width: 24px;\n      height: 24px; }\n  .playkit-overlay .playkit-overlay-screen {\n    display: none; }\n    .playkit-overlay .playkit-overlay-screen.playkit-active {\n      display: block; }\n\n.playkit-player.playkit-size-md .playkit-overlay .playkit-overlay-contents {\n  padding: 36px 20px; }\n\n.playkit-player.playkit-size-md .playkit-overlay .playkit-close-overlay {\n  top: 38px; }\n\n.playkit-player.playkit-size-md .playkit-overlay .playkit-title {\n  margin-bottom: 24px; }\n\n.playkit-player.playkit-size-sm .playkit-overlay .playkit-overlay-contents, .playkit-player.playkit-size-xs .playkit-overlay .playkit-overlay-contents {\n  padding: 16px 24px; }\n\n.playkit-player.playkit-size-sm .playkit-overlay .playkit-close-overlay, .playkit-player.playkit-size-xs .playkit-overlay .playkit-close-overlay {\n  top: 15px;\n  right: 24px; }\n\n.playkit-player.playkit-size-sm .playkit-overlay .playkit-title, .playkit-player.playkit-size-xs .playkit-overlay .playkit-title {\n  font-size: 20px;\n  line-height: 19px;\n  margin-bottom: 24px; }\n\n@keyframes playkit-openSmartContainer {\n  from {\n    opacity: 0;\n    transform: translateY(10px); }\n  to {\n    opacity: 1;\n    transform: translateY(0); } }\n\n@keyframes playkit-closeSmartContainer {\n  from {\n    opacity: 1;\n    transform: translateY(0); }\n  to {\n    opacity: 0;\n    transform: translateY(10px); } }\n\n.playkit-player:not(.playkit-touch) .playkit-smart-container {\n  background-color: #222222;\n  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.3);\n  border-radius: 4px;\n  position: absolute;\n  right: 0px;\n  min-width: 193px;\n  font-size: 15px;\n  z-index: 10;\n  display: block;\n  animation: playkit-openSmartContainer 100ms ease-out forwards; }\n  .playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-leaving {\n    animation: playkit-closeSmartContainer 100ms ease-out forwards; }\n  .playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-top {\n    bottom: 100%;\n    margin-bottom: 6px; }\n    .playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-top:before {\n      display: block;\n      content: ' ';\n      position: absolute;\n      bottom: -6px;\n      left: 0;\n      width: 100%;\n      height: 6px; }\n  .playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-bottom {\n    top: 100%;\n    margin-top: 6px; }\n  .playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-right {\n    left: 0px; }\n  .playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-left {\n    right: 0px; }\n  .playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item {\n    margin: 16px;\n    color: rgba(244, 244, 244, 0.8);\n    white-space: nowrap;\n    display: flex;\n    justify-content: space-between; }\n    .playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon {\n      display: none; }\n    .playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,\n    .playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item select {\n      align-self: flex-end; }\n    .playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown span {\n      max-width: 100px;\n      overflow: hidden;\n      text-overflow: ellipsis;\n      display: inline-block;\n      vertical-align: middle; }\n    .playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item select {\n      text-align-last: right; }\n\n.playkit-player.playkit-touch .playkit-smart-container-item, .playkit-player.playkit-size-sm .playkit-smart-container-item, .playkit-player.playkit-size-xs .playkit-smart-container-item {\n  width: 300px;\n  max-width: 100%;\n  margin: 16px auto;\n  color: rgba(244, 244, 244, 0.8);\n  white-space: nowrap;\n  text-align: left;\n  display: flex;\n  justify-content: space-between; }\n  .playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item label, .playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item label, .playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item label {\n    font-size: 16px;\n    color: rgba(255, 255, 255, 0.8);\n    margin-right: 20px; }\n    .playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon, .playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon, .playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon {\n      width: 24px;\n      height: 24px;\n      display: inline-block;\n      vertical-align: middle;\n      margin-right: 16px; }\n  .playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,\n  .playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item select, .playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,\n  .playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item select, .playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,\n  .playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item select {\n    align-self: flex-end; }\n  .playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item select, .playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item select, .playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item select {\n    text-align-last: right;\n    min-width: 1px;\n    line-height: 24px; }\n\n.playkit-player.playkit-touch.playkit-Windows select option, .playkit-player.playkit-size-sm.playkit-Windows select option, .playkit-player.playkit-size-xs.playkit-Windows select option {\n  color: black;\n  background-color: white; }\n\n.playkit-overlay.playkit-share-overlay .playkit-share-icons {\n  margin: 60px 0; }\n  .playkit-overlay.playkit-share-overlay .playkit-share-icons .playkit-btn-rounded {\n    margin: 0 8px;\n    transition: transform 100ms;\n    will-change: transform;\n    border: none; }\n    .playkit-overlay.playkit-share-overlay .playkit-share-icons .playkit-btn-rounded:first-child {\n      margin-left: 0; }\n    .playkit-overlay.playkit-share-overlay .playkit-share-icons .playkit-btn-rounded:last-child {\n      margin-right: 0; }\n    .playkit-overlay.playkit-share-overlay .playkit-share-icons .playkit-btn-rounded.playkit-facebook {\n      background-color: #3b5998; }\n    .playkit-overlay.playkit-share-overlay .playkit-share-icons .playkit-btn-rounded.playkit-twitter {\n      background-color: #1da1f2; }\n    .playkit-overlay.playkit-share-overlay .playkit-share-icons .playkit-btn-rounded.playkit-linkedin {\n      background-color: #00a0dc; }\n\n.playkit-overlay.playkit-share-overlay .playkit-link-options-container {\n  width: auto;\n  display: inline-block;\n  max-width: 100%;\n  text-align: left;\n  margin: 0 auto; }\n  .playkit-overlay.playkit-share-overlay .playkit-link-options-container .playkit-copy-url-row {\n    display: flex; }\n    .playkit-overlay.playkit-share-overlay .playkit-link-options-container .playkit-copy-url-row .playkit-input-copy-url {\n      margin: 0; }\n    .playkit-overlay.playkit-share-overlay .playkit-link-options-container .playkit-copy-url-row .playkit-btn-copy-url .playkit-icon {\n      width: 32px;\n      margin-top: 5px; }\n  .playkit-overlay.playkit-share-overlay .playkit-link-options-container .playkit-video-start-options-row {\n    margin-top: 24px; }\n    .playkit-overlay.playkit-share-overlay .playkit-link-options-container .playkit-video-start-options-row .playkit-checkbox {\n      margin-right: 15px; }\n    .playkit-overlay.playkit-share-overlay .playkit-link-options-container .playkit-video-start-options-row .playkit-form-group {\n      margin: 0; }\n\n.playkit-share-main-container {\n  width: 300px;\n  max-width: 100%;\n  margin: 0 auto;\n  text-align: center; }\n\n.playkit-player:not(.playkit-touch) .playkit-overlay.playkit-share-overlay .playkit-share-icons .playkit-btn-rounded:hover {\n  transform: scale(1.1667); }\n\n.playkit-player.playkit-size-md .playkit-overlay.playkit-share-overlay .playkit-share-icons {\n  margin: 40px 0; }\n\n.playkit-player.playkit-size-sm .playkit-overlay.playkit-share-overlay .playkit-share-icons {\n  margin: 20px 0; }\n\n.playkit-overlay.playkit-cvaa-overlay .playkit-sample {\n  border: 2px solid rgba(255, 255, 255, 0.2);\n  border-radius: 4px;\n  font-size: 16px;\n  font-weight: bold;\n  line-height: 36px;\n  text-align: center;\n  padding: 0 31px;\n  display: inline-block;\n  margin: 0 12px;\n  cursor: pointer;\n  position: relative; }\n  .playkit-overlay.playkit-cvaa-overlay .playkit-sample.playkit-black-bg {\n    background-color: #000; }\n  .playkit-overlay.playkit-cvaa-overlay .playkit-sample.playkit-yellow-text {\n    color: #faff00; }\n  .playkit-overlay.playkit-cvaa-overlay .playkit-sample .playkit-active-tick {\n    height: 16px;\n    width: 16px;\n    border-radius: 8px;\n    background-color: #01accd;\n    position: absolute;\n    top: -5px;\n    right: -5px; }\n    .playkit-overlay.playkit-cvaa-overlay .playkit-sample .playkit-active-tick .playkit-icon {\n      vertical-align: top; }\n  .playkit-overlay.playkit-cvaa-overlay .playkit-sample span {\n    font-size: 16px !important;\n    line-height: 1;\n    vertical-align: middle; }\n\n.playkit-overlay.playkit-cvaa-overlay .playkit-button-save-cvaa {\n  margin-top: 50px;\n  height: 40px;\n  width: 400px;\n  max-width: 100%;\n  border: 2px solid rgba(255, 255, 255, 0.2);\n  border-radius: 4px;\n  font-size: 16px;\n  font-weight: bold;\n  line-height: 38px;\n  text-align: center;\n  display: inline-block;\n  color: #fff;\n  text-decoration: none;\n  cursor: pointer; }\n\n.playkit-overlay.playkit-cvaa-overlay .playkit-custom-captions-applied {\n  margin-top: 50px; }\n\n.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form {\n  width: 300px;\n  max-width: 100%;\n  margin: 0 auto; }\n  .playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form a {\n    color: white;\n    line-height: 36px;\n    text-decoration: none; }\n    .playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form a:hover, .playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form a:focus {\n      text-decoration: underline; }\n  .playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form .playkit-slider {\n    float: right;\n    width: 100px;\n    margin-top: 5px; }\n\n.playkit-overlay.playkit-cvaa-overlay .playkit-preview-container {\n  width: 100%;\n  text-align: center;\n  font-size: 16px; }\n\n.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample {\n  width: 30%;\n  margin: 2.33%;\n  padding: 0; }\n  .playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample:first-child {\n    margin-left: 0; }\n  .playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample:last-child {\n    margin-right: 0; }\n  .playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample.playkit-custom {\n    width: auto;\n    padding: 0 10px; }\n\n.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-button-save-cvaa,\n.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-custom-captions-applied {\n  margin-top: 20px; }\n\n.playkit-font-size, .playkit-font-color, .playkit-font-family, .playkit-font-style, .playkit-font-opacity, .playkit-background-color, .playkit-background-opacity {\n  background: initial; }\n\n@keyframes playkit-kaltura-spinner {\n  0% {\n    transform: rotate(0deg) scale(0.7);\n    opacity: 1; }\n  70% {\n    transform: rotate(360deg) scale(0.7);\n    opacity: 1; }\n  82% {\n    transform: rotate(360deg) scale(0);\n    opacity: 0; }\n  87% {\n    transform: rotate(360deg) scale(0.9);\n    opacity: 1; }\n  100% {\n    transform: rotate(360deg) scale(0.7);\n    opacity: 1; } }\n\n.playkit-loading-backdrop {\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  transition: 100ms opacity;\n  opacity: 0;\n  z-index: 5; }\n  .playkit-loading-backdrop.playkit-show {\n    opacity: 1; }\n    .playkit-loading-backdrop.playkit-show .playkit-spinner-container {\n      display: block; }\n  .playkit-loading-backdrop .playkit-spinner-container {\n    display: none;\n    position: absolute;\n    top: 50%;\n    left: 50%;\n    transform: translate3d(-50px, -50px, 0); }\n\n.playkit-spinner {\n  width: 100px;\n  height: 100px;\n  position: relative;\n  animation: playkit-kaltura-spinner 2.5s infinite; }\n  .playkit-spinner span {\n    width: 8px;\n    height: 8px;\n    background-color: #fff;\n    display: block;\n    border-radius: 8px;\n    position: absolute;\n    top: 50%;\n    left: 50%;\n    margin-top: -4px;\n    margin-left: -4px; }\n    .playkit-spinner span:nth-child(1) {\n      transform: rotate(45deg) translateX(-25px) translateY(-25px);\n      background-color: #da1f26; }\n    .playkit-spinner span:nth-child(2) {\n      transform: rotate(90deg) translateX(-25px) translateY(-25px);\n      background-color: #06a885; }\n    .playkit-spinner span:nth-child(3) {\n      transform: rotate(135deg) translateX(-25px) translateY(-25px);\n      background-color: #009344; }\n    .playkit-spinner span:nth-child(4) {\n      transform: rotate(180deg) translateX(-25px) translateY(-25px);\n      background-color: #f8a61a; }\n    .playkit-spinner span:nth-child(5) {\n      transform: rotate(225deg) translateX(-25px) translateY(-25px);\n      background-color: #1b4a97; }\n    .playkit-spinner span:nth-child(6) {\n      transform: rotate(270deg) translateX(-25px) translateY(-25px);\n      background-color: #00abcc; }\n    .playkit-spinner span:nth-child(7) {\n      transform: rotate(315deg) translateX(-25px) translateY(-25px);\n      background-color: #b1d238; }\n    .playkit-spinner span:nth-child(8) {\n      transform: rotate(360deg) translateX(-25px) translateY(-25px);\n      background-color: #fcd203; }\n\n.playkit-control-button-container.playkit-control-play-pause .playkit-control-button {\n  transition: 400ms transform; }\n  .playkit-control-button-container.playkit-control-play-pause .playkit-control-button .playkit-icon-pause {\n    transition: 400ms opacity;\n    opacity: 0;\n    display: none; }\n  .playkit-control-button-container.playkit-control-play-pause .playkit-control-button .playkit-icon-play {\n    transition: 400ms opacity;\n    opacity: 1;\n    display: block; }\n  .playkit-control-button-container.playkit-control-play-pause .playkit-control-button.playkit-is-playing {\n    transform: rotate(360deg); }\n    .playkit-control-button-container.playkit-control-play-pause .playkit-control-button.playkit-is-playing .playkit-icon-pause {\n      opacity: 1;\n      display: block; }\n    .playkit-control-button-container.playkit-control-play-pause .playkit-control-button.playkit-is-playing .playkit-icon-play {\n      opacity: 0;\n      display: none; }\n\n.playkit-control-button-container.playkit-volume-control {\n  display: inline-block !important; }\n  .playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-volume-control-bar {\n    display: block !important; }\n  .playkit-control-button-container.playkit-volume-control.playkit-is-muted .playkit-icon-volume-waves {\n    opacity: 0;\n    transform: translateX(-5px); }\n  .playkit-control-button-container.playkit-volume-control.playkit-is-muted .playkit-icon-volume-mute {\n    opacity: 1;\n    transform: scale(1); }\n  .playkit-control-button-container.playkit-volume-control.playkit-dragging-active .playkit-volume-control-bar {\n    display: block; }\n  .playkit-control-button-container.playkit-volume-control .playkit-icon-volume-waves {\n    transform: translateX(0px); }\n  .playkit-control-button-container.playkit-volume-control .playkit-icon-volume-mute {\n    opacity: 1;\n    transform: scale(0); }\n  .playkit-control-button-container.playkit-volume-control .playkit-icon-volume-waves,\n  .playkit-control-button-container.playkit-volume-control .playkit-icon-volume-mute {\n    transition: 300ms transform, 300ms opacity; }\n  .playkit-control-button-container.playkit-volume-control i {\n    position: absolute;\n    top: 0;\n    left: 0; }\n\n.playkit-volume-control-bar {\n  position: absolute;\n  z-index: 2;\n  bottom: 38px;\n  left: 0px;\n  display: block;\n  height: 112px;\n  width: 34px;\n  border-radius: 4px;\n  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.3);\n  background-color: #333333;\n  padding: 6px;\n  display: none; }\n  .playkit-volume-control-bar:before {\n    position: absolute;\n    width: 34px;\n    height: 14px;\n    bottom: -8px;\n    left: 0;\n    content: ' ';\n    display: block; }\n  .playkit-volume-control-bar .playkit-bar {\n    background-color: #424242;\n    height: 100%;\n    position: relative;\n    cursor: pointer; }\n  .playkit-volume-control-bar .playkit-progress {\n    position: absolute;\n    bottom: 0px;\n    left: 0px;\n    width: 100%;\n    border-radius: 0 0 2px 2px;\n    background-color: #01accd; }\n\n.playkit-player.playkit-smart-container-open .playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-volume-control-bar, .playkit-size-ty .playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-volume-control-bar {\n  display: none !important; }\n\n.playkit-touch .playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-volume-control-bar, .playkit-size-ty .playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-volume-control-bar {\n  display: none !important; }\n\n.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button {\n  transition: 100ms transform;\n  transform: scale(1); }\n  .playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button .playkit-icon-minimize {\n    display: none; }\n  .playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-maximize {\n    display: none; }\n  .playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-minimize {\n    display: block; }\n\n.playkit-player:not(.playkit-touch) .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button:hover {\n  transform: scale(1.1); }\n\n.playkit-player .playkit-seek-bar {\n  padding: 12px 0;\n  margin: -6px 0;\n  cursor: pointer;\n  position: relative; }\n  .playkit-player .playkit-seek-bar:hover .playkit-time-preview,\n  .playkit-player .playkit-seek-bar:hover .playkit-frame-preview, .playkit-player .playkit-seek-bar.playkit-hover .playkit-time-preview,\n  .playkit-player .playkit-seek-bar.playkit-hover .playkit-frame-preview, .playkit-player .playkit-seek-bar.playkit-dragging-active .playkit-time-preview,\n  .playkit-player .playkit-seek-bar.playkit-dragging-active .playkit-frame-preview {\n    display: block; }\n  .playkit-player .playkit-seek-bar:hover .playkit-progress-bar .playkit-scrubber, .playkit-player .playkit-seek-bar.playkit-hover .playkit-progress-bar .playkit-scrubber, .playkit-player .playkit-seek-bar.playkit-dragging-active .playkit-progress-bar .playkit-scrubber {\n    transform: scale(1); }\n  .playkit-player .playkit-seek-bar:hover .playkit-progress-bar .playkit-virtual-progress, .playkit-player .playkit-seek-bar.playkit-hover .playkit-progress-bar .playkit-virtual-progress, .playkit-player .playkit-seek-bar.playkit-dragging-active .playkit-progress-bar .playkit-virtual-progress {\n    display: block; }\n  .playkit-player .playkit-seek-bar.playkit-ad-break {\n    cursor: initial; }\n    .playkit-player .playkit-seek-bar.playkit-ad-break .playkit-progress-bar .playkit-progress {\n      background-color: #f9a71b; }\n  .playkit-player .playkit-seek-bar.playkit-live .playkit-progress-bar .playkit-progress {\n    background-color: #da1f26; }\n  .playkit-player .playkit-seek-bar .playkit-progress-bar {\n    height: 4px;\n    background-color: rgba(255, 255, 255, 0.3);\n    border-radius: 2px;\n    position: relative; }\n    .playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-progress {\n      position: absolute;\n      top: 0;\n      left: 0;\n      height: 100%;\n      border-radius: 2px 0 0 2px;\n      background-color: #01accd; }\n    .playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress {\n      display: none; }\n    .playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-buffered,\n    .playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress {\n      position: absolute;\n      top: 0;\n      left: 0;\n      height: 100%;\n      border-radius: 2px 0 0 2px;\n      background-color: rgba(255, 255, 255, 0.3); }\n    .playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-scrubber {\n      position: absolute;\n      cursor: pointer;\n      display: block;\n      top: -6px;\n      right: -8px;\n      border-radius: 8px;\n      height: 16px;\n      width: 16px;\n      background-color: #ffffff;\n      box-shadow: 0 0 31px 0 rgba(0, 0, 0, 0.3);\n      transform: scale(0);\n      transition: 100ms transform; }\n      .playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-scrubber:active {\n        opacity: 1;\n        cursor: grabbing; }\n  .playkit-player .playkit-seek-bar .playkit-frame-preview {\n    position: absolute;\n    bottom: 16px;\n    left: 0;\n    height: 94px;\n    width: 164px;\n    border: 2px solid rgba(255, 255, 255, 0.2);\n    border-radius: 4px; }\n    .playkit-player .playkit-seek-bar .playkit-frame-preview:hover {\n      display: none !important; }\n    .playkit-player .playkit-seek-bar .playkit-frame-preview .playkit-frame-preview-img {\n      background-size: auto 100%;\n      width: 100%;\n      height: 100%;\n      position: relative; }\n  .playkit-player .playkit-seek-bar .playkit-time-preview {\n    position: absolute;\n    bottom: 22px;\n    left: 0;\n    height: 22px;\n    min-width: 48px;\n    padding: 0 3px;\n    text-align: center;\n    border-radius: 3px;\n    background-color: rgba(0, 0, 0, 0.7);\n    font-size: 13px;\n    font-weight: bold;\n    line-height: 22px;\n    color: #fff; }\n  .playkit-player .playkit-seek-bar .playkit-time-preview,\n  .playkit-player .playkit-seek-bar .playkit-frame-preview {\n    display: none; }\n\n.playkit-touch .playkit-virtual-progress,\n.playkit-touch .playkit-time-preview,\n.playkit-touch .playkit-frame-preview {\n  display: none !important; }\n\n.playkit-player.playkit-size-sm .playkit-virtual-progress,\n.playkit-player.playkit-size-sm .playkit-time-preview,\n.playkit-player.playkit-size-sm .playkit-frame-preview {\n  display: none; }\n\n.playkit-player.playkit-size-ty .playkit-seek-bar {\n  padding: 12px 0;\n  cursor: pointer;\n  position: relative;\n  float: left;\n  width: calc(100% - 45px);\n  margin: 1px 0; }\n\n.playkit-player .playkit-time-display {\n  display: inline-block;\n  line-height: 32px;\n  vertical-align: top;\n  font-size: 14px;\n  padding: 0 23px;\n  font-weight: bold; }\n\n.playkit-touch .playkit-time-display {\n  padding-left: 0; }\n\n.playkit-player.playkit-size-md .playkit-time-display {\n  padding: 0 12px; }\n\n.playkit-player.playkit-size-xs .playkit-time-display, .playkit-player.playkit-size-sm .playkit-time-display {\n  padding: 0 12px 0 0; }\n\n.playkit-player .playkit-video-playing-title {\n  font-size: 15px;\n  font-weight: bold;\n  line-height: 18px;\n  padding: 6px 0;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap; }\n\n.playkit-player .playkit-bottom-bar {\n  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.6) 100%);\n  padding: 6px 16px;\n  color: #fff;\n  opacity: 0;\n  visibility: hidden;\n  transition: 100ms opacity;\n  width: 100%;\n  margin-top: auto;\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  z-index: 1; }\n  .playkit-player .playkit-bottom-bar.playkit-hide {\n    display: none; }\n  .playkit-player .playkit-bottom-bar .playkit-left-controls {\n    float: left;\n    text-align: left; }\n    .playkit-player .playkit-bottom-bar .playkit-left-controls .playkit-control-button-container:first-child {\n      margin-left: 0px; }\n  .playkit-player .playkit-bottom-bar .playkit-right-controls {\n    float: right;\n    text-align: left; }\n    .playkit-player .playkit-bottom-bar .playkit-right-controls .playkit-control-button-container:last-child {\n      margin-right: 0px; }\n  .playkit-player .playkit-bottom-bar .playkit-control-button-container {\n    margin: 0 6px; }\n\n.playkit-player.playkit-size-ty .playkit-left-controls {\n  display: none; }\n\n.playkit-player.playkit-size-ty .playkit-control-button-container {\n  display: none;\n  margin: 0; }\n\n.playkit-player.playkit-size-xs .playkit-left-controls .playkit-control-button-container {\n  display: none; }\n\n.playkit-player.playkit-size-xs .playkit-control-button-container, .playkit-player.playkit-size-sm .playkit-control-button-container {\n  margin: 0 3px; }\n\n.playkit-player.playkit-casting .playkit-bottom-bar,\n.playkit-player.playkit-hover .playkit-bottom-bar,\n.playkit-player.playkit-state-paused .playkit-bottom-bar,\n.playkit-player.playkit-state-idle .playkit-bottom-bar,\n.playkit-player.playkit-ad-break .playkit-bottom-bar,\n.playkit-player.playkit-menu-active .playkit-bottom-bar {\n  opacity: 1;\n  visibility: visible; }\n\n.playkit-player.playkit-overlay-active .playkit-bottom-bar {\n  opacity: 0;\n  visibility: hidden; }\n\n.playkit-player.playkit-size-sm .playkit-bottom-bar {\n  padding: 6px 8px; }\n  .playkit-player.playkit-size-sm .playkit-bottom-bar .playkit-time-display {\n    padding-left: 0; }\n\n.playkit-player .playkit-top-bar {\n  background: linear-gradient(0deg, transparent 0%, rgba(0, 0, 0, 0.6) 100%);\n  padding: 14px 16px;\n  color: #fff;\n  opacity: 0;\n  visibility: hidden;\n  transition: 100ms opacity;\n  display: flex;\n  justify-content: space-between;\n  width: 100%;\n  position: absolute;\n  top: 0;\n  left: 0;\n  pointer-events: none; }\n  .playkit-player .playkit-top-bar.playkit-hide {\n    display: none; }\n  .playkit-player .playkit-top-bar .playkit-left-controls {\n    text-align: left;\n    min-width: 0; }\n  .playkit-player .playkit-top-bar .playkit-right-controls {\n    text-align: left; }\n    .playkit-player .playkit-top-bar .playkit-right-controls .playkit-control-button-container {\n      margin: 0 6px; }\n      .playkit-player .playkit-top-bar .playkit-right-controls .playkit-control-button-container:last-child {\n        margin-right: 0; }\n\n.playkit-player.playkit-casting .playkit-top-bar,\n.playkit-player.playkit-hover .playkit-top-bar,\n.playkit-player.playkit-state-paused .playkit-top-bar,\n.playkit-player.playkit-state-idle .playkit-top-bar,\n.playkit-player.playkit-ad-break .playkit-top-bar,\n.playkit-player.playkit-menu-active .playkit-top-bar {\n  opacity: 1;\n  visibility: visible; }\n\n.playkit-player.playkit-overlay-active .playkit-top-bar {\n  opacity: 0;\n  visibility: hidden; }\n\n.playkit-player.playkit-size-sm .playkit-player .playkit-top-bar {\n  padding: 8px 8px 20px 8px; }\n\n@keyframes playkit-overlayActionIconIn {\n  0% {\n    opacity: 0;\n    transform: scale(0); }\n  10% {\n    opacity: 0.1;\n    transform: scale(0.1); }\n  20% {\n    opacity: 0.3;\n    transform: scale(0.2); }\n  30% {\n    opacity: 0.5;\n    transform: scale(0.3); }\n  40% {\n    opacity: 0.7;\n    transform: scale(0.4); }\n  50% {\n    opacity: 0.9;\n    transform: scale(0.5); }\n  60% {\n    opacity: 0.9;\n    transform: scale(0.5); }\n  70% {\n    opacity: 0.9;\n    transform: scale(0.5); }\n  75% {\n    opacity: 0.9;\n    transform: scale(0.5); }\n  80% {\n    opacity: 1;\n    transform: scale(0.5); }\n  85% {\n    opacity: 1;\n    transform: scale(0.5); }\n  90% {\n    opacity: 1;\n    transform: scale(0.5); }\n  93% {\n    opacity: 0.7;\n    transform: scale(0.5); }\n  95% {\n    opacity: 0.5;\n    transform: scale(0.5); }\n  98% {\n    opacity: 0.2;\n    transform: scale(0.5); }\n  100% {\n    opacity: 0;\n    transform: scale(0.5); } }\n\n.playkit-overlay-action {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%; }\n  .playkit-overlay-action .playkit-icon {\n    width: 144px;\n    height: 144px;\n    position: absolute;\n    top: 50%;\n    left: 50%;\n    margin: -72px 0 0 -72px;\n    opacity: 0; }\n\n.playkit-player:not(.playkit-touch):not(.playkit-size-sm) .playkit-overlay-action.playkit-in .playkit-icon {\n  animation: playkit-overlayActionIconIn 300ms linear forwards; }\n\n.playkit-pre-playback-play-overlay {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%; }\n  .playkit-pre-playback-play-overlay .playkit-pre-playback-play-button {\n    z-index: 1;\n    position: absolute;\n    top: 50%;\n    left: 50%;\n    height: 108px;\n    width: 108px;\n    border: 2px solid rgba(255, 255, 255, 0.2);\n    background-color: rgba(0, 0, 0, 0.5);\n    transform: translate(-50%, -50%);\n    -webkit-transform: translate(-50%, -50%);\n    -ms-transform: translate(-50%, -50%);\n    border-radius: 54px;\n    padding: 20px;\n    cursor: pointer; }\n    .playkit-pre-playback-play-overlay .playkit-pre-playback-play-button:hover {\n      border: 2px solid rgba(255, 255, 255, 0.4); }\n    .playkit-pre-playback-play-overlay .playkit-pre-playback-play-button:active {\n      opacity: 0.7;\n      transform: scale(1) translate(-50%, -50%); }\n\n.playkit-pre-playback .playkit-player-gui {\n  opacity: 0 !important;\n  display: none; }\n\n.playkit-player.playkit-size-ty .playkit-pre-playback-play-button {\n  width: 75px;\n  height: 75px;\n  padding: 12px; }\n\n.playkit-player.playkit-size-xs .playkit-pre-playback-play-button {\n  width: 85px;\n  height: 85px;\n  padding: 15px; }\n\n.playkit-player .playkit-btn-skip-ad {\n  font-weight: lighter;\n  position: absolute;\n  bottom: 60px;\n  right: 16px;\n  line-height: 36px; }\n\n.playkit-player .playkit-skip-ad {\n  color: #fff;\n  font-size: 20px;\n  font-weight: lighter;\n  line-height: 24px;\n  text-shadow: 0 0 6px rgba(0, 0, 0, 0.6);\n  position: absolute;\n  bottom: 66px;\n  right: 16px; }\n\n.playkit-row {\n  display: block; }\n  .playkit-row:after {\n    content: '';\n    clear: both;\n    display: block; }\n\n.playkit-d-inline-block {\n  display: inline-block; }\n\n.playkit-mobile-hidden-select {\n  display: block;\n  opacity: 0;\n  position: absolute;\n  top: 0;\n  left: 0px;\n  width: 100%;\n  height: 100%; }\n\n.playkit-font-size-base, .playkit-ad-notice {\n  font-size: 15px; }\n\n.playkit-live-tag {\n  color: #da1f26;\n  font-size: 14px;\n  font-weight: bold;\n  letter-spacing: 1px;\n  line-height: 19px;\n  border: 2px solid #da1f26;\n  border-radius: 4px;\n  text-transform: uppercase;\n  text-align: center;\n  display: inline-block;\n  padding: 0 3px 0 5px;\n  margin: 5px 23px;\n  cursor: default; }\n  .playkit-live-tag.playkit-non-live-playhead {\n    background-color: rgba(255, 255, 255, 0.2);\n    border: none;\n    color: #fff;\n    line-height: 23px;\n    padding: 0 5px 0 7px;\n    cursor: pointer; }\n\n.playkit-player.playkit-size-sm .playkit-live-tag {\n  margin-left: 0; }\n\n.playkit-unmute-button-container {\n  display: inline-block;\n  position: absolute;\n  top: 13px;\n  left: 16px;\n  z-index: 15; }\n  .playkit-unmute-button-container a {\n    color: #ffffff; }\n  .playkit-unmute-button-container.playkit-show-icon-only .playkit-btn.playkit-unmute-button {\n    max-width: 64px; }\n    .playkit-unmute-button-container.playkit-show-icon-only .playkit-btn.playkit-unmute-button span {\n      transform: translateX(10px);\n      opacity: 0; }\n\n.playkit-btn.playkit-unmute-button {\n  font-size: 15px;\n  max-width: 200px;\n  transition: max-width 200ms;\n  padding: 0 16px;\n  white-space: nowrap; }\n  .playkit-btn.playkit-unmute-button span {\n    transform: translateX(0px);\n    opacity: 1;\n    transition: transform 100ms, opacity 100ms;\n    display: inline-block;\n    color: #ffffff; }\n  .playkit-btn.playkit-unmute-button.playkit-has-top-bar {\n    transition: 100ms transform; }\n\n.playkit-unmute-icon-container {\n  width: 32px;\n  height: 32px;\n  display: inline-block;\n  vertical-align: top;\n  position: relative;\n  margin-right: 3px; }\n  .playkit-unmute-icon-container i {\n    position: absolute;\n    top: 0;\n    left: 0; }\n\n.playkit-player.playkit-hover .playkit-unmute-button-container.playkit-has-top-bar,\n.playkit-player.playkit-state-paused .playkit-unmute-button-container.playkit-has-top-bar,\n.playkit-player.playkit-state-idle .playkit-unmute-button-container.playkit-has-top-bar,\n.playkit-player.playkit-menu-active .playkit-unmute-button-container.playkit-has-top-bar {\n  transform: translateY(32px); }\n\n.playkit-overlay.playkit-error-overlay {\n  background-color: #333;\n  font-size: 0em; }\n\n.playkit-overlay-contents .playkit-error-overlay {\n  padding-top: 20px; }\n\n.playkit-error-overlay {\n  position: relative;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex-direction: column;\n  height: 100%;\n  font-family: sans-serif; }\n  .playkit-error-overlay .playkit-copy-url-row {\n    display: flex; }\n  .playkit-error-overlay .playkit-svg-container {\n    flex: 4;\n    display: flex;\n    justify-content: space-around;\n    flex-flow: column; }\n  .playkit-error-overlay .playkit-headline {\n    color: #ffffff;\n    font-size: 18px;\n    margin: 10px 0 14px 0;\n    flex: 1; }\n  .playkit-error-overlay .playkit-error-session {\n    font-size: 14px;\n    color: #ccc;\n    margin-bottom: 20px;\n    user-select: text;\n    -webkit-user-select: text;\n    -moz-user-select: text;\n    -ms-user-select: text;\n    max-width: 300px;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n    flex: 1; }\n  .playkit-error-overlay .playkit-control-button-container {\n    flex: 5; }\n  .playkit-error-overlay .playkit-retry-btn {\n    height: 36px;\n    width: 120px;\n    border: 2px solid #333;\n    border-radius: 18px;\n    background-color: black;\n    color: #ffffff;\n    font-size: 15px;\n    font-weight: bold;\n    line-height: 32px;\n    cursor: pointer; }\n  .playkit-error-overlay .playkit-error-text {\n    height: 0px;\n    visibility: hidden; }\n\n.playkit-link-options-container {\n  width: auto; }\n  .playkit-link-options-container .playkit-copy-url-row .playkit-input-copy-url {\n    margin: 0; }\n  .playkit-link-options-container .playkit-copy-url-row .playkit-btn-copy-url {\n    margin-left: 10px; }\n    .playkit-link-options-container .playkit-copy-url-row .playkit-btn-copy-url .playkit-icon {\n      height: 24px;\n      width: 24px;\n      margin-top: -3px; }\n\n.playkit-slider {\n  height: 8px;\n  border-radius: 4px;\n  background-color: rgba(255, 255, 255, 0.2); }\n  .playkit-slider .playkit-progress {\n    background-color: #01accd;\n    height: 8px;\n    border-radius: 4px;\n    position: relative; }\n    .playkit-slider .playkit-progress .playkit-handle {\n      height: 12px;\n      width: 12px;\n      border-radius: 5px;\n      background-color: #ffffff;\n      box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.3);\n      position: absolute;\n      right: 0;\n      top: 0px;\n      transform: translate3d(6px, -2px, 0);\n      cursor: pointer; }\n\n.playkit-btn {\n  text-decoration: none;\n  height: 36px;\n  border-radius: 18px;\n  color: #fff;\n  line-height: 36px;\n  font-weight: bold;\n  cursor: pointer;\n  display: inline-block;\n  padding: 0 24px; }\n  .playkit-btn.playkit-btn-block {\n    display: block; }\n  .playkit-btn.playkit-btn-dark-transparent {\n    background-color: rgba(0, 0, 0, 0.5);\n    border: 2px solid rgba(255, 255, 255, 0.2);\n    line-height: 32px; }\n    .playkit-btn.playkit-btn-dark-transparent:hover {\n      color: #fff;\n      border: 2px solid rgba(255, 255, 255, 0.4); }\n  .playkit-btn.playkit-btn-branded {\n    background-color: #01accd; }\n    .playkit-btn.playkit-btn-branded:hover {\n      color: #fff; }\n\n.playkit-btn-rounded {\n  height: 36px;\n  width: 36px;\n  min-width: 36px;\n  min-height: 36px;\n  border-radius: 18px;\n  background-color: rgba(0, 0, 0, 0.4);\n  display: inline-block;\n  padding: 2px; }\n\n.playkit-player button:focus {\n  outline: none; }\n\n.playkit-player .playkit-learn-more {\n  font-weight: lighter; }\n\n.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button {\n  transition: 100ms transform;\n  transform: scale(1); }\n  .playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button .playkit-icon-minimize {\n    display: none; }\n  .playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-maximize {\n    display: none; }\n  .playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-minimize {\n    display: block; }\n\n.playkit-player:not(.playkit-touch) .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button:hover {\n  transform: scale(1.1); }\n\n.playkit-player .playkit-watermark {\n  position: absolute;\n  padding: 5px;\n  transition: visibility 0s 1s, opacity 1s linear, transform ease-out 100ms; }\n  .playkit-player .playkit-watermark.playkit-hide-watermark {\n    visibility: hidden;\n    opacity: 0; }\n  .playkit-player .playkit-watermark.playkit-top {\n    top: 0; }\n  .playkit-player .playkit-watermark.playkit-bottom {\n    bottom: 0; }\n  .playkit-player .playkit-watermark.playkit-right {\n    right: 0; }\n  .playkit-player .playkit-watermark.playkit-left {\n    left: 0; }\n\n.playkit-player:not(.playkit-pre-playback):not(.playkit-overlay-active).playkit-state-paused .playkit-watermark.playkit-bottom, .playkit-player:not(.playkit-pre-playback):not(.playkit-overlay-active).playkit-state-idle .playkit-watermark.playkit-bottom, .playkit-player:not(.playkit-pre-playback):not(.playkit-overlay-active).playkit-hover .playkit-watermark.playkit-bottom {\n  transform: translateY(-60px); }\n\n.playkit-player a:not([href]):not([tabindex]).playkit-advanced-captions-menu-link {\n  color: #01accd;\n  text-decoration: underline; }\n\n.playkit-control-button-container.playkit-control-vr-stereo .playkit-control-button .playkit-icon-vr-stereo-full {\n  display: none; }\n\n.playkit-control-button-container.playkit-control-vr-stereo .playkit-control-button.playkit-vr-stereo-mode .playkit-icon-vr-stereo {\n  display: none; }\n\n.playkit-control-button-container.playkit-control-vr-stereo .playkit-control-button.playkit-vr-stereo-mode .playkit-icon-vr-stereo-full {\n  display: block; }\n\n.playkit-player .playkit-cast-button {\n  display: block;\n  width: 28px;\n  height: 30px;\n  background-color: rgba(255, 255, 255, 0);\n  border: none;\n  cursor: pointer;\n  --connected-color: rgba(1, 172, 205, 0.8);\n  --disconnected-color: #ccc; }\n\n.playkit-player .playkit-cast-button:hover {\n  --disconnected-color: #ffffff;\n  --connected-color: #01accd; }\n\n.playkit-player .playkit-cast-overlay {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%; }\n  .playkit-player .playkit-cast-overlay .playkit-cast-poster {\n    all: inherit;\n    background-size: contain;\n    background: black no-repeat center center; }\n    .playkit-player .playkit-cast-overlay .playkit-cast-poster.playkit-has-poster {\n      background-color: #000; }\n  .playkit-player .playkit-cast-overlay .playkit-cast-black-cover {\n    all: inherit;\n    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 72%, transparent 100%); }\n\n.playkit-player .playkit-cast-box .playkit-cast-icon {\n  position: absolute;\n  bottom: 0;\n  left: 46px;\n  height: 128px; }\n  .playkit-player .playkit-cast-box .playkit-cast-icon .playkit-icon {\n    width: 30px;\n    height: 22px;\n    color: rgba(255, 255, 255, 0.6);\n    opacity: 0.6; }\n\n.playkit-player .playkit-cast-box .playkit-cast-connecting-spinner {\n  height: 21px;\n  width: 21px;\n  -webkit-animation: playkit-spin .9s infinite linear;\n  border: 3px solid rgba(255, 255, 255, 0.4);\n  border-top-color: rgba(255, 255, 255, 0.8);\n  border-radius: 100%; }\n\n.playkit-player .playkit-cast-box .playkit-cast-text {\n  position: absolute;\n  bottom: 0;\n  left: 89px;\n  height: 128px;\n  font-family: sans-serif;\n  font-weight: lighter; }\n  .playkit-player .playkit-cast-box .playkit-cast-text .playkit-cast-status {\n    display: inline-block;\n    margin-top: 3px;\n    font-size: 16px;\n    color: rgba(255, 255, 255, 0.6);\n    float: left;\n    font-weight: inherit; }\n  .playkit-player .playkit-cast-box .playkit-cast-text .playkit-cast-device {\n    left: 0;\n    display: inline-block;\n    font-weight: inherit;\n    font-size: 25px;\n    color: #FFFFFF;\n    line-height: 40px; }\n\n@keyframes playkit-castOnTVAnimation {\n  0% {\n    opacity: 0;\n    transform: rotateY(70deg); }\n  33% {\n    opacity: 0.3;\n    transform: rotateY(50deg); }\n  66% {\n    opacity: 0.6;\n    transform: rotateY(30deg); }\n  100% {\n    opacity: 1;\n    transform: rotateY(0); } }\n\n.playkit-player .playkit-cast-on-tv-button-container {\n  position: absolute;\n  width: 100%;\n  text-align: center;\n  bottom: 20px;\n  opacity: 0; }\n  .playkit-player .playkit-cast-on-tv-button-container span {\n    font-family: sans-serif;\n    font-weight: lighter;\n    color: white; }\n  .playkit-player .playkit-cast-on-tv-button-container.playkit-show-cast-on-tv {\n    animation: playkit-castOnTVAnimation 300ms linear forwards; }\n\n.playkit-player .playkit-btn.playkit-cast-on-tv-button {\n  font-size: 15px;\n  max-width: 200px;\n  transition: max-width 200ms;\n  padding: 0 16px;\n  white-space: nowrap; }\n  .playkit-player .playkit-btn.playkit-cast-on-tv-button span {\n    transform: translateX(0px);\n    opacity: 1;\n    transition: transform 100ms, opacity 100ms;\n    display: inline-block; }\n\n.playkit-player .playkit-cast-on-tv-icon-container {\n  width: 32px;\n  height: 32px;\n  display: inline-block;\n  vertical-align: top;\n  position: relative;\n  margin-right: 3px; }\n  .playkit-player .playkit-cast-on-tv-icon-container i {\n    position: absolute;\n    top: 0;\n    left: 0; }\n\n.playkit-player .playkit-backdrop {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background-color: rgba(0, 0, 0, 0.6);\n  transition: 100ms opacity;\n  z-index: 5; }\n\n.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview {\n  position: absolute;\n  bottom: 35px;\n  width: 160px;\n  height: 90px;\n  border: 2px solid rgba(255, 255, 255, 0.2);\n  border-radius: 4px;\n  opacity: 0;\n  transition: 400ms opacity;\n  pointer-events: none; }\n  .playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview:hover {\n    opacity: 0 !important; }\n  .playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-text {\n    position: absolute;\n    padding: 8px;\n    width: 100%; }\n    .playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-text .playkit-poster-preview-text-title {\n      font-size: 14px;\n      font-weight: 400;\n      margin-bottom: 3px;\n      opacity: 0.7; }\n    .playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-text .playkit-poster-preview-text-name {\n      font-size: 15px;\n      white-space: nowrap;\n      overflow: hidden;\n      text-overflow: ellipsis;\n      font-weight: 400; }\n  .playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-img {\n    height: 100%;\n    background-size: contain;\n    background-repeat: round; }\n    .playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-img:after {\n      display: block;\n      background-image: linear-gradient(rgba(0, 0, 0, 0.8), transparent);\n      height: 60%;\n      content: ''; }\n\n.playkit-control-button-container.playkit-control-playlist-button:hover .playkit-poster-preview {\n  opacity: 1; }\n\n.playkit-player-gui > .playkit-playback-controls {\n  display: none;\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  margin-top: -32px;\n  margin-left: -48px; }\n\n.playkit-player.playkit-playlist .playkit-player-gui > .playkit-playback-controls {\n  margin-left: -144px; }\n\n.playkit-bottom-bar .playkit-playback-controls {\n  display: inline; }\n\n.playkit-player.playkit-size-sm.playkit-state-idle .playkit-control-playlist-button, .playkit-player.playkit-size-xs.playkit-state-idle .playkit-control-playlist-button, .playkit-player.playkit-touch.playkit-state-idle .playkit-control-playlist-button {\n  display: none; }\n\n.playkit-player.playkit-size-sm:not(.playkit-state-idle) .playkit-bottom-bar .playkit-playback-controls, .playkit-player.playkit-size-xs:not(.playkit-state-idle) .playkit-bottom-bar .playkit-playback-controls, .playkit-player.playkit-touch:not(.playkit-state-idle) .playkit-bottom-bar .playkit-playback-controls {\n  display: none; }\n\n.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-player-gui > .playkit-playback-controls, .playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-player-gui > .playkit-playback-controls, .playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-player-gui > .playkit-playback-controls {\n  display: block; }\n  .playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-player-gui > .playkit-playback-controls .playkit-control-button, .playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-player-gui > .playkit-playback-controls .playkit-control-button, .playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-player-gui > .playkit-playback-controls .playkit-control-button {\n    width: auto;\n    height: auto;\n    padding: 0 16px;\n    -webkit-filter: drop-shadow(0px 0px 8px rgba(0, 0, 0, 0.5));\n    filter: drop-shadow(0px 0px 8px rgba(0, 0, 0, 0.5)); }\n  .playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-player-gui > .playkit-playback-controls .playkit-icon, .playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-player-gui > .playkit-playback-controls .playkit-icon, .playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-player-gui > .playkit-playback-controls .playkit-icon {\n    width: 64px;\n    height: 64px; }\n  .playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-player-gui > .playkit-playback-controls .playkit-poster-preview, .playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-player-gui > .playkit-playback-controls .playkit-poster-preview, .playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-player-gui > .playkit-playback-controls .playkit-poster-preview {\n    opacity: 0; }\n\n.playkit-player .playkit-playlist-countdown {\n  font-family: sans-serif;\n  height: 72px;\n  position: absolute;\n  bottom: 0;\n  right: 0;\n  margin: 16px;\n  transform: translateY(0px);\n  transition: transform ease-in 100ms, right 500ms 500ms, opacity 400ms, bottom 300ms;\n  cursor: pointer; }\n  .playkit-player .playkit-playlist-countdown.playkit-hidden {\n    right: -160px;\n    pointer-events: none;\n    opacity: 0; }\n    .playkit-player .playkit-playlist-countdown.playkit-hidden .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background {\n      width: 0; }\n      .playkit-player .playkit-playlist-countdown.playkit-hidden .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content {\n        opacity: 0; }\n  .playkit-player .playkit-playlist-countdown.playkit-canceled {\n    bottom: -50px;\n    opacity: 0; }\n  .playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-poster {\n    width: 120px;\n    height: inherit;\n    float: left;\n    border-radius: 4px 0 0 4px;\n    background-size: contain;\n    background-repeat: round; }\n  .playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder {\n    width: 160px;\n    height: inherit;\n    float: right; }\n    .playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background {\n      width: inherit;\n      border-radius: 0 4px 3px 0;\n      background-color: rgba(0, 0, 0, 0.7);\n      height: inherit;\n      transition: width 500ms 1000ms; }\n      .playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content {\n        width: inherit;\n        transition: opacity 300ms 1200ms; }\n        .playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text {\n          width: 100%;\n          padding: 10px;\n          text-align: left;\n          color: #fff;\n          float: left;\n          line-height: initial; }\n          .playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title {\n            font-size: 14px;\n            font-weight: 400;\n            margin-bottom: 12px;\n            opacity: 0.7; }\n          .playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name {\n            font-size: 15px;\n            white-space: nowrap;\n            overflow: hidden;\n            text-overflow: ellipsis;\n            font-weight: 600; }\n        .playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel {\n          position: absolute;\n          top: 4px;\n          right: 4px; }\n        .playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-indicator-bar {\n          height: 4px;\n          background-color: rgba(255, 255, 255, 0.3);\n          position: absolute;\n          bottom: 0;\n          width: inherit;\n          border-radius: inherit; }\n          .playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-indicator-bar .playkit-playlist-countdown-indicator-progress {\n            max-width: 100%;\n            height: 100%;\n            background-color: rgba(255, 255, 255, 0.5);\n            transition: width 400ms linear; }\n\n.playkit-player:not(.playkit-overlay-active).playkit-state-paused .playkit-playlist-countdown, .playkit-player:not(.playkit-overlay-active).playkit-state-idle .playkit-playlist-countdown, .playkit-player:not(.playkit-overlay-active).playkit-hover .playkit-playlist-countdown {\n  transform: translateY(-50px); }\n\n.playkit-player.playkit-size-md .playkit-playlist-countdown {\n  height: 54px; }\n  .playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-poster {\n    width: 96px; }\n  .playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder {\n    width: 152px; }\n    .playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text {\n      padding: 8px; }\n      .playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title {\n        margin-bottom: 4px; }\n    .playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel {\n      top: 0;\n      right: 0; }\n\n.playkit-player.playkit-size-sm .playkit-playlist-countdown, .playkit-player.playkit-size-xs .playkit-playlist-countdown, .playkit-player.playkit-size-ty .playkit-playlist-countdown {\n  z-index: 1;\n  height: 36px;\n  margin: 8px; }\n  .playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-poster, .playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-poster, .playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-poster {\n    display: none; }\n  .playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder, .playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder, .playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder {\n    width: 108px; }\n    .playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background, .playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background, .playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background {\n      transition: width 500ms;\n      border-radius: 2px; }\n      .playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text, .playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text, .playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text {\n        width: 90%;\n        padding: 3px 0 0 4px; }\n        .playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title, .playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title, .playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title {\n          font-size: 12px;\n          margin-bottom: 0; }\n        .playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name, .playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name, .playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name {\n          font-size: 12px;\n          font-weight: 400; }\n      .playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel, .playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel, .playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel {\n        width: 24px;\n        height: 24px;\n        margin-top: 3px; }\n        .playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel *, .playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel *, .playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel * {\n          width: inherit;\n          height: inherit; }\n\n.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay {\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  background-color: rgba(0, 0, 0, 0.5); }\n  .playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content {\n    position: relative;\n    top: 50%;\n    transform: translateY(-50%); }\n    .playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text {\n      position: absolute;\n      width: 100%;\n      top: -90px;\n      font-size: 15px;\n      color: #fff;\n      padding: 4px 8px 12px 8px;\n      text-align: center; }\n      .playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text .playkit-playlist-next-screen-text-title {\n        padding: 4px;\n        font-weight: 100; }\n      .playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text .playkit-playlist-next-screen-text-name {\n        padding: 16px;\n        white-space: nowrap;\n        overflow: hidden;\n        text-overflow: ellipsis; }\n    .playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder {\n      position: relative;\n      margin: auto;\n      width: 384px; }\n      .playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio {\n        width: 100%;\n        padding-top: 56%; }\n        .playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster {\n          position: absolute;\n          top: 0;\n          left: 0;\n          bottom: 0;\n          right: 0;\n          border: 2px solid rgba(255, 255, 255, 0.2);\n          border-radius: 4px;\n          cursor: pointer; }\n          .playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img {\n            height: 100%;\n            border-radius: 3px;\n            background-size: contain;\n            background-repeat: round; }\n          .playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon {\n            position: absolute;\n            top: 50%;\n            left: 50%;\n            transform: translate(-50%, -50%);\n            width: 64px;\n            height: 64px; }\n\n.playkit-player.playkit-state-idle.playkit-size-lg .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder {\n  width: 37.5%; }\n\n.playkit-player.playkit-state-idle.playkit-size-md .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text {\n  top: -58px; }\n  .playkit-player.playkit-state-idle.playkit-size-md .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text .playkit-playlist-next-screen-text-name {\n    padding: 0; }\n\n.playkit-player.playkit-state-idle.playkit-size-md .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder {\n  width: 42%; }\n\n.playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder, .playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder, .playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder {\n  width: 32px; }\n  .playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster, .playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster, .playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster {\n    border: 0; }\n    .playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img, .playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img, .playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img {\n      display: none; }\n    .playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon, .playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon, .playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon {\n      width: 32px;\n      height: 32px; }\n\n.playkit-picture-in-picture-overlay {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  font-family: sans-serif;\n  display: flex;\n  align-items: center;\n  justify-content: center; }\n  .playkit-picture-in-picture-overlay .playkit-picture-in-picture-poster {\n    all: inherit;\n    background-size: contain;\n    background: black no-repeat center center; }\n    .playkit-picture-in-picture-overlay .playkit-picture-in-picture-poster.playkit-has-poster {\n      background-color: #000; }\n    .playkit-picture-in-picture-overlay .playkit-picture-in-picture-poster .playkit-dark-layer {\n      background-color: rgba(0, 0, 0, 0.4);\n      position: absolute;\n      top: 0;\n      left: 0;\n      width: 100%;\n      height: 100%; }\n  .playkit-picture-in-picture-overlay .playkit-picture-in-picture-control {\n    position: absolute;\n    display: flex;\n    flex-direction: column; }\n  .playkit-picture-in-picture-overlay .playkit-picture-in-picture-text {\n    color: #ffffff;\n    font-size: 18px;\n    white-space: nowrap;\n    overflow: hidden; }\n  .playkit-picture-in-picture-overlay .playkit-picture-in-picture-button {\n    height: 36px;\n    width: 120px;\n    border: 2px solid #424242;\n    border-radius: 18px;\n    background-color: #333;\n    color: #ffffff;\n    font-size: 15px;\n    font-weight: bold;\n    line-height: 30px;\n    cursor: pointer;\n    margin-top: 20px;\n    align-self: center; }\n    .playkit-picture-in-picture-overlay .playkit-picture-in-picture-button:hover {\n      background-color: #424242; }\n\n.playkit-player .playkit-control-button-container.playkit-control-share {\n  position: absolute;\n  right: 10px;\n  top: 10px;\n  display: none;\n  z-index: 1; }\n\n.playkit-player.playkit-hover .playkit-control-button-container.playkit-control-share, .playkit-player.playkit-state-paused .playkit-control-button-container.playkit-control-share, .playkit-player.playkit-state-idle .playkit-control-button-container.playkit-control-share {\n  display: inline-block; }\n\n.playkit-copy-url-row .playkit-input-copy-url {\n  margin: 0; }\n\n.playkit-copy-url-row .playkit-btn-copy-url {\n  margin-left: 10px; }\n  .playkit-copy-url-row .playkit-btn-copy-url .playkit-icon {\n    height: 24px;\n    width: 24px;\n    margin-top: -3px;\n    display: none; }\n  .playkit-copy-url-row .playkit-btn-copy-url .playkit-icon-copy {\n    display: block; }\n  .playkit-copy-url-row .playkit-btn-copy-url.playkit-copied .playkit-icon-copy {\n    display: none; }\n  .playkit-copy-url-row .playkit-btn-copy-url.playkit-copied .playkit-icon-check {\n    display: block; }\n",""]),t.locals={row:"playkit-row","d-inline-block":"playkit-d-inline-block",dInlineBlock:"playkit-d-inline-block","mobile-hidden-select":"playkit-mobile-hidden-select",mobileHiddenSelect:"playkit-mobile-hidden-select","font-size-base":"playkit-font-size-base",fontSizeBase:"playkit-font-size-base","ad-notice":"playkit-ad-notice",adNotice:"playkit-ad-notice",player:"playkit-player","form-group":"playkit-form-group",formGroup:"playkit-form-group","has-error":"playkit-has-error",hasError:"playkit-has-error","form-control":"playkit-form-control",formControl:"playkit-form-control","has-icon":"playkit-has-icon",hasIcon:"playkit-has-icon",icon:"playkit-icon",checkbox:"playkit-checkbox","form-group-row":"playkit-form-group-row",formGroupRow:"playkit-form-group-row",dropdown:"playkit-dropdown",btn:"playkit-btn","btn-block":"playkit-btn-block",btnBlock:"playkit-btn-block","btn-dark-transparent":"playkit-btn-dark-transparent",btnDarkTransparent:"playkit-btn-dark-transparent","btn-branded":"playkit-btn-branded",btnBranded:"playkit-btn-branded","btn-rounded":"playkit-btn-rounded",btnRounded:"playkit-btn-rounded","icon-maximize":"playkit-icon-maximize",iconMaximize:"playkit-icon-maximize","icon-minimize":"playkit-icon-minimize",iconMinimize:"playkit-icon-minimize","icon-play":"playkit-icon-play",iconPlay:"playkit-icon-play","icon-pause":"playkit-icon-pause",iconPause:"playkit-icon-pause","icon-volume-base":"playkit-icon-volume-base",iconVolumeBase:"playkit-icon-volume-base","icon-volume-waves":"playkit-icon-volume-waves",iconVolumeWaves:"playkit-icon-volume-waves","icon-volume-wave":"playkit-icon-volume-wave",iconVolumeWave:"playkit-icon-volume-wave","icon-volume-mute":"playkit-icon-volume-mute",iconVolumeMute:"playkit-icon-volume-mute","icon-close":"playkit-icon-close",iconClose:"playkit-icon-close","icon-share":"playkit-icon-share",iconShare:"playkit-icon-share","icon-settings":"playkit-icon-settings",iconSettings:"playkit-icon-settings","icon-check":"playkit-icon-check",iconCheck:"playkit-icon-check","icon-language":"playkit-icon-language",iconLanguage:"playkit-icon-language","icon-quality":"playkit-icon-quality",iconQuality:"playkit-icon-quality","icon-captions":"playkit-icon-captions",iconCaptions:"playkit-icon-captions","icon-speed":"playkit-icon-speed",iconSpeed:"playkit-icon-speed","icon-speed-down":"playkit-icon-speed-down",iconSpeedDown:"playkit-icon-speed-down","icon-speed-up":"playkit-icon-speed-up",iconSpeedUp:"playkit-icon-speed-up","icon-audio":"playkit-icon-audio",iconAudio:"playkit-icon-audio","icon-copy":"playkit-icon-copy",iconCopy:"playkit-icon-copy","icon-facebook":"playkit-icon-facebook",iconFacebook:"playkit-icon-facebook","icon-twitter":"playkit-icon-twitter",iconTwitter:"playkit-icon-twitter","icon-linkedin":"playkit-icon-linkedin",iconLinkedin:"playkit-icon-linkedin","icon-email":"playkit-icon-email",iconEmail:"playkit-icon-email","icon-embed":"playkit-icon-embed",iconEmbed:"playkit-icon-embed","icon-link":"playkit-icon-link",iconLink:"playkit-icon-link","icon-arrow-down":"playkit-icon-arrow-down",iconArrowDown:"playkit-icon-arrow-down","icon-start-over":"playkit-icon-start-over",iconStartOver:"playkit-icon-start-over","icon-seek-end":"playkit-icon-seek-end",iconSeekEnd:"playkit-icon-seek-end","icon-rewind":"playkit-icon-rewind",iconRewind:"playkit-icon-rewind","icon-rewind-10":"playkit-icon-rewind-10",iconRewind10:"playkit-icon-rewind-10","icon-forward":"playkit-icon-forward",iconForward:"playkit-icon-forward","icon-forward-10":"playkit-icon-forward-10",iconForward10:"playkit-icon-forward-10","icon-vr-stereo":"playkit-icon-vr-stereo",iconVrStereo:"playkit-icon-vr-stereo","icon-vr-stereo-full":"playkit-icon-vr-stereo-full",iconVrStereoFull:"playkit-icon-vr-stereo-full","icon-chromecast":"playkit-icon-chromecast",iconChromecast:"playkit-icon-chromecast","icon-chromecast-brand":"playkit-icon-chromecast-brand",iconChromecastBrand:"playkit-icon-chromecast-brand","icon-next":"playkit-icon-next",iconNext:"playkit-icon-next","icon-prev":"playkit-icon-prev",iconPrev:"playkit-icon-prev","icon-picture-in-picture":"playkit-icon-picture-in-picture",iconPictureInPicture:"playkit-icon-picture-in-picture",active:"playkit-active","dropdown-menu":"playkit-dropdown-menu",dropdownMenu:"playkit-dropdown-menu","dropdown-button":"playkit-dropdown-button",dropdownButton:"playkit-dropdown-button",openDropmenu:"playkit-openDropmenu",top:"playkit-top",bottom:"playkit-bottom",right:"playkit-right",left:"playkit-left","stick-bottom":"playkit-stick-bottom",stickBottom:"playkit-stick-bottom","dropdown-menu-item":"playkit-dropdown-menu-item",dropdownMenuItem:"playkit-dropdown-menu-item","control-button":"playkit-control-button",controlButton:"playkit-control-button","control-button-rounded":"playkit-control-button-rounded",controlButtonRounded:"playkit-control-button-rounded",touch:"playkit-touch","control-button-container":"playkit-control-button-container",controlButtonContainer:"playkit-control-button-container","state-idle":"playkit-state-idle",stateIdle:"playkit-state-idle","no-idle-control":"playkit-no-idle-control",noIdleControl:"playkit-no-idle-control",rotate:"playkit-rotate",spin:"playkit-spin","reverse-rotate":"playkit-reverse-rotate",reverseRotate:"playkit-reverse-rotate","reverse-spin":"playkit-reverse-spin",reverseSpin:"playkit-reverse-spin","player-gui":"playkit-player-gui",playerGui:"playkit-player-gui","overlay-active":"playkit-overlay-active",overlayActive:"playkit-overlay-active",casting:"playkit-casting","metadata-loaded":"playkit-metadata-loaded",metadataLoaded:"playkit-metadata-loaded","state-paused":"playkit-state-paused",statePaused:"playkit-state-paused","ad-break":"playkit-ad-break",adBreak:"playkit-ad-break","menu-active":"playkit-menu-active",menuActive:"playkit-menu-active",nav:"playkit-nav","seek-bar":"playkit-seek-bar",seekBar:"playkit-seek-bar","smart-container-item":"playkit-smart-container-item",smartContainerItem:"playkit-smart-container-item","pre-playback-play-button":"playkit-pre-playback-play-button",prePlaybackPlayButton:"playkit-pre-playback-play-button",sample:"playkit-sample","custom-captions-applied":"playkit-custom-captions-applied",customCaptionsApplied:"playkit-custom-captions-applied","button-save-cvaa":"playkit-button-save-cvaa",buttonSaveCvaa:"playkit-button-save-cvaa",slider:"playkit-slider","unmute-button-container":"playkit-unmute-button-container",unmuteButtonContainer:"playkit-unmute-button-container","live-tag":"playkit-live-tag",liveTag:"playkit-live-tag",hover:"playkit-hover",iOS:"playkit-iOS",iOs:"playkit-iOS",Safari:"playkit-Safari",safari:"playkit-Safari",fullscreen:"playkit-fullscreen","video-player":"playkit-video-player",videoPlayer:"playkit-video-player",overlay:"playkit-overlay",openOverlay:"playkit-openOverlay","overlay-contents":"playkit-overlay-contents",overlayContents:"playkit-overlay-contents",title:"playkit-title","close-overlay":"playkit-close-overlay",closeOverlay:"playkit-close-overlay","overlay-screen":"playkit-overlay-screen",overlayScreen:"playkit-overlay-screen","size-md":"playkit-size-md",sizeMd:"playkit-size-md","size-sm":"playkit-size-sm",sizeSm:"playkit-size-sm","size-xs":"playkit-size-xs",sizeXs:"playkit-size-xs","smart-container":"playkit-smart-container",smartContainer:"playkit-smart-container",openSmartContainer:"playkit-openSmartContainer",leaving:"playkit-leaving",closeSmartContainer:"playkit-closeSmartContainer","select-menu-item":"playkit-select-menu-item",selectMenuItem:"playkit-select-menu-item","label-icon":"playkit-label-icon",labelIcon:"playkit-label-icon",Windows:"playkit-Windows",windows:"playkit-Windows","share-overlay":"playkit-share-overlay",shareOverlay:"playkit-share-overlay","share-icons":"playkit-share-icons",shareIcons:"playkit-share-icons",facebook:"playkit-facebook",twitter:"playkit-twitter",linkedin:"playkit-linkedin","link-options-container":"playkit-link-options-container",linkOptionsContainer:"playkit-link-options-container","copy-url-row":"playkit-copy-url-row",copyUrlRow:"playkit-copy-url-row","input-copy-url":"playkit-input-copy-url",inputCopyUrl:"playkit-input-copy-url","btn-copy-url":"playkit-btn-copy-url",btnCopyUrl:"playkit-btn-copy-url","video-start-options-row":"playkit-video-start-options-row",videoStartOptionsRow:"playkit-video-start-options-row","share-main-container":"playkit-share-main-container",shareMainContainer:"playkit-share-main-container","cvaa-overlay":"playkit-cvaa-overlay",cvaaOverlay:"playkit-cvaa-overlay","black-bg":"playkit-black-bg",blackBg:"playkit-black-bg","yellow-text":"playkit-yellow-text",yellowText:"playkit-yellow-text","active-tick":"playkit-active-tick",activeTick:"playkit-active-tick","custom-caption-form":"playkit-custom-caption-form",customCaptionForm:"playkit-custom-caption-form","preview-container":"playkit-preview-container",previewContainer:"playkit-preview-container",custom:"playkit-custom","font-size":"playkit-font-size",fontSize:"playkit-font-size","font-color":"playkit-font-color",fontColor:"playkit-font-color","font-family":"playkit-font-family",fontFamily:"playkit-font-family","font-style":"playkit-font-style",fontStyle:"playkit-font-style","font-opacity":"playkit-font-opacity",fontOpacity:"playkit-font-opacity","background-color":"playkit-background-color",backgroundColor:"playkit-background-color","background-opacity":"playkit-background-opacity",backgroundOpacity:"playkit-background-opacity","loading-backdrop":"playkit-loading-backdrop",loadingBackdrop:"playkit-loading-backdrop",show:"playkit-show","spinner-container":"playkit-spinner-container",spinnerContainer:"playkit-spinner-container",spinner:"playkit-spinner","kaltura-spinner":"playkit-kaltura-spinner",kalturaSpinner:"playkit-kaltura-spinner","control-play-pause":"playkit-control-play-pause",controlPlayPause:"playkit-control-play-pause","is-playing":"playkit-is-playing",isPlaying:"playkit-is-playing","volume-control":"playkit-volume-control",volumeControl:"playkit-volume-control","volume-control-bar":"playkit-volume-control-bar",volumeControlBar:"playkit-volume-control-bar","is-muted":"playkit-is-muted",isMuted:"playkit-is-muted","dragging-active":"playkit-dragging-active",draggingActive:"playkit-dragging-active",bar:"playkit-bar",progress:"playkit-progress","smart-container-open":"playkit-smart-container-open",smartContainerOpen:"playkit-smart-container-open","size-ty":"playkit-size-ty",sizeTy:"playkit-size-ty","control-fullscreen":"playkit-control-fullscreen",controlFullscreen:"playkit-control-fullscreen","is-fullscreen":"playkit-is-fullscreen",isFullscreen:"playkit-is-fullscreen","time-preview":"playkit-time-preview",timePreview:"playkit-time-preview","frame-preview":"playkit-frame-preview",framePreview:"playkit-frame-preview","progress-bar":"playkit-progress-bar",progressBar:"playkit-progress-bar",scrubber:"playkit-scrubber","virtual-progress":"playkit-virtual-progress",virtualProgress:"playkit-virtual-progress",live:"playkit-live",buffered:"playkit-buffered","frame-preview-img":"playkit-frame-preview-img",framePreviewImg:"playkit-frame-preview-img","time-display":"playkit-time-display",timeDisplay:"playkit-time-display","video-playing-title":"playkit-video-playing-title",videoPlayingTitle:"playkit-video-playing-title","bottom-bar":"playkit-bottom-bar",bottomBar:"playkit-bottom-bar",hide:"playkit-hide","left-controls":"playkit-left-controls",leftControls:"playkit-left-controls","right-controls":"playkit-right-controls",rightControls:"playkit-right-controls","top-bar":"playkit-top-bar",topBar:"playkit-top-bar","overlay-action":"playkit-overlay-action",overlayAction:"playkit-overlay-action",in:"playkit-in",overlayActionIconIn:"playkit-overlayActionIconIn","pre-playback-play-overlay":"playkit-pre-playback-play-overlay",prePlaybackPlayOverlay:"playkit-pre-playback-play-overlay","pre-playback":"playkit-pre-playback",prePlayback:"playkit-pre-playback","btn-skip-ad":"playkit-btn-skip-ad",btnSkipAd:"playkit-btn-skip-ad","skip-ad":"playkit-skip-ad",skipAd:"playkit-skip-ad","non-live-playhead":"playkit-non-live-playhead",nonLivePlayhead:"playkit-non-live-playhead","show-icon-only":"playkit-show-icon-only",showIconOnly:"playkit-show-icon-only","unmute-button":"playkit-unmute-button",unmuteButton:"playkit-unmute-button","has-top-bar":"playkit-has-top-bar",hasTopBar:"playkit-has-top-bar","unmute-icon-container":"playkit-unmute-icon-container",unmuteIconContainer:"playkit-unmute-icon-container","error-overlay":"playkit-error-overlay",errorOverlay:"playkit-error-overlay","svg-container":"playkit-svg-container",svgContainer:"playkit-svg-container",headline:"playkit-headline","error-session":"playkit-error-session",errorSession:"playkit-error-session","retry-btn":"playkit-retry-btn",retryBtn:"playkit-retry-btn","error-text":"playkit-error-text",errorText:"playkit-error-text",handle:"playkit-handle","learn-more":"playkit-learn-more",learnMore:"playkit-learn-more",watermark:"playkit-watermark","hide-watermark":"playkit-hide-watermark",hideWatermark:"playkit-hide-watermark","advanced-captions-menu-link":"playkit-advanced-captions-menu-link",advancedCaptionsMenuLink:"playkit-advanced-captions-menu-link","control-vr-stereo":"playkit-control-vr-stereo",controlVrStereo:"playkit-control-vr-stereo","vr-stereo-mode":"playkit-vr-stereo-mode",vrStereoMode:"playkit-vr-stereo-mode","cast-button":"playkit-cast-button",castButton:"playkit-cast-button","cast-overlay":"playkit-cast-overlay",castOverlay:"playkit-cast-overlay","cast-poster":"playkit-cast-poster",castPoster:"playkit-cast-poster","has-poster":"playkit-has-poster",hasPoster:"playkit-has-poster","cast-black-cover":"playkit-cast-black-cover",castBlackCover:"playkit-cast-black-cover","cast-box":"playkit-cast-box",castBox:"playkit-cast-box","cast-icon":"playkit-cast-icon",castIcon:"playkit-cast-icon","cast-connecting-spinner":"playkit-cast-connecting-spinner",castConnectingSpinner:"playkit-cast-connecting-spinner","cast-text":"playkit-cast-text",castText:"playkit-cast-text","cast-status":"playkit-cast-status",castStatus:"playkit-cast-status","cast-device":"playkit-cast-device",castDevice:"playkit-cast-device","cast-on-tv-button-container":"playkit-cast-on-tv-button-container",castOnTvButtonContainer:"playkit-cast-on-tv-button-container","show-cast-on-tv":"playkit-show-cast-on-tv",showCastOnTv:"playkit-show-cast-on-tv",castOnTVAnimation:"playkit-castOnTVAnimation",castOnTvAnimation:"playkit-castOnTVAnimation","cast-on-tv-button":"playkit-cast-on-tv-button",castOnTvButton:"playkit-cast-on-tv-button","cast-on-tv-icon-container":"playkit-cast-on-tv-icon-container",castOnTvIconContainer:"playkit-cast-on-tv-icon-container",backdrop:"playkit-backdrop","control-playlist-button":"playkit-control-playlist-button",controlPlaylistButton:"playkit-control-playlist-button","poster-preview":"playkit-poster-preview",posterPreview:"playkit-poster-preview","poster-preview-text":"playkit-poster-preview-text",posterPreviewText:"playkit-poster-preview-text","poster-preview-text-title":"playkit-poster-preview-text-title",posterPreviewTextTitle:"playkit-poster-preview-text-title","poster-preview-text-name":"playkit-poster-preview-text-name",posterPreviewTextName:"playkit-poster-preview-text-name","poster-preview-img":"playkit-poster-preview-img",posterPreviewImg:"playkit-poster-preview-img","playback-controls":"playkit-playback-controls",playbackControls:"playkit-playback-controls",playlist:"playkit-playlist","playlist-countdown":"playkit-playlist-countdown",playlistCountdown:"playkit-playlist-countdown",hidden:"playkit-hidden","playlist-countdown-content-placeholder":"playkit-playlist-countdown-content-placeholder",playlistCountdownContentPlaceholder:"playkit-playlist-countdown-content-placeholder","playlist-countdown-content-background":"playkit-playlist-countdown-content-background",playlistCountdownContentBackground:"playkit-playlist-countdown-content-background","playlist-countdown-content":"playkit-playlist-countdown-content",playlistCountdownContent:"playkit-playlist-countdown-content",canceled:"playkit-canceled","playlist-countdown-poster":"playkit-playlist-countdown-poster",playlistCountdownPoster:"playkit-playlist-countdown-poster","playlist-countdown-text":"playkit-playlist-countdown-text",playlistCountdownText:"playkit-playlist-countdown-text","playlist-countdown-text-title":"playkit-playlist-countdown-text-title",playlistCountdownTextTitle:"playkit-playlist-countdown-text-title","playlist-countdown-text-name":"playkit-playlist-countdown-text-name",playlistCountdownTextName:"playkit-playlist-countdown-text-name","playlist-countdown-cancel":"playkit-playlist-countdown-cancel",playlistCountdownCancel:"playkit-playlist-countdown-cancel","playlist-countdown-indicator-bar":"playkit-playlist-countdown-indicator-bar",playlistCountdownIndicatorBar:"playkit-playlist-countdown-indicator-bar","playlist-countdown-indicator-progress":"playkit-playlist-countdown-indicator-progress",playlistCountdownIndicatorProgress:"playkit-playlist-countdown-indicator-progress","playlist-next-screen-overlay":"playkit-playlist-next-screen-overlay",playlistNextScreenOverlay:"playkit-playlist-next-screen-overlay","playlist-next-screen-content":"playkit-playlist-next-screen-content",playlistNextScreenContent:"playkit-playlist-next-screen-content","playlist-next-screen-text":"playkit-playlist-next-screen-text",playlistNextScreenText:"playkit-playlist-next-screen-text","playlist-next-screen-text-title":"playkit-playlist-next-screen-text-title",playlistNextScreenTextTitle:"playkit-playlist-next-screen-text-title","playlist-next-screen-text-name":"playkit-playlist-next-screen-text-name",playlistNextScreenTextName:"playkit-playlist-next-screen-text-name","playlist-next-screen-poster-placeholder":"playkit-playlist-next-screen-poster-placeholder",playlistNextScreenPosterPlaceholder:"playkit-playlist-next-screen-poster-placeholder","playlist-next-screen-poster-aspect-ratio":"playkit-playlist-next-screen-poster-aspect-ratio",playlistNextScreenPosterAspectRatio:"playkit-playlist-next-screen-poster-aspect-ratio","playlist-next-screen-poster":"playkit-playlist-next-screen-poster",playlistNextScreenPoster:"playkit-playlist-next-screen-poster","playlist-next-screen-poster-img":"playkit-playlist-next-screen-poster-img",playlistNextScreenPosterImg:"playkit-playlist-next-screen-poster-img","size-lg":"playkit-size-lg",sizeLg:"playkit-size-lg","picture-in-picture-overlay":"playkit-picture-in-picture-overlay",pictureInPictureOverlay:"playkit-picture-in-picture-overlay","picture-in-picture-poster":"playkit-picture-in-picture-poster",pictureInPicturePoster:"playkit-picture-in-picture-poster","dark-layer":"playkit-dark-layer",darkLayer:"playkit-dark-layer","picture-in-picture-control":"playkit-picture-in-picture-control",pictureInPictureControl:"playkit-picture-in-picture-control","picture-in-picture-text":"playkit-picture-in-picture-text",pictureInPictureText:"playkit-picture-in-picture-text","picture-in-picture-button":"playkit-picture-in-picture-button",pictureInPictureButton:"playkit-picture-in-picture-button","control-share":"playkit-control-share",controlShare:"playkit-control-share",copied:"playkit-copied"}},function(e,t){function n(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var a=r(i);return[n].concat(i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"})).concat([a]).join("\n")}return[n].join("\n")}function r(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r=n(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var a=this[i][0];"number"==typeof a&&(r[a]=!0)}for(i=0;i<e.length;i++){var o=e[i];"number"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),t.push(o))}},t}},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=h[r.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](r.parts[a]);for(;a<r.parts.length;a++)i.parts.push(c(r.parts[a],t))}else{for(var o=[],a=0;a<r.parts.length;a++)o.push(c(r.parts[a],t));h[r.id]={id:r.id,refs:1,parts:o}}}}function i(e,t){for(var n=[],r={},i=0;i<e.length;i++){var a=e[i],o=t.base?a[0]+t.base:a[0],s=a[1],l=a[2],u=a[3],c={css:s,media:l,sourceMap:u};r[o]?r[o].parts.push(c):n.push(r[o]={id:o,parts:[c]})}return n}function a(e,t){var n=v(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=b[b.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),b.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function o(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=b.indexOf(e);t>=0&&b.splice(t,1)}function s(e){var t=document.createElement("style");return e.attrs.type="text/css",u(t,e.attrs),a(e,t),t}function l(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",u(t,e.attrs),a(e,t),t}function u(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function c(e,t){var n,r,i,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var u=m++;n=g||(g=s(t)),r=p.bind(null,n,u,!1),i=p.bind(null,n,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(t),r=d.bind(null,n,t),i=function(){o(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=f.bind(null,n),i=function(){o(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function p(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=E(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function f(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t,n){var r=n.css,i=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||a)&&(r=_(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var o=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(o),s&&URL.revokeObjectURL(s)}var h={},y=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),v=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e.call(this,n)),t[n]}}(function(e){return document.querySelector(e)}),g=null,m=0,b=[],_=n(128);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=y()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=i(e,t);return r(n,t),function(e){for(var a=[],o=0;o<n.length;o++){var s=n[o],l=h[s.id];l.refs--,a.push(l)}e&&r(i(e,t),t);for(var o=0;o<a.length;o++){var l=a[o];if(0===l.refs){for(var u=0;u<l.parts.length;u++)l.parts[u]();delete h[l.id]}}}};var E=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i))return e;var a;return a=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(a)+")"})}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.VideoPlayer=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=n(0),c=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),o(t,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"componentDidMount",value:function(){this._el.appendChild(this.props.player.getView())}},{key:"render",value:function(){var e=this;return(0,u.h)("div",{className:l.default.videoPlayer,ref:function(t){return e._el=t}})}}]),t}(u.Component);t.VideoPlayer=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerGUI=void 0;var o,s,l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=n(2),p=function(e){return{state:{shell:e.shell,engine:{adBreak:e.engine.adBreak,isLive:e.engine.isLive,hasError:e.engine.hasError,isIdle:e.engine.isIdle,isVr:e.engine.isVr,playlist:e.engine.playlist}},config:e.config}},f=(o=(0,c.connect)(p))(s=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),l(t,[{key:"getMatchedUI",value:function(e,t){var n=void 0,r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var l=o.value;if(void 0===l.condition||l.condition(t)){n=l;break}}}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}},{key:"render",value:function(e){var t=void 0;return this.props.uis.length>0?(t=this.getMatchedUI(e.uis,e.state),t?t.template(e):this.props.uis[0].template(e)):void 0}}]),t}(u.Component))||s;t.PlayerGUI=f},function(e,t,n){"use strict";function r(e){return(0,i.h)("div",{className:o.default.playbackGuiWWrapper},(0,i.h)(s.Loading,{player:e.player}))}Object.defineProperty(t,"__esModule",{value:!0}),t.idleUI=r;var i=n(0),a=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s=n(15)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Loading=void 0;var l,u,c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(1),f=r(p),d=n(0),h=n(2),y=n(7),v=n(14),g=n(3),m=r(g),b=function(e){return{show:e.loading.show,isMobile:e.shell.isMobile,adBreak:e.engine.adBreak,adIsLinear:e.engine.adIsLinear}},_=(l=(0,h.connect)(b,(0,y.bindActions)(v.actions)))(u=function(e){function t(e){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"Loading",player:e.player}));return n.setState({afterPlayingEvent:!1}),n}return s(t,e),c(t,[{key:"componentDidMount",value:function(){var e=this;this.eventManager.listen(this.player,this.player.Event.PLAYER_STATE_CHANGED,function(t){if(e.state.afterPlayingEvent){var n=e.player.State;t.payload.newState.type===n.IDLE||t.payload.newState.type===n.PLAYING||t.payload.newState.type===n.PAUSED?e.props.updateLoadingSpinnerState(!1):e.props.updateLoadingSpinnerState(!0)}}),this.eventManager.listen(this.player,this.player.Event.AD_BREAK_START,function(){e.props.updateLoadingSpinnerState(!0)}),this.eventManager.listen(this.player,this.player.Event.AD_STARTED,function(){e.props.adIsLinear&&e.props.updateLoadingSpinnerState(!1)}),this.eventManager.listen(this.player,this.player.Event.ALL_ADS_COMPLETED,function(){e.props.updateLoadingSpinnerState(!1)}),this.eventManager.listen(this.player,this.player.Event.AUTOPLAY_FAILED,function(){e.props.updateLoadingSpinnerState(!1)}),this.eventManager.listen(this.player,this.player.Event.PLAYING,function(){e.setState({afterPlayingEvent:!0}),e.props.updateLoadingSpinnerState(!1)}),this.eventManager.listen(this.player,this.player.Event.CHANGE_SOURCE_STARTED,function(){e.setState({afterPlayingEvent:!1})})}},{key:"render",value:function(e){if(e.show)return(0,d.h)("div",{className:[f.default.loadingBackdrop,f.default.show].join(" ")},(0,d.h)("div",{className:f.default.spinnerContainer},(0,d.h)("div",{className:f.default.spinner},[].concat(i(Array(8))).map(function(e){return(0,d.h)("span",{key:e})}))))}}]),t}(m.default))||u;t.Loading=_},function(e,t,n){"use strict";function r(e){return(0,o.h)("div",{className:a.default.playbackGuiWWrapper},(0,o.h)(E.KeyboardControl,{player:e.player,config:e.config}),(0,o.h)(u.Loading,{player:e.player}),(0,o.h)("div",{className:a.default.playerGui,id:"player-gui"},(0,o.h)(_.OverlayPortal,null),(0,o.h)(k.UnmuteIndication,{player:e.player}),(0,o.h)(s.OverlayAction,{player:e.player}),(0,o.h)(P.PlaybackControls,{player:e.player}),(0,o.h)(I.ShareControl,{player:e.player}),C.PlaylistNextScreen.shouldRender(e)?(0,o.h)(C.PlaylistNextScreen,{player:e.player}):void 0,(0,o.h)(b.BottomBar,null,(0,o.h)(f.SeekBarPlaybackContainer,{showFramePreview:!0,showTimeBubble:!0,player:e.player,playerContainer:e.playerContainer}),(0,o.h)("div",{className:a.default.leftControls},(0,o.h)(P.PlaybackControls,{player:e.player}),(0,o.h)(c.RewindControl,{player:e.player,step:10}),(0,o.h)(p.Forward,{player:e.player,step:10}),(0,o.h)(m.TimeDisplayPlaybackContainer,{format:"current / total"})),(0,o.h)("div",{className:a.default.rightControls},g.VrStereoToggleControl.shouldRender(e)?(0,o.h)(g.VrStereoToggleControl,{player:e.player}):void 0,(0,o.h)(d.VolumeControl,{player:e.player}),(0,o.h)(y.LanguageControl,{player:e.player}),(0,o.h)(h.SettingsControl,{player:e.player}),(0,o.h)(A.CastControl,{player:e.player}),(0,o.h)(x.PictureInPicture,{player:e.player}),(0,o.h)(v.FullscreenControl,{player:e.player}),D.Logo.shouldRender(e)?(0,o.h)(D.Logo,{player:e.player}):void 0))),T.Watermark.shouldRender(e)?(0,o.h)(T.Watermark,{player:e.player}):void 0,O.PlaylistCountdown.shouldRender(e)?(0,o.h)(O.PlaylistCountdown,{player:e.player}):void 0,(0,o.h)(l.PrePlaybackPlayOverlay,{player:e.player}),(0,o.h)(w.CastBeforePlay,{player:e.player}),(0,o.h)(R.PictureInPictureOverlay,{player:e.player}),(0,o.h)(S.Backdrop,null))}Object.defineProperty(t,"__esModule",{value:!0}),t.playbackUI=r;var i=n(1),a=function(e){return e&&e.__esModule?e:{default:e}}(i),o=n(0),s=n(36),l=n(38),u=n(15),c=n(66),p=n(67),f=n(68),d=n(22),h=n(43),y=n(47),v=n(23),g=n(48),m=n(73),b=n(24),_=n(50),E=n(25),k=n(26),T=n(51),A=n(52),w=n(53),S=n(74),P=n(27),O=n(161),C=n(77),x=n(54),R=n(78),I=n(55),D=n(81)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.OverlayAction=t.OVERLAY_ACTION_DEFAULT_TIMEOUT=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),p=n(1),f=r(p),d=n(2),h=n(7),y=n(21),v=n(8),g=n(3),m=r(g),b=n(5),_=r(b),E=n(37),k=function(e){return{isPlayingAdOrPlayback:(0,E.isPlayingAdOrPlayback)(e.engine),iconType:e.overlayAction.iconType,playerHover:e.shell.playerHover,isMobile:e.shell.isMobile,isSmartContainerOpen:e.shell.smartContainerOpen}},T=t.OVERLAY_ACTION_DEFAULT_TIMEOUT=300,A=(s=(0,d.connect)(k,(0,h.bindActions)(Object.assign({},y.actions,v.actions))))(l=function(e){function t(e){i(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"OverlayAction",player:e.player}));return n._iconTimeout=null,n._pointerDownPosX=NaN,n._pointerDownPosY=NaN,n._firstClickTime=0,n._clickTimeout=0,n}return o(t,e),u(t,[{key:"togglePlayPause",value:function(){this.props.isPlayingAdOrPlayback?(this.player.pause(),this.props.updateOverlayActionIcon(b.IconType.Pause)):(this.player.play(),this.props.updateOverlayActionIcon(b.IconType.Play)),this.props.updatePlayerHoverState(!0),this.notifyClick({type:"PlayPause"})}},{key:"toggleFullscreen",value:function(){this.player.isFullscreen()?(this.logger.debug("Exit fullscreen"),this.player.exitFullscreen()):(this.logger.debug("Enter fullscreen"),this.player.enterFullscreen()),this.notifyClick({type:"Fullscreen"})}},{key:"onOverlayPointerDown",value:function(e){this._pointerDownPosX=e.clientX||e.changedTouches&&e.changedTouches[0]&&e.changedTouches[0].clientX,this._pointerDownPosY=e.clientY||e.changedTouches&&e.changedTouches[0]&&e.changedTouches[0].clientY}},{key:"onOverlayMouseUp",value:function(e){this.isDragging(e)||this.overlayClick()}},{key:"onOverlayTouchEnd",value:function(e){e.preventDefault(),this.props.playerHover&&!this.isDragging(e)&&this.togglePlayPause()}},{key:"isDragging",value:function(e){var t={clientX:e.clientX||e.changedTouches&&e.changedTouches[0]&&e.changedTouches[0].clientX,clientY:e.clientY||e.changedTouches&&e.changedTouches[0]&&e.changedTouches[0].clientY};return Math.abs(t.clientX-this._pointerDownPosX)>5||Math.abs(t.clientY-this._pointerDownPosY)>5}},{key:"overlayClick",value:function(){var e=this;if(!this.props.isSmartContainerOpen){var t=Date.now();if(t-this._firstClickTime<200)return this.cancelClickTimeout(),void this.toggleFullscreen();if(t-this._firstClickTime<500)return this.cancelClickTimeout(),this.togglePlayPause(),this.toggleFullscreen(),void(this._firstClickTime=0);this._firstClickTime=t,this._clickTimeout=setTimeout(function(){e._clickTimeout=null,e.togglePlayPause()},200)}}},{key:"cancelClickTimeout",value:function(){this._clickTimeout&&(clearTimeout(this._clickTimeout),this._clickTimeout=null)}},{key:"shouldComponentUpdate",value:function(e){return e.iconType&&this.toggleOverlayActionIcon(e.iconType),!0}},{key:"toggleOverlayActionIcon",value:function(e){var t=this;null!==this._iconTimeout&&(clearTimeout(this._iconTimeout),this._iconTimeout=null,this.setState({animation:!1}),this.forceUpdate()),this.setState({animation:!0,iconType:e}),this._iconTimeout=setTimeout(function(){t.setState({animation:!1})},T)}},{key:"render",value:function(){var e=this;return(0,c.h)("div",{className:f.default.overlayAction+" "+(this.state.animation?f.default.in:""),onMouseDown:function(t){return e.onOverlayPointerDown(t)},onTouchStart:function(t){return e.onOverlayPointerDown(t)},onMouseUp:function(t){return e.onOverlayMouseUp(t)},onTouchEnd:function(t){return e.onOverlayTouchEnd(t)}},this.state.animation?this.renderIcons():void 0)}},{key:"renderIcons",value:function(){return Array.isArray(this.state.iconType)?this.state.iconType.map(function(e,t){return(0,c.h)(_.default,{key:t,type:e})}):(0,c.h)(_.default,{type:this.state.iconType})}},{key:"componentDidUpdate",value:function(){this.state.animation&&this.props.updateOverlayActionIcon(null)}}]),t}(m.default))||l;t.OverlayAction=A},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.PrePlaybackPlayOverlay=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(2),h=n(7),y=n(3),v=r(y),g=n(5),m=r(g),b=n(6),_=n(14),E=n(4),k=function(e){return{prePlayback:e.engine.prePlayback,isPlaybackEnded:e.engine.isPlaybackEnded,playlist:e.engine.playlist,loading:e.loading.show}},T=(s=(0,d.connect)(k,(0,h.bindActions)(Object.assign({},_.actions))))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"PrePlaybackPlayOverlay",player:e.player}))}return o(t,e),u(t,[{key:"handleClick",value:function(){this.player.getView().focus(),this.props.playlist&&this.props.isPlaybackEnded?this.player.playlist.playNext():this.player.play(),this.notifyClick()}},{key:"render",value:function(e){var t=this;if(!(!e.prePlayback&&(!e.isPlaybackEnded||e.playlist&&e.playlist.next)||e.loading))return(0,f.h)("div",{className:p.default.prePlaybackPlayOverlay,onMouseOver:function(e){return e.stopPropagation()},onClick:function(){return t.handleClick()}},(0,f.h)(E.Localizer,null,(0,f.h)("a",{className:p.default.prePlaybackPlayButton,tabIndex:"0","aria-label":(0,f.h)(E.Text,{id:e.isPlaybackEnded?"controls.startOver":"controls.play"}),onKeyDown:function(e){e.keyCode===b.KeyMap.ENTER&&t.handleClick()}},e.isPlaybackEnded?(0,f.h)(m.default,{type:g.IconType.StartOver}):(0,f.h)(m.default,{type:g.IconType.Play}))))}}]),t}(v.default))||l;t.PrePlaybackPlayOverlay=T},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.RewindControl=t.REWIND_DEFAULT_STEP=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(0),p=n(4),f=n(3),d=r(f),h=n(5),y=r(h),v=n(6),g=t.REWIND_DEFAULT_STEP=10,m=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"Rewind",player:e.player}))}return o(t,e),s(t,[{key:"onClick",value:function(){this.animate();var e=void 0,t=this.props.step||g,n=this.player.currentTime;e=this.player.currentTime-t<0?0:this.player.currentTime-t,this.player.currentTime=e,this.notifyClick({from:n,to:e})}},{key:"animate",value:function(){this.setState({animation:!1}),this.forceUpdate(),this.setState({animation:!0})}},{key:"render",value:function(e){var t=this;return(0,c.h)("div",{className:[u.default.controlButtonContainer,u.default.noIdleControl].join(" ")},(0,c.h)(p.Localizer,null,(0,c.h)("button",{tabIndex:"0","aria-label":(0,c.h)(p.Text,{id:"controls.rewind"}),className:u.default.controlButton+" "+(this.state.animation?u.default.rotate:""),onClick:function(){return t.onClick()},onKeyDown:function(e){e.keyCode===v.KeyMap.ENTER&&t.onClick()}},(0,c.h)(y.default,{type:e.step&&e.step!==g?h.IconType.Rewind:h.IconType.Rewind10}))))}}]),t}(d.default);t.RewindControl=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Forward=t.FORWARD_DEFAULT_STEP=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(0),p=n(4),f=n(3),d=r(f),h=n(5),y=r(h),v=n(6),g="Forward",m=t.FORWARD_DEFAULT_STEP=10,b=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:g,player:e.player}))}return o(t,e),s(t,[{key:"onClick",value:function(){this.animate();var e=void 0,t=this.props.step||m,n=this.player.currentTime;e=this.player.currentTime+t>this.player.duration?this.player.duration:this.player.currentTime+t,this.player.currentTime=e,this.notifyClick({from:n,to:e})}},{key:"animate",value:function(){this.setState({animation:!1}),this.forceUpdate(),this.setState({animation:!0})}},{key:"render",value:function(e){var t=this;return(0,c.h)("div",{className:[u.default.controlButtonContainer,u.default.noIdleControl].join(" ")},(0,c.h)(p.Localizer,null,(0,c.h)("button",{tabIndex:"0","aria-label":(0,c.h)(p.Text,{id:"controls.forward"}),className:u.default.controlButton+" "+(this.state.animation?u.default.reverseRotate:""),onClick:function(){return t.onClick()},onKeyDown:function(e){e.keyCode===v.KeyMap.ENTER&&t.onClick()}},(0,c.h)(y.default,{type:e.step&&e.step!==m?h.IconType.Forward:h.IconType.Forward10}))))}}]),t}(d.default);b.displayName=g,t.Forward=b},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.SeekBarPlaybackContainer=void 0;var o,s,l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=n(2),p=n(7),f=n(18),d=n(3),h=function(e){return e&&e.__esModule?e:{default:e}}(d),y=n(39),v=function(e){return{currentTime:e.seekbar.currentTime,duration:e.engine.duration,isDraggingActive:e.seekbar.draggingActive,isMobile:e.shell.isMobile,poster:e.engine.poster}},g=(o=(0,c.connect)(v,(0,p.bindActions)(f.actions)))(s=function(e){function t(e){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"SeekBarPlaybackContainer",player:e.player}))}return a(t,e),l(t,[{key:"componentDidMount",value:function(){var e=this;this.eventManager.listen(this.player,this.player.Event.TIME_UPDATE,function(){e.props.isDraggingActive||e.props.updateCurrentTime(e.player.currentTime)})}},{key:"render",value:function(){var e=this;return(0,u.h)(y.SeekBarControl,{player:this.props.player,playerElement:this.props.playerContainer,showFramePreview:this.props.showFramePreview,showTimeBubble:this.props.showTimeBubble,changeCurrentTime:function(t){return e.player.currentTime=t},playerPoster:this.props.poster,updateSeekbarDraggingStatus:function(t){return e.props.updateSeekbarDraggingStatus(t)},updateSeekbarHoverActive:function(t){return e.props.updateSeekbarHoverActive(t)},updateCurrentTime:function(t){return e.props.updateCurrentTime(t)},currentTime:this.props.currentTime,duration:this.props.duration,isDraggingActive:this.props.isDraggingActive,isMobile:this.props.isMobile,notifyChange:function(t){return e.notifyChange(t)}})}}]),t}(h.default))||s;t.SeekBarPlaybackContainer=g},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.SeekBarControl=void 0;var o,s,l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=function(e){return e&&e.__esModule?e:{default:e}}(u),p=n(0),f=n(40),d=n(6),h=n(2),y=n(7),v=n(8),g=n(41),m=n(42),b=function(e){return{config:e.config.components.seekbar,isMobile:e.shell.isMobile}},_=(o=(0,h.connect)(b,(0,y.bindActions)(v.actions)))(s=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.onPlayerMouseUp=(0,m.bindMethod)(e,e.onPlayerMouseUp),e.onPlayerMouseMove=(0,m.bindMethod)(e,e.onPlayerMouseMove),e}return a(t,e),l(t,[{key:"componentWillMount",value:function(){this.setState({virtualTime:0})}},{key:"componentDidMount",value:function(){document.addEventListener("mouseup",this.onPlayerMouseUp),document.addEventListener("mousemove",this.onPlayerMouseMove)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mouseup",this.onPlayerMouseUp),document.removeEventListener("mousemove",this.onPlayerMouseMove)}},{key:"onSeekbarMouseDown",value:function(e){if(!this.props.isMobile&&(e.preventDefault(),this.props.updateSeekbarDraggingStatus(!0),this.props.isDraggingActive)){var t=this.getTime(e);this.updateSeekBarProgress(t,this.props.duration)}}},{key:"onPlayerMouseUp",value:function(e){if(!this.props.isMobile&&this.props.isDraggingActive){var t=this.props.player.currentTime,n=this.getTime(e);this.props.changeCurrentTime(n),this.updateSeekBarProgress(n,this.props.duration),this.props.updateSeekbarDraggingStatus(!1),this.props.notifyChange({from:t,to:n})}}},{key:"onPlayerMouseMove",value:function(e){if(!this.props.isMobile&&this.props.isDraggingActive){var t=this.getTime(e);this.updateSeekBarProgress(t,this.props.duration),this.updateSeekBarProgress(t,this.props.duration,!0)}}},{key:"onSeekbarMouseMove",value:function(e){if(!this.props.isMobile){var t=this.getTime(e);this.updateSeekBarProgress(t,this.props.duration,!0)}}},{key:"onSeekbarTouchStart",value:function(e){if(this.props.updateSeekbarDraggingStatus(!0),this.props.isDraggingActive){var t=this.getTime(e);this.updateSeekBarProgress(t,this.props.duration)}}},{key:"onSeekbarTouchMove",value:function(e){var t=this.getTime(e);this.updateSeekBarProgress(t,this.props.duration,!0),this.props.isDraggingActive&&this.updateSeekBarProgress(t,this.props.duration),e.preventDefault()}},{key:"onSeekbarKeyDown",value:function(e){var t=this;if(!this.props.adBreak){var n=function(e,n){t.props.player.currentTime=n,t.updateSeekBarProgress(t.props.player.currentTime,t.props.duration,!0),t.props.notifyChange({from:e,to:n})},r=void 0;switch(e.keyCode){case d.KeyMap.LEFT:r=this.props.player.currentTime-g.KEYBOARD_DEFAULT_SEEK_JUMP>0?this.props.player.currentTime-5:0,n(this.props.player.currentTime,r);break;case d.KeyMap.RIGHT:r=this.props.player.currentTime+g.KEYBOARD_DEFAULT_SEEK_JUMP>this.props.player.duration?this.props.player.duration:this.props.player.currentTime+5,n(this.props.player.currentTime,r)}}}},{key:"onSeekbarTouchEnd",value:function(e){if(this.props.isDraggingActive){var t=this.getTime(e),n=this.props.player.currentTime,r=t;this.props.changeCurrentTime(r),this.updateSeekBarProgress(r,this.props.duration),this.props.notifyChange({from:n,to:r})}this.props.updateSeekbarDraggingStatus(!1)}},{key:"onSeekbarMouseOver",value:function(){this.props.isMobile||this.props.updateSeekbarHoverActive(!0)}},{key:"onSeekbarMouseLeave",value:function(){this.props.isMobile||this.props.updateSeekbarHoverActive(!1)}},{key:"updateSeekBarProgress",value:function(e,t){arguments.length>2&&void 0!==arguments[2]&&arguments[2]?this.setState({virtualTime:e}):this.props.updateCurrentTime(e)}},{key:"getOffset",value:function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-e.scrollLeft+this._getTransformX(e),n+=e.offsetTop-e.scrollTop,e=e.offsetParent;return this.props.player.isFullscreen()&&(t=0),{top:n,left:t}}},{key:"_getTransformX",value:function(e){var t=getComputedStyle(e),n=t.getPropertyValue("transform")||t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform"),r=n.match(/-?\d+/g),i=0;return r&&r.length>0&&(i=parseFloat(r[4])),i}},{key:"getTime",value:function(e){var t=e.clientX||e.changedTouches&&e.changedTouches[0]&&e.changedTouches[0].clientX,n=this.props.duration*((t-this._seekBarElement.offsetLeft-this.getOffset(this.props.playerElement).left)/this._seekBarElement.clientWidth);return n=parseFloat(n.toFixed(2)),n<0?0:n>this.props.duration?this.props.duration:n}},{key:"getBufferedPercent",value:function(){if(this.props.player.duration>0&&this.props.player.buffered.length>0){var e=this.props.player.isLive()?this.props.player.buffered.end(0)-this.props.player.getStartTimeOfDvrWindow():this.props.player.buffered.end(0),t=e/this.props.player.duration*100;return t<100?t:100}return 0}},{key:"getThumbSpriteOffset",value:function(){var e=this.state.virtualTime/this.props.duration;return-Math.ceil(this.props.config.thumbsSlices*e)*this.props.config.thumbsWidth+"px 0px"}},{key:"getFramePreviewOffset",value:function(){if(this._seekBarElement&&this._framePreviewElement){var e=this.state.virtualTime/this.props.duration*this._seekBarElement.clientWidth-this._framePreviewElement.clientWidth/2;return e<0?0:e>this._seekBarElement.clientWidth-this._framePreviewElement.clientWidth?this._seekBarElement.clientWidth-this._framePreviewElement.clientWidth:e}return 0}},{key:"getTimeBubbleOffset",value:function(){if(this._timeBubbleElement){var e=this.state.virtualTime/this.props.duration*this._seekBarElement.clientWidth-this._timeBubbleElement.clientWidth/2;return e<0?0:e>this._seekBarElement.clientWidth-this._timeBubbleElement.clientWidth?this._seekBarElement.clientWidth-this._timeBubbleElement.clientWidth:e}return 0}},{key:"renderFramePreview",value:function(){var e=this;if(this.props.config.thumbsSprite&&this.props.config.thumbsSlices&&this.props.config.thumbsWidth&&this.props.showFramePreview&&!this.props.isMobile)return(0,p.h)("div",{className:c.default.framePreview,style:this._getFramePreviewStyle(),ref:function(t){return e._framePreviewElement=t}},(0,p.h)("div",{className:c.default.framePreviewImg,style:this._getFramePreviewImgStyle()}))}},{key:"_getFramePreviewImgStyle",value:function(){var e="background-image: url("+this.props.config.thumbsSprite+");";return e+="background-position: "+this.getThumbSpriteOffset()+";",e+="background-size: "+this.props.config.thumbsSlices*this.props.config.thumbsWidth+"px 100%;"}},{key:"_getFramePreviewStyle",value:function(){var e="left: "+this.getFramePreviewOffset()+"px;";return e+="width: "+this.props.config.thumbsWidth+"px;"}},{key:"renderTimeBubble",value:function(){var e=this;if(this.props.showTimeBubble&&!this.props.isMobile){var t="left: "+this.getTimeBubbleOffset()+"px",n=this.props.isDvr?"-"+(0,f.toHHMMSS)(this.props.duration-this.state.virtualTime):(0,f.toHHMMSS)(this.state.virtualTime);return(0,p.h)("div",{className:c.default.timePreview,style:t,ref:function(t){return e._timeBubbleElement=t}},n)}}},{key:"render",value:function(e){var t=this,n=this.state.virtualTime/e.duration*100+"%",r=e.currentTime/e.duration*100+"%",i=Math.round(this.getBufferedPercent())+"%",a=[c.default.seekBar];return e.adBreak&&a.push(c.default.adBreak),e.isDvr&&a.push(c.default.live),e.isMobile&&a.push(c.default.hover),e.isDraggingActive&&a.push(c.default.hover),(0,p.h)("div",{tabIndex:"0",className:a.join(" "),ref:function(e){return t._seekBarElement=e},role:"slider","aria-label":"Seek slider","aria-valuemin":"0","aria-valuemax":Math.round(this.props.duration),"aria-valuenow":Math.round(this.props.currentTime),"aria-valuetext":(0,f.toHHMMSS)(this.props.currentTime)+" of "+(0,f.toHHMMSS)(this.props.duration),onMouseOver:function(){return t.onSeekbarMouseOver()},onMouseLeave:function(){return t.onSeekbarMouseLeave()},onMouseMove:function(e){return t.onSeekbarMouseMove(e)},onMouseDown:function(e){return t.onSeekbarMouseDown(e)},onTouchStart:function(e){return t.onSeekbarTouchStart(e)},onTouchMove:function(e){return t.onSeekbarTouchMove(e)},onTouchEnd:function(e){return t.onSeekbarTouchEnd(e)},onKeyDown:function(e){return t.onSeekbarKeyDown(e)}},(0,p.h)("div",{className:c.default.progressBar},this.renderFramePreview(),this.renderTimeBubble(),(0,p.h)("div",{className:c.default.virtualProgress,style:{width:n}}),(0,p.h)("div",{className:c.default.buffered,style:{width:i}}),(0,p.h)("div",{className:c.default.progress,style:{width:r}},e.adBreak?void 0:(0,p.h)("a",{className:c.default.scrubber}))))}}]),t}(p.Component))||s;t.SeekBarControl=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.VolumeControl=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=n(1),f=r(p),d=n(0),h=n(2),y=n(7),v=n(33),g=n(11),m=n(3),b=r(m),_=n(5),E=r(_),k=n(6),T=n(41),A=(n(9),function(e){return{isDraggingActive:e.volume.draggingActive,volume:e.engine.volume,muted:e.engine.muted,isMobile:e.shell.isMobile}}),w=(s=(0,h.connect)(A,(0,y.bindActions)(c({},v.actions,g.actions))))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"Volume",player:e.player}))}return o(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this;this.eventManager.listen(this.player,this.player.Event.LOADED_METADATA,function(){e.props.updateVolume(e.player.volume),e.props.updateMuted(e.player.muted)}),this.eventManager.listen(this.player,this.player.Event.VOLUME_CHANGE,function(){e.props.updateMuted(e.player.muted),e.props.updateVolume(e.player.volume)}),this.eventManager.listen(document,"mouseup",function(t){return e.onVolumeProgressBarMouseUp(t)}),this.eventManager.listen(document,"mousemove",function(t){return e.onVolumeProgressBarMouseMove(t)})}},{key:"getVolumeProgressHeight",value:function(){return this.props.muted?"0%":Math.round(100*this.props.volume)+"%"}},{key:"onVolumeProgressBarMouseDown",value:function(){this.props.updateVolumeDraggingStatus(!0)}},{key:"onVolumeProgressBarMouseMove",value:function(e){this.props.isDraggingActive&&this.changeVolume(e)}},{key:"onVolumeMouseOver",value:function(){this.props.isMobile||(this.props.updateVolumeHover(!0),this.setState({hover:!0}))}},{key:"onVolumeMouseOut",value:function(){this.props.isMobile||(this.props.updateVolumeHover(!1),this.setState({hover:!1}))}},{key:"onVolumeControlKeyDown",value:function(e){var t=this,n=function(e){t.setState({hover:!0}),e>100||e<0||(t.player.muted=e<T.KEYBOARD_DEFAULT_VOLUME_JUMP,t.player.volume=e/100,t.notifyChange({volume:t.player.volume}))};switch(e.keyCode){case k.KeyMap.UP:n(Math.round(100*this.player.volume)+T.KEYBOARD_DEFAULT_VOLUME_JUMP);break;case k.KeyMap.DOWN:n(Math.round(100*this.player.volume)-T.KEYBOARD_DEFAULT_VOLUME_JUMP);break;default:this.setState({hover:!1})}}},{key:"onVolumeProgressBarMouseUp",value:function(e){this.props.isDraggingActive&&(this.props.updateVolumeDraggingStatus(!1),this.changeVolume(e))}},{key:"onVolumeControlButtonClick",value:function(){0==this.player.volume?(this.logger.debug("Toggle mute. Volume is 0, set mute to false & volume to 0.5"),this.player.muted=!1,this.player.volume=.5):(this.logger.debug("Toggle mute. "+this.player.muted+" => "+!this.player.muted),this.player.muted=!this.player.muted),this.notifyClick()}},{key:"changeVolume",value:function(e){var t=this._volumeProgressBarElement.getBoundingClientRect(),n=void 0;n=t.height>t.width?this._getVerticalVolume(t,e):this._getHorizontalVolume(t,e),(n=parseFloat(n.toFixed(2)))<=1&&n>=0&&(this.logger.debug("Change volume from "+this.player.volume+" => "+n),this.player.volume=n,this.props.muted&&(this.player.muted=!1),this.notifyChange({volume:this.player.volume}))}},{key:"_getHorizontalVolume",value:function(e,t){var n=e.width,r=e.left,i=t.clientX;return 0!=n?(i-r)/n:0}},{key:"_getVerticalVolume",value:function(e,t){var n=e.height,r=e.top,i=t.clientY;return 0!=n?1-(i-r)/n:0}},{key:"render",value:function(){var e=this,t=[f.default.controlButtonContainer,f.default.volumeControl];return this.props.isDraggingActive&&t.push(f.default.draggingActive),(this.props.muted||0===this.props.volume)&&t.push(f.default.isMuted),this.state.hover&&!this.props.smartContainerOpen&&t.push(f.default.hover),(0,d.h)("div",{ref:function(t){return e._volumeControlElement=t},className:t.join(" "),onMouseOver:function(){return e.onVolumeMouseOver()},onMouseOut:function(){return e.onVolumeMouseOut()}},(0,d.h)("button",{tabIndex:"0","aria-label":"Volume",className:f.default.controlButton,onClick:function(){return e.onVolumeControlButtonClick()},onKeyDown:function(t){return e.onVolumeControlKeyDown(t)}},(0,d.h)(E.default,{type:_.IconType.VolumeBase}),(0,d.h)(E.default,{type:_.IconType.VolumeWaves}),(0,d.h)(E.default,{type:_.IconType.VolumeMute})),(0,d.h)("div",{className:f.default.volumeControlBar,role:"slider","aria-valuemin":"0","aria-valuemaz":"100","aria-valuenow":100*this.player.volume,"aria-valuetext":100*this.player.volume+"% volume "+(this.player.muted?"muted":"")},(0,d.h)("div",{className:f.default.bar,ref:function(t){return e._volumeProgressBarElement=t},onMouseDown:function(){return e.onVolumeProgressBarMouseDown()}},(0,d.h)("div",{className:f.default.progress,style:{height:this.getVolumeProgressHeight()}}))))}}]),t}(b.default))||l;t.VolumeControl=w},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsControl=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(4),h=n(2),y=n(7),v=n(34),g=n(3),m=r(g),b=n(44),_=n(69),E=n(5),k=r(E),T=n(10),A=function(e){return{videoTracks:e.engine.videoTracks,isMobile:e.shell.isMobile,isLive:e.engine.isLive,playerSize:e.shell.playerSize}},w=(s=(0,h.connect)(A,(0,y.bindActions)(v.actions)))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"Settings",player:e.player}))}return o(t,e),u(t,[{key:"componentWillMount",value:function(){this.setState({smartContainerOpen:!1})}},{key:"componentDidMount",value:function(){var e=this;this.eventManager.listen(document,"click",function(t){return e.handleClickOutside(t)})}},{key:"handleClickOutside",value:function(e){this.props.isMobile||[T.PLAYER_SIZE.SMALL,T.PLAYER_SIZE.EXTRA_SMALL].includes(this.props.playerSize)||!this._controlSettingsElement||this._controlSettingsElement.contains(e.target)||!this.state.smartContainerOpen||(e.target.classList.contains(p.default.overlayPlay)&&e.stopPropagation(),this.setState({smartContainerOpen:!1}))}},{key:"onControlButtonClick",value:function(){this.setState({smartContainerOpen:!this.state.smartContainerOpen})}},{key:"onSpeedChange",value:function(e){this.props.updateSpeed(e),this.player.playbackRate=e,this.notifyClick({speed:e})}},{key:"onQualityChange",value:function(e){"auto"===e?this.player.enableAdaptiveBitrate():this.player.selectTrack(e),this.notifyClick({type:this.player.Track.VIDEO,track:e})}},{key:"filterUniqueQualities",value:function(e,t){var n=e.length-1,r=e[n];return n>-1&&t.label===r.label?t.bandwidth>r.bandwidth&&(e[n]=t):e.push(t),e}},{key:"render",value:function(e){var t=this,n=this.player.playbackRates.reduce(function(e,n){var r={value:n,label:1===n?"Normal":n,active:!1};return n===t.player.playbackRate&&(r.active=!0),e.push(r),e},[]),r=e.videoTracks.sort(function(e,t){return e.bandwidth<t.bandwidth?1:-1}).filter(function(e){return e.bandwidth||e.height}).reduce(this.filterUniqueQualities,[]).map(function(e){return{label:e.label,active:!t.player.isAdaptiveBitrateEnabled()&&e.active,value:e}});if(r.length>1&&"progressive"!==this.player.streamType&&r.unshift({label:"Auto",active:this.player.isAdaptiveBitrateEnabled(),value:"auto"}),!(r.length<=1&&n.length<=1||e.isLive&&r.length<=1))return(0,f.h)("div",{ref:function(e){return t._controlSettingsElement=e},className:[p.default.controlButtonContainer,p.default.controlSettings].join(" ")},(0,f.h)(d.Localizer,null,(0,f.h)("button",{tabIndex:"0","aria-label":(0,f.h)(d.Text,{id:"controls.settings"}),className:this.state.smartContainerOpen?[p.default.controlButton,p.default.active].join(" "):p.default.controlButton,onClick:function(){return t.onControlButtonClick()}},(0,f.h)(k.default,{type:E.IconType.Settings}))),this.state.smartContainerOpen?(0,f.h)(b.SmartContainer,{targetId:this.player.config.targetId,title:(0,f.h)(d.Text,{id:"settings.title"}),onClose:function(){return t.onControlButtonClick()}},r.length<=1?"":(0,f.h)(d.Localizer,null,(0,f.h)(_.SmartContainerItem,{icon:"quality",label:(0,f.h)(d.Text,{id:"settings.quality"}),options:r,onSelect:function(e){return t.onQualityChange(e)}})),e.isLive||n.length<=1?"":(0,f.h)(d.Localizer,null,(0,f.h)(_.SmartContainerItem,{icon:"speed",label:(0,f.h)(d.Text,{id:"settings.speed"}),options:n,onSelect:function(e){return t.onSpeedChange(e)}}))):"")}}]),t}(m.default))||l;t.SettingsControl=w},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.SmartContainer=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(2),h=n(7),y=n(8),v=n(45),g=r(v),m=n(17),b=n(6),_=n(10),E=function(e){return{isMobile:e.shell.isMobile,playerSize:e.shell.playerSize}},k=(s=(0,d.connect)(E,(0,h.bindActions)(y.actions)))(l=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),u(t,[{key:"componentWillMount",value:function(){this.props.addPlayerClass(p.default.smartContainerOpen),this.props.updateSmartContainerOpen(!0)}},{key:"componentWillUnmount",value:function(){this.props.removePlayerClass(p.default.smartContainerOpen),this.props.updateSmartContainerOpen(!1)}},{key:"render",value:function(e){var t=this,n="#"+this.props.targetId+" .overlay-portal";return e.isMobile||[_.PLAYER_SIZE.SMALL,_.PLAYER_SIZE.EXTRA_SMALL].includes(this.props.playerSize)?(0,f.h)(g.default,{into:n,ref:function(e){return t._portal=e}},(0,f.h)(m.Overlay,{open:!0,onClose:function(){return e.onClose()}},(0,f.h)("div",{className:p.default.title},e.title),e.children)):(0,f.h)("div",{tabIndex:"-1",className:[p.default.smartContainer,p.default.top,p.default.left].join(" "),onKeyDown:function(t){t.keyCode===b.KeyMap.ESC&&e.onClose()}},e.children)}}]),t}(f.Component))||l;t.SmartContainer=k},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Overlay=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(4),h=n(2),y=n(7),v=n(8),g=n(5),m=r(g),b=n(6),_=(s=(0,h.connect)(null,(0,y.bindActions)(v.actions)))(l=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),u(t,[{key:"componentWillMount",value:function(){this.props.addPlayerClass(p.default.overlayActive)}},{key:"componentWillUnmount",value:function(){this.props.removePlayerClass(p.default.overlayActive)}},{key:"renderCloseButton",value:function(e){return e.permanent?void 0:(0,f.h)(d.Localizer,null,(0,f.h)("a",{onClick:function(){return e.onClose()},"aria-label":(0,f.h)(d.Text,{id:"overlay.close"}),className:p.default.closeOverlay},(0,f.h)(m.default,{type:g.IconType.Close})))}},{key:"render",value:function(e){var t=[p.default.overlay];return e.type&&t.push(p.default[e.type+"-overlay"]),e.open&&t.push(p.default.active),(0,f.h)("div",{tabIndex:"-1",className:t.join(" "),role:"dialog",onKeyDown:function(t){t.keyCode===b.KeyMap.ESC&&e.onClose()}},(0,f.h)("div",{className:p.default.overlayContents},e.children),this.renderCloseButton(e))}}]),t}(f.Component))||l;t.Overlay=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.DropDown=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(2),h=n(70),y=n(5),v=r(y),g=n(6),m=n(10),b=function(e){return{isMobile:e.shell.isMobile,playerSize:e.shell.playerSize}},_=(s=(0,d.connect)(b))(l=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),u(t,[{key:"componentWillMount",value:function(){this.setState({dropMenuActive:!1})}},{key:"isSelected",value:function(e){return e.active}},{key:"onSelect",value:function(e){this.props.onSelect(e),this.setState({dropMenuActive:!1}),this._dropdownButton.focus()}},{key:"onKeyDown",value:function(e){switch(e.keyCode){case g.KeyMap.ENTER:this.setState({dropMenuActive:!this.state.dropMenuActive});break;case g.KeyMap.ESC:this.state.dropMenuActive&&(this.onClose(),e.stopPropagation())}}},{key:"onClose",value:function(){this.setState({dropMenuActive:!1}),this._dropdownButton.focus()}},{key:"getActiveOptionLabel",value:function(){var e=this.props.options.filter(function(e){return e.active});try{return e[0].label}catch(e){return this.props.options[0].label||"Unlabled"}}},{key:"renderNativeSelect",value:function(){var e=this;return(0,f.h)(h.Menu,{options:this.props.options,onSelect:function(t){return e.onSelect(t)},onClose:function(){return e.onClose()}})}},{key:"render",value:function(e){var t=this;return e.isMobile||[m.PLAYER_SIZE.SMALL,m.PLAYER_SIZE.EXTRA_SMALL].includes(this.props.playerSize)?this.renderNativeSelect():(0,f.h)("div",{name:e.name,className:this.state.dropMenuActive?[p.default.dropdown,p.default.active].join(" "):p.default.dropdown,ref:function(e){return t._el=e}},(0,f.h)("div",{tabIndex:"0",ref:function(e){return t._dropdownButton=e},className:p.default.dropdownButton,onClick:function(){return t.setState({dropMenuActive:!t.state.dropMenuActive})},onKeyDown:function(e){return t.onKeyDown(e)}},(0,f.h)("span",null,this.getActiveOptionLabel()),(0,f.h)(v.default,{type:y.IconType.ArrowDown})),this.state.dropMenuActive?(0,f.h)(h.Menu,{parentEl:this._el,options:e.options,onSelect:function(e){return t.onSelect(e)},onClose:function(){return t.onClose()}}):void 0)}}]),t}(f.Component))||l;t.DropDown=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Menu=void 0;var l,u,c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(1),f=r(p),d=n(0),h=n(5),y=r(h),v=n(2),g=n(6),m=n(42),b=n(10),_=function(e){return{isMobile:e.shell.isMobile,playerClientRect:e.shell.playerClientRect,playerSize:e.shell.playerSize}},E=(l=(0,v.connect)(_))(u=function(e){function t(){a(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.handleClickOutside=(0,m.bindMethod)(e,e.handleClickOutside),e}return s(t,e),c(t,[{key:"componentWillMount",value:function(){this.setState({position:[f.default.top,f.default.left]})}},{key:"componentDidMount",value:function(){document.addEventListener("click",this.handleClickOutside,!0),this.props.isMobile||[b.PLAYER_SIZE.SMALL,b.PLAYER_SIZE.EXTRA_SMALL].includes(this.props.playerSize)||this.setState({position:this.getPosition()})}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.handleClickOutside)}},{key:"getPosition",value:function(){var e=this._menuElement.getBoundingClientRect(),t=this.props.playerClientRect;return e.top>=t.top?[f.default.top,f.default.left]:e.bottom+e.height<t.bottom?[f.default.bottom,f.default.left]:(this._menuElement.style.maxHeight=.8*t.height+"px",[f.default.stickBottom,f.default.left])}},{key:"handleClickOutside",value:function(e){this.props.isMobile||[b.PLAYER_SIZE.SMALL,b.PLAYER_SIZE.EXTRA_SMALL].includes(this.props.playerSize)||!this._menuElement||this._menuElement.contains(e.target)||this.props.onClose()}},{key:"isSelected",value:function(e){return e.active}},{key:"onSelect",value:function(e){this.props.onSelect(e.value),this.props.options.filter(function(e){return e.active}).forEach(function(e){e.active=!1}),this.props.options.filter(function(t){return t.value===e.value})[0].active=!0}},{key:"onKeyDown",value:function(e,t){switch(e.keyCode){case g.KeyMap.ENTER:this.onSelect(t);break;case g.KeyMap.ESC:this.props.onClose(),e.stopPropagation()}}},{key:"getActiveOptionLabel",value:function(){var e=this.props.options.filter(function(e){return e.active});return e.length>0?e[0].label:this.props.options[0].label}},{key:"renderNativeSelect",value:function(){var e=this,t=this.props.hideSelect?f.default.mobileHiddenSelect:"";return t+=" "+f.default.dropdown,(0,d.h)("select",{className:t,onChange:function(t){return e.onSelect(e.props.options[t.target.value])}},this.props.options.map(function(t,n){return(0,d.h)("option",{selected:e.isSelected(t),value:n,key:n},t.label)}))}},{key:"render",value:function(e){var t=this;return e.isMobile||[b.PLAYER_SIZE.SMALL,b.PLAYER_SIZE.EXTRA_SMALL].includes(this.props.playerSize)?this.renderNativeSelect():(0,d.h)("div",{ref:function(e){return t._menuElement=e},className:[f.default.dropdownMenu].concat(i(this.state.position)).join(" ")},e.options.map(function(e,n){return(0,d.h)("div",{tabIndex:"",key:n,className:t.isSelected(e)?[f.default.dropdownMenuItem,f.default.active].join(" "):f.default.dropdownMenuItem,onClick:function(){return t.onSelect(e)},onKeyDown:function(n){return t.onKeyDown(n,e)}},(0,d.h)("span",null,e.label),(0,d.h)("span",{className:f.default.menuIconContainer,style:"opacity: "+(t.isSelected(e)?1:0)},(0,d.h)(y.default,{type:h.IconType.Check})))}))}}]),t}(d.Component))||u;t.Menu=E},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageControl=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(4),h=n(2),y=n(7),v=n(20),g=n(3),m=r(g),b=n(44),_=n(69),E=n(5),k=r(E),T=n(71),A=n(45),w=r(A),S=n(6),P=n(10),O=function(e){return{audioTracks:e.engine.audioTracks,textTracks:e.engine.textTracks,overlayOpen:e.cvaa.overlayOpen,isMobile:e.shell.isMobile,playerSize:e.shell.playerSize}},C=(s=(0,h.connect)(O,(0,y.bindActions)(v.actions)))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"LanguageControl",player:e.player}))}return o(t,e),u(t,[{key:"componentWillMount",value:function(){this.setState({smartContainerOpen:!1})}},{key:"componentDidMount",value:function(){var e=this;this.eventManager.listen(document,"click",function(t){return e.handleClickOutside(t)})}},{key:"handleClickOutside",value:function(e){!this._controlLanguageElement||this.props.isMobile||this._controlLanguageElement.contains(e.target)||!this.state.smartContainerOpen||this.state.cvaaOverlay||[P.PLAYER_SIZE.SMALL,P.PLAYER_SIZE.EXTRA_SMALL].includes(this.props.playerSize)||(e.target.classList.contains("overlay-action")&&e.stopPropagation(),this.setState({smartContainerOpen:!1}))}},{key:"onControlButtonClick",value:function(){this.setState({smartContainerOpen:!this.state.smartContainerOpen})}},{key:"onAudioChange",value:function(e){this.player.selectTrack(e),this.notifyClick({type:this.player.Track.AUDIO,track:e})}},{key:"onCaptionsChange",value:function(e){this.player.selectTrack(e),this.notifyClick({type:this.player.Track.TEXT,track:e})}},{key:"toggleCVAAOverlay",value:function(){this.setState({cvaaOverlay:!this.state.cvaaOverlay})}},{key:"renderAll",value:function(e,t){var n=this,r="#"+this.player.config.targetId+" .overlay-portal";return(0,f.h)("div",{ref:function(e){return n._controlLanguageElement=e},className:[p.default.controlButtonContainer,p.default.controlLanguage].join(" ")},(0,f.h)(d.Localizer,null,(0,f.h)("button",{tabIndex:"0","aria-label":(0,f.h)(d.Text,{id:"controls.language"}),className:this.state.smartContainerOpen?[p.default.controlButton,p.default.active].join(" "):p.default.controlButton,onClick:function(){return n.onControlButtonClick()}},(0,f.h)(k.default,{type:E.IconType.Language}))),!this.state.smartContainerOpen||this.state.cvaaOverlay?void 0:(0,f.h)(b.SmartContainer,{targetId:this.player.config.targetId,title:(0,f.h)(d.Text,{id:"language.title"}),onClose:function(){return n.onControlButtonClick()}},e.length<=1?void 0:(0,f.h)(d.Localizer,null,(0,f.h)(_.SmartContainerItem,{icon:"audio",label:(0,f.h)(d.Text,{id:"language.audio"}),options:e,onSelect:function(e){return n.onAudioChange(e)}})),t.length<=1?void 0:(0,f.h)(d.Localizer,null,(0,f.h)(_.SmartContainerItem,{icon:"captions",label:(0,f.h)(d.Text,{id:"language.captions"}),options:t,onSelect:function(e){return n.onCaptionsChange(e)}})),t.length<=1?void 0:(0,f.h)("div",{tabIndex:"0",className:p.default.smartContainerItem,onKeyDown:function(e){e.keyCode===S.KeyMap.ENTER&&n.toggleCVAAOverlay()}},(0,f.h)("a",{className:p.default.advancedCaptionsMenuLink,onClick:function(){return n.toggleCVAAOverlay()}},(0,f.h)(d.Text,{id:"language.advanced_captions_settings"})))),this.state.cvaaOverlay?(0,f.h)(w.default,{into:r,ref:function(e){return n._portal=e}},(0,f.h)(T.CVAAOverlay,{player:this.player,onClose:function(){n.toggleCVAAOverlay(),n.onControlButtonClick()}})):(0,f.h)("div",null))}},{key:"render",value:function(e){var t=e.audioTracks.filter(function(e){return e.label||e.language}).map(function(e){return{label:e.label||e.language,active:e.active,value:e}}),n=e.textTracks.map(function(e){return{label:e.label||e.language,active:e.active,value:e}});return t.length>1||n.length>1?this.renderAll(t,n):void 0}}]),t}(m.default))||l;t.LanguageControl=C},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.CVAAOverlay=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=n(1),f=r(p),d=n(0),h=n(2),y=n(148),v=r(y),g=n(7),m=n(20),b=n(8),_=n(3),E=r(_),k=n(17),T=n(46),A=n(72),w=n(5),S=r(w),P=n(6),O=n(4),C=function(e){return{open:e.cvaa.overlayOpen,style:e.cvaa.style}},x={Main:"main",CustomCaptions:"custom-captions"},R=(s=(0,h.connect)(C,(0,g.bindActions)(c({},m.actions,b.actions))))(l=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"CVAAOverlay"}))}return o(t,e),u(t,[{key:"componentWillUnmount",value:function(){this.setState({state:x.Main})}},{key:"componentWillMount",value:function(){this.setState({state:x.Main,customTextStyle:this.props.player.textStyle}),this.captionsStyleDefault=Object.assign(new this.props.player.TextStyle,{backgroundOpacity:this.props.player.TextStyle.StandardOpacities.TRANSPARENT}),this.captionsStyleYellow=Object.assign(new this.props.player.TextStyle,{backgroundOpacity:this.props.player.TextStyle.StandardOpacities.TRANSPARENT,fontColor:this.props.player.TextStyle.StandardColors.YELLOW}),this.captionsStyleBlackBG=Object.assign(new this.props.player.TextStyle,{backgroundColor:this.props.player.TextStyle.StandardColors.BLACK,fontColor:this.props.player.TextStyle.StandardColors.WHITE})}},{key:"componentDidMount",value:function(){this._firstElementToFocus.focus()}},{key:"transitionToState",value:function(e){this.setState({state:e})}},{key:"changeCaptionsStyle",value:function(e){this.props.updateCaptionsStyle(e),this.props.player.textStyle=e,this.props.onClose(),this.notifyClick({textStyle:e})}},{key:"isAdvancedStyleApplied",value:function(){return!(0,v.default)(this.props.player.textStyle,this.captionsStyleDefault)&&!(0,v.default)(this.props.player.textStyle,this.captionsStyleBlackBG)&&!(0,v.default)(this.props.player.textStyle,this.captionsStyleYellow)}},{key:"renderMainState",value:function(){var e=this;return(0,d.h)("div",{className:this.state.state===x.Main?[f.default.overlayScreen,f.default.active].join(" "):f.default.overlayScreen},(0,d.h)("div",{className:f.default.title},(0,d.h)(O.Text,{id:"cvaa.title"})),(0,d.h)("div",null,(0,d.h)("div",{tabIndex:"0",ref:function(t){return e._firstElementToFocus=t},className:f.default.sample,onClick:function(){return e.changeCaptionsStyle(e.captionsStyleDefault)},onKeyDown:function(t){t.keyCode===P.KeyMap.ENTER&&e.changeCaptionsStyle(e.captionsStyleDefault)}},(0,d.h)(O.Text,{id:"cvaa.sample_caption_tag"}),(0,v.default)(this.props.player.textStyle,this.captionsStyleDefault)?(0,d.h)("div",{className:f.default.activeTick},(0,d.h)(S.default,{type:w.IconType.Check})):void 0),(0,d.h)("div",{tabIndex:"0",className:[f.default.sample,f.default.blackBg].join(" "),onClick:function(){return e.changeCaptionsStyle(e.captionsStyleBlackBG)},onKeyDown:function(t){t.keyCode===P.KeyMap.ENTER&&e.changeCaptionsStyle(e.captionsStyleBlackBG)}},(0,d.h)(O.Text,{id:"cvaa.sample_caption_tag"}),(0,v.default)(this.props.player.textStyle,this.captionsStyleBlackBG)?(0,d.h)("div",{className:f.default.activeTick},(0,d.h)(S.default,{type:w.IconType.Check})):void 0),(0,d.h)("div",{tabIndex:"0",className:[f.default.sample,f.default.yellowText].join(" "),onClick:function(){return e.changeCaptionsStyle(e.captionsStyleYellow)},onKeyDown:function(t){t.keyCode===P.KeyMap.ENTER&&e.changeCaptionsStyle(e.captionsStyleYellow)}},(0,d.h)(O.Text,{id:"cvaa.sample_caption_tag"}),(0,v.default)(this.props.player.textStyle,this.captionsStyleYellow)?(0,d.h)("div",{className:f.default.activeTick},(0,d.h)(S.default,{type:w.IconType.Check})):void 0)),this.isAdvancedStyleApplied()?(0,d.h)("div",{className:f.default.customCaptionsApplied},(0,d.h)("div",{tabIndex:"0",className:[f.default.sample,f.default.custom].join(" "),style:this.state.customTextStyle.toCSS()},(0,d.h)("span",null,"Custom captions"),(0,d.h)("div",{className:f.default.activeTick},(0,d.h)(S.default,{type:w.IconType.Check}))),(0,d.h)("a",{tabIndex:"0",onClick:function(){return e.transitionToState(x.CustomCaptions)},onKeyDown:function(t){t.keyCode===P.KeyMap.ENTER&&e.transitionToState(x.CustomCaptions)}},(0,d.h)(O.Text,{id:"cvaa.edit_caption"}))):(0,d.h)("a",{tabIndex:"0",className:f.default.buttonSaveCvaa,onClick:function(){return e.transitionToState(x.CustomCaptions)},onKeyDown:function(t){t.keyCode===P.KeyMap.ENTER&&e.transitionToState(x.CustomCaptions)}},(0,d.h)(O.Text,{id:"cvaa.set_custom_caption"})))}},{key:"_getPreviewStyle",value:function(){return"font-size: "+100*this.state.customTextStyle.implicitFontScale+"%!important; "+this.state.customTextStyle.toCSS()}},{key:"changeCustomStyle",value:function(e){this.setState({customTextStyle:Object.assign(this.state.customTextStyle,e)})}},{key:"renderCustomCaptionsState",value:function(e){var t=this,n=this.props.player.TextStyle.FontFamily,r=this.props.player.TextStyle.EdgeStyles,i=e.player.TextStyle.StandardColors,a=this.props.player.TextStyle.FontSizes.map(function(e){return{value:e.value,label:e.label,active:t.state.customTextStyle.fontScale===e.value}}),o=Object.keys(i).map(function(e){return{value:i[e],label:e.charAt(0).toUpperCase()+e.toLowerCase().slice(1),active:t.state.customTextStyle.fontColor.every(function(t,n){return t===i[e][n]})}}),s=Object.keys(n).map(function(e){return{value:n[e],label:n[e],active:t.state.customTextStyle.fontFamily===n[e]}}),l=Object.keys(r).map(function(e){return{value:r[e],label:e.charAt(0).toUpperCase()+e.toLowerCase().slice(1),active:t.state.customTextStyle.fontEdge===r[e]}}),u=Object.keys(i).map(function(e){return{value:i[e],label:e.charAt(0).toUpperCase()+e.toLowerCase().slice(1),active:t.state.customTextStyle.backgroundColor.every(function(t,n){return t===i[e][n]})}});return(0,d.h)("div",{className:this.state.state===x.CustomCaptions?[f.default.overlayScreen,f.default.active].join(" "):f.default.overlayScreen},(0,d.h)("form",{className:[f.default.form,f.default.customCaptionForm].join(" ")},(0,d.h)("div",{className:[f.default.formGroupRow,f.default.fontSize].join(" ")},(0,d.h)("label",null,(0,d.h)(O.Text,{id:"cvaa.size_label"})),(0,d.h)(T.DropDown,{onSelect:function(e){return t.changeCustomStyle({fontScale:e})},options:a})),(0,d.h)("div",{className:[f.default.formGroupRow,f.default.fontColor].join(" ")},(0,d.h)("label",null,(0,d.h)(O.Text,{id:"cvaa.font_color_label"})),(0,d.h)(T.DropDown,{onSelect:function(e){return t.changeCustomStyle({fontColor:e})},options:o})),(0,d.h)("div",{className:[f.default.formGroupRow,f.default.fontFamily].join(" ")},(0,d.h)("label",null,(0,d.h)(O.Text,{id:"cvaa.font_family_label"})),(0,d.h)(T.DropDown,{onSelect:function(e){return t.changeCustomStyle({fontFamily:e})},options:s})),(0,d.h)("div",{className:[f.default.formGroupRow,f.default.fontStyle].join(" ")},(0,d.h)("label",null,(0,d.h)(O.Text,{id:"cvaa.font_style_label"})),(0,d.h)(T.DropDown,{onSelect:function(e){return t.changeCustomStyle({fontEdge:e})},options:l})),(0,d.h)("div",{className:[f.default.formGroupRow,f.default.fontOpacity].join(" ")},(0,d.h)("label",null,(0,d.h)(O.Text,{id:"cvaa.font_opacity_label"})),(0,d.h)(A.Slider,{min:0,max:100,value:100*this.state.customTextStyle.fontOpacity,onChange:function(e){return t.changeCustomStyle({fontOpacity:e/100})}})),(0,d.h)("div",{className:[f.default.formGroupRow,f.default.backgroundColor].join(" ")},(0,d.h)("label",null,(0,d.h)(O.Text,{id:"cvaa.background_color_label"})),(0,d.h)(T.DropDown,{onSelect:function(e){return t.changeCustomStyle({backgroundColor:e})},options:u})),(0,d.h)("div",{className:[f.default.formGroupRow,f.default.backgroundOpacity].join(" ")},(0,d.h)("label",null,(0,d.h)(O.Text,{id:"cvaa.background_opacity_label"})),(0,d.h)(A.Slider,{min:0,max:100,value:100*this.state.customTextStyle.backgroundOpacity,onChange:function(e){return t.changeCustomStyle({backgroundOpacity:e/100})}})),(0,d.h)("div",{className:f.default.formGroupRow},(0,d.h)("a",{tabIndex:"0",onClick:function(){return t.changeCaptionsStyle(t.state.customTextStyle)},onKeyDown:function(e){e.keyCode===P.KeyMap.ENTER&&t.changeCaptionsStyle(t.state.customTextStyle)},className:[f.default.btn,f.default.btnBranded,f.default.btnBlock].join(" ")},(0,d.h)(O.Text,{id:"cvaa.apply"}))),(0,d.h)("div",{className:f.default.previewContainer},(0,d.h)("span",{style:this._getPreviewStyle()},(0,d.h)(O.Text,{id:"cvaa.caption_preview"})))))}},{key:"render",value:function(e){return(0,d.h)(k.Overlay,{open:!0,onClose:function(){return e.onClose()},type:"cvaa"},this.renderMainState(),this.renderCustomCaptionsState(e))}}]),t}(E.default))||l;t.CVAAOverlay=R},function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(e[n[i]]!==t[n[i]])return!1;return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Slider=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=n(0),c=n(6),p=n(42),f=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.mouseUpHandler=(0,p.bindMethod)(e,e.mouseUpHandler),e.mouseMoveHandler=(0,p.bindMethod)(e,e.mouseMoveHandler),e}return a(t,e),o(t,[{key:"componentWillMount",value:function(){this.setState({value:this.props.value||0,min:this.props.min||0,max:this.props.max||100,dragging:!1}),document.addEventListener("mouseup",this.mouseUpHandler),document.addEventListener("mousemove",this.mouseMoveHandler),document.addEventListener("touchend",this.mouseUpHandler),document.addEventListener("touchmove",this.mouseMoveHandler)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mouseup",this.mouseUpHandler),document.removeEventListener("mousemove",this.mouseMoveHandler),document.removeEventListener("touchend",this.mouseUpHandler),document.removeEventListener("touchmove",this.mouseMoveHandler)}},{key:"componentDidMount",value:function(){this.sliderWidth=this._sliderElement.clientWidth,this._sliderElementOffsetLeft=this._sliderElement.getBoundingClientRect().left}},{key:"mouseDownHandler",value:function(e){this._sliderElementOffsetLeft=this._sliderElement.getBoundingClientRect().left,this.state.dragging||(this.setState({dragging:!0,value:this.mouseEventToValue(e)}),this.props.onChange(this.mouseEventToValue(e)))}},{key:"onKeyboardDragging",value:function(e){e.stopPropagation(),this._sliderElementOffsetLeft=this._sliderElement.getBoundingClientRect().left;var t=this.props.value;switch(e.keyCode){case c.KeyMap.RIGHT:(t+=5)>this.state.max&&(t=this.state.max);break;case c.KeyMap.LEFT:(t-=5)<this.state.min&&(t=this.state.min)}this.setState({value:t,dragging:!1}),this.props.onChange(t)}},{key:"mouseMoveHandler",value:function(e){this.state.dragging&&(this.setState({value:this.mouseEventToValue(e)}),this.props.onChange(this.mouseEventToValue(e)))}},{key:"mouseUpHandler",value:function(e){this.state.dragging&&(this.setState({value:this.mouseEventToValue(e),dragging:!1}),this.props.onChange(this.mouseEventToValue(e)))}},{key:"mouseEventToValue",value:function(e){var t=void 0;t=e.touches&&e.touches.length>0?e.touches[0].clientX:e.changedTouches?e.changedTouches[0].pageX:e.clientX;var n=t-this._sliderElement.getBoundingClientRect().left,r=Math.round(n/this._sliderElement.clientWidth*100);return this.getValueByPersentage(r)<this.state.min?this.state.min:this.getValueByPersentage(r)>this.state.max?this.state.max:this.getValueByPersentage(r)}},{key:"getValueByPersentage",value:function(e){return this.state.max/100*e}},{key:"getPersentageByValue",value:function(){return Math.round(this.state.value/this.state.max*100)}},{key:"render",value:function(){var e=this;return(0,u.h)("div",{tabIndex:"0",ref:function(t){return e._sliderElement=t},className:l.default.slider,onMouseDown:function(t){return e.mouseDownHandler(t)},onTouchStart:function(t){return e.mouseDownHandler(t)},onKeyDown:function(t){t.keyCode!==c.KeyMap.LEFT&&t.keyCode!==c.KeyMap.RIGHT||e.onKeyboardDragging(t)}},(0,u.h)("div",{className:l.default.progress,style:{width:this.getPersentageByValue()+"%"}},(0,u.h)("div",{className:l.default.handle,onMouseDown:function(t){return e.mouseDownHandler(t)},onTouchStart:function(t){return e.mouseDownHandler(t)}})))}}]),t}(u.Component);t.Slider=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.FullscreenControl=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(4),h=n(2),y=n(3),v=r(y),g=n(5),m=r(g),b=function(e){return{fullscreen:e.engine.fullscreen,targetId:e.config.targetId}},_=(s=(0,h.connect)(b))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"Fullscreen",player:e.player}))}return o(t,e),u(t,[{key:"toggleFullscreen",value:function(){this.logger.debug("Toggle fullscreen");var e=document.getElementById(this.props.targetId);this.props.fullscreen?this.player.exitFullscreen():this.player.enterFullscreen(),e&&e.focus(),this.notifyClick()}},{key:"render",value:function(){var e=this;return(0,f.h)("div",{className:[p.default.controlButtonContainer,p.default.controlFullscreen].join(" ")},(0,f.h)(d.Localizer,null,(0,f.h)("button",{tabIndex:"0","aria-label":(0,f.h)(d.Text,{id:"controls.fullscreen"}),className:this.props.fullscreen?[p.default.controlButton,p.default.isFullscreen].join(" "):p.default.controlButton,onClick:function(){return e.toggleFullscreen()}},(0,f.h)(m.default,{type:g.IconType.Maximize}),(0,f.h)(m.default,{type:g.IconType.Minimize}))))}}]),t}(v.default))||l;t.FullscreenControl=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.VrStereoToggleControl=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(4),h=n(3),y=r(h),v=n(5),g=r(v),m=n(6),b=n(11),_=n(7),E=n(2),k=n(8),T=function(e){return{vrStereoMode:e.engine.vrStereoMode,config:e.config.components.vrStereo}},A=(s=(0,E.connect)(T,(0,_.bindActions)(Object.assign({},k.actions,b.actions))))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:t.displayName,player:e.player}))}return o(t,e),u(t,null,[{key:"shouldRender",value:function(e){var t=e.config.components[this.displayName];return e.state.engine.isVr&&!(0===Object.keys(t).length&&t.constructor===Object)}}]),u(t,[{key:"onClick",value:function(){this.player.toggleVrStereoMode(),this.props.updateVrStereoMode(!this.props.vrStereoMode)}},{key:"componentWillMount",value:function(){this.props.updateVrStereoMode(this.props.config.vrStereoMode)}},{key:"render",value:function(){var e=this;return(0,f.h)("div",{className:[p.default.controlButtonContainer,p.default.controlVrStereo].join(" ")},(0,f.h)(d.Localizer,null,(0,f.h)("button",{tabIndex:"0","aria-label":(0,f.h)(d.Text,{id:"controls.vrStereo"}),className:this.props.vrStereoMode?[p.default.controlButton,p.default.vrStereoMode].join(" "):p.default.controlButton,onClick:function(){return e.onClick()},onKeyDown:function(t){t.keyCode===m.KeyMap.ENTER&&e.onClick()}},(0,f.h)(g.default,{type:v.IconType.vrStereo}),(0,f.h)(g.default,{type:v.IconType.vrStereoFull}))))}}]),t}(y.default))||l;A.displayName="vrStereo",t.VrStereoToggleControl=A},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.TimeDisplayPlaybackContainer=void 0;var o,s,l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),p=n(2),f=n(3),d=function(e){return e&&e.__esModule?e:{default:e}}(f),h=n(49),y=function(e){return{currentTime:e.engine.currentTime,duration:e.engine.duration}},v=(o=(0,p.connect)(y))(s=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"TimeDisplayPlaybackContainer"}))}return a(t,e),u(t,[{key:"render",value:function(e){return(0,c.h)(h.TimeDisplay,l({currentTime:e.currentTime,duration:e.duration},e))}}]),t}(d.default))||s;t.TimeDisplayPlaybackContainer=v},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.TimeDisplay=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=n(0),c=n(40),p=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),o(t,[{key:"getTimeDisplay",value:function(e,t,n){var r=n||"current / total",i=(0,c.toHHMMSS)(e),a=(0,c.toHHMMSS)(t),o=(0,c.toHHMMSS)(t-e);return r=r.replace(/current/g,i),r=r.replace(/total/g,a),r=r.replace(/left/g,o)}},{key:"render",value:function(e){return(0,u.h)("div",{className:l.default.timeDisplay},(0,u.h)("span",null,this.getTimeDisplay(e.currentTime,e.duration,e.format)))}}]),t}(u.Component);t.TimeDisplay=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.BottomBar=void 0;var o,s,l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=function(e){return e&&e.__esModule?e:{default:e}}(u),p=n(0),f=n(7),d=n(8),h=n(2),y=function(e){return{isCasting:e.engine.isCasting,isPlaybackEnded:e.engine.isPlaybackEnded}},v=(o=(0,h.connect)(y,(0,f.bindActions)(d.actions)))(s=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),l(t,[{key:"render",value:function(e){var t=this,n=[c.default.bottomBar];return e.isCasting&&e.isPlaybackEnded&&n.push(c.default.hide),(0,p.h)("div",{className:n.join(" "),onMouseOver:function(){return t.props.updateBottomBarHoverActive(!0)},onMouseLeave:function(){return t.props.updateBottomBarHoverActive(!1)}},e.children)}}]),t}(p.Component))||s;t.BottomBar=v},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.OverlayPortal=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),o(t,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"render",value:function(e){return(0,s.h)("div",{className:"overlay-portal"},e.children)}}]),t}(s.Component);t.OverlayPortal=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.UnmuteIndication=t.MUTED_AUTOPLAY_ICON_ONLY_DEFAULT_TIMEOUT=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(2),h=n(3),y=r(h),v=n(5),g=r(v),m=n(6),b=n(4),_=t.MUTED_AUTOPLAY_ICON_ONLY_DEFAULT_TIMEOUT=3e3,E=function(e){return{fallbackToMutedAutoPlay:e.engine.fallbackToMutedAutoPlay}},k=(s=(0,d.connect)(E,null))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"UnmuteIndication",player:e.player}))}return o(t,e),u(t,[{key:"componentDidUpdate",value:function(e){var t=this;!e.fallbackToMutedAutoPlay&&this.props.fallbackToMutedAutoPlay&&(this.eventManager.listenOnce(this.player,this.player.Event.PLAYING,function(){return t._iconOnlyTimeout()}),this.eventManager.listenOnce(this.player,this.player.Event.AD_STARTED,function(){return t._iconOnlyTimeout()}))}},{key:"_iconOnlyTimeout",value:function(){var e=this;setTimeout(function(){e.setState({iconOnly:!0})},_)}},{key:"_keyDownHandler",value:function(e){e.keyCode===m.KeyMap.ENTER&&(this.player.muted=!this.player.muted)}},{key:"render",value:function(e){var t=this;if(this.props.fallbackToMutedAutoPlay){var n=[p.default.unmuteButtonContainer];return e.hasTopBar&&n.push(p.default.hasTopBar),this.state.iconOnly&&n.push(p.default.showIconOnly),(0,f.h)(b.Localizer,null,(0,f.h)("div",{tabIndex:"0","aria-label":(0,f.h)(b.Text,{id:"controls.unmute"}),className:n.join(" "),onMouseOver:function(){return t.setState({iconOnly:!1})},onMouseOut:function(){return t.setState({iconOnly:!0})},onClick:function(){return t.player.muted=!t.player.muted},onTouchEnd:function(e){return e.stopImmediatePropagation()},onKeyDown:function(e){return t._keyDownHandler(e)}},(0,f.h)("a",{className:[p.default.btn,p.default.btnDarkTransparent,p.default.unmuteButton].join(" ")},(0,f.h)("div",{className:p.default.unmuteIconContainer},(0,f.h)(g.default,{type:v.IconType.VolumeBase}),(0,f.h)(g.default,{type:v.IconType.VolumeMute})),(0,f.h)("span",null,(0,f.h)(b.Text,{id:"unmute.unmute"})))))}}}]),t}(y.default))||l;t.UnmuteIndication=k},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.CastControl=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(3),h=r(d),y=n(2),v=n(35),g=function(e){return{isCasting:e.engine.isCasting,isCastAvailable:e.engine.isCastAvailable}},m=(s=(0,y.connect)(g,v.actions))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"Cast",player:e.player}))}return o(t,e),u(t,[{key:"onClick",value:function(){var e=this;this.props.updateBackdropVisibility(!0),this.eventManager.listenOnce(this.player,this.player.Event.Cast.CAST_SESSION_START_FAILED,function(){return e.props.updateBackdropVisibility(!1)})}},{key:"render",value:function(e){var t=this;if(e.isCasting||e.isCastAvailable)return(0,f.h)("div",{class:p.default.controlButtonContainer,onClick:function(){return t.onClick()}},(0,f.h)("google-cast-launcher",{class:p.default.castButton}))}}]),t}(h.default))||l;t.CastControl=m},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.PlaybackControls=void 0;var o,s,l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=function(e){return e&&e.__esModule?e:{default:e}}(u),p=n(0),f=n(2),d=n(75),h=n(76),y=function(e){return{playlist:e.engine.playlist}},v=(o=(0,f.connect)(y))(s=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),l(t,[{key:"render",value:function(e){return(0,p.h)("div",{className:[c.default.playbackControls]},e.playlist?(0,p.h)(d.PlaylistButton,{player:e.player,type:"prev"}):void 0,(0,p.h)(h.PlayPauseControl,{player:e.player}),e.playlist?(0,p.h)(d.PlaylistButton,{player:e.player,type:"next"}):void 0)}}]),t}(p.Component))||s;t.PlaybackControls=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.PlaylistButton=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(4),h=n(3),y=r(h),v=n(5),g=r(v),m=n(6),b=n(2),_=function(e){return{playlist:e.engine.playlist}},E=(s=(0,b.connect)(_))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"PlaybackButton-"+e.type,player:e.player}))}return o(t,e),u(t,[{key:"onClick",value:function(){"prev"===this.props.type?this.player.playlist.playPrev():this.player.playlist.playNext()}},{key:"render",value:function(e){var t=this,n=e.playlist[e.type];return(0,f.h)("div",{className:[p.default.controlButtonContainer,p.default.controlPlaylistButton].join(" ")},n&&n.sources&&(n.sources.poster||n.sources.metadata&&n.sources.metadata.name)?(0,f.h)("div",{className:p.default.posterPreview},(0,f.h)("div",{className:p.default.posterPreviewText},(0,f.h)(d.Localizer,null,(0,f.h)("div",{className:p.default.posterPreviewTextTitle},(0,f.h)(d.Text,{id:"prev"===e.type?"playlist.prev":"playlist.up_next"}))),(0,f.h)("div",{className:p.default.posterPreviewTextName},""+(n.sources.metadata?n.sources.metadata.name:""))),(0,f.h)("div",{className:p.default.posterPreviewImg,style:"background-image: url("+n.sources.poster+");"})):void 0,(0,f.h)(d.Localizer,null,(0,f.h)("button",{disabled:!n,tabIndex:"0","aria-label":(0,f.h)(d.Text,{id:"controls."+e.type}),className:""+p.default.controlButton,onClick:function(){return t.onClick()},onKeyDown:function(e){e.keyCode===m.KeyMap.ENTER&&t.onClick()}},"prev"===e.type?(0,f.h)("div",null,(0,f.h)(g.default,{type:v.IconType.Prev})):(0,f.h)("div",null,(0,f.h)(g.default,{type:v.IconType.Next})))))}}]),t}(y.default))||l;t.PlaylistButton=E},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.PlayPauseControl=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(4),h=n(2),y=n(3),v=r(y),g=n(5),m=r(g),b=n(6),_=n(37),E=function(e){return{isPlayingAdOrPlayback:(0,_.isPlayingAdOrPlayback)(e.engine),isPlaying:e.engine.isPlaying,adBreak:e.engine.adBreak,isPlaybackEnded:e.engine.isPlaybackEnded}},k=(s=(0,h.connect)(E))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"PlayPause",player:e.player}))}return o(t,e),u(t,[{key:"togglePlayPause",value:function(){this.logger.debug("Toggle play"),this.props.isPlayingAdOrPlayback?this.player.pause():this.player.play(),this.notifyClick()}},{key:"render",value:function(e){var t=this,n=this.props.isPlayingAdOrPlayback?[p.default.controlButton,p.default.isPlaying].join(" "):p.default.controlButton;return(0,f.h)("div",{className:[p.default.controlButtonContainer,p.default.controlPlayPause].join(" ")},(0,f.h)(d.Localizer,null,(0,f.h)("button",{tabIndex:"0","aria-label":(0,f.h)(d.Text,{id:e.isPlaybackEnded?"controls.startOver":this.props.isPlayingAdOrPlayback?"controls.pause":"controls.play"}),className:n,onClick:function(){return t.togglePlayPause()},onKeyDown:function(e){e.keyCode===b.KeyMap.ENTER&&t.togglePlayPause()}},e.isPlaybackEnded?(0,f.h)(m.default,{type:g.IconType.StartOver}):(0,f.h)("div",null,(0,f.h)(m.default,{type:g.IconType.Play}),(0,f.h)(m.default,{type:g.IconType.Pause})))))}}]),t}(v.default))||l;t.PlayPauseControl=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(162);Object.defineProperty(t,"PlaylistCountdown",{enumerable:!0,get:function(){return r.PlaylistCountdown}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.PlaylistCountdown=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(4),h=n(3),y=r(h),v=n(5),g=r(v),m=n(6),b=n(2),_=function(e){return{playlist:e.engine.playlist,currentTime:e.engine.currentTime,duration:e.engine.duration,lastSeekPoint:e.engine.lastSeekPoint,isSeeking:e.engine.isSeeking,isPlaybackEnded:e.engine.isPlaybackEnded}},E=(s=(0,b.connect)(_))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"PlaylistCountdown",player:e.player}))}return o(t,e),u(t,null,[{key:"shouldRender",value:function(e){return e.state.engine.playlist&&e.state.engine.playlist.next&&e.state.engine.playlist.next.sources&&e.player.playlist.countdown.showing&&(e.player.playlist.options.autoContinue||e.player.playlist.options.loop)}}]),u(t,[{key:"onClick",value:function(){this.player.playlist.playNext()}},{key:"cancelNext",value:function(e){this.logger.debug("Cancel auto play next item"),e.stopPropagation(),this.setState({canceled:!0})}},{key:"_getTimeToShow",value:function(){var e=this.player.playlist.countdown,t=this.props.duration-e.duration;return e.timeToShow>=0&&e.timeToShow<=this.props.duration&&(t=Math.max(e.timeToShow,this.props.lastSeekPoint)),Math.max(0,Math.min(t,this.props.duration))}},{key:"componentDidMount",value:function(){this.setState({canceled:!1})}},{key:"componentWillUpdate",value:function(e){var t=this._getTimeToShow();e.currentTime>t?this.setState({timeToShow:!0}):this.setState({timeToShow:!1,canceled:!1})}},{key:"componentDidUpdate",value:function(){var e=this._getTimeToShow(),t=this.player.playlist.countdown;!this.state.canceled&&(this.props.isPlaybackEnded||this.props.currentTime>=e+t.duration&&this.props.currentTime<this.props.duration)&&this.player.playlist.playNext()}},{key:"shouldComponentUpdate",value:function(e){return!e.isSeeking}},{key:"render",value:function(e){var t=this,n=e.playlist.next;if(n&&n.sources){var r=this.player.playlist.countdown,i=this._getTimeToShow(),a=e.currentTime-i,o=Math.min(r.duration,e.duration-i),s=(a>0?a/o*104:0)+"%",l=[p.default.playlistCountdown];return!this.state.timeToShow||r.duration>=e.duration?l.push(p.default.hidden):this.state.canceled&&l.push(p.default.canceled),(0,f.h)("div",{className:l.join(" "),onClick:function(){return t.onClick()}},(0,f.h)("div",{className:p.default.playlistCountdownPoster,style:"background-image: url("+n.sources.poster+");"}),(0,f.h)("div",{className:p.default.playlistCountdownContentPlaceholder},(0,f.h)("div",{className:p.default.playlistCountdownContentBackground},(0,f.h)("div",{className:p.default.playlistCountdownContent},(0,f.h)(d.Localizer,null,(0,f.h)("div",{className:p.default.playlistCountdownText},(0,f.h)("div",{className:p.default.playlistCountdownTextTitle},(0,f.h)(d.Text,{id:"playlist.up_next"})),(0,f.h)("div",{className:p.default.playlistCountdownTextName},""+(n.sources.metadata?n.sources.metadata.name:"")))),(0,f.h)("div",{className:[p.default.controlButtonContainer,p.default.playlistCountdownCancel].join(" ")},(0,f.h)(d.Localizer,null,(0,f.h)("button",{tabIndex:"0","aria-label":(0,f.h)(d.Text,{id:"playlist.cancel"}),className:[p.default.controlButton,p.default.playlistCountdownCancelButton].join(" "),onClick:function(e){return t.cancelNext(e)},onKeyDown:function(e){e.keyCode===m.KeyMap.ENTER&&t.cancelNext()}},(0,f.h)(g.default,{type:v.IconType.Close})))),(0,f.h)("div",{className:p.default.playlistCountdownIndicatorBar},(0,f.h)("div",{className:p.default.playlistCountdownIndicatorProgress,style:{width:s}}))))))}}}]),t}(y.default))||l;t.PlaylistCountdown=E},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.PlaylistNextScreen=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(4),h=n(3),y=r(h),v=n(2),g=n(5),m=r(g),b=function(e){return{playlist:e.engine.playlist,isPlaybackEnded:e.engine.isPlaybackEnded}},_=(s=(0,v.connect)(b))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"PlaylistNextScreen",player:e.player}))}return o(t,e),u(t,null,[{key:"shouldRender",value:function(e){return e.state.engine.playlist&&e.state.engine.playlist.next&&e.state.engine.playlist.next.sources}}]),u(t,[{key:"onPosterClick",value:function(){this.player.playlist.playNext()}},{key:"_getPosterUrl",value:function(){var e=this.props.playlist.next;return e.sources.poster?e.sources.poster.indexOf("entry_id/"+e.sources.id)>-1&&-1===e.sources.poster.indexOf("/width/")?e.sources.poster+"/width/384":e.sources.poster:""}},{key:"render",value:function(e){var t=this,n=e.playlist.next;return e.isPlaybackEnded?(0,f.h)("div",{className:p.default.playlistNextScreenOverlay},(0,f.h)("div",{className:p.default.playlistNextScreenContent},(0,f.h)("div",{className:p.default.playlistNextScreenText},(0,f.h)(d.Localizer,null,(0,f.h)("div",{className:p.default.playlistNextScreenTextTitle},(0,f.h)(d.Text,{id:"playlist.next"}))),(0,f.h)("div",{className:p.default.playlistNextScreenTextName},""+(n.sources.metadata?n.sources.metadata.name:""))),(0,f.h)("div",{className:p.default.playlistNextScreenPosterPlaceholder},(0,f.h)("div",{className:p.default.playlistNextScreenPosterAspectRatio},(0,f.h)("div",{className:p.default.playlistNextScreenPoster,onClick:function(){return t.onPosterClick()}},(0,f.h)("div",{className:p.default.playlistNextScreenPosterImg,style:"background-image: url("+this._getPosterUrl()+");"}),(0,f.h)(m.default,{type:g.IconType.Play})))))):void 0}}]),t}(y.default))||l;t.PlaylistNextScreen=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.PictureInPicture=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(4),h=n(5),y=r(h),v=n(6),g=n(3),m=r(g),b=n(2),_=n(10),E=function(e){return{isPictureInPictureSupported:e.engine.isPictureInPictureSupported,playerSize:e.shell.playerSize}},k=(s=(0,b.connect)(E))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"PictureInPicture",player:e.player}))}return o(t,e),u(t,[{key:"_onClick",value:function(){this.player.isInPictureInPicture()?this.player.exitPictureInPicture():this.player.enterPictureInPicture()}},{key:"render",value:function(){var e=this;if(this.props.isPictureInPictureSupported&&this.props.playerSize!==_.PLAYER_SIZE.EXTRA_SMALL)return(0,f.h)("div",{className:[p.default.controlButtonContainer,p.default.pictureInPicture].join(" ")},(0,f.h)(d.Localizer,null,(0,f.h)("button",{tabIndex:"0","aria-label":(0,f.h)(d.Text,{id:"controls.pictureInPicture"}),className:p.default.controlButton+" "+(this.state.animation?p.default.rotate:""),onClick:function(){return e._onClick()},onKeyDown:function(t){t.keyCode===v.KeyMap.ENTER&&e._onClick()}},(0,f.h)(y.default,{type:h.IconType.PictureInPicture}))))}}]),t}(m.default))||l;t.PictureInPicture=k},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.PictureInPictureOverlay=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(3),h=r(d),y=n(2),v=n(4),g=function(e){return{poster:e.engine.poster,isInPictureInPicture:e.engine.isInPictureInPicture,isChangingSource:e.engine.isChangingSource}},m=(s=(0,y.connect)(g))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"PictureInPictureOverlay",player:e.player}))}return o(t,e),u(t,[{key:"_handleClick",value:function(){this.player.exitPictureInPicture()}},{key:"render",value:function(){var e=this;if(this.props.isInPictureInPicture){var t={},n=[p.default.pictureInPicturePoster];return this.props.poster&&(t={backgroundImage:this.props.isChangingSource?"":"url("+this.props.poster+")",backgroundSize:"contain"},n.push(p.default.hasPoster)),(0,f.h)("div",null,(0,f.h)("div",{className:p.default.pictureInPictureOverlay},(0,f.h)("div",{className:n.join(" "),style:t,onMouseOver:function(e){return e.stopPropagation()}},(0,f.h)("div",{className:p.default.darkLayer})),(0,f.h)("div",{className:p.default.pictureInPictureControl},(0,f.h)(v.Localizer,null,(0,f.h)("span",{className:p.default.pictureInPictureText},(0,f.h)(v.Text,{id:"pictureInPicture.overlay_text"}))),(0,f.h)(v.Localizer,null,(0,f.h)("button",{className:[p.default.pictureInPictureButton,p.default.controlButtonContainer].join(" "),onClick:function(){return e._handleClick()}},(0,f.h)(v.Text,{id:"pictureInPicture.overlay_button"}))))))}}}]),t}(h.default))||l;t.PictureInPictureOverlay=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ShareControl=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),p=n(3),f=r(p),d=n(5),h=r(d),y=n(79),v=n(45),g=r(v),m=n(1),b=r(m),_=n(168),E=n(19),k=n(2),T=n(7),A=function(e){return{open:e.share.overlayOpen,isPlaying:e.engine.isPlaying,config:e.config.components.share}},w=(s=(0,k.connect)(A,(0,T.bindActions)(E.actions)))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"Share",player:e.player}))}return o(t,e),u(t,[{key:"toggleOverlay",value:function(){this.setState({overlay:!this.state.overlay}),this.props.toggleShareOverlay(this.state.overlay),this.props.isPlaying||this.state.previousIsPlaying?this.setState({previousIsPlaying:!0}):this.setState({previousIsPlaying:!1}),this.state.overlay?this.player.pause():this.state.previousIsPlaying&&(this.player.play(),this.setState({previousIsPlaying:!1}))}},{key:"_getMergedShareConfig",value:function(){var e=this.props.config.socialNetworks||[];return e.concat(_.defaultConfig.filter(function(t){return!e.find(function(e){return e.name===t.name})}))}},{key:"render",value:function(){var e=this,t=this.props.config,n=t.embedUrl,r=t.enable,i=t.shareUrl,a=t.enableTimeOffset;if(r&&i&&n){var o=this._getMergedShareConfig(),s="#"+this.player.config.targetId+" .overlay-portal";return(0,c.h)("div",{className:[b.default.controlButtonContainer,b.default.controlShare].join(" ")},this.state.overlay?(0,c.h)(g.default,{into:s,ref:function(t){return e._portal=t}},(0,c.h)(y.ShareOverlay,{shareUrl:i,embedUrl:n,enableTimeOffset:a,socialNetworks:o,player:this.player,onClose:function(){return e.toggleOverlay()}})):(0,c.h)("button",{className:b.default.controlButton,onClick:function(){return e.toggleOverlay()},"aria-label":"Share"},(0,c.h)(h.default,{type:d.IconType.Share})))}}}]),t}(f.default))||l;t.ShareControl=w},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ShareOverlay=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),p=n(4),f=n(2),d=n(7),h=n(19),y=n(40),v=n(3),g=r(v),m=n(17),b=n(5),_=r(b),E=n(1),k=r(E),T=n(80),A=function(e){return{open:e.share.overlayOpen}},w={Main:"main",EmbedOptions:"embed-options"},S=function(e){var t=function(){var t=e.config.shareUrl,n=e.config.templateUrl,r=t;n&&(r=n.replace("{shareUrl}",t)),window.open(r,"_blank","width=580,height=580")};return(0,c.h)("button",{href:e.config.shareUrl,target:"_blank",rel:"noopener noreferrer",title:e.config.title,role:"button","aria-label":e.config.ariaLabel,className:[k.default.btnRounded,k.default[e.config.iconType],e.config.iconType].join(" "),onClick:function(){return t()}},(0,c.h)(_.default,{style:"svg"===e.config.iconType?"background-image: url("+e.config.svg+")":"",type:e.config.iconType}))},P=function(e){var t=void 0,n=function(e,t){t?e.setSelectionRange(0,9999):e.select(),document.execCommand("copy"),e.blur()};return(0,c.h)("div",{className:e.copy?k.default.copyUrlRow:""},(0,c.h)("div",{className:[k.default.formGroup,k.default.hasIcon,k.default.inputCopyUrl].join(" "),style:"width: 350px;"},(0,c.h)("input",{type:"text",ref:function(e){return t=e},className:k.default.formControl,value:e.shareUrl,readOnly:!0}),(0,c.h)(_.default,{type:b.IconType.Link})),e.copy&&(0,c.h)(T.CopyButton,{copy:function(){return n(t,e.isIos)}}))},O=function(e){return(0,c.h)("div",{className:k.default.videoStartOptionsRow},(0,c.h)("div",{className:[k.default.checkbox,k.default.dInlineBlock].join(" ")},(0,c.h)("input",{type:"checkbox",id:"start-from",checked:e.startFrom,onClick:function(){return e.toggleStartFrom()}}),(0,c.h)("label",{htmlFor:"start-from"},(0,c.h)(p.Text,{id:"share.start_video_at"}))),(0,c.h)("div",{className:[k.default.formGroup,k.default.dInlineBlock].join(" ")},(0,c.h)("input",{type:"text",className:k.default.formControl,onChange:function(t){return e.handleStartFromChange(t)},value:(0,y.toHHMMSS)(e.startFromValue),style:"width: 72px;"})))},C=(s=(0,f.connect)(A,(0,d.bindActions)(h.actions)))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"ShareOverlay",player:e.player}))}return o(t,e),u(t,[{key:"componentWillMount",value:function(){this.isIos="iOS"===this.player.env.os.name,this.setState({view:w.Main,startFrom:!1,startFromValue:Math.floor(this.player.currentTime)})}},{key:"_transitionToState",value:function(e){this.setState({view:e})}},{key:"getShareUrl",value:function(){var e=this.props.shareUrl;return this.state.startFrom&&(e+="?start="+this.state.startFromValue),e}},{key:"getEmbedCode",value:function(){var e=this.props.embedUrl;return this.state.startFrom&&(e+="?start="+this.state.startFromValue),'<iframe src="'+e+'" style="width: 560px;height: 395px" allowfullscreen webkitallowfullscreen mozAllowFullScreen frameborder="0" allow="accelerometer *; autoplay *; encrypted-media *; gyroscope *; picture-in-picture *"/>'}},{key:"_getEmailTemplate",value:function(){var e="this video";return this.player.config.sources&&this.player.config.sources.metadata&&this.player.config.sources.metadata.name&&(e=this.player.config.sources.metadata.name),"mailto:?subject="+encodeURIComponent("Check out "+e)+"&body="+encodeURIComponent("Check out "+e+": "+this.getShareUrl())}},{key:"_toggleStartFrom",value:function(){this.setState({startFrom:!this.state.startFrom})}},{key:"_handleStartFromChange",value:function(e){var t=(0,y.toSecondsFromHHMMSS)(e.target.value);t>=this.player.duration&&this.setState({startFromValue:1}),this.setState({startFromValue:t})}},{key:"_createSocialNetworks",value:function(e){var t=this;return e.map(function(e){return"default"===e.iconType&&(e.iconType=e.name,e.shareUrl=t.props.shareUrl),(0,c.h)(S,{key:e.name,config:e})})}},{key:"renderMainState",value:function(){var e=this;return(0,c.h)("div",{className:this.state.view===w.Main?"overlay-screen active":"overlay-screen"},(0,c.h)("div",{className:k.default.title},(0,c.h)(p.Text,{id:"share.title"})),(0,c.h)("div",{className:k.default.shareMainContainer},(0,c.h)("div",{className:k.default.shareIcons},this._createSocialNetworks(this.props.socialNetworks),(0,c.h)(p.Localizer,null,(0,c.h)("a",{className:[k.default.btnRounded,k.default.emailShareBtn].join(" "),href:this._getEmailTemplate(),title:(0,c.h)(p.Text,{id:"share.email"})},(0,c.h)(_.default,{type:b.IconType.Email}))),(0,c.h)(p.Localizer,null,(0,c.h)("button",{className:[k.default.btnRounded,k.default.embedShareBtn].join(" "),onClick:function(){return e._transitionToState(w.EmbedOptions)},title:(0,c.h)(p.Text,{id:"share.embed"})},(0,c.h)(_.default,{type:b.IconType.Embed})))),(0,c.h)("div",{className:k.default.linkOptionsContainer},(0,c.h)(P,{shareUrl:this.getShareUrl(),copy:!0,isIos:this.isIos}),this.props.enableTimeOffset?(0,c.h)(O,{startFrom:this.state.startFrom,startFromValue:this.state.startFromValue,handleStartFromChange:function(t){return e._handleStartFromChange(t)},toggleStartFrom:function(){return e._toggleStartFrom()}}):void 0)))}},{key:"renderOptionsState",value:function(e){var t=this;return(0,c.h)("div",{className:this.state.view===w.EmbedOptions?"overlay-screen active":"overlay-screen"},(0,c.h)("div",{className:k.default.title},e.title),(0,c.h)("div",{className:k.default.linkOptionsContainer},(0,c.h)(P,{shareUrl:e.shareUrl,copy:!0,isIos:this.isIos}),this.props.enableTimeOffset?(0,c.h)(O,{startFrom:this.state.startFrom,startFromValue:this.state.startFromValue,handleStartFromChange:function(e){return t._handleStartFromChange(e)},toggleStartFrom:function(){return t._toggleStartFrom()}}):void 0))}},{key:"renderStateContent",value:function(){switch(this.state.view){case w.EmbedOptions:return this.renderOptionsState({title:(0,c.h)(p.Text,{id:"share.embed_options"}),shareUrl:this.getEmbedCode()});case w.Main:default:return this.renderMainState()}}},{key:"render",value:function(e){return(0,c.h)(m.Overlay,{open:!0,onClose:function(){return e.onClose()},type:"share"},this.renderStateContent())}}]),t}(g.default))||l;t.ShareOverlay=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=[{name:"facebook",templateUrl:"https://www.facebook.com/sharer/sharer.php?u={shareUrl}",title:"Share on Facebook",ariaLabel:"Share on Facebook",iconType:"default",svg:""},{name:"linkedin",templateUrl:"https://www.linkedin.com/shareArticle?mini=true&url={shareUrl}",title:"Share on Linkedin",ariaLabel:"Share on Linkedin",iconType:"default",svg:""},{name:"twitter",templateUrl:"https://twitter.com/share?url={shareUrl}",title:"Share on Twitter",ariaLabel:"Share on Twitter",iconType:"default",svg:""}];t.defaultConfig=r},function(e,t,n){"use strict";function r(e){if(a(e))return(0,u.h)("div",{className:l.default.adGuiWrapper},(0,u.h)(c.Loading,{player:e.player}),(0,u.h)("div",{className:l.default.playerGui,id:"player-gui"},(0,u.h)(m.UnmuteIndication,{player:e.player,hasTopBar:!0}),(0,u.h)(v.TopBar,null,(0,u.h)("div",{className:l.default.leftControls},o(e)?void 0:(0,u.h)(_.AdNotice,null)))));var t=i();return(0,u.h)("div",{className:l.default.adGuiWrapper},(0,u.h)(b.KeyboardControl,{player:e.player,config:e.config}),(0,u.h)(c.Loading,{player:e.player}),(0,u.h)("div",{className:l.default.playerGui,id:"player-gui"},(0,u.h)(m.UnmuteIndication,{player:e.player,hasTopBar:!0}),(0,u.h)(v.TopBar,null,(0,u.h)("div",{className:l.default.leftControls},o(e)?void 0:(0,u.h)(_.AdNotice,null)),(0,u.h)("div",{className:l.default.rightControls},t.learnMoreButton?(0,u.h)(y.AdLearnMore,null):void 0)),t.skipButton?(0,u.h)(h.AdSkip,{player:e.player}):void 0,(0,u.h)(E.PlaybackControls,{player:e.player}),(0,u.h)(g.BottomBar,null,(0,u.h)("div",{className:l.default.leftControls},(0,u.h)(E.PlaybackControls,{player:e.player}),(0,u.h)(d.TimeDisplayAdsContainer,null)),(0,u.h)("div",{className:l.default.rightControls},(0,u.h)(p.VolumeControl,{player:e.player}),(0,u.h)(f.FullscreenControl,{player:e.player})))))}function i(){return{learnMoreButton:!1,skipButton:!1}}function a(e){var t=e.state.shell.isMobile,n=!1;try{var r=e.player.config.plugins.ima.adsRenderingSettings;n=r&&r.useStyledLinearAds}catch(e){}return t||n}function o(e){var t=e.player.ads.getAd();return t&&t.bumper}Object.defineProperty(t,"__esModule",{value:!0}),t.adsUI=r;var s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=n(0),c=n(15),p=n(22),f=n(23),d=n(82),h=n(83),y=n(84),v=n(85),g=n(24),m=n(26),b=n(25),_=n(86),E=n(27)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.TimeDisplayAdsContainer=void 0;var o,s,l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),p=n(2),f=n(3),d=function(e){return e&&e.__esModule?e:{default:e}}(f),h=n(49),y=function(e){return{adProgress:e.engine.adProgress}},v=(o=(0,p.connect)(y))(s=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"TimeDisplayAdsContainer"}))}return a(t,e),u(t,[{key:"render",value:function(e){return(0,c.h)(h.TimeDisplay,l({currentTime:Math.round(e.adProgress.currentTime),duration:Math.round(e.adProgress.duration)},e))}}]),t}(d.default))||s;t.TimeDisplayAdsContainer=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.AdSkip=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(2),h=n(3),y=r(h),v=n(4),g=function(e){return{currentTime:e.engine.adProgress.currentTime,duration:e.engine.adProgress.duration,adSkipTimeOffset:e.engine.adSkipTimeOffset,adSkippableState:e.engine.adSkippableState}},m=(s=(0,d.connect)(g))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"AdSkip",player:e.player}))}return o(t,e),u(t,[{key:"getSkipTimeOffset",value:function(){return Math.ceil(this.props.adSkipTimeOffset-this.props.currentTime)}},{key:"render",value:function(){var e=this;return this.props.adSkippableState?this.getSkipTimeOffset()<=0?(0,f.h)(v.Localizer,null,(0,f.h)("a",{className:[p.default.btn,p.default.btnBranded,p.default.btnSkipAd].join(" "),onClick:function(){return e.player.ads.skipAd()}},(0,f.h)(v.Text,{id:"ads.skip_ad"}))):(0,f.h)(v.Localizer,null,(0,f.h)("span",{className:p.default.skipAd},(0,f.h)(v.Text,{id:"ads.skip_in"})," "+this.getSkipTimeOffset())):void 0}}]),t}(y.default))||l;t.AdSkip=m},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.AdLearnMore=void 0;var o,s,l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=function(e){return e&&e.__esModule?e:{default:e}}(u),p=n(0),f=n(2),d=n(4),h=function(e){return{url:e.engine.adUrl}},y=(o=(0,f.connect)(h))(s=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),l(t,[{key:"render",value:function(e){return(0,p.h)("a",{href:e.url,target:"_blank",className:[c.default.btn,c.default.btnDarkTransparent,c.default.learnMore].join(" ")},(0,p.h)(d.Text,{id:"ads.learn_more"}))}}]),t}(p.Component))||s;t.AdLearnMore=y},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.TopBar=void 0;var o,s,l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=function(e){return e&&e.__esModule?e:{default:e}}(u),p=n(0),f=n(2),d=function(e){return{isCasting:e.engine.isCasting,isPlaybackEnded:e.engine.isPlaybackEnded}},h=(o=(0,f.connect)(d))(s=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),l(t,[{key:"render",value:function(e){var t=[c.default.topBar];return e.isCasting&&e.isPlaybackEnded&&t.push(c.default.hide),(0,p.h)("div",{className:t.join(" ")},e.children)}}]),t}(p.Component))||s;t.TopBar=h},function(e,t,n){"use strict";function r(e){return(0,o.h)("div",{className:a.default.playbackGuiWWrapper},(0,o.h)(s.ErrorOverlay,{player:e.player}))}Object.defineProperty(t,"__esModule",{value:!0}),t.errorUI=r;var i=n(1),a=function(e){return e&&e.__esModule?e:{default:e}}(i),o=n(0),s=n(87)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorOverlay=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(2),h=n(3),y=r(h),v=n(17),g=n(4),m=n(7),b=n(11),_=n(176),E=function(e){return{hasError:e.engine.hasError}},k=(s=(0,d.connect)(E,(0,m.bindActions)(b.actions)))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"ErrorOverlay",player:e.player}))}return o(t,e),u(t,[{key:"copyError",value:function(){var e=window.getSelection(),t=document.createRange();t.selectNode(this.sessionEl),e.removeAllRanges(),e.addRange(t),document.execCommand("copy")}},{key:"handleClick",value:function(){var e=this.player.getMediaInfo();this.player.loadMedia(e)}},{key:"renderSessionID",value:function(){var e=this,t=this.player&&this.player.config&&this.player.config.session&&this.player.config.session.id;return t?(0,f.h)("div",{className:p.default.linkOptionsContainer},(0,f.h)("div",{className:p.default.copyUrlRow},(0,f.h)("div",{ref:function(t){e.sessionEl=t},className:p.default.errorSession},(0,f.h)(g.Text,{id:"error.default_session_text"})," "," "+t),(0,f.h)(_.CopyButton,{copy:function(){return e.copyError()}}))):void 0}},{key:"renderRetryButton",value:function(){var e=this;if(this.player.getMediaInfo())return(0,f.h)("div",{className:p.default.controlButtonContainer,onClick:function(){return e.handleClick()}},(0,f.h)("button",{className:[p.default.controlButton,p.default.retryBtn].join(" ")},(0,f.h)(g.Text,{id:"error.retry"})))}},{key:"render",value:function(){return this.props&&this.props.hasError?(0,f.h)("div",{className:"overlay-portal"},(0,f.h)(v.Overlay,{open:!0,permanent:!0,type:"error"},(0,f.h)("div",{className:p.default.errorOverlay},(0,f.h)("p",{className:p.default.errorText}),(0,f.h)("div",{className:p.default.svgContainer},(0,f.h)("svg",{width:"124",height:"110",viewBox:"0 0 124 110",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},(0,f.h)("defs",null,(0,f.h)("polygon",{id:"path-1",points:"58.0906294 70 50.7492774 88.8201923 60.1881585 88.8201923 54.22331 107 73.8876457 84.2307692 64.0554779 84.2307692 70.6102564 70"})),(0,f.h)("g",{id:"Player-v3",fill:"none",fillRule:"evenodd"},(0,f.h)("g",{id:"Desktop---Default---Error",transform:"translate(-365 -103)"},(0,f.h)("g",{id:"Cloud",transform:"translate(366 104)"},(0,f.h)("path",{d:"M63.5662942,30.179068 C61.0506558,29.4162424 58.3339083,29 55.5,29 C42.5213084,29 32,37.7304474 32,48.5 C32,48.6497107 32.0020332,48.7990274 32.0060779,48.947932 L32.0060779,48.947932 C20.975194,51.4855427 13,58.8323573 13,67.5 C13,71.2164926 14.4662425,74.6901504 17.0109182,77.6459815 C17.3714483,67.0552274 26.624181,58.1393462 39.3259742,55.0194402 L39.3259742,55.0194402 C39.3212229,54.8326784 39.3188345,54.6453999 39.3188345,54.4576271 C39.3188345,41.956968 49.9040267,31.6467441 63.5662942,30.179068 Z",id:"Combined-Shape",fillOpacity:".08",fill:"#2E2E2E"}),(0,f.h)("path",{d:"M31.0032591,48.1614253 C31.2192187,36.9518144 42.1402046,28 55.5,28 C64.749856,28 73.0886419,32.3249294 77.2653132,39.0733535 C84.8537029,39.7078593 90.7909537,44.3809769 90.9945979,50.1913309 C102.911627,51.5069936 112,59.4322556 112,69 C112,79.5603607 100.981582,88 87.5,88 C84.4639246,88 81.503099,87.5724513 78.7283559,86.7489741 C74.6488476,88.1943213 69.4726739,89 64,89 C58.7323857,89 53.737093,88.2538247 49.7263698,86.9058736 C46.7827225,87.6274324 43.6763865,88 40.5,88 C24.8190401,88 12,78.9101352 12,67.5 C12,58.659353 19.7679337,51.004786 31.0032591,48.1614253 Z",id:"Combined-Shape",stroke:"#666",strokeWidth:"2"}),(0,f.h)("g",{id:"Path-8",strokeLinecap:"round",strokeLinejoin:"round"},(0,f.h)("use",{fill:"#666",xlinkHref:"#path-1"}),(0,f.h)("path",{stroke:"#1D1D1D",strokeWidth:"2",d:"M65.6170644,83.2307692 L76.0725949,83.2307692 L51.7165365,111.432521 L58.8076053,89.8201923 L49.2858112,89.8201923 L57.4073201,69 L72.1718429,69 L65.6170644,83.2307692 Z"})),(0,f.h)("path",{d:"M59.9991166,0 L59.9991166,7.04768642 C59.9991166,7.59997117 60.4468318,8.04768642 60.9991166,8.04768642 C61.5514013,8.04768642 61.9991166,7.59997117 61.9991166,7.04768642 L61.9991166,0 C61.9991166,-0.55228475 61.5514013,-1 60.9991166,-1 C60.4468318,-1 59.9991166,-0.55228475 59.9991166,0 Z M95.3084192,8.85153517 L90.7782537,14.2503762 C90.4232519,14.6734508 90.4784359,15.3042064 90.9015106,15.6592082 C91.3245852,16.01421 91.9553408,15.9590261 92.3103426,15.5359514 L96.8405081,10.1371104 C97.1955099,9.71403572 97.140326,9.08328013 96.7172513,8.72827833 C96.2941766,8.37327654 95.663421,8.4284605 95.3084192,8.85153517 Z M121.628196,36.6783398 L114.687579,37.9021577 C114.143685,37.9980609 113.780517,38.5167193 113.87642,39.0606136 C113.972323,39.6045079 114.490981,39.9676764 115.034876,39.8717732 L121.975492,38.6479553 C122.519386,38.552052 122.882555,38.0333936 122.786652,37.4894993 C122.690748,36.945605 122.17209,36.5824365 121.628196,36.6783398 Z M0.0227411046,38.6479553 L6.96335733,39.8717732 C7.50725163,39.9676764 8.02591002,39.6045079 8.12181326,39.0606136 C8.2177165,38.5167193 7.85454799,37.9980609 7.31065368,37.9021577 L0.37003746,36.6783398 C-0.173856844,36.5824365 -0.69251523,36.945605 -0.788418471,37.4894993 C-0.884321711,38.0333936 -0.521153199,38.552052 0.0227411046,38.6479553 Z M25.157725,10.1371104 L29.6878905,15.5359514 C30.0428923,15.9590261 30.6736479,16.01421 31.0967226,15.6592082 C31.5197972,15.3042064 31.5749812,14.6734508 31.2199794,14.2503762 L26.6898139,8.85153517 C26.3348121,8.4284605 25.7040565,8.37327654 25.2809818,8.72827833 C24.8579072,9.08328013 24.8027232,9.71403572 25.157725,10.1371104 Z",id:"Path-9",fill:"#666",fillRule:"nonzero"})))))),(0,f.h)("div",{className:p.default.headline},this.props.errorHead?this.props.errorHead:(0,f.h)(g.Text,{id:"error.default_error"})),this.renderSessionID(),this.renderRetryButton()))):void 0}}]),t}(y.default))||l;t.ErrorOverlay=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80);Object.defineProperty(t,"CopyButton",{enumerable:!0,get:function(){return r.CopyButton}})},function(e,t,n){"use strict";function r(e){return(0,o.h)("div",{className:a.default.playbackGuiWWrapper},(0,o.h)(g.KeyboardControl,{player:e.player,config:e.config}),(0,o.h)(u.Loading,{player:e.player}),(0,o.h)("div",{className:a.default.playerGui,id:"player-gui"},(0,o.h)(v.OverlayPortal,null),(0,o.h)(b.UnmuteIndication,{player:e.player}),(0,o.h)(s.OverlayAction,{player:e.player}),(0,o.h)(w.PlaybackControls,{player:e.player}),(0,o.h)(O.ShareControl,{player:e.player}),(0,o.h)(y.BottomBar,null,(0,o.h)(c.SeekBarLivePlaybackContainer,{showFramePreview:!0,showTimeBubble:!0,player:e.player,playerContainer:e.playerContainer}),(0,o.h)("div",{className:a.default.leftControls},(0,o.h)(w.PlaybackControls,{player:e.player}),(0,o.h)(m.LiveTag,{player:e.player})),(0,o.h)("div",{className:a.default.rightControls},E.VrStereoToggleControl.shouldRender(e)?(0,o.h)(E.VrStereoToggleControl,{player:e.player}):void 0,(0,o.h)(p.VolumeControl,{player:e.player}),(0,o.h)(d.LanguageControl,{player:e.player}),(0,o.h)(f.SettingsControl,{player:e.player}),(0,o.h)(k.CastControl,{player:e.player}),(0,o.h)(S.PictureInPicture,{player:e.player}),(0,o.h)(h.FullscreenControl,{player:e.player}),C.Logo.shouldRender(e)?(0,o.h)(C.Logo,{player:e.player}):void 0))),_.Watermark.shouldRender(e)?(0,o.h)(_.Watermark,{player:e.player}):void 0,(0,o.h)(l.PrePlaybackPlayOverlay,{player:e.player}),(0,o.h)(T.CastBeforePlay,{player:e.player}),(0,o.h)(P.PictureInPictureOverlay,{player:e.player}),(0,o.h)(A.Backdrop,null))}Object.defineProperty(t,"__esModule",{value:!0}),t.liveUI=r;var i=n(1),a=function(e){return e&&e.__esModule?e:{default:e}}(i),o=n(0),s=n(36),l=n(38),u=n(15),c=n(88),p=n(22),f=n(43),d=n(47),h=n(23),y=n(24),v=n(50),g=n(25),m=n(89),b=n(26),_=n(51),E=n(48),k=n(52),T=n(53),A=n(74),w=n(27),S=n(54),P=n(78),O=n(55),C=n(81)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.SeekBarLivePlaybackContainer=void 0;var o,s,l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=n(2),p=n(7),f=n(18),d=n(3),h=function(e){return e&&e.__esModule?e:{default:e}}(d),y=n(39),v=function(e){return{currentTime:e.seekbar.currentTime,duration:e.engine.duration,isDraggingActive:e.seekbar.draggingActive,isMobile:e.shell.isMobile,poster:e.engine.poster,isDvr:e.engine.isDvr}},g=(o=(0,c.connect)(v,(0,p.bindActions)(f.actions)))(s=function(e){function t(e){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"SeekBarLivePlaybackContainer",player:e.player}))}return a(t,e),l(t,[{key:"componentDidMount",value:function(){var e=this;this.eventManager.listen(this.player,this.player.Event.TIME_UPDATE,function(){e.props.isDraggingActive||e.props.updateCurrentTime(e.player.currentTime)})}},{key:"render",value:function(e){var t=this;if(e.isDvr)return(0,u.h)(y.SeekBarControl,{player:this.props.player,playerElement:this.props.playerContainer,showTimeBubble:this.props.showTimeBubble,changeCurrentTime:function(e){return t.player.currentTime=e},playerPoster:this.props.poster,updateSeekbarDraggingStatus:function(e){return t.props.updateSeekbarDraggingStatus(e)},updateSeekbarHoverActive:function(e){return t.props.updateSeekbarHoverActive(e)},updateCurrentTime:function(e){return t.props.updateCurrentTime(e)},isDvr:this.props.isDvr,currentTime:this.props.currentTime,duration:this.props.duration,isDraggingActive:this.props.isDraggingActive,isMobile:this.props.isMobile,notifyChange:function(e){return t.notifyChange(e)}})}}]),t}(h.default))||s;t.SeekBarLivePlaybackContainer=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.LiveTag=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(2),h=n(3),y=r(h),v=n(6),g=n(4),m=function(e){return{isLive:e.engine.isLive,isDvr:e.engine.isDvr,currentTime:e.engine.currentTime,duration:e.engine.duration}},b=(s=(0,d.connect)(m))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"LiveTag",player:e.player}))}return o(t,e),u(t,[{key:"isOnLiveEdge",value:function(){return this.props.currentTime>=this.props.duration-1}},{key:"onClick",value:function(){this.isOnLiveEdge()||(this.player.seekToLiveEdge(),this.player.paused&&this.player.play()),this.notifyClick()}},{key:"render",value:function(e){var t=this,n=[p.default.liveTag];return e.isDvr&&!this.isOnLiveEdge()&&n.push(p.default.nonLivePlayhead),(0,f.h)("div",{tabIndex:"0",className:n.join(" "),onClick:function(){return t.onClick()},onKeyDown:function(e){e.keyCode===v.KeyMap.ENTER&&t.onClick()}},(0,f.h)(g.Text,{id:"controls.live"}))}}]),t}(y.default))||l;t.LiveTag=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.middleware=void 0;var r=n(13),i=n(62),a=n(181),o=function(e,t){return(0,r.applyMiddleware)((0,a.loggerMiddleware)(t),(0,i.eventDispatcherMiddleware)(e))};t.middleware=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loggerMiddleware=void 0;var r=n(30),i=function(e){return e&&e.__esModule?e:{default:e}}(r),a=(0,i.default)("UILoggerMiddleware"),o=function(e){return function(t){return function(t){return function(n){e.debugActions&&a.debug("Action fired",n),t(n)}}}};t.loggerMiddleware=o},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.volume=t.shell=t.share=t.setting=t.seekbar=t.overlayAction=t.loading=t.engine=t.cvaa=t.config=void 0;var i=n(12),a=r(i),o=n(20),s=r(o),l=n(11),u=r(l),c=n(14),p=r(c),f=n(21),d=r(f),h=n(18),y=r(h),v=n(34),g=r(v),m=n(19),b=r(m),_=n(8),E=r(_),k=n(33),T=r(k);t.config=a,t.cvaa=s,t.engine=u,t.loading=p,t.overlayAction=d,t.seekbar=y,t.setting=g,t.share=b,t.shell=E,t.volume=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(84);Object.defineProperty(t,"AdLearnMore",{enumerable:!0,get:function(){return r.AdLearnMore}});var i=n(83);Object.defineProperty(t,"AdSkip",{enumerable:!0,get:function(){return i.AdSkip}});var a=n(184);Object.defineProperty(t,"AdNotice",{enumerable:!0,get:function(){return a.AdNotice}});var o=n(3);Object.defineProperty(t,"BaseComponent",{enumerable:!0,get:function(){return o.BaseComponent}});var s=n(24);Object.defineProperty(t,"BottomBar",{enumerable:!0,get:function(){return s.BottomBar}});var l=n(71);Object.defineProperty(t,"CVAAOverlay",{enumerable:!0,get:function(){return l.CVAAOverlay}});var u=n(46);Object.defineProperty(t,"DropDown",{enumerable:!0,get:function(){return u.DropDown}});var c=n(61);Object.defineProperty(t,"EngineConnector",{enumerable:!0,get:function(){return c.EngineConnector}});var p=n(87);Object.defineProperty(t,"ErrorOverlay",{enumerable:!0,get:function(){return p.ErrorOverlay}});var f=n(23);Object.defineProperty(t,"FullscreenControl",{enumerable:!0,get:function(){return f.FullscreenControl}});var d=n(5);Object.defineProperty(t,"Icon",{enumerable:!0,get:function(){return d.Icon}}),Object.defineProperty(t,"IconType",{enumerable:!0,get:function(){return d.IconType}});var h=n(25);Object.defineProperty(t,"KeyboardControl",{enumerable:!0,get:function(){return h.KeyboardControl}});var y=n(47);Object.defineProperty(t,"LanguageControl",{enumerable:!0,get:function(){return y.LanguageControl}});var v=n(89);Object.defineProperty(t,"LiveTag",{enumerable:!0,get:function(){return v.LiveTag}});var g=n(15);Object.defineProperty(t,"Loading",{enumerable:!0,get:function(){return g.Loading}});var m=n(70);Object.defineProperty(t,"Menu",{enumerable:!0,get:function(){return m.Menu}});var b=n(17);Object.defineProperty(t,"Overlay",{enumerable:!0,get:function(){return b.Overlay}});var _=n(36);Object.defineProperty(t,"OverlayAction",{enumerable:!0,get:function(){return _.OverlayAction}});var E=n(50);Object.defineProperty(t,"OverlayPortal",{enumerable:!0,get:function(){return E.OverlayPortal}});var k=n(76);Object.defineProperty(t,"PlayPauseControl",{enumerable:!0,get:function(){return k.PlayPauseControl}});var T=n(38);Object.defineProperty(t,"PrePlaybackPlayOverlay",{enumerable:!0,get:function(){return T.PrePlaybackPlayOverlay}});var A=n(66);Object.defineProperty(t,"RewindControl",{enumerable:!0,get:function(){return A.RewindControl}});var w=n(67);Object.defineProperty(t,"Forward",{enumerable:!0,get:function(){return w.Forward}});var S=n(39);Object.defineProperty(t,"SeekBarControl",{enumerable:!0,get:function(){return S.SeekBarControl}});var P=n(88);Object.defineProperty(t,"SeekBarLivePlaybackContainer",{enumerable:!0,get:function(){return P.SeekBarLivePlaybackContainer}});var O=n(68);Object.defineProperty(t,"SeekBarPlaybackContainer",{enumerable:!0,get:function(){return O.SeekBarPlaybackContainer}});var C=n(43);Object.defineProperty(t,"SettingsControl",{enumerable:!0,get:function(){return C.SettingsControl}});var x=n(55);Object.defineProperty(t,"ShareControl",{enumerable:!0,get:function(){return x.ShareControl}});var R=n(79);Object.defineProperty(t,"ShareOverlay",{enumerable:!0,get:function(){return R.ShareOverlay}});var I=n(63);Object.defineProperty(t,"Shell",{enumerable:!0,get:function(){return I.Shell}});var D=n(72);Object.defineProperty(t,"Slider",{enumerable:!0,get:function(){return D.Slider}});var M=n(44);Object.defineProperty(t,"SmartContainer",{enumerable:!0,get:function(){return M.SmartContainer}});var L=n(49);Object.defineProperty(t,"TimeDisplay",{enumerable:!0,get:function(){return L.TimeDisplay}});var N=n(82);Object.defineProperty(t,"TimeDisplayAdsContainer",{enumerable:!0,get:function(){return N.TimeDisplayAdsContainer}});var j=n(73);Object.defineProperty(t,"TimeDisplayPlaybackContainer",{enumerable:!0,get:function(){return j.TimeDisplayPlaybackContainer}});var U=n(185);Object.defineProperty(t,"Tooltip",{enumerable:!0,get:function(){return U.Tooltip}});var F=n(85);Object.defineProperty(t,"TopBar",{enumerable:!0,get:function(){return F.TopBar}});var B=n(26);Object.defineProperty(t,"UnmuteIndication",{enumerable:!0,get:function(){return B.UnmuteIndication}});var V=n(64);Object.defineProperty(t,"VideoPlayer",{enumerable:!0,get:function(){return V.VideoPlayer}});var G=n(22);Object.defineProperty(t,"VolumeControl",{enumerable:!0,get:function(){return G.VolumeControl}});var H=n(187);Object.defineProperty(t,"Watermark",{enumerable:!0,get:function(){return H.Watermark}});var K=n(52);Object.defineProperty(t,"CastControl",{enumerable:!0,get:function(){return K.CastControl}});var z=n(188);Object.defineProperty(t,"CastOverlay",{enumerable:!0,get:function(){return z.CastOverlay}});var Y=n(48);Object.defineProperty(t,"VrStereoToggleControl",{enumerable:!0,get:function(){return Y.VrStereoToggleControl}});var W=n(190);Object.defineProperty(t,"CastBeforePlay",{enumerable:!0,get:function(){return W.CastBeforePlay}}),Object.defineProperty(t,"CastAfterPlay",{enumerable:!0,get:function(){return W.CastAfterPlay}});var q=n(75);Object.defineProperty(t,"PlaylistButton",{enumerable:!0,get:function(){return q.PlaylistButton}});var X=n(77);Object.defineProperty(t,"PlaylistNextScreen",{enumerable:!0,get:function(){return X.PlaylistNextScreen}});var J=n(54);Object.defineProperty(t,"PictureInPicture",{enumerable:!0,get:function(){return J.PictureInPicture}});var Q=n(27);Object.defineProperty(t,"PlaybackControls",{enumerable:!0,get:function(){return Q.PlaybackControls}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(86);Object.defineProperty(t,"AdNotice",{enumerable:!0,get:function(){return r.AdNotice}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(186);Object.defineProperty(t,"Tooltip",{enumerable:!0,get:function(){return r.Tooltip}})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Tooltip=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=n(0),c=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),o(t,[{key:"render",value:function(e){var t=[l.default.tooltip];return e.out&&t.push(l.default.out),(0,u.h)("div",{className:t.join(" "),style:e.left?{left:e.left}:""},e.children)}}]),t}(u.Component);t.Tooltip=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(51);Object.defineProperty(t,"Watermark",{enumerable:!0,get:function(){return r.Watermark}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(189);Object.defineProperty(t,"CastOverlay",{enumerable:!0,get:function(){return r.CastOverlay}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.CastOverlay=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(3),h=r(d),y=n(2),v=n(5),g=n(16),m=n(4),b=function(e){return{poster:e.engine.poster,castSession:e.engine.castSession,isIdle:e.engine.isIdle,isPlaying:e.engine.isPlaying,isPlaybackEnded:e.engine.isPlaybackEnded,isPaused:e.engine.isPaused,isChangingSource:e.engine.isChangingSource}},_=(s=(0,y.connect)(b))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"CastOverlay",player:e.player}))}return o(t,e),u(t,[{key:"getStatus",value:function(){return this.props.isPlaying||this.props.isPaused?(0,f.h)(m.Text,{id:"cast.status.playing_on"}):this.props.isPlaybackEnded||this.props.isChangingSource||this.props.castSession.resuming?(0,f.h)(m.Text,{id:"cast.status.connected_to"}):(0,f.h)(m.Text,{id:"cast.status.connecting_to"})}},{key:"getIcon",value:function(){return this.props.isPlaying||this.props.isPaused||this.props.isPlaybackEnded||this.props.isChangingSource||this.props.castSession.resuming?(0,f.h)(g.Icon,{type:this.props.icon}):(0,f.h)("div",{className:p.default.castConnectingSpinner})}},{key:"render",value:function(e){if(e.castSession){var t={},n=[p.default.castPoster];e.poster&&(t={backgroundImage:e.isChangingSource?"":"url("+e.poster+")",backgroundSize:"contain"},n.push(p.default.hasPoster));var r=this.getStatus(),i=this.getIcon();return(0,f.h)("div",null,(0,f.h)("div",{className:p.default.castOverlay},(0,f.h)("div",{className:n.join(" "),style:t,onMouseOver:function(e){return e.stopPropagation()}}),(0,f.h)("div",{className:p.default.castBlackCover})),(0,f.h)("div",{className:p.default.castBox},(0,f.h)("div",{className:p.default.castIcon},i),(0,f.h)("div",{className:p.default.castText},(0,f.h)(m.Localizer,null,(0,f.h)("span",{className:p.default.castStatus},r)),(0,f.h)("br",null),(0,f.h)("span",{className:p.default.castDevice},e.castSession.deviceFriendlyName))))}}}]),t}(h.default))||l;_.defaultProps={icon:v.IconType.Cast},t.CastOverlay=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(53);Object.defineProperty(t,"CastBeforePlay",{enumerable:!0,get:function(){return r.CastBeforePlay}});var i=n(191);Object.defineProperty(t,"CastAfterPlay",{enumerable:!0,get:function(){return i.CastAfterPlay}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.CastAfterPlay=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(3),h=r(d),y=n(2),v=n(5),g=n(16),m=n(4),b=function(e){return{isPlaybackEnded:e.engine.isPlaybackEnded,isCasting:e.engine.isCasting}},_=(s=(0,y.connect)(b,null))(l=function(e){function t(e){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{name:"CastAfterPlay",player:e.player}))}return o(t,e),u(t,[{key:"onClick",value:function(e){e.stopPropagation(),this.player.stopCasting()}},{key:"componentDidMount",value:function(){var e=this;setTimeout(function(){e.setState({show:!0})},700)}},{key:"render",value:function(e){var t=this;if(e.isCasting&&e.isPlaybackEnded){var n=[p.default.castOnTvButtonContainer];return this.state.show&&n.push(p.default.showCastOnTv),(0,f.h)("div",null,(0,f.h)("div",{className:n.join(" "),onClick:function(e){return t.onClick(e)}},(0,f.h)("a",{className:[p.default.btn,p.default.btnDarkTransparent,p.default.castOnTvButton].join(" ")},(0,f.h)("div",{className:p.default.castOnTvIconContainer},(0,f.h)(g.Icon,{type:e.icon})),(0,f.h)(m.Localizer,null,(0,f.h)("span",null,(0,f.h)(m.Text,{id:"cast.disconnect_from_tv"}))))))}}}]),t}(h.default))||l;_.defaultProps={icon:v.IconType.CastBrand},t.CastAfterPlay=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7);Object.defineProperty(t,"bindActions",{enumerable:!0,get:function(){return r.bindActions}})}])})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(){E.debug("onRemoteDeviceConnecting"),this.dispatchEvent(new g.FakeEvent(v.CastEventType.CAST_SESSION_STARTING))}function a(e){var t=this;E.debug("onRemoteDeviceConnected",e);var n=e.player,r=e.ui,i=e.session;this._eventManager.removeAll(),Object.values(g.EventType).forEach(function(e){return t._eventManager.listen(n,e,function(e){return t.dispatchEvent(e)})});var a=this.config;r&&g.Utils.Object.mergeDeep(a,{ui:{customPreset:r.uis}}),this.configure({playback:{muted:this.muted,volume:this.volume}}),this._localPlayer.reset(),this._uiWrapper.destroy(),this._remotePlayer=n,this._uiWrapper=new m.UIWrapper(this,a),this.dispatchEvent(new g.FakeEvent(v.CastEventType.CAST_SESSION_STARTED,{session:i}))}function o(){E.debug("onRemoteDeviceDisconnecting"),this.dispatchEvent(new g.FakeEvent(v.CastEventType.CAST_SESSION_ENDING))}function s(e){var t=this;E.debug("onRemoteDeviceDisconnected",e);var n=e.player,r=e.snapshot;if(this._remotePlayer&&this._remotePlayer===n&&(this._eventManager.removeAll(),f.call(this,r),r)){this.dispatchEvent(new g.FakeEvent(v.CastEventType.CAST_SESSION_ENDED));var i=this.config.playback,a=!r.config.playback.autoplay,o=r.mediaInfo;r.config.playback.autoplay=!0,d.call(this,r.config.playback),o&&this.loadMedia(o).then(function(){t._eventManager.listenOnce(t,t.Event.Core.FIRST_PLAYING,function(){t.textStyle=r.textStyle,d.call(t,i),h.call(t,r),a&&t.pause()})})}}function l(e){E.debug("onRemoteDeviceAvailable",e);var t=e.player,n=e.available;this.dispatchEvent(new g.FakeEvent(v.CastEventType.CAST_AVAILABLE,{type:t.type,available:n}))}function u(){E.debug("onRemoteDeviceConnectFailed"),this.dispatchEvent(new g.FakeEvent(v.CastEventType.CAST_SESSION_START_FAILED))}function c(){var e=new y.PlayerSnapshot(this);return E.debug("getPlayerSnapshot",e),e}function p(){return E.debug("getUIWrapper"),this._uiWrapper}function f(e){var t=this;this._uiWrapper.destroy();var n=this._localPlayer.config;if(n.plugins&&n.plugins.ima){var r={};if(n.cast.advertising&&n.cast.advertising.vast){if(e.config.playback.startTime>0){var i=n.plugins.ima.adTagUrl;r={adTagUrl:""},this._eventManager.listen(this,g.EventType.FIRST_PLAYING,function(){return t.configure({plugins:{ima:{adTagUrl:i}}})})}}else r={delayInitUntilSourceSelected:!0};g.Utils.Object.mergeDeep(n,{plugins:{ima:r}}),this._localPlayer.destroy(),this._remotePlayer=null,this._localPlayer=(0,g.loadPlayer)(n)}else this._remotePlayer=null;Object.values(g.EventType).forEach(function(e){return t._eventManager.listen(t._localPlayer,e,function(e){return t.dispatchEvent(e)})}),this._uiWrapper=new m.UIWrapper(this,this.config),this._uiWrapper.setConfig({isCastAvailable:this.isCastAvailable()},"engine")}function d(e){var t=e.autoplay,n=e.startTime;this.configure({playback:{startTime:n,autoplay:t}})}function h(e){if(e.audioLanguage){var t=this.getTracks(g.TrackType.AUDIO).find(function(t){return t.language===e.audioLanguage});this.selectTrack(t)}if(e.textLanguage){var n=this.getTracks(g.TrackType.TEXT).find(function(t){return t.language===e.textLanguage});this.selectTrack(n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteControl=void 0;var y=(n(44),n(99)),v=n(100),g=n(9),m=(n(140),n(142)),b=n(19),_=function(e){return e&&e.__esModule?e:{default:e}}(b),E=(0,_.default)("RemoteControl"),k=function e(t){r(this,e),this.getPlayerSnapshot=c.bind(t),this.getUIWrapper=p.bind(t),this.onRemoteDeviceAvailable=l.bind(t),this.onRemoteDeviceConnected=a.bind(t),this.onRemoteDeviceDisconnected=s.bind(t),this.onRemoteDeviceConnecting=i.bind(t),this.onRemoteDeviceDisconnecting=o.bind(t),this.onRemoteDeviceConnectFailed=u.bind(t)};t.RemoteControl=k},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.BaseRemotePlayer=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=(n(368),n(9)),l=(n(69),n(19)),u=function(e){return e&&e.__esModule?e:{default:e}}(l),c=n(53),p=function(e){function t(e,n,a){r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o._playerConfig={},o._logger=(0,u.default)(e),o._remoteControl=a,o._castConfig=s.Utils.Object.mergeDeep({},o.constructor.defaultConfig,n),o._eventManager=new s.EventManager,o._logger.debug("Initialized"),o}return a(t,e),o(t,null,[{key:"isSupported",value:function(){return!0}}]),o(t,[{key:"loadMedia",value:function(e){return Promise.resolve()}},{key:"setMedia",value:function(e){}},{key:"getMediaInfo",value:function(){}},{key:"configure",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]}},{key:"ready",value:function(){return Promise.resolve()}},{key:"load",value:function(){}},{key:"play",value:function(){}},{key:"pause",value:function(){}},{key:"reset",value:function(){}},{key:"destroy",value:function(){}},{key:"isLive",value:function(){return!1}},{key:"isDvr",value:function(){return!1}},{key:"seekToLiveEdge",value:function(){}},{key:"getStartTimeOfDvrWindow",value:function(){return 0}},{key:"getTracks",value:function(e){return[]}},{key:"getActiveTracks",value:function(){return{audio:void 0,video:void 0,text:void 0}}},{key:"selectTrack",value:function(e){}},{key:"hideTextTrack",value:function(){}},{key:"enableAdaptiveBitrate",value:function(){}},{key:"isAdaptiveBitrateEnabled",value:function(){return!0}},{key:"setTextDisplaySettings",value:function(e){}},{key:"startCasting",value:function(){}},{key:"stopCasting",value:function(){}},{key:"isCasting",value:function(){return!0}},{key:"isCastAvailable",value:function(){return!0}},{key:"getCastSession",value:function(){return new c.RemoteSession("","")}},{key:"isVr",value:function(){return!1}},{key:"toggleVrStereoMode",value:function(){}},{key:"isInVrStereoMode",value:function(){return!1}},{key:"ads",get:function(){return null}},{key:"textStyle",set:function(e){},get:function(){return new s.TextStyle}},{key:"buffered",get:function(){return[]}},{key:"currentTime",set:function(e){},get:function(){return 0}},{key:"duration",get:function(){return 0}},{key:"volume",set:function(e){},get:function(){return 1}},{key:"paused",get:function(){return!1}},{key:"ended",get:function(){return!1}},{key:"seeking",get:function(){return!1}},{key:"muted",set:function(e){},get:function(){return!1}},{key:"src",get:function(){return""}},{key:"poster",get:function(){return""}},{key:"playbackRate",set:function(e){},get:function(){return 1}},{key:"engineType",get:function(){return""}},{key:"streamType",get:function(){return""}},{key:"type",get:function(){return t.Type}},{key:"config",get:function(){return this._playerConfig}}]),t}(s.FakeEventTarget);p.defaultConfig={},p.Type="BaseRemotePlayer",t.BaseRemotePlayer=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(19),o=function(e){return e&&e.__esModule?e:{default:e}}(a);window._babelPolyfill||n(150);var s=function(){function e(){r(this,e)}return i(e,null,[{key:"register",value:function(t){e._logger.debug("Register <"+t.id+"> polyfill"),e._polyfills.push(t)}},{key:"installAll",value:function(){e._logger.debug("Installing all polyfills");for(var t=0;t<e._polyfills.length;t++)e._polyfills[t].install()}}]),e}();s._polyfills=[],s._logger=(0,o.default)("PolyfillManager"),t.default=s},function(e,t,n){var r=n(4),i=n(2).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){var r=n(2),i=n(23),a=n(35),o=n(104),s=n(7).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=a?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:o.f(e)})}},function(e,t,n){var r=n(54)("keys"),i=n(34);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(2).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(4),i=n(1),a=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(20)(Function.call,n(17).f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return a(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:a}},function(e,t){e.exports="\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff"},function(e,t,n){var r=n(4),i=n(77).set;e.exports=function(e,t,n){var a,o=t.constructor;return o!==n&&"function"==typeof o&&(a=o.prototype)!==n.prototype&&r(a)&&i&&i(e,a),e}},function(e,t,n){"use strict";var r=n(26),i=n(25);e.exports=function(e){var t=String(i(this)),n="",a=r(e);if(a<0||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(n+=t);return n}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var r=n(26),i=n(25);e.exports=function(e){return function(t,n){var a,o,s=String(i(t)),l=r(n),u=s.length;return l<0||l>=u?e?"":void 0:(a=s.charCodeAt(l),a<55296||a>56319||l+1===u||(o=s.charCodeAt(l+1))<56320||o>57343?e?s.charAt(l):a:e?s.slice(l,l+2):o-56320+(a-55296<<10)+65536)}}},function(e,t,n){"use strict";var r=n(35),i=n(0),a=n(14),o=n(13),s=n(12),l=n(47),u=n(85),c=n(45),p=n(18),f=n(5)("iterator"),d=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,n,y,v,g,m){u(n,t,y);var b,_,E,k=function(e){if(!d&&e in S)return S[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},T=t+" Iterator",A="values"==v,w=!1,S=e.prototype,P=S[f]||S["@@iterator"]||v&&S[v],O=P||k(v),C=v?A?k("entries"):O:void 0,x="Array"==t?S.entries||P:P;if(x&&(E=p(x.call(new e)))!==Object.prototype&&E.next&&(c(E,T,!0),r||s(E,f)||o(E,f,h)),A&&P&&"values"!==P.name&&(w=!0,O=function(){return P.call(this)}),r&&!m||!d&&!w&&S[f]||o(S,f,O),l[t]=O,l[T]=h,v)if(b={values:A?O:k("values"),keys:g?O:k("keys"),entries:C},m)for(_ in b)_ in S||a(S,_,b[_]);else i(i.P+i.F*(d||w),t,b);return b}},function(e,t,n){"use strict";var r=n(38),i=n(33),a=n(45),o={};n(13)(o,n(5)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(o,{next:i(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var r=n(58),i=n(25);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},function(e,t,n){var r=n(5)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){var r=n(47),i=n(5)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[i]===e)}},function(e,t,n){"use strict";var r=n(7),i=n(33);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){var r=n(52),i=n(5)("iterator"),a=n(47);e.exports=n(23).getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||a[r(e)]}},function(e,t,n){var r=n(242);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){"use strict";var r=n(10),i=n(37),a=n(8);e.exports=function(e){for(var t=r(this),n=a(t.length),o=arguments.length,s=i(o>1?arguments[1]:void 0,n),l=o>2?arguments[2]:void 0,u=void 0===l?n:i(l,n);u>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(32),i=n(120),a=n(47),o=n(16);e.exports=n(84)(Array,"Array",function(e,t){this._t=o(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,n):"values"==t?i(0,e[n]):i(0,[n,e[n]])},"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t,n){var r,i,a,o=n(20),s=n(110),l=n(76),u=n(72),c=n(2),p=c.process,f=c.setImmediate,d=c.clearImmediate,h=c.MessageChannel,y=c.Dispatch,v=0,g={},m=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},b=function(e){m.call(e.data)};f&&d||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return g[++v]=function(){s("function"==typeof e?e:Function(e),t)},r(v),v},d=function(e){delete g[e]},"process"==n(21)(p)?r=function(e){p.nextTick(o(m,e,1))}:y&&y.now?r=function(e){y.now(o(m,e,1))}:h?(i=new h,a=i.port2,i.port1.onmessage=b,r=o(a.postMessage,a,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",b,!1)):r="onreadystatechange"in u("script")?function(e){l.appendChild(u("script")).onreadystatechange=function(){l.removeChild(this),m.call(e)}}:function(e){setTimeout(o(m,e,1),0)}),e.exports={set:f,clear:d}},function(e,t,n){var r=n(2),i=n(94).set,a=r.MutationObserver||r.WebKitMutationObserver,o=r.process,s=r.Promise,l="process"==n(21)(o);e.exports=function(){var e,t,n,u=function(){var r,i;for(l&&(r=o.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(l)n=function(){o.nextTick(u)};else if(a){var c=!0,p=document.createTextNode("");new a(u).observe(p,{characterData:!0}),n=function(){p.data=c=!c}}else if(s&&s.resolve){var f=s.resolve();n=function(){f.then(u)}}else n=function(){i.call(r,u)};return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t,n){"use strict";function r(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=i(t),this.reject=i(n)}var i=n(11);e.exports.f=function(e){return new r(e)}},function(e,t,n){"use strict";function r(e,t,n){var r,i,a,o=Array(n),s=8*n-t-1,l=(1<<s)-1,u=l>>1,c=23===t?U(2,-24)-U(2,-77):0,p=0,f=e<0||0===e&&1/e<0?1:0;for(e=j(e),e!=e||e===L?(i=e!=e?1:0,r=l):(r=F(B(e)/V),e*(a=U(2,-r))<1&&(r--,a*=2),e+=r+u>=1?c/a:c*U(2,1-u),e*a>=2&&(r++,a/=2),r+u>=l?(i=0,r=l):r+u>=1?(i=(e*a-1)*U(2,t),r+=u):(i=e*U(2,u-1)*U(2,t),r=0));t>=8;o[p++]=255&i,i/=256,t-=8);for(r=r<<t|i,s+=t;s>0;o[p++]=255&r,r/=256,s-=8);return o[--p]|=128*f,o}function i(e,t,n){var r,i=8*n-t-1,a=(1<<i)-1,o=a>>1,s=i-7,l=n-1,u=e[l--],c=127&u;for(u>>=7;s>0;c=256*c+e[l],l--,s-=8);for(r=c&(1<<-s)-1,c>>=-s,s+=t;s>0;r=256*r+e[l],l--,s-=8);if(0===c)c=1-o;else{if(c===a)return r?NaN:u?-L:L;r+=U(2,t),c-=o}return(u?-1:1)*r*U(2,c-t)}function a(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function o(e){return[255&e]}function s(e){return[255&e,e>>8&255]}function l(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function u(e){return r(e,52,8)}function c(e){return r(e,23,4)}function p(e,t,n){S(e[C],t,{get:function(){return this[n]}})}function f(e,t,n,r){var i=+n,a=A(i);if(a+t>e[H])throw M(x);var o=e[G]._b,s=a+e[K],l=o.slice(s,s+t);return r?l:l.reverse()}function d(e,t,n,r,i,a){var o=+n,s=A(o);if(s+t>e[H])throw M(x);for(var l=e[G]._b,u=s+e[K],c=r(+i),p=0;p<t;p++)l[u+p]=c[a?p:t-p-1]}var h=n(2),y=n(6),v=n(35),g=n(64),m=n(13),b=n(43),_=n(3),E=n(41),k=n(26),T=n(8),A=n(129),w=n(39).f,S=n(7).f,P=n(92),O=n(45),C="prototype",x="Wrong index!",R=h.ArrayBuffer,I=h.DataView,D=h.Math,M=h.RangeError,L=h.Infinity,N=R,j=D.abs,U=D.pow,F=D.floor,B=D.log,V=D.LN2,G=y?"_b":"buffer",H=y?"_l":"byteLength",K=y?"_o":"byteOffset";if(g.ABV){if(!_(function(){R(1)})||!_(function(){new R(-1)})||_(function(){return new R,new R(1.5),new R(NaN),"ArrayBuffer"!=R.name})){R=function(e){return E(this,R),new N(A(e))};for(var z,Y=R[C]=N[C],W=w(N),q=0;W.length>q;)(z=W[q++])in R||m(R,z,N[z]);v||(Y.constructor=R)}var X=new I(new R(2)),J=I[C].setInt8;X.setInt8(0,2147483648),X.setInt8(1,2147483649),!X.getInt8(0)&&X.getInt8(1)||b(I[C],{setInt8:function(e,t){J.call(this,e,t<<24>>24)},setUint8:function(e,t){J.call(this,e,t<<24>>24)}},!0)}else R=function(e){E(this,R,"ArrayBuffer");var t=A(e);this._b=P.call(Array(t),0),this[H]=t},I=function(e,t,n){E(this,I,"DataView"),E(e,R,"DataView");var r=e[H],i=k(t);if(i<0||i>r)throw M("Wrong offset!");if(n=void 0===n?r-i:T(n),i+n>r)throw M("Wrong length!");this[G]=e,this[K]=i,this[H]=n},y&&(p(R,"byteLength","_l"),p(I,"buffer","_b"),p(I,"byteLength","_l"),p(I,"byteOffset","_o")),b(I[C],{getInt8:function(e){return f(this,1,e)[0]<<24>>24},getUint8:function(e){return f(this,1,e)[0]},getInt16:function(e){var t=f(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=f(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return a(f(this,4,e,arguments[1]))},getUint32:function(e){return a(f(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return i(f(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return i(f(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){d(this,1,e,o,t)},setUint8:function(e,t){d(this,1,e,o,t)},setInt16:function(e,t){d(this,2,e,s,t,arguments[2])},setUint16:function(e,t){d(this,2,e,s,t,arguments[2])},setInt32:function(e,t){d(this,4,e,l,t,arguments[2])},setUint32:function(e,t){d(this,4,e,l,t,arguments[2])},setFloat32:function(e,t){d(this,4,e,c,t,arguments[2])},setFloat64:function(e,t){d(this,8,e,u,t,arguments[2])}});O(R,"ArrayBuffer"),O(I,"DataView"),m(I[C],g.VIEW,!0),t.ArrayBuffer=R,t.DataView=I},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.RemotePlayerManager=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=(n(69),n(70),n(19)),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(){function e(){r(this,e)}return i(e,null,[{key:"register",value:function(t,n){"function"==typeof n?e._registry.has(t)?e._logger.debug("Remote player of type "+t+" is already registered"):(e._logger.debug("Register remote player of type "+t),e._registry.set(t,n)):e._logger.debug("remote player must be instance of BaseRemotePlayer")}},{key:"load",value:function(t,n){e._registry.forEach(function(r,i){e._logger.debug("Load remote player of type "+i),e._remotePlayers.set(i,new r(t,n))})}},{key:"startCasting",value:function(t){e._logger.debug("Start casting");var n=e._getRemotePlayer(t);return n?n.startCasting():Promise.reject()}},{key:"isCastAvailable",value:function(t){var n=e._getRemotePlayer(t);return!!n&&(e._logger.debug("isCastAvailable: "+n.isCastAvailable()),n.isCastAvailable())}},{key:"_getRemotePlayer",value:function(t){var n=e._remotePlayers;return t&&n.get(t)?n.get(t):n.size>0?Array.from(n.values())[0]:void 0}}]),e}();s._logger=(0,o.default)("RemotePlayerManager"),s._registry=new Map,s._remotePlayers=new Map,t.RemotePlayerManager=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){if(e.isLive()){if(e.isDvr()){return e.duration-e.currentTime<e.config.cast.dvrThreshold||!e.currentTime?-1:e.currentTime}return-1}return!e.isCasting()&&!e.currentTime&&e.config.playback.startTime>-1?e.config.playback.startTime:e.currentTime}function a(e,t){var n=t.getActiveTracks();if(n[e])return n[e].language;try{return t.config.playback[e+"Language"]}catch(e){return null}}Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerSnapshot=void 0;var o=(n(44),n(9)),s=function e(t){r(this,e),this.textStyle=t.textStyle,this.mediaInfo=t.getMediaInfo(),this.advertising=t.config.plugins&&t.config.plugins.ima,this.config=o.Utils.Object.mergeDeep({},t.config,{playback:{startTime:i(t),autoplay:0===t.currentTime||!t.paused,audioLanguage:a(o.TrackType.AUDIO,t),textLanguage:a(o.TrackType.TEXT,t)}})};t.PlayerSnapshot=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="kaltura-player",i={CAST_SESSION_START_FAILED:r+"-castsessionstartfailed",CAST_SESSION_STARTING:r+"-castsessionstarting",CAST_SESSION_STARTED:r+"-castsessionstarted",CAST_SESSION_ENDING:r+"-castsessionending",CAST_SESSION_ENDED:r+"-castsessionended",CAST_AVAILABLE:r+"-castavailable"};t.CastEventType=i},function(e,t,n){"use strict";function r(e,t){e.config.session&&e.config.session.id?a(e,t):i(t)}function i(e){o(e,f.Utils.Generator.guid()+":"+f.Utils.Generator.guid())}function a(e,t){var n=/:((?:[a-z0-9]|-)*)/i,r=n.exec(e.config.session.id);r&&r[1]&&o(t,e.config.session.id.replace(r[1],f.Utils.Generator.guid()))}function o(e,t){e.session=e.session||{},e.session.id=t}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(t){var n=new RegExp(h+"((?:[a-z0-9]|-)*:(?:[a-z0-9]|-)*)","i"),r=n.exec(e.url);if(r&&r[1])e.url=e.url.replace(r[1],t);else{var i=-1===e.url.indexOf("?")?"?":"&";e.url+=i+h+t}}}function l(){var e=void 0;try{e=window.parent.document.URL}catch(t){e=document.referrer}return e}function u(e){if(-1===e.url.indexOf(y)){var t=-1===e.url.indexOf("?")?"?":"&",n=btoa(l().substr(0,1e3));e.url+=t+y+n}}function c(e){if(-1===e.url.indexOf(v)){var t=-1===e.url.indexOf("?")?"?":"&";e.url+=t+v+"0.46.0"}}function p(e,t){r(e,t);var n=t.sources;Object.values(f.StreamType).forEach(function(e){n[e]&&n[e].forEach(function(e){"string"==typeof e.url&&e.url.toLowerCase().indexOf(d)>-1&&!e.localSource&&(s(e,t.session&&t.session.id),u(e),c(e))})})}Object.defineProperty(t,"__esModule",{value:!0}),t.addClientTag=t.addReferrer=t.getReferrer=t.updateSessionIdInUrl=t.handleSessionId=t.addKalturaParams=void 0;var f=n(9),d="playmanifest/",h="playSessionId=",y="referrer=",v="clientTag=html5:v";t.addKalturaParams=p,t.handleSessionId=r,t.updateSessionIdInUrl=s,t.getReferrer=l,t.addReferrer=u,t.addClientTag=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={PLAYLIST_LOADED:"kaltura-player-playlistloaded",PLAYLIST_ITEM_CHANGED:"kaltura-player-playlistitemchanged",PLAYLIST_ENDED:"kaltura-player-playlistended"};t.PlaylistEventType=r},function(e,t,n){e.exports=!n(6)&&!n(3)(function(){return 7!=Object.defineProperty(n(72)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){t.f=n(5)},function(e,t,n){var r=n(12),i=n(16),a=n(55)(!1),o=n(74)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),l=0,u=[];for(n in s)n!=o&&r(s,n)&&u.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~a(u,n)||u.push(n));return u}},function(e,t,n){var r=n(7),i=n(1),a=n(36);e.exports=n(6)?Object.defineProperties:function(e,t){i(e);for(var n,o=a(t),s=o.length,l=0;s>l;)r.f(e,n=o[l++],t[n]);return e}},function(e,t,n){var r=n(16),i=n(39).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return i(e)}catch(e){return o.slice()}};e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?s(e):i(r(e))}},function(e,t,n){"use strict";var r=n(36),i=n(56),a=n(51),o=n(10),s=n(50),l=Object.assign;e.exports=!l||n(3)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=r})?function(e,t){for(var n=o(e),l=arguments.length,u=1,c=i.f,p=a.f;l>u;)for(var f,d=s(arguments[u++]),h=c?r(d).concat(c(d)):r(d),y=h.length,v=0;y>v;)p.call(d,f=h[v++])&&(n[f]=d[f]);return n}:l},function(e,t,n){"use strict";var r=n(11),i=n(4),a=n(110),o=[].slice,s={},l=function(e,t,n){if(!(t in s)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";s[t]=Function("F,a","return new F("+r.join(",")+")")}return s[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=o.call(arguments,1),s=function(){var r=n.concat(o.call(arguments));return this instanceof s?l(t,r.length,r):a(t,r,e)};return i(t.prototype)&&(s.prototype=t.prototype),s}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(2).parseInt,i=n(46).trim,a=n(78),o=/^[-+]?0[xX]/;e.exports=8!==r(a+"08")||22!==r(a+"0x16")?function(e,t){var n=i(String(e),3);return r(n,t>>>0||(o.test(n)?16:10))}:r},function(e,t,n){var r=n(2).parseFloat,i=n(46).trim;e.exports=1/r(n(78)+"-0")!=-1/0?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){var r=n(21);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){var r=n(4),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){var r=n(81),i=Math.pow,a=i(2,-52),o=i(2,-23),s=i(2,127)*(2-o),l=i(2,-126),u=function(e){return e+1/a-1/a};e.exports=Math.fround||function(e){var t,n,i=Math.abs(e),c=r(e);return i<l?c*u(i/l/o)*l*o:(t=(1+o/a)*i,n=t-(t-i),n>s||n!=n?c*(1/0):c*n)}},function(e,t,n){var r=n(1);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&r(a.call(e)),t}}},function(e,t,n){var r=n(11),i=n(10),a=n(50),o=n(8);e.exports=function(e,t,n,s,l){r(t);var u=i(e),c=a(u),p=o(u.length),f=l?p-1:0,d=l?-1:1;if(n<2)for(;;){if(f in c){s=c[f],f+=d;break}if(f+=d,l?f<0:p<=f)throw TypeError("Reduce of empty array with no initial value")}for(;l?f>=0:p>f;f+=d)f in c&&(s=t(s,c[f],f,u));return s}},function(e,t,n){"use strict";var r=n(10),i=n(37),a=n(8);e.exports=[].copyWithin||function(e,t){var n=r(this),o=a(n.length),s=i(e,o),l=i(t,o),u=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===u?o:i(u,o))-l,o-s),p=1;for(l<s&&s<l+c&&(p=-1,l+=c-1,s+=c-1);c-- >0;)l in n?n[s]=n[l]:delete n[s],s+=p,l+=p;return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){n(6)&&"g"!=/./g.flags&&n(7).f(RegExp.prototype,"flags",{configurable:!0,get:n(60)})},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var r=n(1),i=n(4),a=n(96);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(125),i=n(48);e.exports=n(63)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(i(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(i(this,"Map"),0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(7).f,i=n(38),a=n(43),o=n(20),s=n(41),l=n(42),u=n(84),c=n(120),p=n(40),f=n(6),d=n(31).fastKey,h=n(48),y=f?"_s":"size",v=function(e,t){var n,r=d(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,u){var c=e(function(e,r){s(e,c,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[y]=0,void 0!=r&&l(r,n,e[u],e)});return a(c.prototype,{clear:function(){for(var e=h(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[y]=0},delete:function(e){var n=h(this,t),r=v(n,e);if(r){var i=r.n,a=r.p;delete n._i[r.i],r.r=!0,a&&(a.n=i),i&&(i.p=a),n._f==r&&(n._f=i),n._l==r&&(n._l=a),n[y]--}return!!r},forEach:function(e){h(this,t);for(var n,r=o(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!v(h(this,t),e)}}),f&&r(c.prototype,"size",{get:function(){return h(this,t)[y]}}),c},def:function(e,t,n){var r,i,a=v(e,t);return a?a.v=n:(e._l=a={i:i=d(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=a),r&&(r.n=a),e[y]++,"F"!==i&&(e._i[i]=a)),e},getEntry:v,setStrong:function(e,t,n){u(e,t,function(e,n){this._t=h(e,t),this._k=n,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?c(0,n.k):"values"==t?c(0,n.v):c(0,[n.k,n.v]):(e._t=void 0,c(1))},n?"entries":"values",!n,!0),p(t)}}},function(e,t,n){"use strict";var r=n(125),i=n(48);e.exports=n(63)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(i(this,"Set"),e=0===e?0:e,e)}},r)},function(e,t,n){"use strict";var r,i=n(28)(0),a=n(14),o=n(31),s=n(108),l=n(128),u=n(4),c=n(3),p=n(48),f=o.getWeak,d=Object.isExtensible,h=l.ufstore,y={},v=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},g={get:function(e){if(u(e)){var t=f(e);return!0===t?h(p(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return l.def(p(this,"WeakMap"),e,t)}},m=e.exports=n(63)("WeakMap",v,g,l,!0,!0);c(function(){return 7!=(new m).set((Object.freeze||Object)(y),7).get(y)})&&(r=l.getConstructor(v,"WeakMap"),s(r.prototype,g),o.NEED=!0,i(["delete","has","get","set"],function(e){var t=m.prototype,n=t[e];a(t,e,function(t,i){if(u(t)&&!d(t)){this._f||(this._f=new r);var a=this._f[e](t,i);return"set"==e?this:a}return n.call(this,t,i)})}))},function(e,t,n){"use strict";var r=n(43),i=n(31).getWeak,a=n(1),o=n(4),s=n(41),l=n(42),u=n(28),c=n(12),p=n(48),f=u(5),d=u(6),h=0,y=function(e){return e._l||(e._l=new v)},v=function(){this.a=[]},g=function(e,t){return f(e.a,function(e){return e[0]===t})};v.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var n=g(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=d(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,a){var u=e(function(e,r){s(e,u,t,"_i"),e._t=t,e._i=h++,e._l=void 0,void 0!=r&&l(r,n,e[a],e)});return r(u.prototype,{delete:function(e){if(!o(e))return!1;var n=i(e);return!0===n?y(p(this,t)).delete(e):n&&c(n,this._i)&&delete n[this._i]},has:function(e){if(!o(e))return!1;var n=i(e);return!0===n?y(p(this,t)).has(e):n&&c(n,this._i)}}),u},def:function(e,t,n){var r=i(a(t),!0);return!0===r?y(e).set(t,n):r[e._i]=n,e},ufstore:y}},function(e,t,n){var r=n(26),i=n(8);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){var r=n(39),i=n(56),a=n(1),o=n(2).Reflect;e.exports=o&&o.ownKeys||function(e){var t=r.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){"use strict";function r(e,t,n,u,c,p,f,d){for(var h,y,v=c,g=0,m=!!f&&s(f,d,3);g<u;){if(g in n){if(h=m?m(n[g],g,t):n[g],y=!1,a(h)&&(y=h[l],y=void 0!==y?!!y:i(h)),y&&p>0)v=r(e,t,h,o(h.length),v,p-1)-1;else{if(v>=9007199254740991)throw TypeError();e[v]=h}v++}g++}return v}var i=n(57),a=n(4),o=n(8),s=n(20),l=n(5)("isConcatSpreadable");e.exports=r},function(e,t,n){var r=n(8),i=n(80),a=n(25);e.exports=function(e,t,n,o){var s=String(a(e)),l=s.length,u=void 0===n?" ":String(n),c=r(t);if(c<=l||""==u)return s;var p=c-l,f=i.call(u,Math.ceil(p/u.length));return f.length>p&&(f=f.slice(0,p)),o?f+s:s+f}},function(e,t,n){var r=n(36),i=n(16),a=n(51).f;e.exports=function(e){return function(t){for(var n,o=i(t),s=r(o),l=s.length,u=0,c=[];l>u;)a.call(o,n=s[u++])&&c.push(e?[n,o[n]]:o[n]);return c}}},function(e,t,n){var r=n(52),i=n(135);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},function(e,t,n){var r=n(42);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},function(e,t){e.exports=Math.scale||function(e,t,n,r,i){return 0===arguments.length||e!=e||t!=t||n!=n||r!=r||i!=i?NaN:e===1/0||e===-1/0?e:(e-t)*(i-r)/(n-t)+r}},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=50)}([function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map;r(this,e),this._attemptCounter=1,this.headers=t}return i(e,[{key:"getUrl",value:function(e){return e+"/service/"+this.service+(this.action?"/action/"+this.action:"")}},{key:"doHttpRequest",value:function(){var e=this,t=new Promise(function(t,n){e._requestPromise={resolve:t,reject:n}});return this.url||this._requestPromise.reject(new o.default(o.default.Severity.CRITICAL,o.default.Category.NETWORK,o.default.Code.MALFORMED_DATA_URI,{url:this.url})),this._createXHR(),t}},{key:"_createXHR",value:function(){var e=this,t=new XMLHttpRequest;t.onreadystatechange=function(){if(4===t.readyState&&200===t.status)try{var n=JSON.parse(t.responseText);return e.responseHeaders=e._getResponseHeaders(t),e._requestPromise.resolve(n)}catch(n){e._requestPromise.reject(e._createError(t,o.default.Code.BAD_SERVER_RESPONSE,{text:t.responseText}))}},t.open(this.method,this.url,this.retryConfig.async),this.retryConfig.async&&this.retryConfig.timeout&&(t.timeout=this.retryConfig.timeout);var n=performance.now();t.ontimeout=function(){e._handleError(t,o.default.Code.TIMEOUT,{timeout:(performance.now()-n)/1e3,statusText:t.statusText})},t.onerror=t.onabort=function(){e._handleError(t,o.default.Code.HTTP_ERROR,{text:t.responseText,statusText:t.statusText})},this.headers.forEach(function(e,n){t.setRequestHeader(n,e)}),t.send(this.params)}},{key:"_getResponseHeaders",value:function(e){return e.getAllResponseHeaders().split("\n").filter(function(e){return 0===e.toLowerCase().indexOf("x-")})}},{key:"_handleError",value:function(e,t,n){var r=this._createError(e,t,n);if(e.onreadystatechange=function(){},e.onerror=function(){},e.ontimeout=function(){},e.onabort=function(){},!(this.retryConfig.maxAttempts&&this._attemptCounter<this.retryConfig.maxAttempts))return this._requestPromise.reject(r);this._attemptCounter++,this._createXHR()}},{key:"_createError",value:function(e,t,n){return Object.assign(n,{url:this.url,headers:this._getResponseHeaders(e),attempt:this._attemptCounter}),new o.default(o.default.Severity.CRITICAL,o.default.Category.NETWORK,t,n)}}]),e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),a=function(e){return e&&e.__esModule?e:{default:e}}(i),o=n(26),s=n(25),l=n(24),u=function e(t,n,a){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};r(this,e),this.severity=t,this.category=n,this.code=a,this.data=o,(0,i.getLogLevel)("Error")!==i.LogLevel.OFF&&e._logger.error("Category:"+n+" | Code:"+a+" |",o)};u.Severity=o.Severity,u.Category=l.Category,u.Code=s.Code,u._logger=(0,a.default)("Error"),t.default=u},function(e,t,n){"use strict";function r(e){l.setHandler(function(t,n){return e(t,n)})}function i(e){return e?l.get(e):l}function a(e){return i(e).getLevel()}function o(e,t){i(t).setLevel(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.setLogHandler=t.setLogLevel=t.getLogLevel=t.LogLevel=void 0;var s=n(27),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),u={DEBUG:l.DEBUG,INFO:l.INFO,TIME:l.TIME,WARN:l.WARN,ERROR:l.ERROR,OFF:l.OFF};l.useDefaults({defaultLevel:l.ERROR}),t.default=i,t.LogLevel=u,t.getLogLevel=a,t.setLogLevel=o,t.setLogHandler=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function e(t){r(this,e),this.hasError=!1,"KalturaAPIException"===t.objectType?(this.hasError=!0,this.error=new a(t.code,t.message)):t.error&&"KalturaAPIException"===t.error.objectType?(this.hasError=!0,this.error=new a(t.error.code,t.error.message)):this.data=t};t.default=i;var a=function e(t,n){r(this,e),this.code=t,this.message=n}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(10),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(){function e(){r(this,e),this.metadata=new Map,this.sources=new o.default,this.type=e.Type.UNKNOWN}return i(e,[{key:"toJSON",value:function(){return{id:this.id,name:this.name,sources:this.sources.toJSON(),duration:this.duration,dvrStatus:this.dvrStatus,metadata:this.metadata,type:this.type,poster:this.poster,assetReferenceType:this.assetReferenceType}}}]),e}();s.Type={VOD:"Vod",LIVE:"Live",IMAGE:"Image",AUDIO:"Audio",UNKNOWN:"Unknown"},t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.OVPConfiguration=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(23),o={serviceUrl:"https://cdnapisec.kaltura.com/api_v3",cdnUrl:"https://cdnapisec.kaltura.com",serviceParams:{apiVersion:"3.3.0",format:1},useApiCaptions:!0},s=function(){function e(){r(this,e)}return i(e,null,[{key:"set",value:function(e){e&&Object.assign(o,e)}},{key:"get",value:function(){return(0,a.clone)(o)}}]),e}();t.default=s,t.OVPConfiguration=s},,function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t,n,i){r(this,e),this.licenseUrl=t,this.scheme=n,i&&(this.certificate=i)}return i(e,[{key:"toJSON",value:function(){var e={licenseUrl:this.licenseUrl,scheme:this.scheme};return this.certificate&&(e.certificate=this.certificate),e}}]),e}();t.default=a},function(e,t,n){"use strict";function r(e){var t=a.get(e);return!!t&&t.name===i.MP4.name}Object.defineProperty(t,"__esModule",{value:!0});var i=t.MediaFormat={DASH:{name:"dash",mimeType:"application/dash+xml",pathExt:"mpd"},HLS:{name:"hls",mimeType:"application/x-mpegURL",pathExt:"m3u8"},WVM:{name:"wvm",mimeType:"video/wvm",pathExt:"wvm"},MP4:{name:"mp4",mimeType:"video/mp4",pathExt:"mp4"},MP3:{name:"mp3",mimeType:"audio/mpeg",pathExt:"mp3"}},a=t.SupportedStreamFormat=new Map([["mpegdash",i.DASH],["applehttp",i.HLS],["url",i.MP4]]);t.isProgressiveSource=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(7),o=(function(e){e&&e.__esModule}(a),function(){function e(){r(this,e)}return i(e,[{key:"toJSON",value:function(){var e={id:this.id,url:this.url,mimetype:this.mimetype};return this.bandwidth&&(e.bandwidth=this.bandwidth),this.width&&(e.width=this.width),this.height&&(e.height=this.height),this.label&&(e.label=this.label),this.drmData&&this.drmData.length>0&&(e.drmData=[],this.drmData.forEach(function(t){Array.isArray(e.drmData)&&e.drmData.push(t.toJSON())})),e}}]),e}());t.default=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(9),o=(function(e){e&&e.__esModule}(a),n(8)),s=function(){function e(){r(this,e),this.progressive=[],this.dash=[],this.hls=[]}return i(e,[{key:"map",value:function(e,t){if(t)switch(t.name){case o.MediaFormat.MP4.name:this.progressive.push(e);break;case o.MediaFormat.DASH.name:this.dash.push(e);break;case o.MediaFormat.HLS.name:this.hls.push(e)}}},{key:"toJSON",value:function(){var e={progressive:[],dash:[],hls:[]};return this.progressive.forEach(function(t){return e.progressive.push(t.toJSON())}),this.hls.forEach(function(t){return e.hls.push(t.toJSON())}),this.dash.forEach(function(t){return e.dash.push(t.toJSON())}),e}}]),e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(12),s=(r(o),n(1)),l=r(s),u=function(){function e(t){i(this,e),this._loadersResponseMap=new Map,this._loaders=new Map,this._networkRetryConfig=t}return a(e,[{key:"add",value:function(e,t){var n=this,r=new e(t);if(r.isValid()){this._loaders.set(e.id,r);var i=this._multiRequest.requests.length,a=r.requests;this._multiRequest.retryConfig=this._networkRetryConfig,a.forEach(function(e){n._multiRequest.add(e)});var o=Array.from(new Array(a.length),function(e,t){return t+i});this._loadersResponseMap.set(e.id,o)}}},{key:"fetchData",value:function(){var e=this;return new Promise(function(t,n){e._multiRequest.execute().then(function(r){e._multiResponse=r.response,e.prepareData(r.response).success?t(e._loaders):n(new l.default(l.default.Severity.CRITICAL,l.default.Category.NETWORK,l.default.Code.API_RESPONSE_MISMATCH,{headers:r.headers}))},function(e){n(e)})})}},{key:"prepareData",value:function(e){var t=this;return this._loaders.forEach(function(n,r){var i=t._loadersResponseMap.get(r);try{i&&i.length>0&&(n.response=e.results.slice(i[0],i[i.length-1]+1))}catch(e){return{success:!1,error:e}}}),{success:!0,data:this._loaders}}}]),e}();t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.MultiRequestResult=void 0;var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=r(u),p=n(2),f=r(p),d=n(3),h=r(d),y=n(1),v=r(y),g=function(e){function t(){var e,n,r,i;a(this,t);for(var s=arguments.length,l=Array(s),u=0;u<s;u++)l[u]=arguments[u];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),r.requests=[],i=n,o(r,i)}return s(t,e),l(t,[{key:"add",value:function(e){this.requests.push(e);var t={},n={service:e.service,action:e.action};return Object.assign(t,i({},this.requests.length,Object.assign(n,e.params))),Object.assign(t,this.params),this.params=t,this}},{key:"execute",value:function(){var e=this;return new Promise(function(n,r){try{e.params=JSON.stringify(e.params)}catch(n){t._logger.error(""+n.message),r(new v.default(v.default.Severity.CRITICAL,v.default.Category.PROVIDER,v.default.Code.FAILED_PARSING_REQUEST,{error:n,params:e.params}))}e.doHttpRequest().then(function(t){var i=new m(t);i.success?n({headers:e.responseHeaders,response:i}):r(new v.default(v.default.Severity.CRITICAL,v.default.Category.NETWORK,v.default.Code.MULTIREQUEST_API_ERROR,{url:e.url,headers:e.responseHeaders,results:i.results}))},function(e){r(e)})})}}]),t}(c.default);g._logger=(0,f.default)("MultiRequestBuilder"),t.default=g;var m=t.MultiRequestResult=function e(t){var n=this;a(this,e),this.results=[],this.success=!0,(t.result?t.result:t).forEach(function(t){var r=new h.default(t);if(n.results.push(r),r.hasError)return e._logger.error("Service returned an error with error code: "+r.error.code+" and message: "+r.error.message+"."),void(n.success=!1)})};m._logger=(0,f.default)("MultiRequestResult")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function e(t){r(this,e),this.message=t.message,this.code=t.code};t.default=i},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function e(t){r(this,e),this.scheme=t.scheme,this.licenseURL=t.licenseURL,this.certificate=t.certificate};i.Scheme={"drm.PLAYREADY_CENC":"com.microsoft.playready","drm.WIDEVINE_CENC":"com.widevine.alpha","fairplay.FAIRPLAY":"com.apple.fairplay",WIDEVINE_CENC:"com.widevine.alpha",PLAYREADY_CENC:"com.microsoft.playready",FAIRPLAY:"com.apple.fairplay"},t.default=i},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(12),s=r(o),l=n(5),u=r(l),c=function(){function e(){i(this,e)}return a(e,null,[{key:"getMultiRequest",value:function(e,t,n){var r=u.default.get(),i=r.serviceParams;Object.assign(i,{ks:t,clientTag:"html5:v"+e}),n&&Object.assign(i,{partnerId:n});var a=new Map;a.set("Content-Type","application/json");var o=new s.default(a);return o.method="POST",o.service="multirequest",o.url=o.getUrl(r.serviceUrl),o.params=i,o}}]),e}();t.default=c},,function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function e(t){r(this,e),this.id=t.id,this.referenceId=t.referenceId,this.externalSourceType=t.externalSourceType,this.name=t.name,this.description=t.description,this.dataUrl=t.dataUrl,this.type=t.type,this.entryType=t.mediaType,this.flavorParamsIds=t.flavorParamsIds,this.duration=t.duration,this.poster=t.thumbnailUrl,this.dvrStatus=t.dvrStatus,this.tags=t.tags};i.EntryType={AUTOMATIC:{value:-1},EXTERNAL_MEDIA:{value:"externalMedia.externalMedia"},MEDIA_CLIP:{value:1},MIX:{value:2},PLAYLIST:{value:5},DATA:{value:6},LIVE_STREAM:{value:7},LIVE_CHANNEL:{value:8},DOCUMENT:{value:10}},i.MediaType={VIDEO:{value:1},IMAGE:{value:2},AUDIO:{value:5},LIVE_STREAM_FLASH:{value:201},LIVE_STREAM_WINDOWS_MEDIA:{value:202},LIVE_STREAM_REAL_MEDIA:{value:203},LIVE_STREAM_QUICK_TIME:{value:204}},i.EntryStatus={ERROR_IMPORTING:-2,ERROR_CONVERTING:-1,SCAN_FAILURE:"virusScan.ScanFailure",IMPORT:0,INFECTED:"virusScan.Infected",PRECONVERT:1,READY:2,DELETED:3,PENDING:4,MODERATE:5,BLOCKED:6,NO_CONTENT:7},i.EntryModerationStatus={PENDING_MODERATION:1,APPROVED:2,REJECTED:3,FLAGGED_FOR_REVIEW:4,MODERATE:5,AUTO_APPROVED:6},t.default=i},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),a=(function(e){e&&e.__esModule}(i),function e(){r(this,e),this.items=[]});t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(2),s=n(11),l=(r(s),n(1)),u=r(l),c=function(){function e(t,n){i(this,e),this._networkRetryConfig={async:!0,timeout:0,maxAttempts:4},this._partnerId=t.partnerId,this._widgetId=t.widgetId,this._uiConfId=t.uiConfId,this._isAnonymous=!t.ks,this._ks=t.ks||"",this._playerVersion=n,t.log&&t.log.level&&this.LogLevel[t.log.level]&&(0,o.setLogLevel)(this.LogLevel[t.log.level]),t.log&&"function"==typeof t.log.handler&&(0,o.setLogHandler)(t.log.handler)}return a(e,[{key:"partnerId",get:function(){return this._partnerId}},{key:"widgetId",get:function(){return this._widgetId||"_"+this._partnerId}},{key:"uiConfId",get:function(){return this._uiConfId}},{key:"ks",get:function(){return this._ks},set:function(e){this._ks=e}},{key:"playerVersion",get:function(){return this._playerVersion}},{key:"isAnonymous",get:function(){return this._isAnonymous}}]),a(e,[{key:"getMediaConfig",value:function(e){throw new TypeError("getMediaConfig method must be implement by the derived class")}},{key:"_parseDataFromResponse",value:function(e){throw new TypeError("_parseDataFromResponse method must be implement by the derived class")}},{key:"_verifyHasSources",value:function(e){if(0===e.hls.concat(e.dash,e.progressive).length)throw new u.default(u.default.Severity.CRITICAL,u.default.Category.SERVICE,u.default.Code.MISSING_PLAY_SOURCE,{action:"",messages:"No play source for entry id: "+e.id})}},{key:"getLogLevel",value:function(e){return(0,o.getLogLevel)(e)}},{key:"setLogLevel",value:function(e,t){(0,o.setLogLevel)(e,t)}},{key:"LogLevel",get:function(){return o.LogLevel}}]),e}();t.default=c},,function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function e(t){r(this,e),this.type=t.type};i.Type={DRM_POLICY:"drm.DRM_POLICY",BLOCK:1,PREVIEW:2,LIMIT_FLAVORS:3,ADD_TO_STORAGE:4,LIMIT_DELIVERY_PROFILES:5,SERVE_FROM_REMOTE_SERVER:6,REQUEST_HOST_REGEX:7,LIMIT_THUMBNAIL_CAPTURE:8},t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var 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},i=function e(t){var n=void 0;return Array.isArray(t)?(n=t.length>0?t.slice(0):[],n.forEach(function(t,i){("object"===(void 0===t?"undefined":r(t))&&t!=={}||Array.isArray(t)&&t.length>0)&&(n[i]=e(t))})):"object"===(void 0===t?"undefined":r(t))?(n=Object.assign({},t),Object.keys(n).forEach(function(t){("object"===r(n[t])&&n[t]!=={}||Array.isArray(n[t])&&n[t].length>0)&&(n[t]=e(n[t]))})):n=t,n};t.clone=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={NETWORK:1,SERVICE:2,PROVIDER:3};t.Category=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,BAD_SERVER_RESPONSE:1005,MULTIREQUEST_API_ERROR:1006,API_RESPONSE_MISMATCH:1007,ERROR:2e3,BLOCK_ACTION:2001,MISSING_MANDATORY_PARAMS:3e3,MISSING_PLAY_SOURCE:3001};t.Code=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={RECOVERABLE:1,CRITICAL:2};t.Severity=r},function(e,t,n){var r,i;/*!
 * js-logger - http://github.com/jonnyreeves/js-logger
 * Jonny Reeves, http://jonnyreeves.co.uk/
 * js-logger may be freely distributed under the MIT license.
 */
!function(a){"use strict";var o={};o.VERSION="1.4.1";var s,l={},u=function(e,t){return function(){return t.apply(e,arguments)}},c=function(){var e,t,n=arguments,r=n[0];for(t=1;t<n.length;t++)for(e in n[t])e in r||!n[t].hasOwnProperty(e)||(r[e]=n[t][e]);return r},p=function(e,t){return{value:e,name:t}};o.DEBUG=p(1,"DEBUG"),o.INFO=p(2,"INFO"),o.TIME=p(3,"TIME"),o.WARN=p(4,"WARN"),o.ERROR=p(8,"ERROR"),o.OFF=p(99,"OFF");var f=function(e){this.context=e,this.setLevel(e.filterLevel),this.log=this.info};f.prototype={setLevel:function(e){e&&"value"in e&&(this.context.filterLevel=e)},getLevel:function(){return this.context.filterLevel},enabledFor:function(e){var t=this.context.filterLevel;return e.value>=t.value},debug:function(){this.invoke(o.DEBUG,arguments)},info:function(){this.invoke(o.INFO,arguments)},warn:function(){this.invoke(o.WARN,arguments)},error:function(){this.invoke(o.ERROR,arguments)},time:function(e){"string"==typeof e&&e.length>0&&this.invoke(o.TIME,[e,"start"])},timeEnd:function(e){"string"==typeof e&&e.length>0&&this.invoke(o.TIME,[e,"end"])},invoke:function(e,t){s&&this.enabledFor(e)&&s(t,c({level:e},this.context))}};var d=new f({filterLevel:o.OFF});!function(){var e=o;e.enabledFor=u(d,d.enabledFor),e.debug=u(d,d.debug),e.time=u(d,d.time),e.timeEnd=u(d,d.timeEnd),e.info=u(d,d.info),e.warn=u(d,d.warn),e.error=u(d,d.error),e.log=e.info}(),o.setHandler=function(e){s=e},o.setLevel=function(e){d.setLevel(e);for(var t in l)l.hasOwnProperty(t)&&l[t].setLevel(e)},o.getLevel=function(){return d.getLevel()},o.get=function(e){return l[e]||(l[e]=new f(c({name:e},d.context)))},o.createDefaultHandler=function(e){e=e||{},e.formatter=e.formatter||function(e,t){t.name&&e.unshift("["+t.name+"]")};var t={},n=function(e,t){Function.prototype.apply.call(e,console,t)};return"undefined"==typeof console?function(){}:function(r,i){r=Array.prototype.slice.call(r);var a,s=console.log;i.level===o.TIME?(a=(i.name?"["+i.name+"] ":"")+r[0],"start"===r[1]?console.time?console.time(a):t[a]=(new Date).getTime():console.timeEnd?console.timeEnd(a):n(s,[a+": "+((new Date).getTime()-t[a])+"ms"])):(i.level===o.WARN&&console.warn?s=console.warn:i.level===o.ERROR&&console.error?s=console.error:i.level===o.INFO&&console.info?s=console.info:i.level===o.DEBUG&&console.debug&&(s=console.debug),e.formatter(r,i),n(s,r))}},o.useDefaults=function(e){o.setLevel(e&&e.defaultLevel||o.DEBUG),o.setHandler(o.createDefaultHandler(e))},r=o,void 0!==(i="function"==typeof r?r.call(t,n,t,e):r)&&(e.exports=i)}()},,,,,function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e),this.type=t.type||e.Type.INCLUDE_FIELDS,this.fields=t.fields||"id,referenceId,name,description,thumbnailUrl,dataUrl,duration,msDuration,flavorParamsIds,mediaType,type,tags,dvrStatus,externalSourceType"};i.Type={INCLUDE_FIELDS:1,EXCLUDE_FIELDS:2},t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),l=r(s),u=n(18),c=r(u),p=function(e){function t(e){i(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasError||(n.totalCount=e.totalCount,n.totalCount>0&&(n.entries=[],e.objects.map(function(e){return n.entries.push(new c.default(e))}))),n}return o(t,e),t}(l.default);t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),l=r(s),u=n(61),c=r(u),p=function(e){function t(e){i(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasError||(n.totalCount=e.totalCount,n.totalCount>0&&(n.metas=[],e.objects.map(function(e){return n.metas.push(new c.default(e))}))),n}return o(t,e),t}(l.default);t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(3),u=r(l),c=n(13),p=r(c),f=n(36),d=r(f),h=n(58),y=r(h),v=n(22),g=r(v),m=n(59),b=r(m),_=function(e){function t(e){i(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if(n.sources=[],n.actions=[],n.messages=[],n.flavorAssets=[],!n.hasError){var r=e.messages;r&&r.map(function(e){return n.messages.push(new p.default(e))});var o=e.actions;o&&o.map(function(e){e.type===g.default.Type.REQUEST_HOST_REGEX?n.actions.push(new y.default(e)):n.actions.push(new g.default(e))});var s=e.sources;s&&s.map(function(e){return n.sources.push(new d.default(e))});var l=e.flavorAssets;l&&l.map(function(e){return n.flavorAssets.push(new b.default(e))})}return n}return o(t,e),s(t,[{key:"hasBlockAction",value:function(){return void 0!==this.getBlockAction()}},{key:"getBlockAction",value:function(){return this.actions.find(function(e){return e.type===g.default.Type.BLOCK})}},{key:"getErrorMessages",value:function(){return this.messages}},{key:"getRequestHostRegexAction",value:function(){var e=this.actions.find(function(e){return e.type===g.default.Type.REQUEST_HOST_REGEX});if(e instanceof y.default)return e}}]),t}(u.default);t.default=_},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(14),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(){function e(t){var n=this;r(this,e),this.drm=[],this.format=t.format,this.deliveryProfileId=t.deliveryProfileId,this.url=t.url,this.protocols=t.protocols,this.flavorIds=t.flavorIds,t.drm&&t.drm.map(function(e){return n.drm.push(new o.default(e))})}return i(e,[{key:"hasDrmData",value:function(){return this.drm&&this.drm.length>0}},{key:"hasFlavorIds",value:function(){return!!this.flavorIds&&this.flavorIds.length>0}},{key:"getProtocol",value:function(e){var t="";if(this.protocols&&this.protocols.length>0)this.protocols.split(",").forEach(function(n){n===e&&(t=n)});else if("http"===e)return e;return t}}]),e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(16),u=r(l),c=n(0),p=r(c),f=n(32),d=r(f),h=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,null,[{key:"getPlaybackContext",value:function(e,t){var n=new Map,r="{1:result:ks}"===t?"{2:result:objects:0:id}":"{1:result:objects:0:id}";n.set("Content-Type","application/json");var i=new p.default(n);i.service="baseEntry",i.action="getPlaybackContext",i.method="POST",i.url=i.getUrl(e),i.tag="baseEntry-getPlaybackContext";var a={objectType:"KalturaContextDataParams",flavorTags:"all"};return i.params={entryId:r,ks:t,contextDataParams:a},i}},{key:"list",value:function(e,n,r,i){var a=new Map;a.set("Content-Type","application/json");var o=new p.default(a);return o.service="baseEntry",o.action="list",o.method="POST",o.url=o.getUrl(e),o.tag="list",o.params=t.getEntryListReqParams(r,n,i),o}},{key:"getEntryListReqParams",value:function(e,t,n){return{ks:t,filter:n?{redirectFromEntryId:e}:{idEqual:e},responseProfile:new d.default}}}]),t}(u.default);t.default=h},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(2),u=r(l),c=n(5),p=r(c),f=n(57),d=r(f),h=n(53),y=r(h),v=n(55),g=r(v),m=n(51),b=r(m),_=n(54),E=r(_),k=n(20),T=r(k),A=n(4),w=r(A),S=n(52),P=r(S),O=n(1),C=r(O),x=function(e){function t(e,n){i(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r._filterOptionsConfig={redirectFromEntryId:!0},r._logger=(0,u.default)("OVPProvider"),p.default.set(e.env),r._setFilterOptionsConfig(e.filterOptions),r._networkRetryConfig=Object.assign(r._networkRetryConfig,e.networkRetryParameters),r}return o(t,e),s(t,[{key:"getMediaConfig",value:function(e){var t=this;return e.ks&&(this.ks=e.ks,this._isAnonymous=!1),this._dataLoader=new b.default(this.playerVersion,this.partnerId,this.ks,this._networkRetryConfig),new Promise(function(n,r){var i=e.entryId;if(i){var a=t.ks;a||(a="{1:result:ks}",t._dataLoader.add(g.default,{widgetId:t.widgetId}));var o=t._getEntryRedirectFilter(e);return t._dataLoader.add(y.default,{entryId:i,ks:a,redirectFromEntryId:o}),t._dataLoader.fetchData().then(function(e){try{n(t._parseDataFromResponse(e))}catch(e){r(e)}},function(e){r(e)})}r(new C.default(C.default.Severity.CRITICAL,C.default.Category.PROVIDER,C.default.Code.MISSING_MANDATORY_PARAMS,{message:"missing entry id"}))})}},{key:"_getEntryRedirectFilter",value:function(e){return"boolean"==typeof e.redirectFromEntryId?e.redirectFromEntryId:"boolean"!=typeof this._filterOptionsConfig.redirectFromEntryId||this._filterOptionsConfig.redirectFromEntryId}},{key:"_setFilterOptionsConfig",value:function(e){e&&"boolean"==typeof e.redirectFromEntryId&&(this._filterOptionsConfig.redirectFromEntryId=e.redirectFromEntryId)}},{key:"_parseDataFromResponse",value:function(e){this._logger.debug("Data parsing started");var t={session:{isAnonymous:this._isAnonymous,partnerId:this.partnerId},sources:this._getDefaultSourcesObject(),plugins:{}};if(this.uiConfId&&(t.session.uiConfId=this.uiConfId),e){if(e.has(g.default.id)){var n=e.get(g.default.id);n&&n.response&&(t.session.ks=n.response)}else t.session.ks=this.ks;if(e.has(y.default.id)){var r=e.get(y.default.id);if(r&&r.response){var i=r.response;if(d.default.hasBlockAction(i))throw new C.default(C.default.Severity.CRITICAL,C.default.Category.SERVICE,C.default.Code.BLOCK_ACTION,{action:d.default.getBlockAction(i),messages:d.default.getErrorMessages(i)});var a=d.default.getMediaEntry(this.isAnonymous?"":this.ks,this.partnerId,this.uiConfId,i);Object.assign(t.sources,this._getSourcesObject(a)),this._verifyHasSources(t.sources)}}}return this._logger.debug("Data parsing finished",t),t}},{key:"getPlaylistConfig",value:function(e){var t=this;return e.ks&&(this.ks=e.ks,this._isAnonymous=!1),this._dataLoader=new b.default(this.playerVersion,this.partnerId,this.ks,this._networkRetryConfig),new Promise(function(n,r){var i=e.playlistId;if(i){var a=t.ks;a||(a="{1:result:ks}",t._dataLoader.add(g.default,{widgetId:t.widgetId})),t._dataLoader.add(E.default,{playlistId:i,ks:a}),t._dataLoader.fetchData().then(function(e){n(t._parsePlaylistDataFromResponse(e))},function(e){r(e)})}else r({success:!1,data:"Missing mandatory parameter"})})}},{key:"_parsePlaylistDataFromResponse",value:function(e){var t=this;this._logger.debug("Data parsing started");var n=this._getPlaylistObject();if(e&&e.has(E.default.id)){var r=e.get(E.default.id);if(r&&r.response){var i=d.default.getPlaylist(r.response);n.id=i.id,n.poster=i.poster,n.metadata.name=i.name,n.metadata.description=i.description,i.items.forEach(function(e){return n.items.push({sources:t._getSourcesObject(e)})})}}return this._logger.debug("Data parsing finished",n),n}},{key:"getEntryListConfig",value:function(e){var t=this;return e.ks&&(this.ks=e.ks,this._isAnonymous=!1),this._dataLoader=new b.default(this.playerVersion,this.partnerId,this.ks,this._networkRetryConfig),new Promise(function(n,r){var i=e.entries;if(i&&i.length){var a=t.ks;a||(a="{1:result:ks}",t._dataLoader.add(g.default,{widgetId:t.widgetId}));var o=t._getEntryRedirectFilter(e);t._dataLoader.add(P.default,{entries:i,ks:a,redirectFromEntryId:o}),t._dataLoader.fetchData().then(function(e){n(t._parseEntryListDataFromResponse(e))},function(e){r(e)})}else r({success:!1,data:"Missing mandatory parameter"})})}},{key:"_parseEntryListDataFromResponse",value:function(e){var t=this;this._logger.debug("Data parsing started");var n=this._getPlaylistObject();if(e&&e.has(P.default.id)){var r=e.get(P.default.id);r&&r.response&&d.default.getEntryList(r.response).items.forEach(function(e){return n.items.push({sources:t._getSourcesObject(e)})})}return this._logger.debug("Data parsing finished",n),n}},{key:"_getPlaylistObject",value:function(){return{id:"",metadata:{name:"",description:""},poster:"",items:[]}}},{key:"_getDefaultSourcesObject",value:function(){return{hls:[],dash:[],progressive:[],id:"",duration:0,type:w.default.Type.UNKNOWN,poster:"",dvr:!1,vr:null,metadata:{name:"",description:"",tags:""}}}},{key:"_getSourcesObject",value:function(e){var t=this._getDefaultSourcesObject(),n=e.sources.toJSON();return t.hls=n.hls,t.dash=n.dash,t.progressive=n.progressive,t.id=e.id,t.duration=e.duration,t.type=e.type,t.dvr=!!e.dvrStatus,t.poster=e.poster,e.sources.captions&&(t.captions=e.sources.captions),e.metadata&&"string"==typeof e.metadata.tags&&e.metadata.tags.indexOf("360")>-1&&(t.vr={}),Object.assign(t.metadata,e.metadata),t}}]),t}(T.default);t.default=x},,function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),a=(function(e){e&&e.__esModule}(i),function e(){r(this,e),this.items=[]});t.default=a},,,,,,,,function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a={SRT:"1",DFXP:"2",WEBVTT:"3",CAP:"4"},o={3:"vtt",1:"srt"},s=function(){function e(){r(this,e)}return i(e,null,[{key:"createConfig",value:function(e){return e.map(function(e){var t=e.url,n=o[e.format];return[a.DFXP,a.CAP].includes(e.format)&&(t=e.webVttUrl,n=o[a.WEBVTT]),{default:!!e.isDefault,type:n,language:e.languageCode,label:e.label,url:t}})}}]),e}();t.ExternalCaptionsBuilder=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=t.NAME=t.Provider=void 0;var r=n(39),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.Provider=i.default,t.NAME="playkit-js-providers-ovp",t.VERSION="2.20.2"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(11),l=r(s),u=n(16),c=r(u),p=function(e){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments[3];i(this,t);var s=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,o));return s._multiRequest=c.default.getMultiRequest(e,r,n),s}return o(t,e),t}(l.default);t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),s=(r(o),n(5)),l=r(s),u=n(37),c=r(u),p=n(33),f=r(p),d=function(){function e(t){i(this,e),this._response={playlistItems:{entries:[]}},this.requests=this.buildRequests(t),this._entries=t.entries}return a(e,null,[{key:"id",get:function(){return"entry_list"}}]),a(e,[{key:"buildRequests",value:function(e){var t=l.default.get(),n=[];return e.entries.forEach(function(r){n.push(c.default.list(t.serviceUrl,e.ks,r.entryId||r,e.redirectFromEntryId))}),n}},{key:"isValid",value:function(){return!(!this._entries||!this._entries.length)}},{key:"requests",set:function(e){this._requests=e},get:function(){return this._requests}},{key:"response",set:function(e){var t=this,n=void 0;e.forEach(function(e){n=new f.default(e.data),t._response.playlistItems.entries.push(n.entries[0])})},get:function(){return this._response}}]),e}();t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),s=(r(o),n(37)),l=r(s),u=n(63),c=r(u),p=n(5),f=r(p),d=n(35),h=r(d),y=n(34),v=r(y),g=n(33),m=r(g),b=n(18),_=(r(b),function(){function e(t){i(this,e),this._response={},this.requests=this.buildRequests(t),this._entryId=t.entryId}return a(e,null,[{key:"id",get:function(){return"media"}}]),a(e,[{key:"buildRequests",value:function(e){var t=f.default.get(),n=[];return n.push(l.default.list(t.serviceUrl,e.ks,e.entryId,e.redirectFromEntryId)),n.push(l.default.getPlaybackContext(t.serviceUrl,e.ks)),n.push(c.default.list(t.serviceUrl,e.ks,e.entryId)),n}},{key:"isValid",value:function(){return!!this._entryId}},{key:"requests",set:function(e){this._requests=e},get:function(){return this._requests}},{key:"response",set:function(e){var t=new m.default(e[0].data);this._response.entry=t.entries[0],this._response.playBackContextResult=new h.default(e[1].data),this._response.metadataListResult=new v.default(e[2].data)},get:function(){return this._response}}]),e}());t.default=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),s=(r(o),n(64)),l=r(s),u=n(5),c=r(u),p=n(62),f=r(p),d=n(60),h=r(d),y=function(){function e(t){i(this,e),this._response={},this.requests=this.buildRequests(t),this._playlistId=t.playlistId}return a(e,null,[{key:"id",get:function(){return"playlist"}}]),a(e,[{key:"buildRequests",value:function(e){var t=c.default.get(),n=[];return n.push(l.default.get(t.serviceUrl,e.ks,e.playlistId)),n.push(l.default.execute(t.serviceUrl,e.ks,e.playlistId)),n}},{key:"isValid",value:function(){return!!this._playlistId}},{key:"requests",set:function(e){this._requests=e},get:function(){return this._requests}},{key:"response",set:function(e){this._response.playlistData=new f.default(e[0].data),this._response.playlistItems=new h.default(e[1].data)},get:function(){return this._response}}]),e}();t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(65),s=r(o),l=n(5),u=r(l),c=n(0),p=(r(c),function(){function e(t){i(this,e),this._response={},this.requests=this.buildRequests(t),this._widgetId=t.widgetId}return a(e,[{key:"requests",set:function(e){this._requests=e},get:function(){return this._requests}},{key:"response",set:function(e){this._response.ks=e[0].data.ks},get:function(){return this._response.ks}}],[{key:"id",get:function(){return"session"}}]),a(e,[{key:"buildRequests",value:function(e){var t=u.default.get(),n=[];return n.push(s.default.anonymousSession(t.serviceUrl,e.widgetId)),n}},{key:"isValid",value:function(){return!!this._widgetId}}]),e}());t.default=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(5),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(){function e(){r(this,e)}return i(e,null,[{key:"build",value:function(e){var t=o.default.get(),n=t.cdnUrl,r=e.partnerId,i=e.entryId,a=e.ks,s=e.uiConfId,l=e.format,u=e.protocol,c=e.extension,p=e.flavorIds;if(!(n&&r&&i&&l&&u))return"";var f=n;return n.endsWith("/")||(f+="/"),f+="p/"+r+"/sp/"+r+"00/playManifest/entryId/"+i+"/protocol/"+u+"/format/"+l,p?f+="/flavorIds/"+p:s&&(f+="/uiConfId/"+s),""!==a&&(f+="/ks/"+a),""!==c&&(f+="/a."+c),s&&""!==p&&(f+="?uiConfId="+s),f}}]),e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(35),s=(r(o),n(34)),l=(r(s),n(18)),u=r(l),c=n(36),p=(r(c),n(14)),f=r(p),d=n(56),h=r(d),y=n(66),v=r(y),g=n(2),m=r(g),b=n(5),_=r(b),E=n(4),k=r(E),T=n(7),A=r(T),w=n(9),S=r(w),P=n(10),O=r(P),C=n(8),x=n(41),R=r(x),I=n(19),D=r(I),M=n(22),L=(r(M),n(13)),N=(r(L),n(49)),j=function(){function e(){i(this,e)}return a(e,null,[{key:"getMediaEntry",value:function(t,n,r,i){var a=new k.default,o=i.entry,s=i.playBackContextResult,l=i.metadataListResult,u=s.sources;return a.sources=e._getParsedSources(u,t,n,r,o,s),_.default.get().useApiCaptions&&s.data.playbackCaptions&&(a.sources.captions=N.ExternalCaptionsBuilder.createConfig(s.data.playbackCaptions)),e._fillBaseData(a,o,l),a}},{key:"getPlaylist",value:function(t){var n=new R.default,r=t.playlistData,i=t.playlistItems.entries;return n.id=r.id,n.name=r.name,n.description=r.description,n.poster=r.poster,i.forEach(function(t){var r=new k.default;e._fillBaseData(r,t),n.items.push(r)}),n}},{key:"getEntryList",value:function(t){var n=new D.default;return t.playlistItems.entries.forEach(function(t){var r=new k.default;e._fillBaseData(r,t),n.items.push(r)}),n}},{key:"_fillBaseData",value:function(t,n,r){return t.poster=n.poster,t.id=n.id,t.duration=n.duration,t.metadata=e._parseMetadata(r),t.metadata.description=n.description||"",t.metadata.name=n.name||"",t.metadata.tags=n.tags||"",t.type=e._getEntryType(n.entryType,n.type),t.type===k.default.Type.LIVE&&(t.dvrStatus=n.dvrStatus),t}},{key:"_getEntryType",value:function(e,t){var n=k.default.Type.UNKNOWN;switch(e){case u.default.MediaType.IMAGE.value:n=k.default.Type.IMAGE;break;case u.default.MediaType.AUDIO.value:n=k.default.Type.AUDIO;break;default:switch(t){case u.default.EntryType.MEDIA_CLIP.value:n=k.default.Type.VOD;break;case u.default.EntryType.LIVE_STREAM.value:case u.default.EntryType.LIVE_CHANNEL.value:n=k.default.Type.LIVE;break;default:n=k.default.Type.UNKNOWN}}return n}},{key:"_getParsedSources",value:function(t,n,r,i,a,o){var s=new O.default,l=function(t){var l=e._parseAdaptiveSource(t,o,n,r,i,a.id);if(l){var u=C.SupportedStreamFormat.get(t.format);s.map(l,u)}};return a.type===u.default.EntryType.EXTERNAL_MEDIA.value?function(){var e=new S.default;e.mimetype="video/youtube",e.url=a.referenceId,e.id=a.id+"_youtube",s.progressive.push(e)}():t&&t.length>0&&(function(){t.filter(function(e){return!(0,C.isProgressiveSource)(e.format)}).forEach(l)}(),function(){var l=t.find(function(e){return(0,C.isProgressiveSource)(e.format)});s.progressive=e._parseProgressiveSources(l,o,n,r,i,a.id)}()),s}},{key:"_parseAdaptiveSource",value:function(t,n,r,i,a,o){var s=new S.default;if(t){var l="",u=C.SupportedStreamFormat.get(t.format),c=t.getProtocol(e._getBaseProtocol()),p=t.deliveryProfileId,d=t.format,y="";if(u&&(y=u.pathExt,s.mimetype=u.mimeType),t.hasFlavorIds()?(!y&&n.flavorAssets&&n.flavorAssets.length>0&&(y=n.flavorAssets[0].fileExt),l=h.default.build({entryId:o,flavorIds:t.flavorIds,format:d,ks:r,partnerId:i,uiConfId:a,extension:y,protocol:c})):l=t.url,!l){var v="failed to create play url from source, discarding source: ("+o+"_"+p+"), "+d;return e._logger.warn(v),null}if(s.url=e._applyRegexAction(n,l),s.id=o+"_"+p+","+d,t.hasDrmData()){var g=[];t.drm.forEach(function(e){g.push(new A.default(e.licenseURL,f.default.Scheme[e.scheme],e.certificate))}),s.drmData=g}}return s}},{key:"_parseProgressiveSources",value:function(t,n,r,i,a,o){var s=[],l=[];if(t){var u=t.getProtocol(e._getBaseProtocol()),c=t.format,p=t.deliveryProfileId,f=p+","+c;n.flavorAssets.map(function(t){var d=new S.default;d.id=t.id+f,d.mimetype="mp3"===t.fileExt?"audio/mp3":"video/mp4",d.height=t.height,d.width=t.width,d.bandwidth=1024*t.bitrate,d.label=t.label||t.language;var y=h.default.build({entryId:o,flavorIds:t.id,format:c,ks:r,partnerId:i,uiConfId:a,extension:t.fileExt,protocol:u});if(""===y)return e._logger.warn("failed to create play url from source, discarding source: ("+o+"_"+p+"), "+c+"."),null;d.url=e._applyRegexAction(n,y),t.height&&t.width?s.push(d):l.push(d)})}return l.length&&!s.length?l:s}},{key:"_parseMetadata",value:function(e){var t={};return e&&e.metas&&e.metas.length>0&&e.metas.forEach(function(e){var n=void 0,r=new DOMParser;e.xml=e.xml.replace(/\r?\n|\r/g,""),e.xml=e.xml.replace(/>\s*/g,">"),e.xml=e.xml.replace(/>\s*/g,">"),n=r.parseFromString(e.xml,"text/xml");var i=v.default.xmlToJson(n);Object.keys(i.metadata).forEach(function(e){t[e]=i.metadata[e]["#text"]})}),t}},{key:"_getBaseProtocol",value:function(){var e=_.default.get(),t=/^https?:/,n=t.exec(e.cdnUrl),r=n?n[0]:document.location.protocol;return"string"==typeof r?r.slice(0,-1):"https"}},{key:"hasBlockAction",value:function(e){return e.playBackContextResult.hasBlockAction()}},{key:"getBlockAction",value:function(e){return e.playBackContextResult.getBlockAction()}},{key:"getErrorMessages",value:function(e){return e.playBackContextResult.getErrorMessages()}},{key:"_applyRegexAction",value:function(e,t){var n=e.getRequestHostRegexAction();if(n){var r=new RegExp(n.pattern,"i");if(t.match(r))return t.replace(r,n.replacement+"/")}return t}}]),e}();j._logger=(0,m.default)("OVPProviderParser"),t.default=j},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(22),s=function(e){return e&&e.__esModule?e:{default:e}}(o),l=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.pattern=e.pattern,n.replacement=e.replacement,n.replacmenServerNodeId=e.replacmenServerNodeId,n}return a(t,e),t}(s.default);t.default=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function e(t){r(this,e),this.id=t.id,this.flavorParamsId=t.flavorParamsId,this.fileExt=t.fileExt,this.bitrate=t.bitrate,this.width=t.width,this.height=t.height,this.id=t.id,this.frameRate=t.frameRate,this.isOriginal=t.isOriginal,this.isWeb=t.isWeb,this.containerFormat=t.containerFormat,this.videoCodecId=t.videoCodecId,this.status=t.status,this.language=t.language,this.label=t.label};i.Status={ERROR:-1,QUEUED:0,CONVERTING:1,READY:2,DELETED:3,NOT_APPLICABLE:4,TEMP:5,WAIT_FOR_CONVERT:6,IMPORTING:7,VALIDATING:8,EXPORTING:9},t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),l=r(s),u=n(18),c=r(u),p=function(e){function t(e){i(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hasError||(n.entries=[],e.map(function(e){return n.entries.push(new c.default(e))})),n}return o(t,e),t}(l.default);t.default=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function e(t){r(this,e),this.id=t.id,this.metadataProfileId=t.metadataProfileId,this.metadataProfileVersion=t.metadataProfileVersion,this.metadataProfileId=t.metadataProfileId,this.metadataObjectType=t.metadataObjectType,this.objectId=t.objectId,this.version=t.version,this.created=new Date(0),this.created.setUTCSeconds(t.createdAt),this.updated=new Date(0),this.updated.setUTCSeconds(t.updatedAt),this.status=t.status,this.xml=t.xml};i.ObjectType={AD_CUE_POINT:"adCuePointMetadata.AdCuePoint",ANNOTATION:"annotationMetadata.Annotation",CODE_CUE_POINT:"codeCuePointMetadata.CodeCuePoint",THUMB_CUE_POINT:"thumbCuePointMetadata.thumbCuePoint",ENTRY:1,CATEGORY:2,USER:3,PARTNER:4,DYNAMIC_OBJECT:5},i.Status={VALID:1,INVALID:2,DELETED:3},t.default=i},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function e(t){r(this,e),this.id=t.id,this.name=t.name,this.description=t.description,this.poster=t.thumbnailUrl};t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(16),u=r(l),c=n(0),p=r(c),f=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,null,[{key:"list",value:function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new p.default(r);i.service="metadata_metadata",i.action="list",i.method="POST",i.url=i.getUrl(e),i.tag="metadata_metadata-list";var a={objectType:"KalturaMetadataFilter",objectIdEqual:n,metadataObjectTypeEqual:"1"};return i.params={filter:a,ks:t},i}}]),t}(u.default);t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(16),u=r(l),c=n(0),p=r(c),f=n(32),d=r(f),h=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,null,[{key:"execute",value:function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new p.default(r);return i.service="playlist",i.action="execute",i.method="POST",i.url=i.getUrl(e),i.tag="playlist-execute",i.params={ks:t,id:n,responseProfile:new d.default},i}},{key:"get",value:function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new p.default(r);return i.service="playlist",i.action="get",i.method="POST",i.url=i.getUrl(e),i.tag="playlist-get",i.params={ks:t,id:n,responseProfile:{fields:"id,name,description,thumbnailUrl",type:1}},i}}]),t}(u.default);t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(16),u=r(l),c=n(0),p=r(c),f=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,null,[{key:"anonymousSession",value:function(e,t){var n=new Map;n.set("Content-Type","application/json");var r=new p.default(n);return r.service="session",r.action="startWidgetSession",r.method="POST",r.url=r.getUrl(e),r.tag="session-startWidget",r.params={widgetId:t},r}}]),t}(u.default);t.default=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){r(this,e)}return i(e,null,[{key:"xmlToJson",value:function(e){var t={};if(1===e.nodeType){if(e.attributes.length>0){t["@attributes"]={};for(var n=0;n<e.attributes.length;n++){var r=e.attributes.item(n);t["@attributes"][r.nodeName]=r.nodeValue}}}else 3===e.nodeType&&(t=e.nodeValue);if(e.hasChildNodes())for(var i=0;i<e.childNodes.length;i++){var a=e.childNodes.item(i),o=a.nodeName;if(void 0===t[o])t[o]=this.xmlToJson(a);else{if(void 0===t[o].push){var s=t[o];t[o]=[],t[o].push(s)}t[o].push(this.xmlToJson(a))}}return t}}]),e}();t.default=a}])})},function(e,t,n){(function(e){!function(){var n="undefined"!=typeof window?window:e,r={};(function(e,t){function n(){n=function(){},mp.Symbol||(mp.Symbol=bp)}function r(){n();var e=mp.Symbol.iterator;e||(e=mp.Symbol.iterator=mp.Symbol("iterator")),"function"!=typeof Array.prototype[e]&&gp(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return i(this)}}),r=function(){}}function i(e){var t=0;return a(function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}})}function a(e){return r(),e={next:e},e[mp.Symbol.iterator]=function(){return this},e}function o(e){r();var t=e[Symbol.iterator];return t?t.call(e):i(e)}function s(e,t){if(t){for(var n=mp,r=e.split("."),i=0;i<r.length-1;i++){var a=r[i];a in n||(n[a]={}),n=n[a]}r=r[r.length-1],i=n[r],a=t(i),a!=i&&null!=a&&gp(n,r,{configurable:!0,writable:!0,value:a})}}function l(e){function t(t){return e.next(t)}function n(t){return e.throw(t)}return new Promise(function(r,i){function a(e){e.done?r(e.value):Promise.resolve(e.value).then(t,n).then(a,i)}a(e.next())})}function u(e){return l(e())}function c(){this.g=!1,this.c=null,this.o=void 0,this.j=1,this.b=this.f=0,this.i=this.a=null}function p(e){if(e.g)throw new TypeError("Generator is already running");e.g=!0}function f(e,t){e.a={yd:t,Gd:!0},e.j=e.f||e.b}function d(e,t,n){return e.j=n,{value:t}}function h(e){e.j=0}function y(e,t,n){e.f=t,void 0!=n&&(e.b=n)}function v(e,t){e.f=0,e.b=t||0}function g(e,t){e.j=t,e.f=0}function m(e){e.f=0;var t=e.a.yd;return e.a=null,t}function b(e){e.i=[e.a],e.f=0,e.b=0}function _(e,t){var n=e.i.splice(0)[0];(n=e.a=e.a||n)?n.Gd?e.j=e.f||e.b:void 0!=n.A&&e.b<n.A?(e.j=n.A,e.a=null):e.j=e.b:e.j=t}function E(e){this.a=new c,this.b=e}function k(e,t){p(e.a);var n=e.a.c;return n?T(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.a.return):(e.a.return(t),A(e))}function T(e,t,n,r){try{var i=t.call(e.a.c,n);if(!(i instanceof Object))throw new TypeError("Iterator result "+i+" is not an object");if(!i.done)return e.a.g=!1,i;var a=i.value}catch(t){return e.a.c=null,f(e.a,t),A(e)}return e.a.c=null,r.call(e.a,a),A(e)}function A(e){for(;e.a.j;)try{var t=e.b(e.a);if(t)return e.a.g=!1,{value:t.value,done:!1}}catch(t){e.a.o=void 0,f(e.a,t)}if(e.a.g=!1,e.a.a){if(t=e.a.a,e.a.a=null,t.Gd)throw t.yd;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function w(e){this.next=function(t){return p(e.a),e.a.c?t=T(e,e.a.c.next,t,e.a.h):(e.a.h(t),t=A(e)),t},this.throw=function(t){return p(e.a),e.a.c?t=T(e,e.a.c.throw,t,e.a.h):(f(e.a,t),t=A(e)),t},this.return=function(t){return k(e,t)},r(),this[Symbol.iterator]=function(){return this}}function S(e,t){return w.prototype=e.prototype,new w(new E(t))}function P(e){if(!(e instanceof Array)){e=o(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function C(e,t,n){e instanceof String&&(e=String(e));for(var r=e.length,i=0;i<r;i++){var a=e[i];if(t.call(n,a,i,e))return{Cd:i,ie:a}}return{Cd:-1,ie:void 0}}function x(e,t){r(),e instanceof String&&(e+="");var n=0,i={next:function(){if(n<e.length){var r=n++;return{value:t(r,e[r]),done:!1}}return i.next=function(){return{done:!0,value:void 0}},i.next()}};return i[Symbol.iterator]=function(){return i},i}function R(e,t,n){if(null==e)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}function I(e,t){var n=e.split("."),r=Sp;n[0]in r||!r.execScript||r.execScript("var "+n[0]);for(var i;n.length&&(i=n.shift());)n.length||void 0===t?r=r[i]?r[i]:r[i]={}:r[i]=t}function D(e,t){function n(){}n.prototype=t.prototype,e.ag=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.og=function(e,n,r){return t.prototype[n].apply(e,Array.prototype.slice.call(arguments,2))}}function M(e){this.c=Math.exp(Math.log(.5)/e),this.b=this.a=0}function L(e,t,n){var r=Math.pow(e.c,t);n=n*(1-r)+r*e.a,isNaN(n)||(e.a=n,e.b+=t)}function N(e){return e.a/(1-Math.pow(e.c,e.b))}function j(){this.b=new M(2),this.c=new M(5),this.a=0}function U(){}function F(){}function B(){}function V(e){var t;e instanceof V?(G(this,e.va),this.$a=e.$a,this.ra=e.ra,H(this,e.xb),this.ia=e.ia,K(this,e.a.clone()),this.Qa=e.Qa):e&&(t=String(e).match(Pp))?(G(this,t[1]||"",!0),this.$a=z(t[2]||""),this.ra=z(t[3]||"",!0),H(this,t[4]),this.ia=z(t[5]||"",!0),K(this,t[6]||"",!0),this.Qa=z(t[7]||"")):this.a=new q(null)}function G(e,t,n){e.va=n?z(t,!0):t,e.va&&(e.va=e.va.replace(/:$/,""))}function H(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.xb=t}else e.xb=null}function K(e,t,n){t instanceof q?e.a=t:(n||(t=Y(t,Rp)),e.a=new q(t))}function z(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function Y(e,t,n){return"string"==typeof e?(e=encodeURI(e).replace(t,W),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function W(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(15&e).toString(16)}function q(e){this.a=e||null}function X(e){this.b=e,this.a=null}function J(e){this.b=e,this.a=null}function Q(e,t){var n=Z();this.i=null==e.maxAttempts?n.maxAttempts:e.maxAttempts,this.f=null==e.baseDelay?n.baseDelay:e.baseDelay,this.h=null==e.fuzzFactor?n.fuzzFactor:e.fuzzFactor,this.g=null==e.backoffFactor?n.backoffFactor:e.backoffFactor,this.a=0,this.b=this.f,(this.c=void 0!==t&&t)&&(this.a=1)}function $(e){return u(function t(){var n,r;return S(t,function(t){switch(t.j){case 1:if(e.a>=e.i){if(!e.c)return t.return(Promise.reject());e.a=1,e.b=e.f}return n=e.a,(e.a++,0==n)?t.return():(r=e.b*(1+(2*Math.random()-1)*e.h),d(t,new Promise(function(e){new J(e).O(r/1e3)}),2));case 2:e.b*=e.g,h(t)}})})}function Z(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0}}function ee(e,t,n,r){for(var i=[],a=3;a<arguments.length;++a)i[a-3]=arguments[a];this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1}function te(){var e,t,n=new Promise(function(n,r){e=n,t=r});return n.resolve=e,n.reject=t,n}function ne(e,t){this.promise=e,this.Jd=t,this.a=!1}function re(e){return new ne(Promise.reject(e),function(){return Promise.resolve()})}function ie(){var e=Promise.reject(new ee(2,7,7001));return e.catch(function(){}),new ne(e,function(){return Promise.resolve()})}function ae(e){return new ne(Promise.resolve(e),function(){return Promise.resolve()})}function oe(e){return new ne(e,function(){return e.catch(function(){})})}function se(e){return new ne(Promise.all(e.map(function(e){return e.promise})),function(){return Promise.all(e.map(function(e){return e.abort()}))})}function le(e,t,n){try{var r=e(t);return r&&r.promise&&r.abort?(n.resolve(r.promise),function(){return r.abort()}):(n.resolve(r),function(){return Promise.resolve(r).then(function(){}).catch(function(){})})}catch(e){return n.reject(e),function(){return Promise.resolve()}}}function ue(t,n){n=void 0===n?{}:n;for(var r in n)this[r]=n[r];this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=e.performance&&e.performance.now?e.performance.now():Date.now(),this.type=t,this.isTrusted=!1,this.target=this.currentTarget=null,this.a=!1}function ce(){this.a={}}function pe(){this.Bc=new ce,this.Vb=this}function fe(e){function t(e){switch(typeof e){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return e;default:if(!e||e.buffer&&e.buffer.constructor==ArrayBuffer)return e;if(n.has(e))return null;var r=e.constructor==Array;if(e.constructor!=Object&&!r)return null;n.add(e);var i,a=r?[]:{};for(i in e)a[i]=t(e[i]);return r&&(a.length=e.length),a}}var n=new Set;return t(e)}function de(e,t){return!("number"!=typeof e||"number"!=typeof t||!isNaN(e)||!isNaN(t))||e===t}function he(e,t){var n=e.indexOf(t);-1<n&&e.splice(n,1)}function ye(e,t){var n=0;return e.forEach(function(e){n+=t(e)?1:0}),n}function ve(e,t,n){if(n||(n=de),e.length!=t.length)return!1;t=t.slice();var r={};e=o(e);for(var i=e.next();!i.done;r={item:r.item},i=e.next()){if(r.item=i.value,-1==(i=t.findIndex(function(e){return function(t){return n(e.item,t)}}(r))))return!1;t[i]=t[t.length-1],t.pop()}return 0==t.length}function ge(){this.a=[]}function me(e,t){e.a.push(t.finally(function(){he(e.a,t)}))}function be(e){pe.call(this),this.f=!1,this.g=new ge,this.a=new Set,this.b=new Set,this.c=e||null}function _e(e,t,n){n=n||3;var r=Mp[e];(!r||n>=r.priority)&&(Mp[e]={priority:n,zf:t})}function Ee(e,t){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null}}function ke(e,t,n){var r=ae(void 0),i={};e=o(e.a);for(var a=e.next();!a.done;i={fd:i.fd},a=e.next())i.fd=a.value,r=r.U(function(e){return function(){return e.fd(t,n)}}(i));return r.U(void 0,function(e){if(e&&7001==e.code)throw e;throw new ee(2,1,1006,e)})}function Te(e,t,n,r,i,a,o){var s=new V(n.uris[i]),l=s.va,u=!1;l||(l=location.protocol,l=l.slice(0,-1),G(s,l),n.uris[i]=s.toString());var c=(l=Mp[l])?l.zf:null;if(!c)return re(new ee(2,1,1e3,s));var p;return oe($(r)).U(function(){return e.f?ie():(p=Date.now(),c(n.uris[i],n,t,function(n,r,i){e.c&&1==t&&(e.c(n,r),u=!0,o.a=i)}))}).U(function(e){return void 0==e.timeMs&&(e.timeMs=Date.now()-p),{response:e,Ze:u}},function(s){if(s&&7001==s.code)throw s;if(e.f)return ie();if(s&&1==s.severity)return e.dispatchEvent(new ue("retry",{error:s instanceof ee?s:null})),i=(i+1)%n.uris.length,Te(e,t,n,r,i,s,o);throw s||a})}function Ae(e,t,n){var r=ae(void 0);e=o(e.b);for(var i=e.next();!i.done;i=e.next())r=r.U(i.value.bind(null,t,n.response));return r.U(function(){return n},function(e){if(e&&7001==e.code)throw e;var t=2;throw e instanceof ee&&(t=e.severity),new ee(t,1,1007,e)})}function we(){this.a=0}function Se(e,t,n){ne.call(this,e,t),this.b=n}function Pe(){}function Oe(){this.a=new ce}function Ce(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.a=xe(e,r),this.target.addEventListener(t,n,this.a)}function xe(e,t){if(void 0==t)return!1;if("boolean"==typeof t)return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter(function(e){return!n.has(e)}),Re(e)?t:t.capture||!1}function Re(e){var t=Up;if(void 0==t){t=!1;try{var n={},r={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",r),Object.defineProperty(n,"capture",r),r=function(){},e.addEventListener("test",r,n),e.removeEventListener("test",r,n)}catch(e){t=!1}Up=t}return t||!1}function Ie(e){if(e=new Uint8Array(e),new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");return e=Ye(e.subarray(4),!0),new V(e).ra}function De(e,t,n){function r(e){new DataView(a.buffer).setUint32(o,e.byteLength,!0),o+=4,i(e)}function i(e){a.set(e,o),o+=e.byteLength}if(!n||!n.byteLength)throw new ee(2,6,6015);t="string"==typeof t?new Uint8Array(Xe(t,!0)):new Uint8Array(t);var a=new Uint8Array(8+e.byteLength+t.byteLength+n.byteLength),o=0;return i(new Uint8Array(e)),r(t),r(new Uint8Array(n)),a}function Me(e,t){for(var n=[],r=o(e),i=r.next();!i.done;i=r.next())n.push(t(i.value));return n}function Le(e,t){for(var n=o(e),r=n.next();!r.done;r=n.next())if(!t(r.value))return!1;return!0}function Ne(e){var t=new Map;return Object.keys(e).forEach(function(n){t.set(n,e[n])}),t}function je(e){var t={};return e.forEach(function(e,n){t[n]=e}),t}function Ue(e,t){var n=e;return t&&(n+='; codecs="'+t+'"'),n}function Fe(e){var t=[e.mimeType];return Fp.forEach(function(n,r){var i=e[r];i&&t.push(n+'="'+i+'"')}),t.join(";")}function Be(e){e=e.split(".");var t=e[0];return e.pop(),[t,e.join(".")]}function Ve(){return!(!e.MediaSource||!MediaSource.isTypeSupported)}function Ge(e){return""!=Ke().canPlayType(e)}function He(e){return(navigator.userAgent||"").includes(e)}function Ke(){return Vp||(Bp||(Bp=new J(function(){Vp=null})),(Vp=document.querySelector("video")||document.querySelector("audio"))||(Vp=document.createElement("video")),Bp.O(1),Vp)}function ze(e){if(!e)return"";e=new Uint8Array(e),239==e[0]&&187==e[1]&&191==e[2]&&(e=e.subarray(3)),e=Je(e),e=escape(e);try{return decodeURIComponent(e)}catch(e){throw new ee(2,2,2004)}}function Ye(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw new ee(2,2,2004);if(e instanceof ArrayBuffer)var r=e;else n=new Uint8Array(e.byteLength),n.set(new Uint8Array(e)),r=n.buffer;e=Math.floor(e.byteLength/2),n=new Uint16Array(e),r=new DataView(r);for(var i=0;i<e;i++)n[i]=r.getUint16(2*i,t);return Je(n)}function We(e){var t=new Uint8Array(e);if(239==t[0]&&187==t[1]&&191==t[2])return ze(t);if(254==t[0]&&255==t[1])return Ye(t.subarray(2),!1);if(255==t[0]&&254==t[1])return Ye(t.subarray(2),!0);var n=function(e,t){return e.byteLength<=t||32<=e[t]&&126>=e[t]}.bind(null,t);if(0==t[0]&&0==t[2])return Ye(e,!1);if(0==t[1]&&0==t[3])return Ye(e,!0);if(n(0)&&n(1)&&n(2)&&n(3))return ze(e);throw new ee(2,2,2003)}function qe(e){e=encodeURIComponent(e),e=unescape(e);for(var t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t.buffer}function Xe(e,t){for(var n=new Uint8Array(2*e.length),r=new DataView(n.buffer),i=0;i<e.length;++i)r.setUint16(2*i,e.charCodeAt(i),t);return n.buffer}function Je(e){if(!Gp)for(var t={size:65536};0<t.size;t={size:t.size},t.size/=2)if(function(e){try{return P(new Uint8Array(e)),!0}catch(e){return!1}}(t.size)){Gp=function(e){return function(t){for(var n="",r=0;r<t.length;r+=e.size)n+=String.fromCharCode.apply(String,P(t.subarray(r,r+e.size)));return n}}(t);break}return Gp(e)}function Qe(t,n){var r=Je(t);return n=void 0==n||n,r=e.btoa(r).replace(/\+/g,"-").replace(/\//g,"_"),n?r:r.replace(/=*$/,"")}function $e(t){t=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));for(var n=new Uint8Array(t.length),r=0;r<t.length;++r)n[r]=t.charCodeAt(r);return n}function Ze(t){for(var n=new Uint8Array(t.length/2),r=0;r<t.length;r+=2)n[r/2]=e.parseInt(t.substr(r,2),16);return n}function et(e){for(var t="",n=0;n<e.length;++n){var r=e[n].toString(16);1==r.length&&(r="0"+r),t+=r}return t}function tt(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!=t.length)return!1;for(var n=0;n<e.length;++n)if(e[n]!=t[n])return!1;return!0}function nt(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];for(var r=n=0;r<t.length;++r)n+=t[r].length;n=new Uint8Array(n);for(var i=r=0;i<t.length;++i)n.set(t[i],r),r+=t[i].length;return n}function rt(e){var t=this;this.C=e,this.v=new Set,this.m=this.h=null,this.P=!1,this.a=null,this.i=new Oe,this.b=new Map,this.s=[],this.l=new te,this.c=null,this.g=function(n){t.l.reject(n),e.onError(n)},this.na=new Map,this.T=new Map,this.M=new J(function(){return At(t)}),this.f=!1,this.$=new te,this.D=!1,this.G=[],this.ma=!1,this.W=new J(function(){Ot(t)}).La(1),this.l.catch(function(){})}function it(e){return u(function t(){var n;return S(t,function(t){switch(t.j){case 1:return e.i.release(),e.i=null,e.l.reject(),e.W.stop(),e.W=null,e.M.stop(),e.M=null,n=Array.from(e.b.keys()),e.b.clear(),d(t,Promise.all(n.map(function(e){return Promise.resolve().then(function(){return u(function t(){return S(t,function(t){switch(t.j){case 1:return y(t,2),d(t,Dt(e),4);case 4:g(t,0);break;case 2:m(t),h(t)}})})})})),2);case 2:if(!e.m){t.A(3);break}return y(t,4),d(t,e.m.setMediaKeys(null),6);case 6:g(t,5);break;case 4:m(t);case 5:e.m=null;case 3:e.a=null,e.v.clear(),e.h=null,e.s=[],e.c=null,e.g=null,e.C=null,h(t)}})})}function at(e,t,n){return e.s=[],e.D=n,lt(e,t)}function ot(e,t,n){return e.s=n,e.D=0<n.length,lt(e,t)}function st(e,t,n,r,i,a){var o=new Map;return o.set(t,{audioCapabilities:i,videoCapabilities:a,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:t,drmInfos:[{keySystem:t,licenseServerUri:n,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:r,initData:null,keyIds:null}]}),vt(e,o)}function lt(e,t){var n=t.some(function(e){return 0<e.drmInfos.length});if(!n){var r=Ne(e.c.servers);xt(t,r)}var i=gt(e);if(i){var a=o(t);for(r=a.next();!r.done;r=a.next())r.value.drmInfos=[i]}for(i=o(t),r=i.next();!r.done;r=i.next())for(r=o(r.value.drmInfos),a=r.next();!a.done;a=r.next())It(a.value,Ne(e.c.servers),Ne(e.c.advanced||{}));return r=yt(e,t),r.size?(r=vt(e,r),n?r:r.catch(function(){})):(e.P=!0,Promise.resolve())}function ut(e){return u(function t(){var n;return S(t,function(t){switch(t.j){case 1:if(!(e.h&&e.a&&e.a.serverCertificate&&e.a.serverCertificate.length)){t.A(0);break}return y(t,3),d(t,e.h.setServerCertificate(e.a.serverCertificate),5);case 5:g(t,0);break;case 3:return n=m(t),t.return(Promise.reject(new ee(2,6,6004,n.message)))}})})}function ct(e,t){return u(function n(){var r,i,a;return S(n,function(n){switch(n.j){case 1:return d(n,mt(e,t),2);case 2:return(r=n.o)?(i=[],(a=e.b.get(r))&&(a.xa=new te,i.push(a.xa)),i.push(r.remove()),d(n,Promise.all(i),0)):n.return()}})})}function pt(e){var t=e.a?e.a.initData:[];return t.forEach(function(t){return bt(e,t.initDataType,t.initData)}),e.s.forEach(function(t){return mt(e,t)}),t.length||e.s.length||e.l.resolve(),e.l}function ft(e,t,n){var r=e.b.values();r=o(r);for(var i=r.next();!i.done;i=r.next())if(tt(n,i.value.initData))return;bt(e,t,n)}function dt(e,t){return!!He("Edge/")||e.v.has(t)}function ht(e){return e=e.b.keys(),e=Me(e,function(e){return e.sessionId}),Array.from(e)}function yt(e,t){for(var n=new Set,r=o(t),i=r.next();!i.done;i=r.next()){var a=o(i.value.drmInfos);for(i=a.next();!i.done;i=a.next())n.add(i.value)}for(r=o(n),i=r.next();!i.done;i=r.next())It(i.value,Ne(e.c.servers),Ne(e.c.advanced||{}));a=e.D?"required":"optional";var s=e.D?["persistent-license"]:["temporary"];for(r=new Map,n=o(n),i=n.next();!i.done;i=n.next())i=i.value,r.set(i.keySystem,{audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:a,sessionTypes:s,label:i.keySystem,drmInfos:[]});for(n=o(t),i=n.next();!i.done;i=n.next()){i=i.value,a=i.audio,s=i.video;var l=a?Ue(a.mimeType,a.codecs):"",u=s?Ue(s.mimeType,s.codecs):"",c=o(i.drmInfos);for(i=c.next();!i.done;i=c.next()){i=i.value;var p=r.get(i.keySystem);p.drmInfos.push(i),i.distinctiveIdentifierRequired&&(p.distinctiveIdentifier="required"),i.persistentStateRequired&&(p.persistentState="required"),a&&p.audioCapabilities.push({robustness:i.audioRobustness||"",contentType:l}),s&&p.videoCapabilities.push({robustness:i.videoRobustness||"",contentType:u})}}return r}function vt(e,t){if(1==t.size&&t.has(""))return Promise.reject(new ee(2,6,6e3));for(var n=o(t.values()),r=n.next();!r.done;r=n.next())r=r.value,0==r.audioCapabilities.length&&delete r.audioCapabilities,0==r.videoCapabilities.length&&delete r.videoCapabilities;var i=n=new te;return[!0,!1].forEach(function(e){var n=this;t.forEach(function(t,r){t.drmInfos.some(function(e){return!!e.licenseServerUri})==e&&(i=i.catch(function(){if(!this.f)return navigator.requestMediaKeySystemAccess(r,[t])}.bind(n)))})}.bind(e)),i=i.catch(function(){return Promise.reject(new ee(2,6,6001))}),i=i.then(function(e){if(this.f)return Promise.reject();this.v.clear();var n=e.getConfiguration(),r=n.videoCapabilities||[],i=o(n.audioCapabilities||[]);for(n=i.next();!n.done;n=i.next())this.v.add(n.value.contentType);for(r=o(r),n=r.next();!n.done;n=r.next())this.v.add(n.value.contentType);r=e.keySystem,n=t.get(e.keySystem),i=[];var a=[],s=[],l=[];return Rt(n.drmInfos,i,a,s,l),this.a={keySystem:r,licenseServerUri:i[0],distinctiveIdentifierRequired:"required"==n.distinctiveIdentifier,persistentStateRequired:"required"==n.persistentState,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:"",serverCertificate:a[0],initData:s,keyIds:l},this.a.licenseServerUri?e.createMediaKeys():Promise.reject(new ee(2,6,6012,this.a.keySystem))}.bind(e)).then(function(e){if(this.f)return Promise.reject();this.h=e,this.P=!0}.bind(e)).catch(function(e){if(!this.f)return this.a=null,this.v.clear(),e instanceof ee?Promise.reject(e):Promise.reject(new ee(2,6,6002,e.message))}.bind(e)),n.reject(),i}function gt(t){if(t=Ne(t.c.clearKeys),0==t.size)return null;var n=[],r=[];t.forEach(function(e,t){var i=Ze(t),a=Ze(e);i={kty:"oct",kid:Qe(i,!1),k:Qe(a,!1)},n.push(i),r.push(i.kid)}),t=JSON.stringify({keys:n});var i=JSON.stringify({kids:r});return i=[{initData:new Uint8Array(qe(i)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+e.btoa(t),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:i,keyIds:[]}}function mt(e,t){try{var n=e.h.createSession("persistent-license")}catch(t){var r=new ee(2,6,6005,t.message);return e.g(r),Promise.reject(r)}e.i.w(n,"message",e.Rd.bind(e)),e.i.w(n,"keystatuseschange",e.Pd.bind(e));var i={initData:null,loaded:!1,Yc:1/0,xa:null};return e.b.set(n,i),n.load(t).then(function(e){return this.f?Promise.reject():e?(i.loaded=!0,Ct(this)&&this.l.resolve(),n):(this.b.delete(n),void this.g(new ee(2,6,6013)))}.bind(e),function(e){this.f||(this.b.delete(n),this.g(new ee(2,6,6005,e.message)))}.bind(e))}function bt(e,t,n){try{var r=e.D?e.h.createSession("persistent-license"):e.h.createSession()}catch(t){return void e.g(new ee(2,6,6005,t.message))}e.i.w(r,"message",e.Rd.bind(e)),e.i.w(r,"keystatuseschange",e.Pd.bind(e)),e.b.set(r,{initData:n,loaded:!1,Yc:1/0,xa:null});try{if(e.c.initDataTransform)n=e.c.initDataTransform(n);else if(e.keySystem().startsWith("com.apple.fps")){var i=e.a.serverCertificate,a=Ie(n);n=De(n,a,i)}}catch(n){return t=n,n instanceof ee||(t=new ee(2,6,6016,n)),void e.g(t)}r.generateRequest(t,n.buffer).catch(function(t){if(!e.f){if(e.b.delete(r),t.errorCode&&t.errorCode.systemCode){var n=t.errorCode.systemCode;0>n&&(n+=Math.pow(2,32)),n="0x"+n.toString(16)}e.g(new ee(2,6,6006,t.message,t,n))}})}function _t(e,t){var n=t.target,r=e.b.get(n),i=e.a.licenseServerUri,a=e.c.advanced[e.a.keySystem];"individualization-request"==t.messageType&&a&&a.individualizationServer&&(i=a.individualizationServer),i=Ee([i],e.c.retryParameters),i.body=t.message,i.method="POST",i.licenseRequestType=t.messageType,i.sessionId=n.sessionId,"com.microsoft.playready"!=e.a.keySystem&&"com.chromecast.playready"!=e.a.keySystem||Et(i),e.a.keySystem.startsWith("com.apple.fps")&&e.c.fairPlayTransform&&kt(i),e.C.rb.request(2,i).promise.then(function(e){return this.f?Promise.reject():(this.a.keySystem.startsWith("com.apple.fps")&&this.c.fairPlayTransform&&Tt(e),n.update(e.data).then(function(){var e=this;this.C.onEvent(new ue("drmsessionupdate")),r&&(r.xa&&r.xa.resolve(),new J(function(){r.loaded=!0,Ct(e)&&e.l.resolve()}).O(Kp))}.bind(this)))}.bind(e),function(e){this.f||(e=new ee(2,6,6007,e),this.g(e),r&&r.xa&&r.xa.reject(e))}.bind(e)).catch(function(e){this.f||(e=new ee(2,6,6008,e.message),this.g(e),r&&r.xa&&r.xa.reject(e))}.bind(e))}function Et(e){var t=Ye(e.body,!0,!0);if(t.includes("PlayReadyKeyMessage")){t=(new DOMParser).parseFromString(t,"application/xml");for(var n=t.getElementsByTagName("HttpHeader"),r=0;r<n.length;++r)e.headers[n[r].querySelector("name").textContent]=n[r].querySelector("value").textContent;e.body=$e(t.querySelector("Challenge").textContent).buffer}else e.headers["Content-Type"]="text/xml; charset=utf-8"}function kt(e){var t=new Uint8Array(e.body);t="spc="+Qe(t),e.headers["Content-Type"]="application/x-www-form-urlencoded",e.body=qe(t)}function Tt(e){try{var t=ze(e.data)}catch(e){return}t=t.trim(),"<ckc>"===t.substr(0,5)&&"</ckc>"===t.substr(-6)&&(t=t.slice(5,-6));try{t=JSON.parse(t).ckc}catch(e){}e.data=$e(t).buffer}function At(e){var t=e.na,n=e.T;n.clear(),t.forEach(function(e,t){return n.set(t,e)}),t=Array.from(n.values()),t.length&&t.every(function(e){return"expired"==e})&&e.g(new ee(2,6,6014)),e.C.kc(je(n))}function wt(){function e(e){return u(function t(){var i,a,o;return S(t,function(t){switch(t.j){case 1:return y(t,2),d(t,navigator.requestMediaKeySystemAccess(e,n),4);case 4:return i=t.o,o=!!(a=i.getConfiguration().sessionTypes)&&a.includes("persistent-license"),He("Tizen 3")&&(o=!1),r.set(e,{persistentState:o}),d(t,i.createMediaKeys(),5);case 5:g(t,0);break;case 2:m(t),r.set(e,null),h(t)}})})}var t=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],n=[{videoCapabilities:t,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:t}],r=new Map;return t="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").map(function(t){return e(t)}),Promise.all(t).then(function(){return je(r)})}function St(e,t){var n=t.audio,r=t.video;if(n&&n.encrypted&&!dt(e,Ue(n.mimeType,n.codecs))||r&&r.encrypted&&!dt(e,Ue(r.mimeType,r.codecs)))return!1;var i=e.keySystem();return 0==t.drmInfos.length||t.drmInfos.some(function(e){return e.keySystem==i})}function Pt(e,t){if(!e.length)return t;if(!t.length)return e;for(var n=[],r=0;r<e.length;r++)for(var i=0;i<t.length;i++)if(e[r].keySystem==t[i].keySystem){var a=e[r];i=t[i];var o=[];o=o.concat(a.initData||[]),o=o.concat(i.initData||[]);var s=[];s=s.concat(a.keyIds),s=s.concat(i.keyIds),n.push({keySystem:a.keySystem,licenseServerUri:a.licenseServerUri||i.licenseServerUri,distinctiveIdentifierRequired:a.distinctiveIdentifierRequired||i.distinctiveIdentifierRequired,persistentStateRequired:a.persistentStateRequired||i.persistentStateRequired,videoRobustness:a.videoRobustness||i.videoRobustness,audioRobustness:a.audioRobustness||i.audioRobustness,serverCertificate:a.serverCertificate||i.serverCertificate,initData:o,keyIds:s});break}return n}function Ot(e){e.b.forEach(function(t,n){var r=t.Yc,i=n.expiration;isNaN(i)&&(i=1/0),i!=r&&(e.C.onExpirationUpdated(n.sessionId,i),t.Yc=i)})}function Ct(e){return e=e.b.values(),Le(e,function(e){return e.loaded})}function xt(e,t){var n=[];t.forEach(function(e,t){n.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(var r=o(e),i=r.next();!i.done;i=r.next())i.value.drmInfos=n}function Rt(e,t,n,r,i){e.forEach(function(e){if(t.includes(e.licenseServerUri)||t.push(e.licenseServerUri),e.serverCertificate&&(n.some(function(t){return tt(t,e.serverCertificate)})||n.push(e.serverCertificate)),e.initData&&e.initData.forEach(function(e){r.some(function(t){return!(!t.keyId||t.keyId!=e.keyId)||t.initDataType==e.initDataType&&tt(t.initData,e.initData)})||r.push(e)}),e.keyIds)for(var a=0;a<e.keyIds.length;++a)i.includes(e.keyIds[a])||i.push(e.keyIds[a])})}function It(t,n,r){!t.keySystem||"org.w3.clearkey"==t.keySystem&&t.licenseServerUri||(n.size&&(n=n.get(t.keySystem)||"",t.licenseServerUri=n),t.keyIds||(t.keyIds=[]),(r=r.get(t.keySystem))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=r.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=r.persistentStateRequired),t.videoRobustness||(t.videoRobustness=r.videoRobustness),t.audioRobustness||(t.audioRobustness=r.audioRobustness),t.serverCertificate||(t.serverCertificate=r.serverCertificate)),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==t.keySystem&&(t.keySystem="com.chromecast.playready"))}function Dt(e){return u(function t(){var n;return S(t,function(t){switch(t.j){case 1:return n=new Promise(function(e){new J(e).O(Hp)}),d(t,Promise.race([e.close().then(function(){return!0}),n.then(function(){return!1})]),2);case 2:h(t)}})})}function Mt(){this.a=new muxjs.mp4.CaptionParser,this.g=[],this.f={}}function Lt(){}function Nt(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function jt(e,t,n){return n=void 0===n?0:n,!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)||t>e.end(e.length-1))&&t+n>=e.start(0)}function Ut(e,t){if(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))return 0;for(var n=0,r=e.length-1;0<=r&&e.end(r)>t;--r)n+=e.end(r)-Math.max(e.start(r),t);return n}function Ft(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}function Bt(e,t){if(0==t.length)return e;var n=t.map(function(e){return new V(e)});return e.map(function(e){return new V(e)}).map(function(e){return n.map(e.resolve.bind(e))}).reduce(Yp.yc,[]).map(function(e){return e.toString()})}function Vt(e,t){return{keySystem:e,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:t||[],keyIds:[]}}function Gt(){this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.b=null,this.g=[],this.c=[],this.f=!1,this.a.on("data",this.i.bind(this)),this.a.on("done",this.h.bind(this))}function Ht(t,n){return!(!e.muxjs||"mp2t"!=t.toLowerCase().split(";")[0].split("/")[1])&&(n?MediaSource.isTypeSupported(Kt(n,t)):MediaSource.isTypeSupported(Kt("audio",t))||MediaSource.isTypeSupported(Kt("video",t)))}function Kt(e,t){var n=t.replace(/mp2t/i,"mp4");"audio"==e&&(n=n.replace("video","audio"));var r=/avc1\.(66|77|100)\.(\d+)/.exec(n);if(r){var i="avc1.",a=r[1],o=Number(r[2]);i=("66"==a?i+"4200":"77"==a?i+"4d00":i+"6400")+(o>>4).toString(16),i+=(15&o).toString(16),n=n.replace(r[0],i)}return n}function zt(e,t){e.f=!0,e.b=new te,e.g=[],e.c=[];var n=new Uint8Array(t);return e.a.push(n),e.a.flush(),e.f&&e.b.reject(new ee(2,3,3018)),e.b}function Yt(e,t,n){this.startTime=e,this.direction=ef,this.endTime=t,this.payload=n,this.region=new Wt,this.position=null,this.positionAlign=Xp,this.size=100,this.textAlign=Jp,this.writingMode=tf,this.lineInterpretation=nf,this.line=null,this.lineHeight="",this.lineAlign=rf,this.displayAlign=$p,this.fontSize=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=of,this.fontStyle=sf,this.fontFamily="",this.textDecoration=[],this.wrapLine=!0,this.id=""}function Wt(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=uf,this.scroll=cf}function qt(e){this.g=null,this.c=e,this.f=this.m=0,this.h=1/0,this.b=this.a=null,this.l="",this.i=new Map}function Xt(t){return!!(pf[t]||e.muxjs&&"application/cea-608"==t)}function Jt(e,t){"application/cea-608"!=t&&(e.g=new pf[t])}function Qt(e,t,n,r){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==n||null==r)this.g.parseInit(new Uint8Array(t));else{var e={periodStart:this.m,segmentStart:n,segmentEnd:r};e=this.g.parseMedia(new Uint8Array(t),e).filter(function(e){return e.startTime>=this.f&&e.startTime<this.h}.bind(this)),this.c.append(e),null==this.a&&(this.a=Math.max(n,this.f)),this.b=Math.min(r,this.h)}}.bind(e))}function $t(e,t,n,r,i){var a=n+" "+r,s=new Map;t=o(t);for(var l=t.next();!l.done;l=t.next()){var u=l.value;l=u.stream,s.has(l)||s.set(l,new Map),s.get(l).has(a)||s.get(l).set(a,[]),u.startTime+=i,u.endTime+=i,u.startTime>=e.f&&u.startTime<e.h&&(u=new Yt(u.startTime,u.endTime,u.text),s.get(l).get(a).push(u),l==e.l&&e.c.append([u]))}for(i=o(s.keys()),a=i.next();!a.done;a=i.next())for(a=a.value,e.i.has(a)||e.i.set(a,new Map),t=o(s.get(a).keys()),l=t.next();!l.done;l=t.next())l=l.value,u=s.get(a).get(l),e.i.get(a).set(l,u);e.a=null==e.a?Math.max(n,e.f):Math.min(e.a,Math.max(n,e.f)),e.b=Math.max(e.b,Math.min(r,e.h))}function Zt(e,t,n){this.f=e,this.g=n,this.b={},this.a=null,this.c={},this.i=new Oe,this.v=!1,this.l={},this.m=t,e=this.s=new te,t=new MediaSource,this.i.da(t,"sourceopen",e.resolve),this.f.src=ff(t),this.h=t}function en(e){var t=Ue(e.mimeType,e.codecs),n=Fe(e);return Xt(t)||MediaSource.isTypeSupported(n)||Ht(t,e.type)}function tn(e,t){e.a||(e.a=new qt(e.g)),Jt(e.a,t)}function nn(e){return!e.h||"ended"==e.h.readyState}function rn(e,t){if("text"==t)var n=e.a.a;else n=sn(e,t),n=!n||1==n.length&&1e-6>n.end(0)-n.start(0)?null:1==n.length&&0>n.start(0)?0:n.length?n.start(0):null;return n}function an(e,t){return"text"==t?e.a.b:Nt(sn(e,t))}function on(e,t,n){return"text"==t?(e=e.a,null==e.b||e.b<n?0:e.b-Math.max(n,e.a)):(e=sn(e,t),Ut(e,n))}function sn(e,t){try{return e.b[t].buffered}catch(e){return null}}function ln(t,n,r,i,a,o){return"text"==n?Qt(t.a,r,i,a):t.l[n]?zt(t.l[n],r).then(function(e){return this.a||tn(this,"text/vtt"),e.captions&&$t(this.a,e.captions,i,a,this.b.video.timestampOffset),pn(this,n,this.ee.bind(this,n,e.data.buffer))}.bind(t)):(o&&e.muxjs&&(t.a||tn(t,"text/vtt"),null==i&&null==a?t.m.init(r):t.m.b(r,function(e){e.length&&$t(t.a,e,i,a,t.b.video.timestampOffset)})),pn(t,n,t.ee.bind(t,n,r)))}function un(e,t){return"text"==t?e.a?(e.m.c(),e.a.remove(0,1/0)):Promise.resolve():pn(e,t,e.fe.bind(e,t,0,e.h.duration))}function cn(e,t,n,r,i){return"text"==t?(e.a.m=n,e=e.a,e.f=r,e.h=i,Promise.resolve()):Promise.all([pn(e,t,e.oe.bind(e,t)),pn(e,t,e.Sf.bind(e,t,n)),pn(e,t,e.Pf.bind(e,t,r,i))])}function pn(e,t,n){if(e.v)return Promise.reject();if(n={start:n,p:new te},e.c[t].push(n),1==e.c[t].length)try{n.start()}catch(r){"QuotaExceededError"==r.name?n.p.reject(new ee(2,3,3017,t)):n.p.reject(new ee(2,3,3015,r)),dn(e,t)}return n.p}function fn(e,t){if(e.v)return Promise.reject();var n,r=[];for(n in e.b){var i=new te,a={start:function(e){e.resolve()}.bind(null,i),p:i};e.c[n].push(a),r.push(i),1==e.c[n].length&&a.start()}return Promise.all(r).then(function(){try{t()}catch(t){var e=Promise.reject(new ee(2,3,3015,t))}for(var n in this.b)dn(this,n);return e}.bind(e),function(e){throw e}.bind(e))}function dn(e,t){e.c[t].shift();var n=e.c[t][0];if(n)try{n.start()}catch(r){n.p.reject(new ee(2,3,3015,r)),dn(e,t)}}function hn(e,t){return e=vn(e),t=vn(t),e.split("-")[0]==t.split("-")[0]}function yn(e,t){e=vn(e),t=vn(t);var n=e.split("-"),r=t.split("-");return n[0]==r[0]&&1==n.length&&2==r.length}function vn(e){var t=e.split("-");return e=t[0]||"",t=t[1]||"",e=e.toLowerCase(),e=df.get(e)||e,(t=t.toUpperCase())?e+"-"+t:e}function gn(e){return e.language?vn(e.language):e.audio&&e.audio.language?vn(e.audio.language):e.video&&e.video.language?vn(e.video.language):"und"}function mn(e,t){for(var n=vn(e),r=new Set,i=o(t),a=i.next();!a.done;a=i.next())r.add(vn(a.value));for(i=o(r),a=i.next();!a.done;a=i.next())if((a=a.value)==n)return a;for(i=o(r),a=i.next();!a.done;a=i.next())if(a=a.value,yn(a,n))return a;for(i=o(r),a=i.next();!a.done;a=i.next()){var s=a=a.value,l=n;if(s=vn(s),l=vn(l),s=s.split("-"),l=l.split("-"),2==s.length&&2==l.length&&s[0]==l[0])return a}for(r=o(r),a=r.next();!a.done;a=r.next())if(i=a.value,yn(n,i))return i;return null}function bn(e,t,n){function r(e,t,n){return e>=t&&e<=n}var i=e.video;return!(i&&i.width&&i.height&&!(r(i.width,t.minWidth,Math.min(t.maxWidth,n.width))&&r(i.height,t.minHeight,Math.min(t.maxHeight,n.height))&&r(i.width*i.height,t.minPixels,t.maxPixels))||!r(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function _n(e,t,n){var r=!1;return e.forEach(function(e){var i=e.allowedByApplication;e.allowedByApplication=bn(e,t,n),i!=e.allowedByApplication&&(r=!0)}),r}function En(e,t,n,r){r.variants=r.variants.filter(function(r){if(e&&e.P&&!St(e,r))return!1;var i=r.audio;return r=r.video,!(i&&!en(i)||r&&!en(r)||i&&t&&!kn(i,t)||r&&n&&!kn(r,n))}),r.textStreams=r.textStreams.filter(function(e){return Xt(Ue(e.mimeType,e.codecs))})}function kn(e,t){return e.mimeType==t.mimeType&&e.codecs.split(".")[0]==t.codecs.split(".")[0]}function Tn(e){var t=e.audio,n=e.video,r=t?t.codecs:null,i=n?n.codecs:null,a=[];i&&a.push(i),r&&a.push(r);var o=[];n&&o.push(n.mimeType),t&&o.push(t.mimeType),o=o[0]||null;var s=[];t&&s.push(t.kind),n&&s.push(n.kind),s=s[0]||null;var l=new Set;return t&&t.roles.forEach(function(e){return l.add(e)}),n&&n.roles.forEach(function(e){return l.add(e)}),e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:s,width:null,height:null,frameRate:null,mimeType:o,codecs:a.join(", "),audioCodec:r,videoCodec:i,primary:e.primary,roles:Array.from(l),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.videoBandwidth=n.bandwidth||null),t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioBandwidth=t.bandwidth||null,e.label=t.label,e.audioRoles=t.roles),e}function An(e){return{id:e.id,active:!1,type:"text",bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,mimeType:e.mimeType,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId}}function wn(e){return e.__shaka_id||(e.__shaka_id=hf++),e.__shaka_id}function Sn(e){return{id:wn(e),active:!1,type:"",bandwidth:0,language:vn(e.language),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}function Pn(e){return e.allowedByApplication&&e.allowedByKeySystem}function On(e){return e.filter(function(e){return Pn(e)})}function Cn(e,t){var n=e.filter(function(e){return e.audio&&e.audio.channelsCount}),r=new Map;n=o(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;var a=i.audio.channelsCount;r.has(a)||r.set(a,[]),r.get(a).push(i)}return n=Array.from(r.keys()),0==n.length?e:(i=n.filter(function(e){return e<=t}),i.length?r.get(Math.max.apply(null,i)):r.get(Math.min.apply(null,n)))}function xn(e,t,n){var r=e,i=e.filter(function(e){return e.primary});i.length&&(r=i);var a=r.length?r[0].language:"";if(r=r.filter(function(e){return e.language==a}),t){var o=mn(vn(t),e.map(function(e){return e.language}));o&&(r=e.filter(function(e){return vn(e.language)==o}))}if(n){if(e=Rn(r,n),e.length)return e}else if(e=r.filter(function(e){return 0==e.roles.length}),e.length)return e;return e=r.map(function(e){return e.roles}).reduce(Yp.yc,[]),e.length?Rn(r,e[0]):r}function Rn(e,t){return e.filter(function(e){return e.roles.includes(t)})}function In(e,t,n){for(var r=0;r<n.length;r++)if(n[r].audio==e&&n[r].video==t)return n[r];return null}function Dn(e){var t=[];return e.audio&&t.push(e.audio),e.video&&t.push(e.video),t}function Mn(){this.h=null,this.f=!1,this.b=new j,this.c=[],this.i=!1,this.a=this.g=null}function Ln(e,t){return e&&(t=t.filter(function(t){return bn(t,e,{width:1/0,height:1/0})})),t.sort(function(e,t){return e.bandwidth-t.bandwidth})}function Nn(e,t){this.a=e,this.b=t}function jn(e,t){var n=new Nn(2,6),r=yf,i=r.a,a=n.b-i.b;(0<(n.a-i.a||a)?r.c:r.b)(r.a,n,e,t)}function Un(e,t,n,r){F([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",r].join(" "))}function Fn(e,t,n,r){U([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",r].join(""))}function Bn(e){return JSON.stringify(e,function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof ue){var n,r={};for(n in t){var i=t[n];i&&"object"==typeof i?"detail"==n&&(r[n]=i):n in Event||(r[n]=i)}return r}if(t instanceof TimeRanges)for(r={__type__:"TimeRanges",length:t.length,start:[],end:[]},n=0;n<t.length;++n)r.start.push(t.start(n)),r.end.push(t.end(n));else r=t instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return r}})}function Vn(e){return JSON.parse(e,function(e,t){return"NaN"==t?NaN:"-Infinity"==t?-1/0:"Infinity"==t?1/0:t&&"object"==typeof t&&"TimeRanges"==t.__type__?Gn(t):t&&"object"==typeof t&&"Uint8Array"==t.__type__?new Uint8Array(t.entries):t})}function Gn(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}function Hn(e,t,n,r,i,a){this.T=e,this.f=new J(t),this.P=n,this.l=!1,this.G=r,this.M=i,this.C=a,this.b=this.h=!1,this.D="",this.i=null,this.m=this.Nd.bind(this),this.s=this.kf.bind(this),this.a={video:{},player:{}},this.v=0,this.c={},this.g=null}function Kn(e){var t=Of;t.removeUpdateListener(e.m),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.s)}function zn(e){for(var t in e.c){var n=e.c[t];delete e.c[t],n.reject(new ee(1,7,7e3))}}function Yn(e){e=Bn(e),Of.sendMessage("urn:x-cast:com.google.shaka.v2",e,function(){},B)}function Wn(e,t,n){var r=this;pe.call(this),this.c=e,this.b=t,this.i=this.g=this.f=this.l=this.h=null,(this.m=n)&&(this.a=new Hn(n,function(){return Jn(r)},function(){return Qn(r)},function(e,t){return Zn(r,e,t)},function(){return $n(r)},function(){return Xn(r)})),qn(this)}function qn(e){e.a&&e.a.init(),e.i=new Oe,vf.forEach(function(e){this.i.w(this.c,e,this.ig.bind(this))}.bind(e)),_f.forEach(function(e){this.i.w(this.b,e,this.yf.bind(this))}.bind(e)),e.h={};for(var t in e.c)Object.defineProperty(e.h,t,{configurable:!1,enumerable:!0,get:e.hg.bind(e,t),set:e.jg.bind(e,t)});e.l={};for(var n in e.b)Object.defineProperty(e.l,n,{configurable:!1,enumerable:!0,get:e.Ud.bind(e,n)});e.f=new pe,e.f.Vb=e.h,e.g=new pe,e.g.Vb=e.l}function Xn(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.b.bc(),startTime:null};return e.c.pause(),mf.forEach(function(e){t.video[e]=this.c[e]}.bind(e)),e.c.ended||(t.startTime=e.c.currentTime),Tf.forEach(function(e){var n=e[1];e=this.b[e[0]](),t.player[n]=e}.bind(e)),Af.forEach(function(e){var n=e[1];e=this.b[e[0]](),t.playerAfterLoad[n]=e}.bind(e)),t}function Jn(e){e.dispatchEvent(new ue("caststatuschanged"))}function Qn(e){e.f.dispatchEvent(new ue(e.h.paused?"pause":"play"))}function $n(e){Tf.forEach(function(e){var t=e[1];e=this.a.get("player",e[0])(),this.b[t](e)}.bind(e));var t=e.a.get("player","getAssetUri")(),n=e.a.get("video","ended"),r=Promise.resolve(),i=e.c.autoplay,a=null;n||(a=e.a.get("video","currentTime")),t&&(e.c.autoplay=!1,r=e.b.load(t,a));var o={};mf.forEach(function(e){o[e]=this.a.get("video",e)}.bind(e)),r.then(function(){e.c&&(mf.forEach(function(e){this.c[e]=o[e]}.bind(e)),Af.forEach(function(e){var t=e[1];e=this.a.get("player",e[0])(),this.b[t](e)}.bind(e)),e.c.autoplay=i,t&&e.c.play())},function(t){e.b.dispatchEvent(new ue("error",{detail:t}))})}function Zn(e,t,n){e.a.ga()&&("video"==t?e.f.dispatchEvent(n):"player"==t&&e.g.dispatchEvent(n))}function er(e,t,n,r){var i=this;pe.call(this),this.a=e,this.b=t,this.c=new Oe,this.D={video:e,player:t},this.s=n||function(){},this.G=r||function(e){return e},this.v=!1,this.h=!0,this.g=0,this.m=!1,this.l=!0,this.i=this.f=null,this.C=new J(function(){ir(i)}),tr(this)}function tr(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=e.Qd.bind(e),t.onSenderDisconnected=e.Qd.bind(e),t.onSystemVolumeChanged=e.Be.bind(e),e.i=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.i.onMessage=e.ef.bind(e),e.f=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.f.onMessage=e.rf.bind(e),t.start(),vf.forEach(function(e){this.c.w(this.a,e,this.Wd.bind(this,"video"))}.bind(e)),_f.forEach(function(e){this.c.w(this.b,e,this.Wd.bind(this,"player"))}.bind(e)),cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?e.b.kd(3840,2160):e.b.kd(1920,1080),e.c.w(e.a,"loadeddata",function(){this.m=!0}.bind(e)),e.c.w(e.b,"loading",function(){this.h=!1,nr(this)}.bind(e)),e.c.w(e.a,"playing",function(){this.h=!1,nr(this)}.bind(e)),e.c.w(e.a,"pause",function(){nr(this)}.bind(e)),e.c.w(e.b,"unloading",function(){this.h=!0,nr(this)}.bind(e)),e.c.w(e.a,"ended",function(){var e=this;new J(function(){e.a&&e.a.ended&&(e.h=!0,nr(e))}).O(5)}.bind(e))}function nr(e){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new ue("caststatuschanged")),ar(this)||lr(this,0))}.bind(e))}function rr(e,t,n){for(var r in t.player)e.b[r](t.player[r]);e.s(n),n=Promise.resolve();var i=e.a.autoplay;t.manifest&&(e.a.autoplay=!1,n=e.b.load(t.manifest,t.startTime)),n.then(function(){if(e.b){for(var n in t.video)e.a[n]=t.video[n];for(var r in t.playerAfterLoad)e.b[r](t.playerAfterLoad[r]);e.a.autoplay=i,t.manifest&&(e.a.play(),lr(e,0))}},function(t){e.b.dispatchEvent(new ue("error",{detail:t}))})}function ir(e){e.C.O(.5);var t={video:{},player:{}};if(gf.forEach(function(e){t.video[e]=this.a[e]}.bind(e)),e.b.V())for(var n in kf)0==e.g%kf[n]&&(t.player[n]=e.b[n]());for(var r in Ef)0==e.g%Ef[r]&&(t.player[r]=e.b[r]());(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),e.m&&(e.g+=1),sr(e,{type:"update",update:t},e.f),ar(e)}function ar(e){return!(!e.l||!e.a.duration&&!e.b.V())&&(or(e),e.l=!1,!0)}function or(e){lr(e,0,{contentId:e.b.bc(),streamType:e.b.V()?"LIVE":"BUFFERED",duration:e.a.duration,contentType:""})}function sr(e,t,n,r){e.v&&(e=Bn(t),r?n.getCastChannel(r).send(e):n.broadcast(e))}function lr(e,t,n){var r=e.a.playbackRate,i=Cf;i=e.h?i.IDLE:e.b.Oc()?i.je:e.a.paused?i.le:i.me,r={mediaSessionId:0,playbackRate:r,playerState:i,currentTime:e.a.currentTime,supportedMediaCommands:15,volume:{level:e.a.volume,muted:e.a.muted}},n&&(r.media=n),sr(e,{requestId:t,type:"MEDIA_STATUS",status:[r]},e.i)}function ur(e,t){this.K=e,this.b=t==xf,this.a=0}function cr(){throw new ee(2,3,3e3)}function pr(){this.c=[],this.b=[],this.a=!1}function fr(e){for(;e.reader.sa()&&!e.parser.a;)e.parser.mc(e.start,e.reader,e.partialOkay)}function dr(e){for(var t=e.reader.F();0<t&&!e.parser.a;--t)e.parser.mc(e.start,e.reader,e.partialOkay)}function hr(e){return function(t){e(t.reader.Xa(t.reader.K.byteLength-t.reader.ba()))}}function yr(e){for(var t=0,n=0;n<e.length;n++)t=t<<8|e.charCodeAt(n);return t}function vr(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function gr(e){this.f=[],this.b=[],this.a=[],(new pr).fa("pssh",this.c.bind(this)).parse(e.buffer)}function mr(e,t,n){var r=Tr(e),i=null;e=[];var a=[],s=new Set(r.map(function(e){return e.keyId}));if(s.delete(null),1<s.size)throw new ee(2,4,4010);if(n||(a=r.filter(function(e){return"urn:mpeg:dash:mp4protection:2011"!=e.ae||(i=e.init||i,!1)}),a.length&&(e=kr(i,t,a),0==e.length&&(e=[Vt("",i)]))),r.length&&(n||!a.length))for(e=[],t=o(If.values()),n=t.next();!n.done;n=t.next())"org.w3.clearkey"!=(n=n.value)&&e.push(Vt(n,i));if(s=Array.from(s)[0]||null)for(t=o(e),n=t.next();!n.done;n=t.next())for(n=o(n.value.initData),r=n.next();!r.done;r=n.next())r.value.keyId=s;return{wd:s,pg:i,drmInfos:e,Ad:!0}}function br(e,t,n,r){var i=mr(e,t,r);if(n.Ad)e=1==n.drmInfos.length&&!n.drmInfos[0].keySystem,t=0==i.drmInfos.length,(0==n.drmInfos.length||e&&!t)&&(n.drmInfos=i.drmInfos),n.Ad=!1;else if(0<i.drmInfos.length&&(n.drmInfos=n.drmInfos.filter(function(e){return i.drmInfos.some(function(t){return t.keySystem==e.keySystem})}),0==n.drmInfos.length))throw new ee(2,4,4008);return i.wd||n.wd}function _r(e){var t=0,n=new DataView(e).getUint32(t,!0);if(n!==e.byteLength)return[];t+=6,n=[];for(var r=new DataView(e);t<e.byteLength-1;){var i=r.getUint16(t,!0);t+=2;var a=r.getUint16(t,!0);t+=2;var o=new Uint8Array(e,t,a);n.push({type:i,value:o}),t+=a}return n}function Er(e){return(e=e.querySelector("DATA > LA_URL"))?e.textContent:""}function kr(e,t,n){var r=[];n=o(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;var a=If.get(i.ae);if(a){var s;if(s=Rf.Gc(i.node,"urn:microsoft:playready","pro")){s=$e(s.textContent);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),u=s.length,c=l.length+16+u,p=new ArrayBuffer(c),f=new Uint8Array(p);p=new DataView(p);var d=0;p.setUint32(d,c),d+=4,p.setUint32(d,1886614376),d+=4,p.setUint32(d,0),d+=4,f.set(l,d),d+=l.length,p.setUint32(d,u),d+=4,f.set(s,d),s=[{initData:f,initDataType:"cenc",keyId:i.keyId}]}else s=null;s=Vt(a,i.init||e||s),(a=Df.get(a))&&(s.licenseServerUri=a(i)),r.push(s)}else for(i=t(i.node)||[],i=o(i),a=i.next();!a.done;a=i.next())r.push(a.value)}return r}function Tr(e){var t=[];e=o(e);for(var n=e.next();!n.done;n=e.next())(n=Ar(n.value))&&t.push(n);return t}function Ar(e){var t=e.getAttribute("schemeIdUri"),n=Rf.getAttributeNS(e,"urn:mpeg:cenc:2013","default_KID"),r=Rf.zd(e,"urn:mpeg:cenc:2013","pssh").map(Rf.cc);if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase(),n.includes(" ")))throw new ee(2,4,4009);var i=[];try{i=r.map(function(e){return{initDataType:"cenc",initData:$e(e),keyId:null}})}catch(e){throw new ee(2,4,4007)}return{node:e,ae:t,keyId:n,init:0<i.length?i:null}}function wr(t,n,r,i,a){var o={RepresentationID:n,Number:r,Bandwidth:i,Time:a};return t.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(t,n,r,i){if("$$"==t)return"$";var a=o[n];if(null==a)return t;switch("RepresentationID"==n&&r&&(r=void 0),"Time"==n&&(a=Math.round(a)),i){case void 0:case"d":case"i":case"u":t=a.toString();break;case"o":t=a.toString(8);break;case"x":t=a.toString(16);break;case"X":t=a.toString(16).toUpperCase();break;default:t=a.toString()}return r=e.parseInt(r,10)||1,Array(Math.max(0,r-t.length)+1).join("0")+t})}function Sr(e,t){var n=Pr(e,t,"timescale"),r=1;n&&(r=Rf.nc(n)||1),n=Pr(e,t,"duration"),(n=Rf.nc(n||""))&&(n/=r);var i=Pr(e,t,"startNumber"),a=Number(Pr(e,t,"presentationTimeOffset"))||0,o=Rf.vb(i||"");null!=i&&null!=o||(o=1);var s=Or(e,t,"SegmentTimeline");if(i=null,s){i=r;var l=e.S.duration||1/0;s=Rf.R(s,"S");for(var u=[],c=0,p=0;p<s.length;++p){var f=s[p],d=Rf.J(f,"t",Rf.vb),h=Rf.J(f,"d",Rf.vb);if(f=Rf.J(f,"r",Rf.parseInt),null!=d&&(d-=a),!h)break;if(d=null!=d?d:c,0>(f=f||0))if(p+1<s.length){if(null==(f=Rf.J(s[p+1],"t",Rf.vb)))break;if(d>=f)break;f=Math.ceil((f-d)/h)-1}else{if(1/0==l)break;if(d/i>=l)break;f=Math.ceil((l*i-d)/h)-1}0<u.length&&d!=c&&(u[u.length-1].end=d/i);for(var y=0;y<=f;++y)c=d+h,u.push({start:d/i,end:c/i,eg:d}),d=c}i=u}return{timescale:r,Z:n,Za:o,la:a/r||0,sd:a,N:i}}function Pr(e,t,n){return[t(e.B),t(e.ca),t(e.ja)].filter(Yp.Ga).map(function(e){return e.getAttribute(n)}).reduce(function(e,t){return e||t})}function Or(e,t,n){return[t(e.B),t(e.ca),t(e.ja)].filter(Yp.Ga).map(function(e){return Rf.ac(e,n)}).reduce(function(e,t){return e||t})}function Cr(e,t,n,r,i,a){for(var o=Rf.getAttributeNS(e,"http://www.w3.org/1999/xlink","href"),s=Rf.getAttributeNS(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=0;l<e.attributes.length;l++){var u=e.attributes[l];"http://www.w3.org/1999/xlink"==u.namespaceURI&&(e.removeAttributeNS(u.namespaceURI,u.localName),--l)}if(5<=a)return re(new ee(2,4,4028));if("onLoad"!=s)return re(new ee(2,4,4027));var c=Bt([r],[o]);return i.request(0,Ee(c,t)).U(function(r){if(!(r=Rf.Sd(r.data,e.tagName)))return re(new ee(2,4,4001,o));for(;e.childNodes.length;)e.removeChild(e.childNodes[0]);for(;r.childNodes.length;){var s=r.childNodes[0];r.removeChild(s),e.appendChild(s)}for(s=0;s<r.attributes.length;s++){var l=r.attributes[s].nodeName,u=r.getAttribute(l);e.setAttribute(l,u)}return xr(e,t,n,c[0],i,a+1)})}function xr(e,t,n,r,i,a){if(a=void 0===a?0:a,Rf.getAttributeNS(e,"http://www.w3.org/1999/xlink","href")){var o=Cr(e,t,n,r,i,a);return n&&(o=o.U(void 0,function(){return xr(e,t,n,r,i,a)})),o}o=[];for(var s=0;s<e.childNodes.length;s++){var l=e.childNodes[s];l instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Rf.getAttributeNS(l,"http://www.w3.org/1999/xlink","href")?(e.removeChild(l),--s):"SegmentTimeline"!=l.tagName&&o.push(xr(l,t,n,r,i,a)))}return se(o).U(function(){return e})}function Rr(e,t,n){this.c=e,this.b=t,this.a=n}function Ir(e,t,n,r,i,a){this.position=e,this.startTime=t,this.endTime=n,this.c=r,this.b=i,this.a=a}function Dr(e,t,n,r){var i,a=(new pr).fa("sidx",function(e){i=Mr(t,r,n,e)});if(e&&a.parse(e),i)return i;throw new ee(2,3,3004)}function Mr(e,t,n,r){var i=[];r.reader.L(4);var a=r.reader.F();if(0==a)throw new ee(2,3,3005);if(0==r.version)var o=r.reader.F(),s=r.reader.F();else o=r.reader.yb(),s=r.reader.yb();r.reader.L(2);var l=r.reader.Mb();for(e=e+r.size+s,s=0;s<l;s++){var u=r.reader.F(),c=(2147483648&u)>>>31;u&=2147483647;var p=r.reader.F();if(r.reader.L(4),1==c)throw new ee(2,3,3006);i.push(new Ir(i.length,o/a-t,(o+p)/a-t,function(){return n},e,e+u-1)),o+=p,e+=u}return r.parser.stop(),i}function Lr(e){this.a=e}function Nr(e,t){for(;e.a.length&&e.a[e.a.length-1].startTime>=t;)e.a.pop();for(;e.a.length&&0>=e.a[0].endTime;)e.a.shift();if(0!=e.a.length){var n=e.a[e.a.length-1];e.a[e.a.length-1]=new Ir(n.position,n.startTime,t,n.c,n.b,n.a)}}function jr(e){this.b=e,this.a=new ur(e,0),Mf||(Mf=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}function Ur(e){var t=Fr(e);if(7<t.length)throw new ee(2,3,3002);for(var n=0,r=0;r<t.length;r++)n=256*n+t[r];t=n,n=Fr(e);e:{for(r=0;r<Mf.length;r++)if(tt(n,Mf[r])){r=!0;break e}r=!1}if(r)n=e.b.byteLength-e.a.ba();else{if(8==n.length&&224&n[1])throw new ee(2,3,3001);r=n[0]&(1<<8-n.length)-1;for(var i=1;i<n.length;i++)r=256*r+n[i];n=r}return n=e.a.ba()+n<=e.b.byteLength?n:e.b.byteLength-e.a.ba(),r=new DataView(e.b.buffer,e.b.byteOffset+e.a.ba(),n),e.a.L(n),new Br(t,r)}function Fr(e){var t,n=e.a.ka();for(t=1;8>=t&&!(n&1<<8-t);t++);if(8<t)throw new ee(2,3,3002);var r=new Uint8Array(t);for(r[0]=n,n=1;n<t;n++)r[n]=e.a.ka();return r}function Br(e,t){this.id=e,this.a=t}function Vr(e){if(8<e.a.byteLength)throw new ee(2,3,3002);if(8==e.a.byteLength&&224&e.a.getUint8(0))throw new ee(2,3,3001);for(var t=0,n=0;n<e.a.byteLength;n++){t=256*t+e.a.getUint8(n)}return t}function Gr(){}function Hr(e,t,n,r,i,a){function o(){return i}var s=[];e=new jr(e.a);for(var l=null,u=null;e.sa();){var c=Ur(e);if(187==c.id){var p=Kr(c);p&&(c=n*p.fg,p=t+p.Df,null!=l&&s.push(new Ir(s.length,l-a,c-a,o,u,p-1)),l=c,u=p)}}return null!=l&&s.push(new Ir(s.length,l-a,r-a,o,u,null)),s}function Kr(e){var t=new jr(e.a);if(e=Ur(t),179!=e.id)throw new ee(2,3,3013);if(e=Vr(e),t=Ur(t),183!=t.id)throw new ee(2,3,3012);t=new jr(t.a);for(var n=0;t.sa();){var r=Ur(t);if(241==r.id){n=Vr(r);break}}return{fg:e,Df:n}}function zr(e,t){var n=Or(e,t,"Initialization");if(!n)return null;var r=e.B.oa,i=n.getAttribute("sourceURL");i&&(r=Bt(e.B.oa,[i])),i=0;var a=null;return(n=Rf.J(n,"range",Rf.oc))&&(i=n.start,a=n.end),new Rr(function(){return r},i,a)}function Yr(e,t){var n=Number(Pr(e,qr,"presentationTimeOffset"))||0,r=Pr(e,qr,"timescale"),i=1;r&&(i=Rf.nc(r)||1),n=n/i||0,r=zr(e,qr);var a=e.B.contentType;if(i=e.B.mimeType.split("/")[1],"text"!=a&&"mp4"!=i&&"webm"!=i)throw new ee(2,4,4006);if("webm"==i&&!r)throw new ee(2,4,4005);a=Or(e,qr,"RepresentationIndex");var o=Pr(e,qr,"indexRange"),s=e.B.oa;if(o=Rf.oc(o||""),a){var l=a.getAttribute("sourceURL");l&&(s=Bt(e.B.oa,[l])),o=Rf.J(a,"range",Rf.oc,o)}if(!o)throw new ee(2,4,4002);return i=Wr(e,t,r,s,o.start,o.end,i,n),{createSegmentIndex:i.createSegmentIndex,findSegmentPosition:i.findSegmentPosition,getSegmentReference:i.getSegmentReference,initSegmentReference:r,la:n}}function Wr(e,t,n,r,i,a,o,s){var l=e.presentationTimeline,u=!e.kb||!e.S.Qc,c=e.S.start,p=e.S.duration,f=t,d=null;return{createSegmentIndex:function(){var e=[f(r,i,a),"webm"==o?f(n.c(),n.b,n.a):null];return f=null,Promise.all(e).then(function(e){var t=e[0];e=e[1]||null,t="mp4"==o?Dr(t,i,r,s):(new Gr).parse(t,e,r,s),l.sb(t,c),d=new Lr(t),u&&Nr(d,p)})},findSegmentPosition:function(e){return d.find(e)},getSegmentReference:function(e){return d.get(e)}}}function qr(e){return e.Ob}function Xr(e,t){var n=zr(e,Jr),r=$r(e),i=Sr(e,Jr),a=i.Za;0==a&&(a=1);var o=0;if(i.Z?o=i.Z*(a-1):i.N&&0<i.N.length&&(o=i.N[0].start),r={Z:i.Z,startTime:o,Za:a,la:i.la,N:i.N,qb:r},!r.Z&&!r.N&&1<r.qb.length)throw new ee(2,4,4002);if(!r.Z&&!e.S.duration&&!r.N&&1==r.qb.length)throw new ee(2,4,4002);if(r.N&&0==r.N.length)throw new ee(2,4,4002);return a=i=null,e.ja.id&&e.B.id&&(a=e.ja.id+","+e.B.id,i=t[a]),o=Qr(e.S.duration,r.Za,e.B.oa,r),i?(i.Tc(o),a=e.presentationTimeline.Hb(),i.Dc(a-e.S.start)):(e.presentationTimeline.sb(o,e.S.start),i=new Lr(o),a&&e.kb&&(t[a]=i)),e.kb&&e.S.Qc||Nr(i,e.S.duration),{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:i.find.bind(i),getSegmentReference:i.get.bind(i),initSegmentReference:n,la:r.la}}function Jr(e){return e.Ja}function Qr(e,t,n,r){var i=r.qb.length;r.N&&r.N.length!=r.qb.length&&(i=Math.min(r.N.length,r.qb.length));for(var a=[],o=r.startTime,s=0;s<i;s++){var l=r.qb[s],u=Bt(n,[l.cf]),c=void 0;c=null!=r.Z?o+r.Z:r.N?r.N[s].end:o+e,a.push(new Ir(s+t,o,c,function(e){return e}.bind(null,u),l.start,l.end)),o=c}return a}function $r(e){return[e.B.Ja,e.ca.Ja,e.ja.Ja].filter(Yp.Ga).map(function(e){return Rf.R(e,"SegmentURL")}).reduce(function(e,t){return 0<e.length?e:t}).map(function(t){t.getAttribute("indexRange")&&!e.Fd&&(e.Fd=!0);var n=t.getAttribute("media");return t=Rf.J(t,"mediaRange",Rf.oc,{start:0,end:null}),{cf:n,start:t.start,end:t.end}})}function Zr(e,t,n,r){var i=ri(e),a=Sr(e,ei),o=Pr(e,ei,"media"),s=Pr(e,ei,"index");if(a={Z:a.Z,timescale:a.timescale,Za:a.Za,la:a.la,sd:a.sd,N:a.N,Sc:o,Jb:s},o=a.Jb?1:0,o+=a.N?1:0,0==(o+=a.Z?1:0))throw new ee(2,4,4002);if(1!=o&&(a.Jb&&(a.N=null),a.Z=null),!a.Jb&&!a.Sc)throw new ee(2,4,4002);if(a.Jb){if("mp4"!=(n=e.B.mimeType.split("/")[1])&&"webm"!=n)throw new ee(2,4,4006);if("webm"==n&&!i)throw new ee(2,4,4005);r=wr(a.Jb,e.B.id,null,e.bandwidth||null,null),r=Bt(e.B.oa,[r]),e=Wr(e,t,i,r,0,null,n,a.la)}else a.Z?(r||(e.presentationTimeline.Vc(a.Z),e.presentationTimeline.Wc(e.S.start)),e=ti(e,a)):(o=t=null,e.ja.id&&e.B.id&&(o=e.ja.id+","+e.B.id,t=n[o]),s=ni(e,a),r=!e.kb||!e.S.Qc,t?(r&&Nr(new Lr(s),e.S.duration),t.Tc(s),n=e.presentationTimeline.Hb(),t.Dc(n-e.S.start)):(e.presentationTimeline.sb(s,e.S.start),t=new Lr(s),o&&e.kb&&(n[o]=t)),r&&Nr(t,e.S.duration),e={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:t.find.bind(t),getSegmentReference:t.get.bind(t)});return{createSegmentIndex:e.createSegmentIndex,findSegmentPosition:e.findSegmentPosition,getSegmentReference:e.getSegmentReference,initSegmentReference:i,la:a.la}}function ei(e){return e.Qb}function ti(e,t){var n=e.S.duration,r=t.Z,i=t.Za,a=t.timescale,o=t.Sc,s=e.bandwidth||null,l=e.B.id,u=e.B.oa;return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(e){return 0>e||n&&e>=n?null:Math.floor(e/r)},getSegmentReference:function(e){var t=e*r,c=t+r;return n&&(c=Math.min(c,n)),0>c||n&&t>=n?null:new Ir(e,t,c,function(){var n=wr(o,l,e+i,s,t*a);return Bt(u,[n])},0,null)}}}function ni(e,t){for(var n=[],r=0;r<t.N.length;r++){var i=r+t.Za;n.push(new Ir(i,t.N[r].start,t.N[r].end,function(e,t,n,r,i,a){return e=wr(e,t,i,n,a),Bt(r,[e]).map(function(e){return e.toString()})}.bind(null,t.Sc,e.B.id,e.bandwidth||null,e.B.oa,i,t.N[r].eg+t.sd),0,null))}return n}function ri(e){var t=Pr(e,ei,"initialization");if(!t)return null;var n=e.B.id,r=e.bandwidth||null,i=e.B.oa;return new Rr(function(){var e=wr(t,n,null,r,null);return Bt(i,[e])},0,null)}function ii(e,t,n){this.f=e,this.pc=t,this.h=this.g=1/0,this.a=1,this.b=this.c=null,this.l=0,this.m=!0,this.i=0,this.s=void 0===n||n}function ai(e,t,n,r){return e=Ee(e,r),0==t&&null==n||(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function oi(){var e=this;this.a=this.b=null,this.f=[],this.c=null,this.l=[],this.h=1,this.m={},this.s=0,this.v=new M(5),this.i=new J(function(){di(e)}),this.g=new ge}function si(e){var t=Date.now(),n=e.a.networkingEngine.request(0,Ee(e.f,e.b.retryParameters));return me(e.g,n),n.promise.then(function(t){if(e.a)return t.uri&&!e.f.includes(t.uri)&&e.f.unshift(t.uri),li(e,t.data,t.uri)}).then(function(){var n=(Date.now()-t)/1e3;return L(e.v,1,n),n})}function li(e,t,n){if(!(t=Rf.Sd(t,"MPD")))throw new ee(2,4,4001,n);return t=xr(t,e.b.retryParameters,e.b.dash.xlinkFailGracefully,n,e.a.networkingEngine),me(e.g,t),t.promise.then(function(t){return ui(e,t,n)})}function ui(e,t,n){return u(function r(){var i,a,o,s,l,u,c,p,f,y,v,g,m,b,_,E,k,T,A,w,P,O,C,x,R,I;return S(r,function(r){switch(r.j){case 1:s=Yp,l=Rf,u=[n],c=l.R(t,"Location").map(l.cc).filter(s.Ga),0<c.length&&(p=Bt(u,c),u=e.f=p),f=l.R(t,"BaseURL").map(l.cc),y=Bt(u,f),v=e.b.dash.ignoreMinBufferTime,g=0,v||(g=l.J(t,"minBufferTime",l.Ba)),e.s=l.J(t,"minimumUpdatePeriod",l.Ba,-1),m=l.J(t,"availabilityStartTime",l.vf),b=l.J(t,"timeShiftBufferDepth",l.Ba),_=l.J(t,"suggestedPresentationDelay",l.Ba),E=l.J(t,"maxSegmentDuration",l.Ba),k=t.getAttribute("type")||"static",e.c?T=e.c.presentationTimeline:(A=Math.max(e.b.dash.defaultPresentationDelay,1.5*g),w=null!=_?_:A,T=new ii(m,w,e.b.dash.autoCorrectDrift)),P={kb:"static"!=k,presentationTimeline:T,ja:null,S:null,ca:null,B:null,bandwidth:0,Fd:!1};for(var S=P,D=y,M=Rf.J(t,"mediaPresentationDuration",Rf.Ba),L=[],N=0,j=Rf.R(t,"Period"),U=0;U<j.length;U++){var F=j[U];N=Rf.J(F,"start",Rf.Ba,N);var B=Rf.J(F,"duration",Rf.Ba),V=null;if(U!=j.length-1){var G=Rf.J(j[U+1],"start",Rf.Ba);null!=G&&(V=G-N)}else null!=M&&(V=M-N);if(null==V&&(V=B),F=ci(e,S,D,{start:N,duration:V,node:F,Qc:null==V||U==j.length-1}),L.push(F),B=S.ja.id,e.l.includes(B)||(e.l.push(B),e.c&&(e.a.filterNewPeriod(F),e.c.periods.push(F))),null==V){N=null;break}N+=V}if(null==e.c&&e.a.filterAllPeriods(L),null!=M?(i=L,a=M,o=!1):(i=L,a=N,o=!0),O=a,C=i,T.Rb("static"==k),"static"!=k&&o||T.wa(O||1/0),(x=T.V())&&!isNaN(e.b.availabilityWindowOverride)&&(b=e.b.availabilityWindowOverride),null==b&&(b=1/0),T.md(b),T.Vc(E||1),e.c){r.A(0);break}if(e.c={presentationTimeline:T,periods:C,offlineSessionIds:[],minBufferTime:g||0},!T.he()){r.A(0);break}return R=l.R(t,"UTCTiming"),d(r,bi(e,y,R),4);case 4:if(I=r.o,!e.a)return r.return();T.ce(I),h(r)}})})}function ci(e,t,n,r){if(t.ja=yi(r.node,null,n),t.S=r,t.ja.id||(t.ja.id="__shaka_period_"+r.start),Rf.R(r.node,"EventStream").forEach(e.wf.bind(e,r.start,r.duration)),n=Rf.R(r.node,"AdaptationSet").map(e.uf.bind(e,t)).filter(Yp.Ga),t.kb){t=[];for(var i=o(n),a=i.next();!a.done;a=i.next()){a=o(a.value.Gf);for(var s=a.next();!s.done;s=a.next())t.push(s.value)}if(t.length!=new Set(t).size)throw new ee(2,4,4018)}var l=n.filter(function(e){return!e.qd});if(n.filter(function(e){return e.qd}).forEach(function(e){var t=e.streams[0],n=e.qd;l.forEach(function(e){e.id==n&&e.streams.forEach(function(e){e.trickModeVideo=t})})}),t=pi(l,"video"),i=pi(l,"audio"),!t.length&&!i.length)throw new ee(2,4,4004);for(i.length||(i=[null]),t.length||(t=[null]),n=[],a=0;a<i.length;a++)for(s=0;s<t.length;s++)fi(e,i[a],t[s],n);for(e=pi(l,"text"),t=[],i=0;i<e.length;i++)t.push.apply(t,e[i].streams);return{startTime:r.start,textStreams:t,variants:n}}function pi(e,t){return e.filter(function(e){return e.contentType==t})}function fi(e,t,n,r){if(t||n)if(t&&n){var i=t.drmInfos,a=n.drmInfos;if(i.length&&a.length?0<Pt(i,a).length:1){a=Pt(t.drmInfos,n.drmInfos);for(var o=0;o<t.streams.length;o++)for(var s=0;s<n.streams.length;s++)i=(n.streams[s].bandwidth||0)+(t.streams[o].bandwidth||0),i={id:e.h++,language:t.language,primary:t.Rc||n.Rc,audio:t.streams[o],video:n.streams[s],bandwidth:i,drmInfos:a,allowedByApplication:!0,allowedByKeySystem:!0},r.push(i)}}else for(a=t||n,o=0;o<a.streams.length;o++)i=a.streams[o].bandwidth||0,i={id:e.h++,language:a.language||"und",primary:a.Rc,audio:t?a.streams[o]:null,video:n?a.streams[o]:null,bandwidth:i,drmInfos:a.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},r.push(i)}function di(e){u(function t(){var n,r;return S(t,function(t){switch(t.j){case 1:return n=0,y(t,2),d(t,si(e),4);case 4:n=t.o,g(t,3);break;case 2:r=m(t),e.a&&(r.severity=1,e.a.onError(r));case 3:if(!e.a)return t.return();hi(e,n),h(t)}})})}function hi(e,t){0>e.s||e.i.O(Math.max(3,e.s-t,N(e.v)))}function yi(e,t,n){t=t||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,Xc:null},n=n||t.oa;var r=Rf.vb,i=Rf.Ae,a=Rf.R(e,"BaseURL").map(Rf.cc),s=e.getAttribute("contentType")||t.contentType,l=e.getAttribute("mimeType")||t.mimeType,u=e.getAttribute("codecs")||t.codecs;i=Rf.J(e,"frameRate",i)||t.frameRate;var c=Rf.R(e,"InbandEventStream"),p=t.emsgSchemeIdUris.slice();c=o(c);for(var f=c.next();!f.done;f=c.next())f=f.value.getAttribute("schemeIdUri"),p.includes(f)||p.push(f);return c=Rf.R(e,"AudioChannelConfiguration"),c=vi(c)||t.Xc,s||(s=_i(l,u)),{oa:Bt(n,a),Ob:Rf.ac(e,"SegmentBase")||t.Ob,Ja:Rf.ac(e,"SegmentList")||t.Ja,Qb:Rf.ac(e,"SegmentTemplate")||t.Qb,width:Rf.J(e,"width",r)||t.width,height:Rf.J(e,"height",r)||t.height,contentType:s,mimeType:l,codecs:u,frameRate:i,emsgSchemeIdUris:p,id:e.getAttribute("id"),Xc:c}}function vi(e){for(var t=0;t<e.length;++t){var n=e[t],r=n.getAttribute("schemeIdUri");if(r&&(n=n.getAttribute("value")))switch(r){case"urn:mpeg:dash:outputChannelPositionList:2012":return n.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(r=parseInt(n,10)))continue;return r;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(r=parseInt(n,16)){for(e=0;r;)1&r&&++e,r>>=1;return e}}}return null}function gi(e){var t=e.Ob?1:0;return t+=e.Ja?1:0,0==(t+=e.Qb?1:0)?"text"==e.contentType||"application"==e.contentType:(1!=t&&(e.Ob&&(e.Ja=null),e.Qb=null),!0)}function mi(e,t,n,r){return t=Bt(t,[n]),t=Ee(t,e.b.retryParameters),t.method=r,t=e.a.networkingEngine.request(4,t),me(e.g,t),t.promise.then(function(e){if("HEAD"==r){if(!e.headers||!e.headers.date)return 0;e=e.headers.date}else e=ze(e.data);return e=Date.parse(e),isNaN(e)?0:e-Date.now()})}function bi(e,t,n){n=n.map(function(e){return{scheme:e.getAttribute("schemeIdUri"),value:e.getAttribute("value")}});var r=e.b.dash.clockSyncUri;return!n.length&&r&&n.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:r}),Yp.ye(n,function(e){var n=e.scheme;switch(e=e.value,n){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return mi(this,t,e,"HEAD");case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return mi(this,t,e,"GET");case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return n=Date.parse(e),isNaN(n)?0:n-Date.now();case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":return F("NTP UTCTiming scheme is not supported"),Promise.reject();default:return F("Unrecognized scheme in UTCTiming element",n),Promise.reject()}}.bind(e)).catch(function(){return F("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),0})}function _i(e,t){return Xt(Ue(e,t))?"text":e.split("/")[0]}function Ei(e,t,n,r){this.b=e,this.type=t,this.a=n,this.segments=r||null}function ki(e,t,n,r){this.id=e,this.name=t,this.a=n,this.value=void 0===r?null:r}function Ti(e,t){this.name=e,this.value=t}function Ai(e,t,n){return(e=e.getAttribute(t))?e.value:n||null}function wi(e,t){this.b=t,this.a=e}function Si(e){this.b=e,this.a=0}function Pi(e){Oi(e,/[ \t]+/gm)}function Oi(e,t){t.lastIndex=e.a;var n=t.exec(e.b);return n=null==n?null:{position:n.index,length:n[0].length,Jf:n},e.a==e.b.length||null==n||n.position!=e.a?null:(e.a+=n.length,n.Jf)}function Ci(e){return e.a==e.b.length?null:(e=Oi(e,/[^ \t\n]*/gm))?e[0]:null}function xi(){this.a=0}function Ri(e,t,n){t=ze(t),t=t.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var r=t.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(r[0]))throw new ee(2,4,4015);t=0;for(var i=1;i<r.length;i++)if(!Nf.Pc(r[i])){var a=Di(e,r[i]);if(--e.a,jf.includes(a.name)){t=1;break}"EXT-X-STREAM-INF"==a.name&&(i+=1)}for(i=[],a=1;a<r.length;)if(Nf.Pc(r[a]))a+=1;else{var o=Di(e,r[a]);if(Uf.includes(o.name)){if(1!=t)throw new ee(2,4,4017);return r=r.splice(a,r.length-a),e=Ii(e,n,r,i),new Ei(n,t,i,e)}i.push(o),a+=1,"EXT-X-STREAM-INF"==o.name&&(o.a.push(new Ti("URI",r[a])),a+=1)}return new Ei(n,t,i)}function Ii(e,t,n,r){var i=[],a=[];return n.forEach(function(n){if(/^(#EXT)/.test(n))n=Di(e,n),jf.includes(n.name)?r.push(n):a.push(n);else{if(Nf.Pc(n))return[];n=Nf.zc(t,n.trim()),i.push(new wi(n,a)),a=[]}}),i}function Di(e,t){var n=e.a++,r=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!r)throw new ee(2,4,4016,t);var i=r[1],a=r[2];r=[];var o;if(a){a=new Si(a);var s;(s=Oi(a,/^([^,=]+)(?:,|$)/g))&&(o=s[1]);for(var l=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;s=Oi(a,l);)r.push(new Ti(s[1],s[2]||s[3]))}return new ki(n,i,r,o)}function Mi(e){try{var t=Mi.parse(e);return ae({uri:e,ad:e,data:t.data,headers:{"content-type":t.contentType}})}catch(e){return re(e)}}function Li(){var e=this;this.c=this.g=null,this.$=1,this.D=new Map,this.T=new Set,this.a=new Map,this.b=null,this.v="",this.s=new xi,this.P=0,this.h=new J(function(){pa(e)}),this.f=Gf,this.m=null,this.C=0,this.G=1/0,this.i=new ge,this.M=[],this.l=new Map,this.W=!1}function Ni(e,t){return u(function n(){var r,i,a,o,s,l,u,c,p,f,y;return S(n,function(n){switch(n.j){case 1:return r=Nf,i=Hf,a=t.pe,d(n,ca(e,a),2);case 2:if(o=n.o,s=Ri(e.s,o.data,o.uri),1!=s.type)throw new ee(2,4,4017);return u=(l=r.Ra(s.a,"EXT-X-MEDIA-SEQUENCE"))?Number(l.value):0,c=t.stream,d(n,$i(e,t.tc,s,u,c.mimeType,c.codecs),3);case 3:p=n.o,t.Pb.a=p,f=p[p.length-1],(y=r.Ra(s.a,"EXT-X-ENDLIST"))&&(fa(e,i.Oa),e.b.wa(f.endTime)),h(n)}})})}function ji(e,t){return u(function n(){var r,i,a,s,l,u,c,p,f,y,v;return S(n,function(n){switch(n.j){case 1:if(r=Ri(e.s,t,e.v),0!=r.type)throw new ee(2,4,4022);return d(n,Ui(e,r),2);case 2:if(i=n.o,!e.g)throw new ee(2,7,7001);if(e.W&&0==i.variants.length)throw new ee(2,4,4034);e.g.filterAllPeriods([i]),a=1/0,s=0,l=1/0;for(var g=o(e.a.values()),m=g.next();!m.done;m=g.next())u=m.value,a=Math.min(a,u.Uc),s=Math.max(s,u.Uc),"text"!=u.stream.type&&(l=Math.min(l,u.duration));if(e.f!=Hf.Oa?(e.b=new ii(0,3*e.C),e.b.Rb(!1)):(e.b=new ii(null,0),e.b.Rb(!0)),Qi(e),e.f!=Hf.Oa){for(e.P=e.G,c=Hf,e.f==c.td&&(p=e.b.pc,isNaN(e.c.availabilityWindowOverride)||(p=e.c.availabilityWindowOverride),e.b.md(p)),f=0;95443.7176888889<=s;)f+=95443.7176888889,s-=95443.7176888889;if(f)for(g=o(e.a.values()),m=g.next();!m.done;m=g.next())y=m.value,95443.7176888889>y.Uc&&(y.stream.presentationTimeOffset=-f,y.Pb.offset(f))}else for(e.b.wa(l),e.b.offset(-a),g=o(e.a.values()),m=g.next();!m.done;m=g.next())v=m.value,v.stream.presentationTimeOffset=a,v.Pb.offset(-a),Nr(v.Pb,l);e.m={presentationTimeline:e.b,periods:[i],offlineSessionIds:[],minBufferTime:0},h(n)}})})}function Ui(e,t){return u(function n(){var r,i,a,o,s,l,c,p,f,h,v,g;return S(n,function(n){switch(n.j){case 1:return r=Nf,i=Yp,a=t.a,o=r.lb(t.a,"EXT-X-MEDIA"),s=o.filter(function(e){return"SUBTITLES"==la(e,"TYPE")}.bind(e)),l=s.map(function(e){var t=this;return u(function n(){var r;return S(n,function(n){switch(n.j){case 1:return y(n,2),d(n,Hi(t,e),4);case 4:return n.return(n.o);case 2:if(r=m(n),t.c.hls.ignoreTextStreamFailures)return n.return(null);throw r}})})}.bind(e)),c=o.filter(function(e){return"CLOSED-CAPTIONS"==la(e,"TYPE")}),Ki(e,c),d(n,Promise.all(l),2);case 2:return p=n.o,f=r.lb(a,"EXT-X-STREAM-INF"),h=f.map(function(e){return Fi(this,e,t)}.bind(e)),d(n,Promise.all(h),3);case 3:return v=n.o,g=v.reduce(i.yc,[]),g=g.filter(function(e){return null!=e}),n.return({startTime:0,variants:g,textStreams:p.filter(function(e){return null!=e})})}})})}function Fi(e,t,n){return u(function r(){var i,a,o,s,l,u,c,p,f,h,y,v,g,m,b,_,E,k,T,A,w,P,O,C,x,R,I;return S(r,function(r){switch(r.j){case 1:return i=Wp,a=Nf,o=Ai(t,"CODECS","avc1.42E01E,mp4a.40.2"),s=ia(o.split(/\s*,\s*/)),l=t.getAttribute("RESOLUTION"),c=u=null,p=Ai(t,"FRAME-RATE"),f=Number(la(t,"BANDWIDTH")),l&&(h=l.value.split("x"),u=h[0],c=h[1]),y=a.lb(n.a,"EXT-X-MEDIA"),y=y.filter(function(e){return"CLOSED-CAPTIONS"!=la(e,"TYPE")}),y=y.filter(function(e){var t=Ai(e,"URI")||"";return"SUBTITLES"==(Ai(e,"TYPE")||"")||""!=t}),v=Ai(t,"AUDIO"),g=Ai(t,"VIDEO"),v?y=a.Hc(y,"AUDIO",v):g&&(y=a.Hc(y,"VIDEO",g)),(m=aa(i.qa,s))&&((b=Ai(t,"SUBTITLES"))&&(_=a.Hc(y,"SUBTITLES",b),_.length&&(E=e.D.get(_[0].id))&&(E.stream.codecs=m)),he(s,m)),k=y.map(function(e){return zi(this,e,s)}.bind(e)),T=[],A=[],d(r,Promise.all(k),2);case 2:if(P=r.o,P=P.filter(function(e){return null!=e}),v?T=P:g&&(A=P),C=!1,T.length||A.length?T.length?(R=la(t,"URI"),I=T[0].tc,R==I?(O=i.Ab,C=!0):O=i.Na):O=i.Ab:1==s.length?(x=aa(i.Na,s),O=l||p||x?i.Na:i.Ab):(O=i.Na,s=[s.join(",")]),C){r.A(3);break}return d(r,Yi(e,t,s,O),4);case 4:w=r.o;case 3:if(w)w.stream.type==i.Ab?T=[w]:A=[w];else if(null===w)return r.return([]);return A&&Bi(A),T&&Bi(T),r.return(Vi(e,T,A,f,u,c,p))}})})}function Bi(e){e.forEach(function(e){var t=e.stream.codecs.split(",");t=t.filter(function(e){return"mp4a.40.34"!=e}),e.stream.codecs=t.join(",")})}function Vi(e,t,n,r,i,a,s){n.forEach(function(e){(e=e.stream)&&(e.width=Number(i)||void 0,e.height=Number(a)||void 0,e.frameRate=Number(s)||void 0)}.bind(e)),t.length||(t=[null]),n.length||(n=[null]);var l=[];t=o(t);for(var u=t.next();!u.done;u=t.next()){u=u.value;for(var c=o(n),p=c.next();!p.done;p=c.next()){var f=p.value;p=u?u.stream:null;var d=f?f.stream:null,h=u?u.drmInfos:null,y=f?f.drmInfos:null;f=(f?f.tc:"")+" - "+(u?u.tc:"");var v=void 0;if(p&&d){if(!(h.length&&y.length?0<Pt(h,y).length:1))continue;v=Pt(h,y)}else p?v=h:d&&(v=y);e.T.has(f)||(p=Gi(e,p,d,r,v),l.push(p),e.T.add(f))}}return l}function Gi(e,t,n,r,i){return{id:e.$++,language:t?t.language:"und",primary:!!t&&t.primary||!!n&&n.primary,audio:t,video:n,bandwidth:r,drmInfos:i,allowedByApplication:!0,allowedByKeySystem:!0}}function Hi(e,t){return u(function n(){var r;return S(n,function(n){switch(n.j){case 1:return la(t,"TYPE"),d(n,zi(e,t,[]),2);case 2:return r=n.o,n.return(r.stream)}})})}function Ki(e,t){for(var n=o(t),r=n.next();!r.done;r=n.next()){r=r.value,la(r,"TYPE");var i=Ai(r,"LANGUAGE")||"und";i=vn(i);var a=la(r,"GROUP-ID");r=la(r,"INSTREAM-ID"),e.l.get(a)||e.l.set(a,new Map),e.l.get(a).set(r,i)}}function zi(e,t,n){return u(function r(){var i,a,o,s,l,u,c,p,f,h,y;return S(r,function(r){switch(r.j){case 1:if(i=la(t,"URI"),e.a.has(i))return r.return(e.a.get(i));if(a=la(t,"TYPE").toLowerCase(),o=Wp,"subtitles"==a&&(a=o.qa),s=vn(Ai(t,"LANGUAGE","und")),l=Ai(t,"NAME"),u=t.getAttribute("DEFAULT"),c=t.getAttribute("AUTOSELECT"),p=Ai(t,"CHANNELS"),"audio"==a)if(p){var v=p.split("/")[0];v=parseInt(v,10)}else v=null;else v=null;return f=v,h=!!u||!!c,d(r,Wi(e,i,n,a,s,h,l,f,null),2);case 2:return null==(y=r.o)?r.return(null):e.a.has(i)?r.return(e.a.get(i)):(e.D.set(t.id,y),e.a.set(i,y),r.return(y))}})})}function Yi(e,t,n,r){return u(function i(){var a,o,s,l,u;return S(i,function(i){switch(i.j){case 1:return a=Wp,(o=la(t,"URI"),e.a.has(o))?i.return(e.a.get(o)):(s=Ai(t,"CLOSED-CAPTIONS"),l=null,r==a.Na&&s&&"NONE"!=s&&(l=e.l.get(s)),d(i,Wi(e,o,n,r,"und",!1,null,null,l),2));case 2:return null==(u=i.o)?i.return(null):e.a.has(o)?i.return(e.a.get(o)):(e.a.set(o,u),i.return(u))}})})}function Wi(e,t,n,r,i,a,s,l,c){return u(function u(){var p,f,h,y,v,g,m,b,_,E,k,T,A,w,P,O,C,x,R,I,D,M,L,N,j,U;return S(u,function(u){switch(u.j){case 1:return p=Nf,f=p.zc(e.v,t),y="",d(u,ca(e,f),2);case 2:if(g=u.o,f=g.uri,h=Ri(e.s,g.data,f),1!=h.type)throw new ee(2,4,4017);m=[],h.segments.forEach(function(e){e=p.lb(e.b,"EXT-X-KEY"),m.push.apply(m,e)}),b=!1,_=[],E=null;for(var S=o(m),F=S.next();!F.done;F=S.next())if(k=F.value,"NONE"!=(T=la(k,"METHOD"))){if(b=!0,"AES-128"==T)return e.W=!0,u.return(null);A=la(k,"KEYFORMAT"),(P=(w=Vf[A])?w(k):null)&&(P.keyIds.length&&(E=P.keyIds[0]),_.push(P))}if(b&&!_.length)throw new ee(2,4,4026);return qi(e,h),y=oa(r,n),d(u,sa(e,r,y,h),3);case 3:return v=O=u.o,x=(C=p.Ra(h.a,"EXT-X-MEDIA-SEQUENCE"))?Number(C.value):0,d(u,$i(e,t,h,x,v,y),4);case 4:return R=u.o,I=R[0].startTime,D=R[R.length-1].endTime,M=D-I,L=new Lr(R),N=Xi(h),j=void 0,"text"==r&&(j="subtitle"),U={id:e.$++,originalId:s,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:L.find.bind(L),getSegmentReference:L.get.bind(L),initSegmentReference:N,presentationTimeOffset:0,mimeType:v,codecs:y,kind:j,encrypted:b,keyId:E,language:i,label:s,type:r,primary:a,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],channelsCount:l,closedCaptions:c},u.return({stream:U,Pb:L,drmInfos:_,tc:t,pe:f,Uc:I,qg:D,duration:M})}})})}function qi(e,t){var n=Hf,r=Nf.Ra(t.a,"EXT-X-PLAYLIST-TYPE"),i=Nf.Ra(t.a,"EXT-X-ENDLIST");i=r&&"VOD"==r.value||i,r=r&&"EVENT"==r.value&&!i,r=!i&&!r,i?fa(e,n.Oa):(r?fa(e,n.td):fa(e,n.ke),n=ua(t.a,"EXT-X-TARGETDURATION"),n=Number(n.value),e.C=Math.max(n,e.C),e.G=Math.min(n,e.G))}function Xi(e){var t=Nf.lb(e.a,"EXT-X-MAP");if(!t.length)return null;if(1<t.length)throw new ee(2,4,4020);t=t[0];var n=la(t,"URI"),r=Nf.zc(e.b,n);return e=0,n=null,(t=Ai(t,"BYTERANGE"))&&(e=t.split("@"),t=Number(e[0]),e=Number(e[1]),n=e+t-1),new Rr(function(){return[r]},e,n)}function Ji(e,t,n,r){var i=t.b,a=t.a;t=ua(i,"EXTINF").value.split(","),t=r+Number(t[0]);var o=0,s=null;return(i=Nf.Ra(i,"EXT-X-BYTERANGE"))&&(o=i.value.split("@"),i=Number(o[0]),o=o[1]?Number(o[1]):e.a+1,s=o+i-1),new Ir(n,r,t,function(){return[a]},o,s)}function Qi(e){e.b&&(e.M.forEach(function(t){e.b.sb(t,0)}),e.M=[])}function $i(e,t,n,r,i,a){return u(function o(){var s,l,u,c,p,f,h,y,v,g,m;return S(o,function(o){switch(o.j){case 1:return s=n.segments,l=[],u=s[0].a,c=Ji(null,s[0],r,0),p=Xi(n),d(o,ea(e,t,p,c,i,a),2);case 2:f=o.o,u.split("/").pop();for(var b=0;b<s.length;++b)h=s[b],y=l[l.length-1],v=0==b?f:y.endTime,g=r+b,m=Ji(y,h,g,v),l.push(m);return e.M.push(l),Qi(e),o.return(l)}})})}function Zi(e,t){return u(function n(){var r,i,a,o,s,l;return S(n,function(n){switch(n.j){case 1:return r=Dp,i=ai(t.c(),t.b,t.b+2048-1,e.c.retryParameters),a=ai(t.c(),t.b,t.a,e.c.retryParameters),y(n,2),d(n,da(e,i,r.ud),4);case 4:return o=n.o,n.return(o);case 2:if(s=m(n),7001==s.code)throw s;return F("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive!  Your server should support Range requests and CORS preflights.",i.uris[0]),d(n,da(e,a,r.ud),5);case 5:return l=n.o,n.return(l)}})})}function ea(e,t,n,r,i,a){return u(function o(){var s,l,u,c,p,f,h,y,v;return S(o,function(o){switch(o.j){case 1:if(e.m&&(s=e.a.get(t),l=s.Pb,u=l.get(r.position)))return o.return(u.startTime);if("audio/mpeg"==i)return o.return(0);if("video/mp4"!=i&&"audio/mp4"!=i){o.A(2);break}return c=[Zi(e,r)],n&&c.push(Zi(e,n)),d(o,Promise.all(c),3);case 3:return p=o.o,f=p[0],h=p[1]||p[0],o.return(ta(f.data,h.data));case 2:if("video/mp2t"!=i){o.A(4);break}return d(o,Zi(e,r),5);case 5:return y=o.o,o.return(na(y.data));case 4:if("application/mp4"!=i&&!i.startsWith("text/")){o.A(6);break}return d(o,Zi(e,r),7);case 7:return v=o.o,o.return(ra(i,a,v.data));case 6:if("video/webm"==i)return o.return(null);throw new ee(2,4,4030)}})})}function ta(e,t){var n=0;if((new pr).H("moov",fr).H("trak",fr).H("mdia",fr).fa("mdhd",function(e){e.reader.L(0==e.version?8:16),n=e.reader.F(),e.parser.stop()}).parse(t,!0),!n)throw new ee(2,4,4030);var r=0,i=!1;if((new pr).H("moof",fr).H("traf",fr).fa("tfdt",function(e){r=(0==e.version?e.reader.F():e.reader.yb())/n,i=!0,e.parser.stop()}).parse(e,!0),!i)throw new ee(2,4,4030);return r}function na(e){function t(){throw new ee(2,4,4030)}e=new ur(new DataView(e),0);for(var n=0,r=0;;){if(n=e.ba(),r=e.ka(),71!=r&&t(),16384&e.Mb()||t(),r=(48&e.ka())>>4,0!=r&&2!=r||t(),3==r&&(r=e.ka(),e.L(r)),1==e.F()>>8)return e.L(3),n=e.ka()>>6,0!=n&&1!=n||t(),0==e.ka()&&t(),n=e.ka(),r=e.Mb(),e=e.Mb(),(1073741824*((14&n)>>1)+((65534&r)<<14|(65534&e)>>1))/9e4;e.seek(n+188),r=e.ka(),71!=r&&(e.seek(n+192),r=e.ka()),71!=r&&(e.seek(n+204),r=e.ka()),71!=r&&t(),e.$d(1)}}function ra(e,t,n){return e=Ue(e,t),Xt(e)?(t=new qt(null),Jt(t,e),t.Mc(n)):0}function ia(e){var t=new Set,n=[];e=o(e);for(var r=e.next();!r.done;r=e.next()){r=r.value;var i=Be(r)[0];t.has(i)||(n.push(r),t.add(i))}return n}function aa(e,t){for(var n=Ff[e],r=0;r<n.length;r++)for(var i=0;i<t.length;i++)if(n[r].test(t[i].trim()))return t[i].trim();return"text"==e?"":null}function oa(e,t){if(1==t.length)return t[0];var n=aa(e,t);if(null!=n)return n;throw new ee(2,4,4025,t)}function sa(e,t,n,r){return u(function i(){var a,o,s,l,u,c,p,f,h,y;return S(i,function(i){switch(i.j){case 1:return a=Wp,(o=Dp,s=r.segments[0].a,l=new V(s),u=l.ia.split(".").pop(),c=Bf[t],p=c[u])?i.return(p):t==a.qa?n&&"vtt"!=n?i.return("application/mp4"):i.return("text/vtt"):(f=Ee([s],e.c.retryParameters),f.method="HEAD",d(i,da(e,f,o.ud),2));case 2:if(h=i.o,!(y=h.headers["content-type"]))throw new ee(2,4,4021,u);return i.return(y.split(";")[0])}})})}function la(e,t){var n=e.getAttribute(t);if(!n)throw new ee(2,4,4023,t);return n.value}function ua(e,t){var n=Nf.Ra(e,t);if(!n)throw new ee(2,4,4024,t);return n}function ca(e,t){return da(e,Ee([t],e.c.retryParameters),Dp.ng)}function pa(e){u(function t(){var n,r;return S(t,function(t){switch(t.j){case 1:return e.g?(y(t,2),d(t,e.update(),4)):t.return();case 4:n=e.P,e.h.O(n),g(t,0);break;case 2:r=m(t),r.severity=1,e.g.onError(r),e.h.O(.1),h(t)}})})}function fa(e,t){e.f=t,e.b&&e.b.Rb(e.f==Hf.Oa),e.f!=Hf.Oa||e.h.stop()}function da(e,t,n){if(!e.i)throw new ee(2,7,7001);return t=e.g.networkingEngine.request(n,t),me(e.i,t),t.promise}function ha(){this.a=new Map}function ya(e,t,n){va(e,t).text=n}function va(e,t){return e.a.has(t)||e.a.set(t,new ga),e.a.get(t)}function ga(){this.text=this.variant=null}function ma(e,t){this.a=e,this.b=new Set([e]),t=t||[];for(var n=o(t),r=n.next();!r.done;r=n.next())this.add(r.value)}function ba(e,t){var n;if(!(n=!!e.audio!=!!t.audio||!!e.video!=!!t.video||e.language!=t.language)&&(n=e.audio&&t.audio)){n=e.audio;var r=t.audio;n=!(n.channelsCount==r.channelsCount&&_a(n,r)&&Ea(n.roles,r.roles))}return!n&&(n=e.video&&t.video)&&(n=e.video,r=t.video,n=!(_a(n,r)&&Ea(n.roles,r.roles))),!n}function _a(e,t){if(e.mimeType!=t.mimeType)return!1;var n=e.codecs.split(",").map(function(e){return Be(e)[0]}),r=t.codecs.split(",").map(function(e){return Be(e)[0]});if(n.length!=r.length)return!1;n.sort(),r.sort();for(var i=0;i<n.length;i++)if(n[i]!=r[i])return!1;return!0}function Ea(e,t){var n=new Set(e),r=new Set(t);if(n.delete("main"),r.delete("main"),n.size!=r.size)return!1;n=o(n);for(var i=n.next();!i.done;i=n.next())if(!r.has(i.value))return!1;return!0}function ka(e){this.a=e,this.b=new Ta(e.language,"",e.audio&&e.audio.channelsCount?e.audio.channelsCount:0)}function Ta(e,t,n){this.c=e,this.b=t,this.a=n}function Aa(e,t){var n=vn(t),r=mn(n,e.map(function(e){return gn(e)}));return r?e.filter(function(e){return r==gn(e)}):[]}function wa(e,t){return e.filter(function(e){var n=e.audio;return e=e.video,n&&0<=n.roles.indexOf(t)||e&&0<=e.roles.indexOf(t)})}function Sa(e,t){this.a=zf,this.b=(new Map).set(zf,t).set(Kf,e)}function Pa(e,t){this.f=e,this.g=xa(e),this.b=e.a.currentTime,this.c=Date.now()/1e3,this.h=t,this.a=function(){}}function Oa(e,t){e.a=t}function Ca(e){this.a=e}function xa(e){if(e.a.paused||0==e.a.playbackRate||null==e.a.buffered)var t=!1;else e:{t=e.a.buffered,e=e.a.currentTime;for(var n=0;n<t.length;n++){var r=t.start(n),i=t.end(n);if(!(e<r||e>i-.5)){t=!0;break e}}t=!1}return t}function Ra(e,t,n,r,i){var a=this;this.a=e,this.v=t,this.s=n,this.l=i,this.f=new Oe,this.i=!1,this.m=e.readyState,this.c=!1,this.b=r,this.h=!1,this.f.w(e,"waiting",function(){return Ia(a)}),this.g=new J(function(){Ia(a)}).La(.25)}function Ia(e){if(0!=e.a.readyState){if(e.a.seeking){if(!e.i)return}else e.i=!1;if(!e.a.paused){e.a.readyState!=e.m&&(e.c=!1,e.m=e.a.readyState);var t=e.s.smallGapLimit,n=e.a.currentTime,r=e.a.buffered;e:{if(r&&r.length&&!(1==r.length&&1e-6>r.end(0)-r.start(0)))for(var i=He("Edge/")||He("Trident/")||He("Tizen")||He("CrKey")?.5:.1,a=0;a<r.length;a++)if(r.start(a)>n&&(0==a||r.end(a-1)-n<=i)){i=a;break e}i=null}if(null==i)e.b&&(e=e.b,n=e.f,r=xa(n),n=n.a.currentTime,i=Date.now()/1e3,e.b==n&&e.g==r||(e.c=i,e.b=n,e.g=r),(n=i-e.c)>=e.h&&r&&e.a(e.b,n));else if(0!=i||e.h){a=r.start(i);var o=e.v.za();if(!(a>=o)){o=a-n,t=o<=t;var s=!1;.001>o||(t||e.c||(e.c=!0,n=new ue("largegap",{currentTime:n,gapSize:o}),n.cancelable=!0,e.l(n),e.s.jumpLargeGaps&&!n.defaultPrevented&&(s=!0)),!t&&!s)||(0!=i&&r.end(i-1),e.a.currentTime=a)}}}}}function Da(e){var t=this;this.c=e,this.a=new Set,this.b=new J(function(){Ma(t,!1)}).La(.25)}function Ma(e,t){for(var n=o(e.a),r=n.next();!r.done;r=n.next())r.value.g(e.c.currentTime,t)}function La(e){var t=[];e=o(e);for(var n=e.next();!n.done;n=e.next()){n=o(n.value.variants);for(var r=n.next();!r.done;r=n.next())t.push(r.value)}return t}function Na(e,t){for(var n=null,r=o(e),i=r.next();!i.done;i=r.next())i=i.value,t>=i.startTime&&(n=i);return n}function ja(e){this.c=e,this.a=null,this.b=function(){}}function Ua(e,t){e.b=t}function Fa(e){var t=this;this.a=e,this.f=!1,this.c=this.a.ec(),this.b=new J(function(){t.a.Id(.25*t.c)})}function Ba(e){e.b.stop();var t=e.f?0:e.c;if(0<=t)try{return void(e.a.ec()!=t&&e.a.ld(t))}catch(e){}e.b.La(.25),0!=e.a.ec()&&e.a.ld(0)}function Va(e,t,n){this.a=e,this.f=t,this.g=n,this.h=!1,this.b=new Oe,this.c=new Ya(e),0<e.readyState?Ka(this,n):Ha(this,n)}function Ga(e){return e.h?e.a.currentTime:e.g}function Ha(e,t){e.g=t,e.b.ea(e.a,"loadedmetadata"),e.b.da(e.a,"loadedmetadata",function(){Ka(e,t)})}function Ka(e,t){.001>Math.abs(e.a.currentTime-t)?za(e):(e.b.da(e.a,"seeking",function(){za(e)}),Wa(e.c,0==e.a.currentTime?t:e.a.currentTime))}function za(e){e.h=!0,e.b.w(e.a,"seeking",function(){return e.f()})}function Ya(e){var t=this;this.b=e,this.h=10,this.g=this.f=this.c=0,this.a=new J(function(){0>=t.c?t.a.stop():t.b.currentTime!=t.f?t.a.stop():(t.b.currentTime=t.g,t.c--)})}function Wa(e,t){e.f=e.b.currentTime,e.g=t,e.c=e.h,e.b.currentTime=t,e.a.La(.1)}function qa(e){function t(){null==n.c?n.f=!0:(n.b.da(n.a,"seeking",function(){n.f=!0}),n.a.currentTime=n.c)}var n=this;this.a=e,this.f=!1,this.c=null,this.b=new Oe,0==this.a.readyState?this.b.da(this.a,"loadedmetadata",t):t()}function Xa(e,t,n,r,i,a){var o=this;this.b=e,this.a=t.presentationTimeline,this.C=t.minBufferTime||0,this.g=n,this.v=i,this.l=null,this.f=new Ra(e,t.presentationTimeline,n,eo(e,n),a),this.c=new Va(e,function(){var e=o.f;e.i=!0,e.h=!1,e.c=!1;var t=Ga(o.c);return e=$a(o,t),.001<Math.abs(e-t)&&(t=(new Date).getTime()/1e3,!o.l||o.l<t-1)?(o.l=t,t=o.c,0<t.a.readyState?Wa(t.c,e):Ha(t,e),e=void 0):(o.v(),e=void 0),e},Ja(this,r)),this.i=new J(function(){if(0!=o.b.readyState&&!o.b.paused){var e=o.b.currentTime,t=o.a.mb(),n=o.a.za();3>n-t&&(t=n-3),e<t&&(e=$a(o,e),o.b.currentTime=e)}}).La(.25)}function Ja(e,t){return null==t?t=1/0>e.a.Y()?e.a.mb():e.a.za():0>t&&(t=e.a.za()+t),Qa(e,Za(e,t))}function Qa(e,t){var n=e.a.Y();return t>=n?n-e.g.durationBackoff:t}function $a(e,t){var n=jt.bind(null,e.b.buffered),r=Math.max(e.C,e.g.rebufferingGoal),i=e.g.safeSeekOffset,a=e.a.mb(),o=e.a.za(),s=e.a.Y();3>o-a&&(a=o-3);var l=e.a.Gb(r),u=e.a.Gb(i);return r=e.a.Gb(r+i),t>=s?Qa(e,t):t>o?o:t<a?n(u)?u:r:t>=l||n(t)?t:r}function Za(e,t){var n=e.a.mb();return t<n?n:(n=e.a.za(),t>n?n:t)}function eo(e,t){if(!t.stallEnabled)return null;var n=t.stallSkip,r=new Pa(new Ca(e),t.stallThreshold);return Oa(r,function(){e.currentTime+=n}),r}function to(){this.b=function(){},this.a=new Set}function no(e,t){e.b=t}function ro(e){var t=this;this.h=e,this.f=new Map,this.a=function(){},this.b=function(){},this.c=function(){},this.i=[{bb:null,ab:Wf,Ua:function(e,n){return t.a(e,n)}},{bb:Yf,ab:Wf,Ua:function(e,n){return t.a(e,n)}},{bb:qf,ab:Wf,Ua:function(e,n){return t.a(e,n)}},{bb:Wf,ab:Yf,Ua:function(e,n){return t.b(e,n)}},{bb:Wf,ab:qf,Ua:function(e,n){return t.b(e,n)}},{bb:Yf,ab:qf,Ua:function(e,n){return t.c(e,n)}},{bb:qf,ab:Yf,Ua:function(e,n){return t.c(e,n)}}]}function io(e,t,n,r){e.a=t,e.b=n,e.c=r}function ao(e,t){this.a=t,this.c=e,this.g=null,this.l=1,this.v=Promise.resolve(),this.h=[],this.i=new Map,this.b=new Map,this.s=!1,this.G=null,this.D=this.f=this.m=!1,this.C=0}function oo(e){return lo(e,"audio")}function so(e){return lo(e,"video")}function lo(e,t){var n=e.b.get(t);return n?n.Ia||n.stream:null}function uo(e,t){return u(function n(){var r,i,a,o,s,l,u,c,p,f;return S(n,function(n){switch(n.j){case 1:return r=Wp,d(n,un(e.a.I,r.qa),2);case 2:return e.C++,e.D=!1,i=e.C,a=e.a.I,o=new Map,s=new Set,o.set(r.qa,t),s.add(t),d(n,a.init(o,!1),3);case 3:return e.f?n.return():d(n,_o(e,s),4);case 4:if(e.f)return n.return();u=(l=e.a.I.g.isTextVisible())||e.g.alwaysStreamText,e.C!=i||e.b.has(r.qa)||e.D||!u||(c=e.a.Sa(),p=No(e,c),f=mo(t,p,0),e.b.set(r.qa,f),Bo(e,f,0)),h(n)}})})}function co(e,t){var n=e.b.get("video");if(n){var r=n.stream;if(r)if(t){var i=r.trickModeVideo;i&&!n.Ia&&(fo(e,i,!1,0,!1),n.Ia=r)}else(r=n.Ia)&&(n.Ia=null,fo(e,r,!0,0,!1))}}function po(e,t,n,r){t.video&&fo(e,t.video,n,r,!1),t.audio&&fo(e,t.audio,n,r,!1)}function fo(e,t,n,r,i){var a=e.b.get(t.type);if(!a&&"text"==t.type&&e.g.ignoreTextStreamFailures)uo(e,t);else if(a){var o=jo(e,t),s=Array.from(e.b.values()).every(function(e){return e.pa==a.pa});n&&o!=a.pa&&s?e.b.forEach(function(t){vo(e,t)}):(a.Ia&&(t.trickModeVideo?(a.Ia=t,t=t.trickModeVideo):a.Ia=null),(s=e.h[o])&&s.zb&&(s=e.i.get(t.id))&&s.zb&&(a.stream!=t||i)&&("text"==t.type&&tn(e.a.I,Ue(t.mimeType,t.codecs)),a.stream=t,a.hc=!0,ho(e,a,o)&&a.Kb.abort(),n&&(a.Pa?a.uc=!0:a.Ha?(a.Ma=!0,a.Zb=r,a.uc=!0):(Vo(a),Fo(e,a,!0,r).catch(function(t){e.a&&e.a.onError(t)})))))}}function ho(e,t,n){if(!t.Kb)return!1;var r=e.a.Sa(),i=an(e.a.I,t.type);if(null==(n=(n=wo(e,t,r,i,n))&&n.a?n.a-n.b:null))return!1;var a=t.stream.initSegmentReference;return a&&(n+=(a.a?a.a-a.b:null)||0),a=e.a.getBandwidthEstimate(),8*n/a<i-r-Math.max(e.c.minBufferTime||0,e.g.rebufferingGoal)||t.Kb.b.a>n}function yo(e){function t(t){var i=e.a.I;return"text"==t?(t=i.a,t=null!=t.a&&null!=t.b&&(n>=t.a&&n<t.b)):(t=sn(i,t),t=jt(t,n,r)),t}var n=e.a.Sa(),r=e.g.smallGapLimit,i=No(e,n);if(Le(e.b.values(),function(e){return e.pa==i}))for(var a=o(e.b.keys()),s=a.next();!s.done;s=a.next())s=s.value,t(s)||vo(e,e.b.get(s));else Le(e.b.keys(),t)||e.b.forEach(function(t){vo(e,t)})}function vo(e,t){t.Pa||t.Ma||(t.Ha?(t.Ma=!0,t.Zb=0):null==rn(e.a.I,t.type)?null==t.Da&&Bo(e,t,0):(Vo(t),Fo(e,t,!1,0).catch(function(t){e.a&&e.a.onError(t)})))}function go(e,t,n,r,i){return u(function a(){var o,s,l,u,c,p,f;return S(a,function(a){switch(a.j){case 1:return o=e.a.Sa(),s=No(e,o),l=Wp,u=new Map,c=new Set,t&&(u.set(l.Ab,t),c.add(t)),n&&(u.set(l.Na,n),c.add(n)),r&&(u.set(l.qa,r),c.add(r)),p=e.a.I,f=e.g.forceTransmuxTS,d(a,p.init(u,f),2);case 2:return e.f?a.return():(Eo(e),d(a,_o(e,c),3));case 3:if(e.f)return a.return();u.forEach(function(t,n){if(!e.b.has(n)){var r=mo(t,s,i);e.b.set(n,r),Bo(e,r,0)}}),h(a)}})})}function mo(e,t,n){return{stream:e,type:e.type,pb:null,Aa:null,Ia:null,hc:!0,pa:t,endOfStream:!1,Ha:!1,Da:null,Ma:!1,Zb:0,uc:!1,Pa:!1,dd:!1,Ib:!1,Zd:n||0,Kb:null}}function bo(e,t){var n=e.h[t];if(n)return n.promise;n={promise:new te,zb:!1},e.h[t]=n;for(var r=new Set,i=o(e.c.periods[t].variants),a=i.next();!a.done;a=i.next())a=a.value,a.video&&r.add(a.video),a.video&&a.video.trickModeVideo&&r.add(a.video.trickModeVideo),a.audio&&r.add(a.audio);for(i=o(e.c.periods[t].textStreams),a=i.next();!a.done;a=i.next())r.add(a.value);return e.v=e.v.then(function(){if(!this.f)return _o(this,r)}.bind(e)).then(function(){this.f||(this.h[t].promise.resolve(),this.h[t].zb=!0)}.bind(e)).catch(function(e){this.f||(this.h[t].promise.catch(function(){}),this.h[t].promise.reject(),delete this.h[t],this.a.onError(e))}.bind(e)),n.promise}function _o(e,t){return u(function n(){var r,i,a,s,l,u,c;return S(n,function(n){switch(n.j){case 1:r=[];for(var p=o(t),f=p.next();!f.done;f=p.next())i=f.value,(a=e.i.get(i.id))?r.push(a.promise):(e.i.set(i.id,{promise:new te,zb:!1}),r.push(i.createSegmentIndex()));return y(n,2),d(n,Promise.all(r),4);case 4:if(e.f)return n.return();g(n,3);break;case 2:if(s=m(n),e.f)return n.return();for(n=o(t),f=n.next();!f.done;f=n.next())l=f.value,e.i.get(l.id).promise.catch(function(){}),e.i.get(l.id).promise.reject(),e.i.delete(l.id);throw s;case 3:for(p=o(t),f=p.next();!f.done;f=p.next())u=f.value,c=e.i.get(u.id),c.zb||(c.promise.resolve(),c.zb=!0);h(n)}})})}function Eo(e){var t=e.c.presentationTimeline.Y();1/0>t?e.a.I.wa(t):e.a.I.wa(Math.pow(2,32))}function ko(e,t){if(!e.f&&!t.Ha&&null!=t.Da&&!t.Pa)if(t.Da=null,t.Ma)Fo(e,t,t.uc,t.Zb);else{try{var n=To(e,t);null!=n&&(Bo(e,t,n),t.Ib=!1)}catch(t){return void Go(e,t)}n=Array.from(e.b.values()),Do(e,t),e.s&&n.every(function(e){return e.endOfStream})&&e.a.I.endOfStream().then(function(){if(!this.f){var e=this.a.I.Y();0!=e&&e<this.c.presentationTimeline.Y()&&this.c.presentationTimeline.wa(e)}}.bind(e))}}function To(e,t){if(Mo(t))return e.a.I.rc(t.stream.originalId||""),null;var n=e.a.Sa(),r=Ao(e,t,n),i=jo(e,t.stream),a=No(e,r),o=on(e.a.I,t.type,n),s=Math.max(e.c.minBufferTime||0,e.g.rebufferingGoal,e.g.bufferingGoal)*e.l;if(r>=e.c.presentationTimeline.Y())return t.endOfStream=!0,"video"==t.type&&(r=e.b.get("text"))&&"application/cea-608"==r.stream.mimeType&&(r.endOfStream=!0),null;if(t.endOfStream=!1,t.pa=a,a!=i)return null;if(o>=s)return.5;if(a=an(e.a.I,t.type),!(a=wo(e,t,n,a,i)))return 1;var l=1/0;return Array.from(e.b.values()).forEach(function(t){Mo(t)||(t=Ao(e,t,n),l=Math.min(l,t))}),r>=l+e.c.presentationTimeline.a?1:(t.Zd=0,Po(e,t,n,i,a),null)}function Ao(e,t,n){return t.pb&&t.Aa?(n=jo(e,t.pb),e.c.periods[n].startTime+t.Aa.endTime):Math.max(n,t.Zd)}function wo(e,t,n,r,i){if(t.Aa&&t.stream==t.pb)return So(e,t,i,t.Aa.position+1);if(t.Aa?(n=jo(e,t.pb),n=t.stream.findSegmentPosition(Math.max(0,e.c.periods[n].startTime+t.Aa.endTime-e.c.periods[i].startTime))):n=t.stream.findSegmentPosition(Math.max(0,(r||n)-e.c.periods[i].startTime)),null==n)return null;var a=null;return null==r&&(a=So(e,t,i,Math.max(0,n-1))),a||So(e,t,i,n)}function So(e,t,n,r){return n=e.c.periods[n],(t=t.stream.getSegmentReference(r))?(r=e.c.presentationTimeline,e=r.Hb(),r=r.nb(),n.startTime+t.endTime<e||n.startTime+t.startTime>r?null:t):null}function Po(e,t,n,r,i){var a=e.c.periods[r],o=t.stream,s=e.c.presentationTimeline.Y(),l=e.c.periods[r+1];r=Co(e,t,r,Math.max(0,a.startTime-.1),l?l.startTime+.01:s),t.Ha=!0,t.hc=!1,s=Uo(e,t,i),Promise.all([r,s]).then(function(e){if(!this.f&&!this.m)return xo(this,t,n,a,o,i,e[1])}.bind(e)).then(function(){this.f||this.m||(t.Ha=!1,t.dd=!1,t.Ma||this.a.Zc(),Bo(this,t,0),Io(this,o))}.bind(e)).catch(function(e){this.f||this.m||(t.Ha=!1,"text"==t.type&&this.g.ignoreTextStreamFailures?this.b.delete("text"):7001==e.code?(t.Ha=!1,t.Da=null,Bo(this,t,0)):3017==e.code?Oo(this,t,e):(t.Ib=!0,e.severity=2,Go(this,e)))}.bind(e))}function Oo(e,t,n){if(!Array.from(e.b.values()).some(function(e){return e!=t&&e.dd})){var r=Math.round(100*e.l);if(20<r)e.l-=.2;else{if(!(4<r))return t.Ib=!0,e.m=!0,void e.a.onError(n);e.l-=.04}t.dd=!0}Bo(e,t,4)}function Co(e,t,n,r,i){return t.hc?(n=cn(e.a.I,t.type,e.c.periods[n].startTime-t.stream.presentationTimeOffset,r,i),t.stream.initSegmentReference?(e=Uo(e,t,t.stream.initSegmentReference).then(function(e){if(!this.f)return ln(this.a.I,t.type,e,null,null,t.stream.closedCaptions&&0<t.stream.closedCaptions.size)}.bind(e)).catch(function(e){return t.hc=!0,Promise.reject(e)}),Promise.all([n,e])):n):Promise.resolve()}function xo(e,t,n,r,i,a,o){var s=i.closedCaptions&&0<i.closedCaptions.size;return null!=i.emsgSchemeIdUris&&0<i.emsgSchemeIdUris.length&&(new pr).fa("emsg",e.M.bind(e,r,a,i.emsgSchemeIdUris)).parse(o),Ro(e,t,n).then(function(){if(!this.f)return ln(this.a.I,t.type,o,a.startTime+r.startTime,a.endTime+r.startTime,s)}.bind(e)).then(function(){if(!this.f)return t.pb=i,t.Aa=a,Promise.resolve()}.bind(e))}function Ro(e,t,n){var r=Math.max(e.g.bufferBehind,e.c.presentationTimeline.a),i=rn(e.a.I,t.type);return null==i?Promise.resolve():(n=n-i-r,0>=n?Promise.resolve():e.a.I.remove(t.type,i,i+n).then(function(){}.bind(e)))}function Io(e,t){if(!e.s){var n=Array.from(e.b.values());if(1==n.length&&"text"==n[0].type||(e.s=n.every(function(e){return"text"==e.type||!e.Ma&&!e.Pa&&e.Aa})),e.s){for(n=jo(e,t),e.h[n]||bo(e,n).then(function(){this.f||this.a.Kd()}.bind(e)).catch(Yp.ic),n=0;n<e.c.periods.length;++n)bo(e,n).catch(Yp.ic);e.a.sf&&e.a.sf()}}}function Do(e,t){var n=jo(e,t.stream);if(t.pa!=n){var r=t.pa,i=Array.from(e.b.values());i.every(function(e){return e.pa==r||Mo(e)})&&i.every(Lo)&&bo(e,r).then(function(){if(!this.f&&i.every(function(e){var t=Lo(e),n=jo(this,e.stream);return!!Mo(e)||t&&e.pa==r&&n!=r}.bind(this))){var e=this.c.periods[r],t=this.a.Ld(e),n=new Map;t.variant&&t.variant.video&&n.set("video",t.variant.video),t.variant&&t.variant.audio&&n.set("audio",t.variant.audio),t.text&&n.set("text",t.text);var a=o(this.b.keys());for(t=a.next();!t.done;t=a.next())if(t=t.value,!n.has(t)&&"text"!=t)return void this.a.onError(new ee(2,5,5005));for(a=o(Array.from(n.keys())),t=a.next();!t.done;t=a.next())if(t=t.value,!this.b.has(t)){if("text"!=t)return void this.a.onError(new ee(2,5,5005));go(this,null,null,n.get("text"),e.startTime),n.delete(t)}for(e=o(Array.from(this.b.keys())),t=e.next();!t.done;t=e.next())t=t.value,(a=n.get(t))?(fo(this,a,!1,0,!1),Bo(this,this.b.get(t),0)):this.b.delete(t);this.a.Kd()}}.bind(e)).catch(Yp.ic)}}function Mo(e){return"text"==e.type&&"application/cea-608"==e.stream.mimeType}function Lo(e){return!e.Ha&&null==e.Da&&!e.Ma&&!e.Pa}function No(e,t){var n=Na(e.c.periods,t+qp);return n?e.c.periods.indexOf(n):0}function jo(e,t){for(var n=e.c.periods,r=0;r<n.length;r++){for(var i=n[r],a=new Set,s=o(i.variants),l=s.next();!l.done;l=s.next())l=l.value,l.audio&&a.add(l.audio),l.video&&a.add(l.video),l.video&&l.video.trickModeVideo&&a.add(l.video.trickModeVideo);for(i=o(i.textStreams),s=i.next();!s.done;s=i.next())a.add(s.value);if(a.has(t))return r}return-1}function Uo(e,t,n){return n=ai(n.c(),n.b,n.a,e.g.retryParameters),e=e.a.rb.request(1,n),t.Kb=e,e.promise.then(function(e){return t.Kb=null,e.data})}function Fo(e,t,n,r){return u(function i(){var a,o,s;return S(i,function(i){switch(i.j){case 1:return t.Ma=!1,t.uc=!1,t.Zb=0,t.Pa=!0,r?(o=e.a.Sa(),s=e.a.I.Y(),a=e.a.I.remove(t.type,o+r,s)):a=un(e.a.I,t.type).then(function(){if(!this.f&&n)return this.a.I.flush(t.type)}.bind(e)),d(i,a,2);case 2:if(e.f)return i.return();t.pb=null,t.Aa=null,t.Pa=!1,t.endOfStream=!1,Bo(e,t,0),h(i)}})})}function Bo(e,t,n){t.Da=new X(function(){return u(function n(){var r;return S(n,function(n){switch(n.j){case 1:return y(n,2),d(n,ko(e,t),4);case 4:g(n,0);break;case 2:r=m(n),e.a&&e.a.onError(r),h(n)}})})}).O(n)}function Vo(e){null!=e.Da&&(e.Da.stop(),e.Da=null)}function Go(e,t){$(e.G).then(function(){this.f||(this.a.onError(t),t.handled||this.g.failureCallback(t))}.bind(e))}function Ho(e,t,n,r,i,a){if(200<=n&&299>=n&&202!=n)return{uri:i||r,ad:r,data:t,headers:e,fromCache:!!e["x-shaka-from-cache"]};i=null;try{i=We(t)}catch(e){}throw new ee(401==n||403==n?2:1,1,1001,r,n,i,e,a)}function Ko(e,t,n,r){var i=new Ko.b;Ne(t.headers).forEach(function(e,t){i.append(t,e)});var a=new Ko.a,o={vd:!1,ge:!1};if(e=Ko.l(e,n,{body:t.body||void 0,headers:i,method:t.method,signal:a.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},o,r),e=new ne(e,function(){return o.vd=!0,a.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var s=new J(function(){o.ge=!0,a.abort()});s.O(t/1e3),e.finally(function(){s.stop()})}return e}function zo(e,t,n,r){var i=new zo.f,a=Date.now(),s=0;return new ne(new Promise(function(l,u){i.open(t.method,e,!0),i.responseType="arraybuffer",i.timeout=t.retryParameters.timeout,i.withCredentials=t.allowCrossSiteCredentials,i.onabort=function(){u(new ee(1,1,7001,e,n))},i.onload=function(t){t=t.target;var r=t.getAllResponseHeaders().trim().split("\r\n"),i={};r=o(r);for(var a=r.next();!a.done;a=r.next())a=a.value.split(": "),i[a[0].toLowerCase()]=a.slice(1).join(": ");try{var s=Ho(i,t.response,t.status,e,t.responseURL,n);l(s)}catch(e){u(e)}},i.onerror=function(t){u(new ee(1,1,1002,e,t,n))},i.ontimeout=function(){u(new ee(1,1,1003,e,n))},i.onprogress=function(e){var t=Date.now();(100<t-a||e.lengthComputable&&e.loaded==e.total)&&(r(t-a,e.loaded-s,e.total-e.loaded),s=e.loaded,a=t)};for(var c in t.headers)i.setRequestHeader(c.toLowerCase(),t.headers[c]);i.send(t.body)}),function(){return i.abort(),Promise.resolve()})}function Yo(){this.a=this.f=this.b=0,this.c=new Map,this.g=0}function Wo(e,t){e.b+=t;var n=e.g;return e.g++,e.c.set(n,t),n}function qo(e,t){this.g=e,this.b=new Map,this.c=!1,this.f=t,this.a=new Yo}function Xo(e,t,n,r,i){var a=Wo(e.a,r);r=e.b.get(t)||Promise.resolve(),e.b.set(t,r.then(function(){return u(function t(){var r;return S(t,function(t){switch(t.j){case 1:return d(t,Qo(e,n),2);case 2:if(r=t.o,e.c)throw new ee(2,9,7001);e.a.close(a,r.byteLength);var o=e.a;return e.f(0==o.b?0:o.f/o.b,e.a.a),t.return(i(r))}})})}))}function Jo(e){return u(function t(){return S(t,function(t){switch(t.j){case 1:return d(t,Promise.all(e.b.values()),2);case 2:return t.return(e.a.a)}})})}function Qo(e,t){return u(function n(){var r,i;return S(n,function(n){switch(n.j){case 1:return r=e.g.request(1,t),d(n,r.promise,2);case 2:return i=n.o,n.return(i.data)}})})}function $o(e,t){var n=this;this.c=e,this.b=e.objectStore(t),this.a=new te,e.onabort=function(e){e.preventDefault(),n.a.reject()},e.onerror=function(e){e.preventDefault(),n.a.reject()},e.oncomplete=function(){n.a.resolve()}}function Zo(e,t){return new Promise(function(n,r){var i=e.b.openCursor();i.onerror=r,i.onsuccess=function(e){if(!(e=e.target.result))return n();t(e.key,e.value,e),e.continue()}})}function es(e){this.b=e,this.a=[]}function ts(e,t){return rs(e,t,"readonly")}function ns(e,t){return rs(e,t,"readwrite")}function rs(e,t,n){n=e.b.transaction([t],n);var r=new $o(n,t);return e.a.push(r),r.promise().then(function(){he(e.a,r)},function(){he(e.a,r)}),r}function is(e){this.a=new es(e)}function as(){this.a=new Map}function os(e){var t=null;if(e.a.forEach(function(e,n){e.getCells().forEach(function(e,r){e.hasFixedKeySpace()||t||(t={path:{ua:n,aa:r},aa:e})})}),t)return t;throw new ee(2,9,9013,"Could not find a cell that supports add-operations")}function ss(e,t){e.a.forEach(function(e,n){e.getCells().forEach(function(e,r){t({ua:n,aa:r},e)})})}function ls(e,t,n){if(!(e=e.a.get(t)))throw new ee(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new ee(2,9,9013,"Could not find cell with name "+n);return t}function us(e,t){e.a.forEach(function(e){t(e.getEmeSessionCell())})}function cs(e){var t=Array.from(e.a.keys());if(!t.length)throw new ee(2,9,9e3,"No supported storage mechanisms found");return e.a.get(t[0]).getEmeSessionCell()}function ps(e,t){Xf.set(e,t)}function fs(e){this.a=new es(e)}function ds(e){return Promise.reject(new ee(2,9,9011,"Cannot add new value to "+e))}function hs(e,t,n,r){e=ns(e.a,t);var i=e.store();return n.forEach(function(e){i.delete(e).onsuccess=function(){return r(e)}}),e.promise()}function ys(e,t,n){e=ts(e.a,t);var r=e.store(),i={},a=[];return n.forEach(function(e){r.get(e).onsuccess=function(t){t=t.target.result,void 0==t&&a.push(e),i[e]=t}}),e.promise().then(function(){return a.length?Promise.reject(new ee(2,9,9012,"Could not find values for "+a)):n.map(function(e){return i[e]})})}function vs(e){return{originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:null==e.expiration?1/0:e.expiration,periods:e.periods.map(gs),sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata}}function gs(e){return ks(e),e.streams.forEach(function(){}),{startTime:e.startTime,streams:e.streams.map(ms)}}function ms(e){var t=e.$e?Es(e.$e):null;return{id:e.id,originalId:null,primary:e.primary,presentationTimeOffset:e.presentationTimeOffset,contentType:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,kind:e.kind,language:e.language,label:e.label,width:e.width,height:e.height,initSegmentKey:t,encrypted:e.encrypted,keyId:e.keyId,segments:e.segments.map(bs),variantIds:e.variantIds}}function bs(e){var t=Es(e.uri);return{startTime:e.startTime,endTime:e.endTime,dataKey:t}}function _s(e){return{data:e.data}}function Es(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new ee(2,9,9004,"Could not parse uri "+e)}function ks(e){var t=e.streams.filter(function(e){return"audio"==e.contentType}),n=e.streams.filter(function(e){return"video"==e.contentType});if(!t.every(function(e){return e.variantIds})||!n.every(function(e){return e.variantIds})){t.forEach(function(e){e.variantIds=[]}),n.forEach(function(e){e.variantIds=[]});var r=0;if(n.length&&!t.length){var i=r++;n.forEach(function(e){e.variantIds.push(i)})}if(!n.length&&t.length){var a=r++;t.forEach(function(e){e.variantIds.push(a)})}n.length&&t.length&&t.forEach(function(e){n.forEach(function(t){var n=r++;e.variantIds.push(n),t.variantIds.push(n)})})}}function Ts(e,t,n,r){this.a=new es(e),this.c=t,this.b=n,this.f=r}function As(e,t,n){if(e.f)return Promise.reject(new ee(1,9,9011,"Cannot add new value to "+t));e=ns(e.a,t);var r=e.store(),i=[];return n.forEach(function(e){r.add(e).onsuccess=function(e){i.push(e.target.result)}}),e.promise().then(function(){return i})}function ws(e,t,n,r){e=ns(e.a,t);var i=e.store();return n.forEach(function(e){i.delete(e).onsuccess=function(){return r(e)}}),e.promise()}function Ss(e,t,n){e=ts(e.a,t);var r=e.store(),i={},a=[];return n.forEach(function(e){var t=r.get(e);t.onsuccess=function(){void 0==t.result&&a.push(e),i[e]=t.result}}),e.promise().then(function(){return a.length?Promise.reject(new ee(1,9,9012,"Could not find values for "+a)):n.map(function(e){return i[e]})})}function Ps(){this.g=this.c=this.b=this.a=this.f=null}function Os(){var t=new te,n=e.indexedDB.deleteDatabase("shaka_offline_db");return n.onblocked=function(){},n.onsuccess=function(){t.resolve()},n.onerror=function(e){t.reject(new ee(2,9,9001,n.error)),e.preventDefault()},t}function Cs(e,t,n,r){this.a=e,this.g=t,this.f=n,this.c=r,this.b=["offline:",e,"/",t,"/",n,"/",r].join("")}function xs(e){if(null==(e=/^offline:([a-z]+)\/([^\/]+)\/([^\/]+)\/([0-9]+)$/.exec(e)))return null;var t=e[1];if("manifest"!=t&&"segment"!=t)return null;var n=e[2];if(!n)return null;var r=e[3];return r&&null!=t?new Cs(t,n,r,Number(e[4])):null}function Rs(e,t){this.b=e,this.a=t}function Is(e,t){var n=new ii(null,0);n.wa(t.duration);var r=t.periods.map(function(t){return Ds(e,t,n)}),i=t.drmInfo?[t.drmInfo]:[];return t.drmInfo&&r.forEach(function(e){e.variants.forEach(function(e){e.drmInfos=i})}),{presentationTimeline:n,minBufferTime:2,offlineSessionIds:t.sessionIds,periods:r}}function Ds(e,t,n){var r=t.streams.filter(function(e){return"audio"==e.contentType}),i=t.streams.filter(function(e){return"video"==e.contentType});return r=Ms(e,r,i),i=t.streams.filter(function(e){return"text"==e.contentType}).map(function(t){return Ls(e,t)}),t.streams.forEach(function(r){r=r.segments.map(function(t,n){return Ns(e,n,t)}),n.sb(r,t.startTime)}),{startTime:t.startTime,variants:Array.from(r.values()),textStreams:i}}function Ms(e,t,n){for(var r=new Set,i=o(t),a=i.next();!a.done;a=i.next()){var s=o(a.value.variantIds);for(a=s.next();!a.done;a=s.next())r.add(a.value)}for(i=o(n),a=i.next();!a.done;a=i.next())for(s=o(a.value.variantIds),a=s.next();!a.done;a=s.next())r.add(a.value);for(i=new Map,r=o(r),a=r.next();!a.done;a=r.next())a=a.value,i.set(a,{id:a,language:"",primary:!1,audio:null,video:null,bandwidth:0,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0});for(t=o(t),r=t.next();!r.done;r=t.next())for(r=r.value,a=Ls(e,r),s=o(r.variantIds),r=s.next();!r.done;r=s.next())r=i.get(r.value),r.language=a.language,r.primary=r.primary||a.primary,r.audio=a;for(n=o(n),t=n.next();!t.done;t=n.next())for(r=t.value,t=Ls(e,r),a=o(r.variantIds),r=a.next();!r.done;r=a.next())r=i.get(r.value),r.primary=r.primary||t.primary,r.video=t;return i}function Ls(e,t){var n=t.segments.map(function(t,n){return Ns(e,n,t)}),r=new Lr(n);return n={id:t.id,originalId:t.originalId,createSegmentIndex:function(){return Promise.resolve()},findSegmentPosition:function(e){return r.find(e)},getSegmentReference:function(e){return r.get(e)},initSegmentReference:null,presentationTimeOffset:t.presentationTimeOffset,mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate||void 0,kind:t.kind,encrypted:t.encrypted,keyId:t.keyId,language:t.language,label:t.label||null,type:t.contentType,primary:t.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null},null!=t.initSegmentKey&&(n.initSegmentReference=js(e,t.initSegmentKey)),n}function Ns(e,t,n){var r=new Cs("segment",e.b,e.a,n.dataKey);return new Ir(t,n.startTime,n.endTime,function(){return[r.toString()]},0,null)}function js(e,t){var n=new Cs("segment",e.b,e.a,t);return new Rr(function(){return[n.toString()]},0,null)}function Us(){this.a=null}function Fs(e){var t=xs(e);return t&&"manifest"==t.a?Fs.h(e):t&&"segment"==t.a?Fs.i(t.key(),t):re(new ee(2,1,9004,e))}function Bs(e,t,n){return u(function r(){var i,a,s,l,u,c;return S(r,function(r){switch(r.j){case 1:i=[];for(var p=[],f=o(n),h=f.next();!h.done;h=f.next()){h=h.value;for(var y=!1,v=o(p),g=v.next();!g.done;g=v.next())if(g=g.value,Gs(g.info,h)){g.sessionIds.push(h.sessionId),y=!0;break}y||p.push({info:h,sessionIds:[h.sessionId]})}a=o(p),s=a.next();case 2:if(s.done){r.A(4);break}return l=s.value,u=Vs(e,t,l),d(r,u,5);case 5:c=r.o,i=i.concat(c),s=a.next(),r.A(2);break;case 4:return r.return(i)}})})}function Vs(e,t,n){return u(function r(){var i,a;return S(r,function(r){switch(r.j){case 1:return i=new rt({rb:t,onError:function(){},kc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),y(r,2),i.configure(e),d(r,st(i,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:g(r,3);break;case 2:return m(r),d(r,i.destroy(),5);case 5:return r.return([]);case 3:return y(r,6),d(r,ut(i),8);case 8:g(r,7);break;case 6:return m(r),d(r,i.destroy(),9);case 9:return r.return([]);case 7:return a=[],d(r,Promise.all(n.sessionIds.map(function(e){return u(function t(){return S(t,function(t){switch(t.j){case 1:return y(t,2),d(t,ct(i,e),4);case 4:a.push(e),g(t,0);break;case 2:m(t),h(t)}})})})),10);case 10:return d(r,i.destroy(),11);case 11:return r.return(a)}})})}function Gs(e,t){function n(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&ve(e.audioCapabilities,t.audioCapabilities,n)&&ve(e.videoCapabilities,t.videoCapabilities,n)}function Hs(e,t){var n=lu(),r=this;this.g=t,this.c=e,this.i=n,this.h=null,this.f=[],this.b=this.a=null,this.l=!0,this.m=Promise.resolve().then(function(){return zs(r)})}function Ks(e,t){var n={tb:function(){},jc:function(){},Wa:function(){},onError:function(){},lc:function(){},sg:function(){}};return e.f.push({create:t,ta:n}),e.b&&e.b.abort(),Ws(e),n}function zs(e){return u(function t(){return S(t,function(t){switch(t.j){case 1:if(e.l){if(0==e.f.length||e.a&&!e.a.Ta)var n=!1;else{e.a&&(e.a.ta.Wa(),e.a=null),n=e.f.shift();var r=n.create(e.i);r?(n.ta.tb(),e.a={node:r.node,payload:r.payload,Ta:r.Ta,ta:n.ta}):n.ta.lc(),n=!0}return n?n=Promise.resolve():e.a?n=Ys(e):(e.g.ff(e.c),e.h=new te,n=e.h),d(t,n,1)}t.A(0)}})})}function Ys(e){return u(function t(){var n,r;return S(t,function(t){switch(t.j){case 1:return e.c=e.g.Pe(e.c,e.i,e.a.node,e.a.payload),y(t,2),e.b=e.g.ze(e.c,e.i,e.a.payload),d(t,e.b.promise,4);case 4:e.b=null,e.c==e.a.node&&(e.a.ta.jc(),e.a=null),g(t,0);break;case 2:return n=m(t),7001==n.code?e.a.ta.Wa():e.a.ta.onError(n),e.a=null,e.b=null,r=e,d(t,e.g.handleError(e.i,n),5);case 5:r.c=t.o,h(t)}})})}function Ws(e){e.h&&(e.h.resolve(),e.h=null)}function qs(e){this.a=null;for(var t=0;t<e.textTracks.length;++t){var n=e.textTracks[t];n.mode="disabled","Shaka Player TextTrack"==n.label&&(this.a=n)}this.a||(this.a=e.addTextTrack("subtitles","Shaka Player TextTrack")),this.a.mode="hidden"}function Xs(e){if(e.startTime>=e.endTime)return null;var t=new VTTCue(e.startTime,e.endTime,e.payload);t.lineAlign=e.lineAlign,t.positionAlign=e.positionAlign,t.size=e.size;try{t.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=t.align&&(t.align="middle"),"vertical-lr"==e.writingMode?t.vertical="lr":"vertical-rl"==e.writingMode&&(t.vertical="rl"),1==e.lineInterpretation&&(t.snapToLines=!1),null!=e.line&&(t.line=e.line),null!=e.position&&(t.position=e.position),t}function Js(e,t){var n=e.mode;e.mode="showing"==n?"showing":"hidden";for(var r=e.cues,i=r.length-1;0<=i;i--){var a=r[i];a&&t(a)&&e.removeCue(a)}e.mode=n}function Qs(e,t,n,r,i){var a,o=i in r,s=!0;for(a in t){var l=i+"."+a,u=o?r[i]:n[a];o||a in n?void 0===t[a]?void 0===u||o?delete e[a]:e[a]=fe(u):u.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=fe(u)),l=Qs(e[a],t[a],u,r,l),s=s&&l):typeof t[a]!=typeof u||null==t[a]||t[a].constructor!=u.constructor?s=!1:e[a]=t[a]:s=!1}return s}function $s(e,t){for(var n={},r=n,i=0,a=0;!(0>(i=e.indexOf(".",i)));)0!=i&&"\\"==e[i-1]||(a=e.substring(a,i).replace(/\\\./g,"."),r[a]={},r=r[a],a=i+1),i+=1;return r[e.substring(a).replace(/\\\./g,".")]=t,n}function Zs(){}function el(){var e=5e5,t=1/0;navigator.connection&&(e=1e6*navigator.connection.downlink,navigator.connection.saveData&&(t=360));var n={retryParameters:Z(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(e){return e},fairPlayTransform:!0},r={retryParameters:Z(),availabilityWindowOverride:NaN,dash:{customScheme:function(e){if(e)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0},hls:{ignoreTextStreamFailures:!1}},i={retryParameters:Z(),failureCallback:function(){},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1};He("Web0S")&&(i.stallEnabled=!1);var a={trackSelectionCallback:function(e){return e},progressCallback:function(){},usePersistentLicense:!0},o={drm:n,manifest:r,streaming:i,offline:a,abrFactory:Mn,abr:{enabled:!0,defaultBandwidthEstimate:e,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:t,minPixels:0,maxPixels:1/0,minBandwidth:0,maxBandwidth:1/0}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayFactory:function(){return null}};return a.trackSelectionCallback=function(e){return nl(e,o.preferredAudioLanguage)},o}function tl(e,t,n){var r={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return Qs(e,t,n||el(),r,"")}function nl(e,t){var n=e.filter(function(e){return"variant"==e.type}),r=[],i=mn(t,n.map(function(e){return e.language}));i&&(r=n.filter(function(e){return vn(e.language)==i})),0==r.length&&(r=n.filter(function(e){return e.primary})),0==r.length&&(n.map(function(e){return e.language}),r=n);var a=r.filter(function(e){return e.height&&480>=e.height});if(a.length&&(a.sort(function(e,t){return t.height-e.height}),r=a.filter(function(e){return e.height==a[0].height})),n=[],r.length){var s=Math.floor(r.length/2);r.sort(function(e,t){return e.bandwidth-t.bandwidth}),n.push(r[s])}for(r=o(e),s=r.next();!s.done;s=r.next())s=s.value,"text"==s.type&&n.push(s);return n}function rl(){this.a=null,this.b=[]}function il(e,t){if(null==e.a)e.a={timestamp:Date.now()/1e3,state:t,duration:0};else{var n=Date.now()/1e3;e.a.duration=n-e.a.timestamp,e.a.state!=t&&(e.b.push(e.a),e.a={timestamp:n,state:t,duration:0})}}function al(e,t){var n=0;e.a&&e.a.state==t&&(n+=e.a.duration);for(var r=o(e.b),i=r.next();!i.done;i=r.next())i=i.value,n+=i.state==t?i.duration:0;return n}function ol(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],r=o(e.b),i=r.next();!i.done;i=r.next())n.push(t(i.value));return e.a&&n.push(t(e.a)),n}function sl(){this.b=this.c=null,this.a=[]}function ll(){this.f=this.l=this.b=this.h=this.i=this.g=this.m=NaN,this.a=new rl,this.c=new sl}function ul(t,n){var r=this;pe.call(this),this.h=ed,this.a=null,this.eb=!1,this.i=new Oe,this.vc=this.l=this.Bb=this.c=this.m=this.f=this.Sb=this.P=this.Tb=this.W=this.gb=this.s=this.D=this.g=this.G=null,this.Hd=1e9,this.Wb=new Set,this.ib=!0,this.Ea=null,this.Dd=!1,this.Bd=0,this.na=null,this.$=new ha,this.b=xl(this),this.Xb={width:1/0,height:1/0},this.v=null,this.Ub=new Ta(this.b.preferredAudioLanguage,this.b.preferredVariantRole,this.b.preferredAudioChannelCount),this.ma=this.b.preferredTextLanguage,this.cb=this.b.preferredTextRole,n&&n(this),this.G=kl(this),this.i.w(e,"online",function(){r.gd()}),this.C={name:"detach"},this.M={name:"attach"},this.Fa={name:"unload"},this.Ec={name:"manifest-parser"},this.Cc={name:"manifest"},this.fb={name:"media-source"},this.wc={name:"drm-engine"},this.T={name:"load"},this.Ic={name:"src-equals-drm-engine"},this.hb={name:"src-equals"};var i=new Map;i.set(this.M,function(e,t){return oe(pl(r,e,t))}),i.set(this.C,function(e){return e.u&&(r.i.ea(e.u,"error"),e.u=null),r.a=null,e=Promise.resolve(),oe(e)}),i.set(this.Fa,function(e){return oe(fl(r,e))}),i.set(this.fb,function(e){return e=dl(r,e),oe(e)}),i.set(this.Ec,function(e,t){return oe(hl(r,e,t))}),i.set(this.Cc,function(e){return yl(r,e)}),i.set(this.wc,function(){return oe(vl(r))}),i.set(this.T,function(e,t){return oe(gl(r,e,t))}),i.set(this.Ic,function(e){return e=ml(r,e),oe(e)}),i.set(this.hb,function(e,t){return bl(r,e,t)}),this.jb=new Hs(this.C,{Pe:function(e,t,n,i){var a=null;return e==r.C&&(a=n==r.C?r.C:r.M),e==r.M&&(a=n==r.C||t.u!=i.u?r.C:n==r.M?r.M:n==r.fb||n==r.T?r.fb:n==r.hb?r.Ic:null),e==r.fb&&(a=n==r.T&&t.u==i.u?r.Ec:r.Fa),e==r.Ec&&(a=su(r.T,r.Cc,r.Fa,n,t,i)),e==r.Cc&&(a=su(r.T,r.wc,r.Fa,n,t,i)),e==r.wc&&(a=su(r.T,r.T,r.Fa,n,t,i)),e==r.Ic&&(a=n==r.hb&&t.u==i.u?r.hb:r.Fa),e!=r.T&&e!=r.hb||(a=r.Fa),e==r.Fa&&(a=i.u&&t.u==i.u?r.M:r.C),a},ze:function(e,t,n){return r.dispatchEvent(new ue("onstatechange",{state:e.name})),i.get(e)(t,n)},handleError:function(e){return u(function t(){return S(t,function(t){switch(t.j){case 1:return d(t,fl(r,e),2);case 2:return t.return(e.u?r.M:r.C)}})})},ff:function(e){r.dispatchEvent(new ue("onstateidle",{state:e.name}))}}),t&&this.Cb(t,!0)}function cl(e){if(e.ya)return!1;if(!Ve())return!0;var t=e.mimeType;return e=e.uri||"",t||(t={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",ts:"video/mp2t",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac"}[Lf.getExtension(e)]),!!t&&(!!Ge(t)&&(!Lf.isSupported(e,t)||!!navigator.vendor&&navigator.vendor.includes("Apple")))}function pl(e,t,n){return null==t.u&&(t.u=n.u,e.i.w(t.u,"error",function(){var t=Wl(e);t&&e.Ka(t)})),e.a=t.u,Promise.resolve()}function fl(e,t){return u(function n(){return S(n,function(n){switch(n.j){case 1:if(e.h!=Zf&&(e.h=ed),e.dispatchEvent(new ue("unloading")),t.ya=null,t.mimeType=null,t.startTime=null,t.uri=null,t.u&&(e.i.ea(t.u,"loadeddata"),e.i.ea(t.u,"playing"),e.i.ea(t.u,"pause"),e.i.ea(t.u,"ended"),e.i.ea(t.u,"ratechange")),e.gb&&(e.gb.release(),e.gb=null),e.Tb&&(e.Tb.stop(),e.Tb=null),!e.m){n.A(2);break}return d(n,e.m.stop(),3);case 3:e.m=null;case 2:if(!e.l){n.A(4);break}return d(n,e.l.stop(),4);case 4:if(!e.f){n.A(6);break}return d(n,e.f.destroy(),7);case 7:e.f=null;case 6:if(e.s&&(e.s.release(),e.s=null),!e.D){n.A(8);break}return d(n,e.D.destroy(),9);case 9:e.D=null;case 8:if(t.u&&t.u.src&&(t.u.removeAttribute("src"),t.u.load()),!e.g){n.A(10);break}return d(n,e.g.destroy(),11);case 11:e.g=null;case 10:e.$.a.clear(),e.Bb=null,e.P=null,e.Wb.clear(),e.c=null,e.v=null,e.xc=null,e.ib=!0,Nl(e),h(n)}})})}function dl(t,n){return u(function r(){var i,a,o,s;return S(r,function(r){switch(r.j){case 1:return i=e.muxjs?new Mt:new Lt,a=t.b.textDisplayFactory,o=new a,t.xc=a,s=new Zt(n.u,i,o),d(r,s.s,2);case 2:t.D=s,h(r)}})})}function hl(e,t,n){return u(function r(){var i,a,o;return S(r,function(r){switch(r.j){case 1:if(t.ya=n.ya,t.mimeType=n.mimeType,t.uri=n.uri,i=t.uri,a=e.G,e.Bb=i,t.ya){e.m=t.ya(),r.A(2);break}return o=e,d(r,Lf.create(i,a,e.b.manifest.retryParameters,t.mimeType),3);case 3:o.m=r.o;case 2:e.m.configure(e.b.manifest),h(r)}})})}function yl(e,t){var n=t.uri,r=e.G;e.Sb=new to,no(e.Sb,function(t){Yl(e,"timelineregionadded",t)});var i={networkingEngine:r,filterNewPeriod:function(t){return e.Fc(t)},filterAllPeriods:function(t){return Il(e,t)},onTimelineRegionAdded:function(t){var n=e.Sb;e:{for(var r=o(n.a),i=r.next();!i.done;i=r.next())if(i=i.value,i.schemeIdUri==t.schemeIdUri&&i.startTime==t.startTime&&i.endTime==t.endTime){r=i;break e}r=null}null==r&&(n.a.add(t),n.b(t))},onEvent:function(t){return e.dispatchEvent(t)},onError:function(t){return e.Ka(t)}};return new ne(Promise.resolve().then(function(){return u(function t(){var r;return S(t,function(t){switch(t.j){case 1:return r=e,d(t,e.m.start(n,i),2);case 2:if(r.c=t.o,e.dispatchEvent(new ue("manifestparsed")),0==e.c.periods.length)throw new ee(2,4,4014);_l(e.c.periods),h(t)}})})}),function(){return e.m.stop()})}function vl(e){return u(function t(){return S(t,function(t){switch(t.j){case 1:return e.g=new rt({rb:e.G,onError:function(t){e.Ka(t)},kc:function(t){ql(e,t)},onExpirationUpdated:function(t,n){Xl(e,t,n)},onEvent:function(t){e.dispatchEvent(t)}}),e.g.configure(e.b.drm),d(t,ot(e.g,La(e.c.periods),e.c.offlineSessionIds),2);case 2:Il(e,e.c.periods),h(t)}})})}function gl(e,t,n){return u(function r(){var i,a,s,l,u,c,p,f,y;return S(r,function(r){switch(r.j){case 1:return t.startTime=n.startTime,i=t.u,a=t.uri,e.Bb=a,e.v=new ll,s=function(){return jl(e)},l=function(){var t=e.a.playbackRate;0!=t&&e.W.set(t)},e.i.w(i,"playing",s),e.i.w(i,"pause",s),e.i.w(i,"ended",s),e.i.w(i,"ratechange",l),u=e.b.abrFactory,e.l&&e.vc==u||(e.vc=u,e.l=new u,e.l.configure(e.b.abr)),Rl(e,e.c.periods),e.Ub=new Ta(e.b.preferredAudioLanguage,e.b.preferredVariantRole,e.b.preferredAudioChannelCount),e.ma=e.b.preferredTextLanguage,Jl(e.c.presentationTimeline,e.b.playRangeStart,e.b.playRangeEnd),d(r,e.g.Cb(i),2);case 2:return e.l.init(function(t,n,r){n=void 0!==n&&n,r=void 0===r?0:r;e:{for(var i=o(e.c.periods),a=i.next();!a.done;a=i.next())if(a=a.value,a.variants.includes(t)){i=a;break e}i=null}Ol(e,i,t,!0),e.f&&(po(e.f,t,n,r),Bl(e))}),e.s=Tl(e,t.startTime),e.gb=Al(e),e.W=new Fa({ec:function(){return t.u.playbackRate},ld:function(e){t.u.playbackRate=e},Id:function(e){t.u.currentTime+=e}}),c=Math.max(e.c.minBufferTime,e.b.streaming.rebufferingGoal),wl(e,c),e.f=Sl(e),e.f.configure(e.b.streaming),El(e),e.h=td,e.dispatchEvent(new ue("streaming")),d(r,e.f.start(),3);case 3:e.b.streaming.startAtSegmentBoundary&&(p=e.s.h(),f=Ll(e,p),e.s.m(f)),e.c.periods.forEach(e.Fc.bind(e)),Vl(e),Bl(e),y=ru(e)||e.c.periods[0],y.variants.some(function(e){return e.primary}),Ul(e,y.variants),e.i.da(i,"loadeddata",function(){e.v.b=Date.now()/1e3-n.od}),h(r)}})})}function ml(e,t){return u(function n(){var r,i;return S(n,function(n){switch(n.j){case 1:return r=Wp,e.g=new rt({rb:e.G,onError:function(t){e.Ka(t)},kc:function(t){ql(e,t)},onExpirationUpdated:function(t,n){Xl(e,t,n)},onEvent:function(t){e.dispatchEvent(t)}}),e.g.configure(e.b.drm),i={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"video/mp4",codecs:"",encrypted:!0,keyId:null,language:"und",label:null,type:r.Na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},d(n,ot(e.g,[i],[]),2);case 2:return d(n,e.g.Cb(t.u),0)}})})}function bl(e,t,n){function r(){return jl(e)}if(t.uri=n.uri,t.startTime=n.startTime,e.Bb=t.uri,e.v=new ll,e.s=new qa(t.u),null!=t.startTime&&e.s.m(t.startTime),e.W=new Fa({ec:function(){return t.u.playbackRate},ld:function(e){t.u.playbackRate=e},Id:function(e){t.u.currentTime+=e}}),wl(e,e.b.streaming.rebufferingGoal),e.i.w(t.u,"playing",r),e.i.w(t.u,"pause",r),e.i.w(t.u,"ended",r),e.i.da(t.u,"loadeddata",function(){e.v.b=Date.now()/1e3-n.od}),e.a.audioTracks&&(e.i.w(e.a.audioTracks,"addtrack",function(){return Vl(e)}),e.i.w(e.a.audioTracks,"removetrack",function(){return Vl(e)})),e.a.textTracks){var i=e.a.textTracks;e.i.w(i,"addtrack",function(){return Vl(e)}),e.i.w(i,"removetrack",function(){return Vl(e)})}t.u.src=t.uri,e.h=nd,e.dispatchEvent(new ue("streaming"));var a=new te;return e.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?a.resolve():e.a.error?a.reject(Wl(e)):(e.i.da(e.a,"loadeddata",function(){a.resolve()}),e.i.da(e.a,"error",function(){a.reject(Wl(e))})),new ne(a,function(){return a.reject(new ee(2,7,7001)),Promise.resolve()})}function _l(e){function t(e){return e.video&&e.audio||e.video&&e.video.codecs.includes(",")}e.some(function(e){return e.variants.some(t)})&&e.forEach(function(e){e.variants=e.variants.filter(t)})}function El(e){function t(e){var t="";e.video&&(t=Be(e.video.codecs)[0]);var n="";return e.audio&&(n=Be(e.audio.codecs)[0]),t+"-"+n}var n=e.c.periods.reduce(function(e,t){return e.concat(t.variants)},[]);n=Cn(n,e.b.preferredAudioChannelCount);var r=new ce;n.forEach(function(e){var n=t(e);r.push(n,e)});var i=null,a=1/0;r.forEach(function(e,t){var n=0,r=0;t.forEach(function(e){n+=e.bandwidth||0,++r});var o=n/r;o<a&&(i=e,a=o)}),e.c.periods.forEach(function(e){e.variants=e.variants.filter(function(e){return t(e)==i})})}function kl(e){return new be(function(t,n){e.l&&e.l.segmentDownloaded(t,n)})}function Tl(e,t){return new Xa(e.a,e.c,e.b.streaming,t,function(){e.gb&&Ma(e.gb,!0),e.f&&yo(e.f)},function(t){return e.dispatchEvent(t)})}function Al(e){var t=new ja(e.c);Ua(t,function(){Vl(e)});var n=new ro(e.Sb);io(n,function(t){Yl(e,"timelineregionenter",t)},function(t){Yl(e,"timelineregionexit",t)},function(t,n){n||(Yl(e,"timelineregionenter",t),Yl(e,"timelineregionexit",t))});var r=new Da(e.a);return r.a.add(t),r.a.add(n),r}function wl(e,t){e.P=new Sa(t,Math.min(.5,t/2)),e.P.a=Kf,Nl(e),e.Tb=new J(function(){switch(e.h){case nd:var t=!!e.a.ended||Nt(e.a.buffered)>=e.a.duration-.1;break;case td:e:if(e.a.ended||nn(e.D))t=!0;else{if(e.c.presentationTimeline.V()){var n=e.c.presentationTimeline.nb();if(Nt(e.a.buffered)>=n){t=!0;break e}}t=!1}break;default:t=!1}var r=Ut(e.a.buffered,e.a.currentTime);n=e.P;var i=t,a=n.b.get(n.a);t=n.a,r=i||r>=a?zf:Kf,n.a=r,t!=r&&Nl(e)}).La(.25)}function Sl(e){return new ao(e.c,{Sa:function(){return e.s.h()},getBandwidthEstimate:function(){return e.l.getBandwidthEstimate()},I:e.D,rb:e.G,Ld:e.df.bind(e),Kd:e.te.bind(e),onError:e.Ka.bind(e),onEvent:function(t){return e.dispatchEvent(t)},hf:e.jf.bind(e),Zc:e.qf.bind(e)})}function Pl(e){if(e.m&&e.m.configure(e.b.manifest),e.g&&e.g.configure(e.b.drm),e.f){e.f.configure(e.b.streaming);try{e.c.periods.forEach(e.Fc.bind(e))}catch(t){e.Ka(t)}var t=oo(e.f),n=so(e.f),r=ru(e);t=In(t,n,r.variants),e.l&&t&&t.allowedByApplication&&t.allowedByKeySystem?Ul(e,r.variants):Fl(e,r)}if(e.D&&(r=e.b.textDisplayFactory,e.xc!=r)){t=new r,n=e.D;var i=n.g;n.g=t,i&&(t.setTextVisibility(i.isTextVisible()),i.destroy()),n.a&&(n.a.c=t),e.xc=r,e.f&&(r=e.f,(t=r.b.get("text"))&&fo(r,t.stream,!0,0,!0))}e.l&&(e.l.configure(e.b.abr),e.b.abr.enabled&&!e.ib?e.l.enable():e.l.disable(),zl(e))}function Ol(e,t,n,r){va(e.$,t).variant=n,e=e.v.c,e.c!=n&&(e.c=n,e.a.push({timestamp:Date.now()/1e3,id:n.id,type:"variant",fromAdaptation:r,bandwidth:n.bandwidth}))}function Cl(e,t,n,r){ya(e.$,t,n),e=e.v.c,e.b!=n&&(e.b=n,e.a.push({timestamp:Date.now()/1e3,id:n.id,type:"text",fromAdaptation:r,bandwidth:null}))}function xl(e){var t=el();return t.streaming.failureCallback=function(t){var n=[1001,1002,1003];e.V()&&n.includes(t.code)&&(t.severity=1,e.gd())},t.textDisplayFactory=function(){return new qs(e.a)},t}function Rl(e,t){for(var n=0;n<t.length;n++){for(var r=t[n],i=new Map,a=o(r.variants),s=a.next();!s.done;s=a.next())if(s=s.value,s.video&&s.video.closedCaptions){s=s.video;for(var l=o(s.closedCaptions.keys()),u=l.next();!u.done;u=l.next())if(u=u.value,!i.has(u)){var c={id:e.Hd++,originalId:u,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"application/cea-608",codecs:"",kind:"caption",encrypted:!1,keyId:null,language:s.closedCaptions.get(u),label:null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:s.roles,channelsCount:null,closedCaptions:null};i.set(u,c)}}for(i=o(i.values()),a=i.next();!a.done;a=i.next())r.textStreams.push(a.value)}}function Il(e,t){var n=e.f?oo(e.f):null,r=e.f?so(e.f):null;if(t.forEach(En.bind(null,e.g,n,r)),0==(n=ye(t,function(e){return e.variants.some(Pn)})))throw new ee(2,4,4032);if(n<t.length)throw new ee(2,4,4011);t.forEach(function(e){_n(e.variants,this.b.restrictions,this.Xb)&&this.f&&ru(this)==e&&Vl(this),Ql(this,e.variants)}.bind(e))}function Dl(e,t,n,r){n=void 0!==n&&n,r=void 0===r?0:r,e.ib?(e.Ea=t,e.Dd=n,e.Bd=r):(po(e.f,t,n,r),Gl(e))}function Ml(e,t){e.ib?e.na=t:(fo(e.f,t,!0,0,!1),Hl(e))}function Ll(e,t){function n(e,t){if(!e)return null;var n=e.findSegmentPosition(t-a.startTime);return null==n?null:(n=e.getSegmentReference(n))?n.startTime+a.startTime:null}var r=oo(e.f),i=so(e.f),a=ru(e);return r=n(r,t),i=n(i,t),null!=i&&null!=r?Math.max(i,r):null!=i?i:null!=r?r:t}function Nl(e){var t=e.Oc();if(e.v&&e.P&&e.s){var n=e.W;n.f=t,Ba(n),jl(e)}e.dispatchEvent(new ue("buffering",{buffering:t}))}function jl(e){if(e.v&&e.P){var t=e.v.a;e.P.a==Kf?il(t,"buffering"):e.a.paused?il(t,"paused"):e.a.ended?il(t,"ended"):il(t,"playing")}}function Ul(e,t){try{Ql(e,t)}catch(t){return e.Ka(t),null}var n=t.filter(function(e){return Pn(e)});return n=e.Ub.create(n),e.l.setVariants(Array.from(n.values())),e.l.chooseVariant()}function Fl(e,t){var n=Ul(e,t.variants);n&&(Ol(e,t,n,!0),Dl(e,n,!0)),(n=xn(t.textStreams,e.ma,e.cb)[0]||null)&&(e.b.streaming.alwaysStreamText||e.gc())&&(Cl(e,t,n,!0),Ml(e,n)),Bl(e)}function Bl(e){$l(e,new ue("adaptation"))}function Vl(e){$l(e,new ue("trackschanged"))}function Gl(e){$l(e,new ue("variantchanged"))}function Hl(e){$l(e,new ue("textchanged"))}function Kl(e){$l(e,new ue("texttrackvisibility"))}function zl(e){$l(e,new ue("abrstatuschanged",{rg:e.b.abr.enabled}))}function Yl(e,t,n){e.dispatchEvent(new ue(t,{detail:{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement}}))}function Wl(e){if(!e.a.error)return null;var t=e.a.error.code;if(1==t)return null;var n=e.a.error.msExtendedCode;return n&&(0>n&&(n+=Math.pow(2,32)),n=n.toString(16)),new ee(2,3,3016,t,n,e.a.error.message)}function ql(e,t){if(e.f){var n=ru(e),r=!1,i=Object.keys(t),a=1==i.length&&"00"==i[0];i.length&&n.variants.forEach(function(e){Dn(e).forEach(function(n){var i=e.allowedByKeySystem;n.keyId&&(n=t[a?"00":n.keyId],e.allowedByKeySystem=!!n&&!Qf.includes(n)),i!=e.allowedByKeySystem&&(r=!0)})}),i=oo(e.f);(i=In(i,so(e.f),n.variants))&&!i.allowedByKeySystem&&Fl(e,n),r&&(Vl(e),Ul(e,n.variants))}}function Xl(e,t,n){e.m&&e.m.onExpirationUpdated&&e.m.onExpirationUpdated(t,n),e.dispatchEvent(new ue("expirationupdated"))}function Jl(e,t,n){0<t&&(e.V()||e.de(t)),n<e.Y()&&(e.V()||e.wa(n))}function Ql(e,t){var n=e.g?je(e.g.T):{},r=Object.keys(n);r=r.length&&"00"==r[0];for(var i=!1,a=!1,s=[],l=[],u=o(t),c=u.next();!c.done;c=u.next()){c=c.value;var p=[];c.audio&&p.push(c.audio),c.video&&p.push(c.video),p=o(p);for(var f=p.next();!f.done;f=p.next())if(f=f.value,f.keyId){var d=n[r?"00":f.keyId];d?Qf.includes(d)&&(l.includes(d)||l.push(d)):s.includes(f.keyId)||s.push(f.keyId)}c.allowedByApplication?c.allowedByKeySystem&&(i=!0):a=!0}if(!i)throw new ee(2,4,4012,{hasAppRestrictions:a,missingKeys:s,restrictedKeyStatuses:l})}function $l(e,t){u(function n(){return S(n,function(n){switch(n.j){case 1:return d(n,Promise.resolve(),2);case 2:e.h!=Zf&&e.dispatchEvent(t),h(n)}})})}function Zl(e){var t=new Set;e=o(e);for(var n=e.next();!n.done;n=e.next())n=n.value,n.language?t.add(vn(n.language)):t.add("und");return t}function eu(e){var t=new Map;e=o(e);for(var n=e.next();!n.done;n=e.next()){var r=n.value;n="und";var i=[];for(r.language&&(n=vn(r.language)),i="variant"==r.type?r.audioRoles:r.roles,i&&i.length||(i=[""]),t.has(n)||t.set(n,new Set),r=o(i),i=r.next();!i.done;i=r.next())i=i.value,t.get(n).add(i)}var a=[];return t.forEach(function(e,t){for(var n=o(e),r=n.next();!r.done;r=n.next())a.push({language:t,role:r.value})}),a}function tu(e){return e=ru(e),null==e?[]:e.variants.filter(function(e){return Pn(e)})}function nu(e){var t=ru(e);return null==t?[]:t.textStreams.filter(function(t){return!e.Wb.has(t)})}function ru(e){var t=e.s.h(),n=null;e=o(e.c.periods);for(var r=e.next();!r.done;r=e.next())r=r.value,r.startTime<=t&&(n=r);return n}function iu(e){var t=ru(e);return va(e.$,t).variant}function au(e){var t=ru(e);if(null==t)return null;if(!va(e.$,t).text){var n=xn(t.textStreams,e.ma,e.cb);n.length&&ya(e.$,t,n[0])}return va(e.$,t).text}function ou(){return new ee(2,7,7e3)}function su(e,t,n,r,i,a){return r==e&&i.u==a.u&&i.uri==a.uri&&i.mimeType==a.mimeType&&i.ya==a.ya?t:n}function lu(){return{ya:null,u:null,mimeType:null,startTime:null,od:null,uri:null}}function uu(e){return new Promise(function(t,n){e.Wa=function(){return n(ou())},e.jc=function(){return t()},e.onError=function(e){return n(e)},e.lc=function(){return n(ou())}})}function cu(e,t,n){var r=void 0==t.expiration?1/0:t.expiration,i=t.presentationTimeline.Y();return t=fu(t.periods[0]),{offlineUri:null,originalManifestUri:e,duration:i,size:0,expiration:r,tracks:t,appMetadata:n}}function pu(e,t){var n=Ds(new Rs(e.ua(),e.aa()),t.periods[0],new ii(null,0)),r=t.appMetadata||{};return n=fu(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:r}}function fu(e){var t=[],n=On(e.variants);n=o(n);for(var r=n.next();!r.done;r=n.next())t.push(Tn(r.value));for(e=o(e.textStreams),n=e.next();!n.done;n=e.next())t.push(An(n.value));return t}function du(){this.a={}}function hu(e,t,n){return n=n.endTime-n.startTime,yu(e,t)*n}function yu(e,t){var n=e.a[t];return null==n&&(n=0),n}function vu(e){this.a=!1,this.b=new te,this.c=e}function gu(e,t){for(var n={width:1/0,height:1/0},r=o(e.periods),i=r.next();!i.done;i=r.next())i=i.value,i.variants=i.variants.filter(function(e){return bn(e,t,n)})}function mu(e){e=o(e.periods);for(var t=e.next();!t.done;t=e.next())t=t.value,t.variants=t.variants.filter(function(e){var t=!0;return e.audio&&(t=t&&en(e.audio)),e.video&&(t=t&&en(e.video)),t})}function bu(e,t){for(var n=o(e.periods),r=n.next();!r.done;r=n.next())r=r.value,r.variants=r.variants.filter(function(e){return St(t,e)})}function _u(e){var t=new Tu;e.periods.forEach(function(e,n){var r=Su(e.variants);if(0==n){r=o(r.a);for(var i=r.next();!i.done;i=r.next())t.add(i.value)}else Au(t,r)}),e=o(e.periods);for(var n=e.next();!n.done;n=e.next())n=n.value,n.variants=n.variants.filter(function(e){return wu(t,new ku(e))})}function Eu(e,t){var n=new Tu;e.periods.forEach(function(e,r){0<r&&(e.variants=e.variants.filter(function(e){return wu(n,new ku(e))})),t(e),n=Su(e.variants)})}function ku(e){var t=e.audio;e=e.video,this.b=t?t.mimeType:null,this.a=t?t.codecs.split(".")[0]:null,this.f=e?e.mimeType:null,this.c=e?e.codecs.split(".")[0]:null}function Tu(){this.a=[]}function Au(e,t){e.a=e.a.filter(function(e){return wu(t,e)})}function wu(e,t){return e.a.some(function(e){return t.b==e.b&&t.a==e.a&&t.f==e.f&&t.c==e.c})}function Su(e){var t=new Tu;e=o(e);for(var n=e.next();!n.done;n=e.next())t.add(new ku(n.value));return t}function Pu(e){var t=this;if(e&&e.constructor!=ul)throw new ee(2,9,9008);this.b=this.a=null,e?(this.a=e.b,this.b=e.Fb()):(this.a=el(),this.b=new be),this.f=!1,this.c=[],this.g=[];var n=!e;this.h=new vu(function(){return u(function e(){var r;return S(e,function(e){switch(e.j){case 1:return r=function(){},d(e,Promise.all(t.g.map(function(e){return e.then(r,r)})),2);case 2:if(!n){e.A(3);break}return d(e,t.b.destroy(),3);case 3:t.a=null,t.b=null,h(e)}})})})}function Ou(){if(Ve())e:{for(var e=o(Xf.values()),t=e.next();!t.done;t=e.next())if(t=t.value,t=t()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}function Cu(e,t,n,r){return u(function i(){var a,o,s,l,u,c,p,f,h,v;return S(i,function(i){switch(i.j){case 1:return zu(),e.f?i.return(Promise.reject(new ee(2,9,9006))):(e.f=!0,d(i,Uu(e,t,r),2));case 2:if(a=i.o,Ku(e),!(o=!a.presentationTimeline.V()&&!a.presentationTimeline.Va()))throw new ee(2,9,9005,t);return s=null,l=new as,c=u=null,y(i,3,4),d(i,Fu(e,a,function(e){c=c||e}),6);case 6:if(s=i.o,Ku(e),c)throw c;return xu(e,a,s),d(i,l.init(),7);case 7:return Ku(e),d(i,os(l),8);case 8:return u=i.o,Ku(e),d(i,Ru(e,u.aa,s,a,t,n),9);case 9:if(p=i.o,Ku(e),c)throw c;return d(i,u.aa.addManifests([p]),10);case 10:return f=i.o,Ku(e),h=new Cs("manifest",u.path.ua,u.path.aa,f[0]),i.return(pu(h,p));case 4:return b(i),e.f=!1,e.c=[],d(i,l.destroy(),11);case 11:if(!s){i.A(12);break}return d(i,s.destroy(),12);case 12:_(i,0);break;case 3:if(v=m(i),!u){i.A(14);break}return d(i,u.aa.removeSegments(e.c,function(){}),14);case 14:throw c||v}})})}function xu(e,t,n){gu(t,e.a.restrictions),mu(t),bu(t,n),_u(t),Eu(t,function(t){for(var n=[],r=o(t.variants),i=r.next();!i.done;i=r.next())n.push(Tn(i.value));for(r=o(t.textStreams),i=r.next();!i.done;i=r.next())n.push(An(i.value));n=e.a.offline.trackSelectionCallback(n);var a=new Set,s=new Set;for(n=o(n),r=n.next();!r.done;r=n.next())r=r.value,"variant"==r.type&&a.add(r.id),"text"==r.type&&s.add(r.id);t.variants=t.variants.filter(function(e){return a.has(e.id)}),t.textStreams=t.textStreams.filter(function(e){return s.has(e.id)})}),Ju(t)}function Ru(e,t,n,r,i,a){return u(function o(){var s,l,u,c;return S(o,function(o){switch(o.j){case 1:return s=cu(i,r,a),l=new qo(e.b,function(t,n){s.size=n,e.a.offline.progressCallback(s,t)}),v(o,2),c=u=Bu(e,l,t,n,r,i,a),d(o,Jo(l),4);case 4:return c.size=o.o,o.return(u);case 2:return b(o),d(o,l.destroy(),5);case 5:_(o,0)}})})}function Iu(e,t){return u(function n(){var r,i,a,o,s,l;return S(n,function(n){switch(n.j){case 1:return zu(),null==(r=xs(t))||"manifest"!=r.a?n.return(Promise.reject(new ee(2,9,9004,t))):(i=r,a=new as,v(n,2),d(n,a.init(),4));case 4:return d(n,ls(a,i.ua(),i.aa()),5);case 5:return o=n.o,d(n,o.getManifests([i.key()]),6);case 6:return s=n.o,l=s[0],d(n,Promise.all([Mu(e,l,a),Lu(e,o,i,l)]),2);case 2:return b(n),d(n,a.destroy(),8);case 8:_(n,0)}})})}function Du(e,t){for(var n=[],r=o(e.periods),i=r.next();!i.done;i=r.next()){i=o(i.value.streams);for(var a=i.next();!a.done;a=i.next())a=a.value,t&&"video"==a.contentType?n.push({contentType:Ue(a.mimeType,a.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=a.contentType||n.push({contentType:Ue(a.mimeType,a.codecs),robustness:e.drmInfo.audioRobustness})}return n}function Mu(e,t,n){return u(function r(){return S(r,function(r){switch(r.j){case 1:return d(r,qu(e.b,e.a.drm,n,t),0)}})})}function Lu(e,t,n,r){function i(){s+=1,e.a.offline.progressCallback(l,s/o)}var a=Wu(r),o=a.length+1,s=0,l=pu(n,r);return Promise.all([t.removeSegments(a,i),t.removeManifests([n.key()],i)])}function Nu(e){return u(function t(){var n,r,i,a,s,l,c,p,f;return S(t,function(t){switch(t.j){case 1:return zu(),n=e.b,r=e.a.drm,i=new as,a=!1,v(t,2),d(t,i.init(),4);case 4:for(s=[],us(i,function(e){return s.push(e)}),l=Promise.resolve(),c={},p=o(s),f=p.next();!f.done;c={qc:c.qc},f=p.next())c.qc=f.value,l=l.then(function(e){return function(){return u(function t(){var i,o;return S(t,function(t){switch(t.j){case 1:return d(t,e.qc.getAll(),2);case 2:return i=t.o,d(t,Bs(r,n,i),3);case 3:return o=t.o,d(t,e.qc.remove(o),4);case 4:o.length!=i.length&&(a=!0),h(t)}})})}}(c));return d(t,l,2);case 2:return b(t),d(t,i.destroy(),6);case 6:_(t,3);break;case 3:return t.return(!a)}})})}function ju(){return u(function e(){var t,n,r;return S(e,function(e){switch(e.j){case 1:return zu(),t=[],n=new as,v(e,2),d(e,n.init(),4);case 4:return r=Promise.resolve(),ss(n,function(e,n){r=r.then(function(){return u(function r(){var i;return S(r,function(r){switch(r.j){case 1:return d(r,n.getAllManifests(),2);case 2:i=r.o,i.forEach(function(n,r){var i=pu(new Cs("manifest",e.ua,e.aa,r),n);t.push(i)}),h(r)}})})})}),d(e,r,2);case 2:return b(e),d(e,n.destroy(),6);case 6:_(e,3);break;case 3:return e.return(t)}})})}function Uu(e,t,n){return u(function r(){var i,a,o,s,l,u;return S(r,function(r){switch(r.j){case 1:return i=null,a=e.b,o={networkingEngine:a,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){i=e}},d(r,n(),2);case 2:return s=r.o,s.configure(e.a.manifest),Ku(e),v(r,3),d(r,s.start(t,o),5);case 5:return l=r.o,Ku(e),u=Xu(l),d(r,Promise.all(Array.from(u).map(function(e){return e.createSegmentIndex()})),6);case 6:if(Ku(e),i)throw i;return r.return(l);case 3:return b(r),d(r,s.stop(),7);case 7:_(r,0)}})})}function Fu(e,t,n){return u(function r(){var i,a,o;return S(r,function(r){switch(r.j){case 1:return i=new rt({rb:e.b,onError:n,kc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),a=La(t.periods),o=e.a,i.configure(o.drm),d(r,at(i,a,o.offline.usePersistentLicense),2);case 2:return d(r,ut(i),3);case 3:return d(r,pt(i),4);case 4:return r.return(i)}})})}function Bu(e,t,n,r,i,a,o){var s=new du,l=i.periods.map(function(r){return Vu(e,t,n,s,i,r)}),u=r.a,c=ht(r);if(u&&e.a.offline.usePersistentLicense){if(!c.length)throw new ee(2,9,9007,a);u.initData=[]}return{originalManifestUri:a,duration:i.presentationTimeline.Y(),size:0,expiration:r.dc(),periods:l,sessionIds:e.a.offline.usePersistentLicense?c:[],drmInfo:u,appMetadata:o}}function Vu(e,t,n,r,i,a){i.periods.forEach(function(e){e.variants.forEach(function(e){var t=e.audio,n=e.video;if(t&&!n&&(r.a[t.id]=t.bandwidth||e.bandwidth),!t&&n&&(r.a[n.id]=n.bandwidth||e.bandwidth),t&&n){var i=t.bandwidth||393216,a=n.bandwidth||e.bandwidth-i;0>=a&&(a=e.bandwidth),r.a[t.id]=i,r.a[n.id]=a}}),e.textStreams.forEach(function(e){r.a[e.id]=52})});var s=Xu(i),l=new Map;s=o(s);for(var u=s.next();!u.done;u=s.next()){u=u.value;var c=Gu(e,t,n,r,i,u);l.set(u.id,c)}return a.variants.forEach(function(e){e.audio&&l.get(e.audio.id).variantIds.push(e.id),e.video&&l.get(e.video.id).variantIds.push(e.id)}),{startTime:a.startTime,streams:Array.from(l.values())}}function Gu(e,t,n,r,i,a){var o={id:a.id,originalId:a.originalId,primary:a.primary,presentationTimeOffset:a.presentationTimeOffset||0,contentType:a.type,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,kind:a.kind,language:a.language,label:a.label,width:a.width||null,height:a.height||null,initSegmentKey:null,encrypted:a.encrypted,keyId:a.keyId,segments:[],variantIds:[]};i=i.presentationTimeline.Hb();var s=a.id;return Hu(a,i,function(i){var l=ai(i.c(),i.b,i.a,e.a.streaming.retryParameters);Xo(t,s,l,hu(r,a.id,i),function(t){return n.addSegments([{data:t}]).then(function(t){e.c.push(t[0]),o.segments.push({startTime:i.startTime,endTime:i.endTime,dataKey:t[0]})})})}),(i=a.initSegmentReference)&&(i=ai(i.c(),i.b,i.a,e.a.streaming.retryParameters),Xo(t,s,i,.5*yu(r,a.id),function(t){return n.addSegments([{data:t}]).then(function(t){e.c.push(t[0]),o.initSegmentKey=t[0]})})),o}function Hu(e,t,n){t=e.findSegmentPosition(t);for(var r=null==t?null:e.getSegmentReference(t);r;)n(r),r=e.getSegmentReference(++t)}function Ku(e){if(e.h.a)throw new ee(2,9,7001)}function zu(){if(!Ou())throw new ee(2,9,9e3)}function Yu(e,t){return u(function n(){return S(n,function(n){switch(n.j){case 1:return e.g.push(t),v(n,2),d(n,t,4);case 4:return n.return(n.o);case 2:b(n),he(e.g,t),_(n,0)}})})}function Wu(e){var t=[];return e.periods.forEach(function(e){e.streams.forEach(function(e){null!=e.initSegmentKey&&t.push(e.initSegmentKey),e.segments.forEach(function(e){t.push(e.dataKey)})})}),t}function qu(e,t,n,r){return u(function i(){var a,o,s;return S(i,function(i){switch(i.j){case 1:return r.drmInfo?(a=cs(n),o=r.sessionIds.map(function(e){return{sessionId:e,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:Du(r,!1),videoCapabilities:Du(r,!0)}}),d(i,Bs(t,e,o),2)):i.return();case 2:return s=i.o,d(i,a.remove(s),3);case 3:return d(i,a.add(o.filter(function(e){return-1==s.indexOf(e.sessionId)})),0)}})})}function Xu(e){var t=new Set;e=o(e.periods);for(var n=e.next();!n.done;n=e.next()){n=n.value;for(var r=o(n.textStreams),i=r.next();!i.done;i=r.next())t.add(i.value);for(n=o(n.variants),r=n.next();!r.done;r=n.next())r=r.value,r.audio&&t.add(r.audio),r.video&&t.add(r.video)}return t}function Ju(e){if(0==e.periods.length)throw new ee(2,4,4014);e=o(e.periods);for(var t=e.next();!t.done;t=e.next())Qu(t.value)}function Qu(e){e.variants.map(function(e){return e.video});var t=new Set(e.variants.map(function(e){return e.audio}));e=e.textStreams;for(var n=o(t),r=n.next();!r.done;r=n.next()){r=o(t);for(var i=r.next();!i.done;i=r.next());}for(t=o(e),n=t.next();!n.done;n=t.next())for(n=o(e),r=n.next();!r.done;r=n.next());}function $u(e,t){t=t||0;for(var n={priority:t,re:e},r=0;r<rd.length;r++)if(rd[r].priority<t)return void rd.splice(r,0,n);rd.push(n)}function Zu(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"==typeof Event)var n=new Event(t,e);else n=document.createEvent("Event"),n.initEvent(t,e.bubbles,e.cancelable);e.target.dispatchEvent(n)}function ec(e,t,n){if("input"==e)switch(this.type){case"range":e="change"}HTMLInputElement.prototype.originalAddEventListener.call(this,e,t,n)}function tc(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(t){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];return n=e.apply(this,n),n.abort=function(){},n}}function nc(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}function rc(){var e=MediaSource.prototype.endOfStream;MediaSource.prototype.endOfStream=function(t){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];for(var i=r=0;i<this.sourceBuffers.length;++i){var a=this.sourceBuffers[i];a=a.buffered.end(a.buffered.length-1),r=Math.max(r,a)}if(!isNaN(this.duration)&&r<this.duration)for(this.Ed=!0,r=0;r<this.sourceBuffers.length;++r)this.sourceBuffers[r].xd=!1;return e.apply(this,n)};var t=!1,n=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i]=arguments[i];return r=n.apply(this,r),r.mediaSource_=this,r.addEventListener("updateend",ic,!1),t||(this.addEventListener("sourceclose",ac,!1),t=!0),r}}function ic(e){var t=e.target,n=t.mediaSource_;if(n.Ed){for(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),t.xd=!0,e=0;e<n.sourceBuffers.length;++e)if(0==n.sourceBuffers[e].xd)return;n.Ed=!1}}function ac(e){e=e.target;for(var t=0;t<e.sourceBuffers.length;++t)e.sourceBuffers[t].removeEventListener("updateend",ic,!1);e.removeEventListener("sourceclose",ac,!1)}function oc(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"mp2t"!=t.split(/ *; */)[0].split("/")[1].toLowerCase()&&e(t)}}function sc(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"opus"!=Be(t)[0]&&e(t)}}function lc(){var e=MediaSource.isTypeSupported,t=/^dv(?:h[e1]|a[v1])\./;MediaSource.isTypeSupported=function(n){for(var r=n.split(/ *; */),i=r[0],a={},o=1;o<r.length;++o){var s=r[o].split("="),l=s[0];s=s[1].replace(/"(.*)"/,"$1"),a[l]=s}if(!(r=a.codecs))return e(n);var u=!1,c=!1;n=r.split(",").filter(function(e){return t.test(e)&&(c=!0),/^(hev|hvc)1\.2/.test(e)&&(u=!0),!0}),c&&(u=!1),a.codecs=n.join(","),u&&(a.eotf="smpte2084");for(var p in a)i+="; "+p+'="'+a[p]+'"';return cast.__platform__.canDisplayType(i)}}function uc(e,t){try{var n=new cc(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function cc(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(var n=o(t),r=n.next();!r.done;r=n.next()){var i=r.value;if("required"==i.persistentState)r=null;else{r={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:i.initDataTypes,sessionTypes:["temporary"],label:i.label};var a=!1,s=!1;if(i.audioCapabilities)for(var l=o(i.audioCapabilities),u=l.next();!u.done;u=l.next())if(u=u.value,u.contentType){a=!0;var c=u.contentType.split(";")[0];WebKitMediaKeys.isTypeSupported(this.keySystem,c)&&(r.audioCapabilities.push(u),s=!0)}if(i.videoCapabilities)for(i=o(i.videoCapabilities),u=i.next();!u.done;u=i.next())l=u.value,l.contentType&&(a=!0,u=l.contentType.split(";")[0],WebKitMediaKeys.isTypeSupported(this.keySystem,u)&&(r.videoCapabilities.push(l),s=!0));a||(s=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),r=s?r:null}if(r)return void(this.a=r)}throw n=Error("Unsupported keySystem"),n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function pc(e){var t=this.mediaKeys;return t&&t!=e&&dc(t,null),delete this.mediaKeys,(this.mediaKeys=e)?dc(e,this):Promise.resolve()}function fc(e){this.b=new WebKitMediaKeys(e),this.a=new Oe}function dc(e,t){if(e.a.Ya(),!t)return Promise.resolve();e.a.w(t,"webkitneedkey",yc);try{return 1<=t.readyState?t.webkitSetMediaKeys(e.b):e.a.da(t,"loadedmetadata",function(){t.webkitSetMediaKeys(e.b)}),Promise.resolve()}catch(e){return Promise.reject(e)}}function hc(e){pe.call(this),this.b=null,this.g=e,this.c=this.a=null,this.f=new Oe,this.sessionId="",this.expiration=NaN,this.closed=new te,this.keyStatuses=new gc}function yc(e){var t=new Event("encrypted");t.initDataType="cenc",t.initData=e.initData,this.dispatchEvent(t)}function vc(e,t){var n=e.keyStatuses;n.size=void 0==t?0:1,n.a=t,e.dispatchEvent(new ue("keystatuseschange"))}function gc(){this.size=0,this.a=void 0}function mc(e,t){try{var n=new bc(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function bc(e,t){this.keySystem=e;for(var n=!1,r=0;r<t.length;++r){var i=t[r],a={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:i.initDataTypes,sessionTypes:["temporary"],label:i.label},o=!1;if(i.audioCapabilities)for(var s=0;s<i.audioCapabilities.length;++s){var l=i.audioCapabilities[s];if(l.contentType){o=!0;var u=l.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,u)&&(a.audioCapabilities.push(l),n=!0)}}if(i.videoCapabilities)for(s=0;s<i.videoCapabilities.length;++s)l=i.videoCapabilities[s],l.contentType&&(o=!0,u=l.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,u)&&(a.videoCapabilities.push(l),n=!0));if(o||(n=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),"required"==i.persistentState&&(n=!1),n)return void(this.a=a)}throw n=Error("Unsupported keySystem"),n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function _c(e){var t=this.mediaKeys;return t&&t!=e&&kc(t,null),delete this.mediaKeys,(this.mediaKeys=e)?kc(e,this):Promise.resolve()}function Ec(e){this.a=new MSMediaKeys(e),this.b=new Oe}function kc(e,t){function n(){t.msSetMediaKeys(r.a),t.removeEventListener("loadedmetadata",n)}if(e.b.Ya(),!t)return Promise.resolve();e.b.w(t,"msneedkey",Ac);var r=e;try{return 1<=t.readyState?t.msSetMediaKeys(e.a):t.addEventListener("loadedmetadata",n),Promise.resolve()}catch(e){return Promise.reject(e)}}function Tc(e){pe.call(this),this.c=null,this.g=e,this.b=this.a=null,this.f=new Oe,this.sessionId="",this.expiration=NaN,this.closed=new te,this.keyStatuses=new Pc}function Ac(e){if(e.initData){var t=document.createEvent("CustomEvent");t.initCustomEvent("encrypted",!1,!1,null),t.initDataType="cenc",t.initData=wc(e.initData),this.dispatchEvent(t)}}function wc(e){if(!e)return e;var t=new gr(e);if(1>=t.a.length)return e;for(var n=[],r=0;r<t.a.length;r++)n.push(e.subarray(t.a[r].start,t.a[r].end+1));for(e=[],t={},r=o(n),n=r.next();!n.done;t={fc:t.fc},n=r.next())t.fc=n.value,e.some(function(e){return function(t){return tt(t,e.fc)}}(t))||e.push(t.fc);for(t=0,r=o(e),n=r.next();!n.done;n=r.next())t+=n.value.length;for(t=new Uint8Array(t),r=0,e=o(e),n=e.next();!n.done;n=e.next())n=n.value,t.set(n,r),r+=n.length;return t}function Sc(e,t){var n=e.keyStatuses;n.size=void 0==t?0:1,n.a=t,e.dispatchEvent(new ue("keystatuseschange"))}function Pc(){this.size=0,this.a=void 0}function Oc(){return Promise.reject(Error("The key system specified is not supported."))}function Cc(e){return null==e?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function xc(){throw new TypeError("Illegal constructor.")}function Rc(){throw new TypeError("Illegal constructor.")}function Ic(e){var t=od;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function Dc(e,t){try{var n=new Lc(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function Mc(e){var t=this.mediaKeys;return t&&t!=e&&jc(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&jc(e,this),Promise.resolve()}function Lc(e,t){this.a=this.keySystem=e;var n=!1;"org.w3.clearkey"==e&&(this.a="webkit-org.w3.clearkey",n=!1);var r=!1,i=document.getElementsByTagName("video");i=i.length?i[0]:document.createElement("video");for(var a=0;a<t.length;++a){var o=t[a],s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:o.initDataTypes,sessionTypes:["temporary"],label:o.label},l=!1;if(o.audioCapabilities)for(var u=0;u<o.audioCapabilities.length;++u){var c=o.audioCapabilities[u];if(c.contentType){l=!0;var p=c.contentType.split(";")[0];i.canPlayType(p,this.a)&&(s.audioCapabilities.push(c),r=!0)}}if(o.videoCapabilities)for(u=0;u<o.videoCapabilities.length;++u)c=o.videoCapabilities[u],c.contentType&&(l=!0,i.canPlayType(c.contentType,this.a)&&(s.videoCapabilities.push(c),r=!0));if(l||(r=i.canPlayType("video/mp4",this.a)||i.canPlayType("video/webm",this.a)),"required"==o.persistentState&&(n?(s.persistentState="required",s.sessionTypes=["persistent-license"]):r=!1),r)return void(this.b=s)}throw n="Unsupported keySystem","org.w3.clearkey"!=e&&"com.widevine.alpha"!=e||(n="None of the requested configurations were supported."),n=Error(n),n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function Nc(e){this.g=e,this.b=null,this.a=new Oe,this.c=[],this.f={}}function jc(e,t){e.b=t,e.a.Ya();var n=od;t&&(e.a.w(t,n+"needkey",e.tf.bind(e)),e.a.w(t,n+"keymessage",e.Zf.bind(e)),e.a.w(t,n+"keyadded",e.Xf.bind(e)),e.a.w(t,n+"keyerror",e.Yf.bind(e)))}function Uc(e,t){var n=e.f[t];return n||((n=e.c.shift())?(n.sessionId=t,e.f[t]=n):null)}function Fc(e,t,n){pe.call(this),this.f=e,this.h=!1,this.a=this.b=null,this.c=t,this.g=n,this.sessionId="",this.expiration=NaN,this.closed=new te,this.keyStatuses=new Gc}function Bc(e,t,n){if(e.h)return Promise.reject(Error("The session is already initialized."));e.h=!0;try{if("persistent-license"==e.g)if(n)var r=new Uint8Array(qe("LOAD_SESSION|"+n));else{var i=qe("PERSISTENT|"),a=new Uint8Array(i.byteLength+t.byteLength);a.set(new Uint8Array(i),0),a.set(new Uint8Array(t),i.byteLength),r=a}else r=new Uint8Array(t)}catch(e){return Promise.reject(e)}e.b=new te;var o=Ic("generateKeyRequest");try{e.f[o](e.c,r)}catch(t){if("InvalidStateError"!=t.name)return e.b=null,Promise.reject(t);new J(function(){try{e.f[o](e.c,r)}catch(t){e.b.reject(t),e.b=null}}).O(.01)}return e.b}function Vc(e,t){var n=e.keyStatuses;n.size=void 0==t?0:1,n.a=t,e.dispatchEvent(new ue("keystatuseschange"))}function Gc(){this.size=0,this.a=void 0}function Hc(e){if(e=e.target,"picture-in-picture"==e.webkitPresentationMode){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function Kc(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function zc(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function Yc(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function Wc(t,n,r){return new e.TextTrackCue(t,n,r)}function qc(t,n,r){return new e.TextTrackCue(t+"-"+n+"-"+r,t,n,r)}function Xc(){}function Jc(e){var t=[];if(!e)return t;for(var n=e.childNodes,r=0;r<n.length;r++){var i="span"==n[r].nodeName&&"p"==e.nodeName;n[r].nodeType!=Node.ELEMENT_NODE||"br"==n[r].nodeName||i||(i=Jc(n[r]),t=t.concat(i))}return t.length||t.push(e),t}function Qc(e,t){for(var n=e.childNodes,r=0;r<n.length;r++)if("br"==n[r].nodeName&&0<r)n[r-1].textContent+="\n";else if(0<n[r].childNodes.length)Qc(n[r],t);else if(t){var i=n[r].textContent.trim();i=i.replace(/\s+/g," "),n[r].textContent=i}}function $c(e,t,n,r,i,a,o,s){if(!e.hasAttribute("begin")&&!e.hasAttribute("end")&&/^\s*$/.test(e.textContent))return null;Qc(e,s),s=ap(e.getAttribute("begin"),n);var l=ap(e.getAttribute("end"),n);n=ap(e.getAttribute("dur"),n);var u=e.textContent;if(null==l&&null!=n&&(l=s+n),null==s||null==l)throw new ee(2,2,2001);if(t=new Yt(s+t,l+t,u),(a=ip(e,"region",a,""))&&a.getAttribute("xml:id")){var c=a.getAttribute("xml:id");o=o.filter(function(e){return e.id==c}),t.region=o[0]}return r=ip(e,"smpte:backgroundImage",r,"#"),Zc(t,e,a,r,i),t}function Zc(e,t,n,r,i){"rtl"==tp(t,n,i,"direction")&&(e.direction="rtl");var a=tp(t,n,i,"writingMode");if("tb"==a||"tblr"==a?e.writingMode="vertical-lr":"tbrl"==a?e.writingMode="vertical-rl":"rltb"==a||"rl"==a?e.direction="rtl":a&&(e.direction=ef),(a=tp(t,n,i,"textAlign"))&&(e.positionAlign=md[a],e.lineAlign=gd[a],e.textAlign=Qp[a.toUpperCase()]),(a=tp(t,n,i,"displayAlign"))&&(e.displayAlign=Zp[a.toUpperCase()]),(a=tp(t,n,i,"color"))&&(e.color=a),(a=tp(t,n,i,"backgroundColor"))&&(e.backgroundColor=a),(a=tp(t,n,i,"fontFamily"))&&(e.fontFamily=a),(a=tp(t,n,i,"fontWeight"))&&"bold"==a&&(e.fontWeight=700),(a=tp(t,n,i,"wrapOption"))&&"noWrap"==a&&(e.wrapLine=!1),(a=tp(t,n,i,"lineHeight"))&&a.match(ud)&&(e.lineHeight=a),(a=tp(t,n,i,"fontSize"))&&a.match(ud)&&(e.fontSize=a),(a=tp(t,n,i,"fontStyle"))&&(e.fontStyle=lf[a.toUpperCase()]),r){a=r.getAttribute("imagetype");var o=r.getAttribute("encoding");r=r.textContent.trim(),"PNG"==a&&"Base64"==o&&r&&(e.backgroundImage="data:image/png;base64,"+r)}(n=np(n,i,"textDecoration"))&&ep(e,n),(t=rp(t,i,"textDecoration"))&&ep(e,t)}function ep(e,t){for(var n=t.split(" "),r=0;r<n.length;r++)switch(n[r]){case"underline":e.textDecoration.includes("underline")||e.textDecoration.push("underline");break;case"noUnderline":e.textDecoration.includes("underline")&&he(e.textDecoration,"underline");break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&he(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&he(e.textDecoration,"overline")}}function tp(e,t,n,r){return(e=rp(e,n,r))?e:np(t,n,r)}function np(e,t,n){for(var r=Jc(e),i=0;i<r.length;i++){var a=Rf.getAttributeNS(r[i],"http://www.w3.org/ns/ttml#styling",n);if(a)return a}return(e=ip(e,"style",t,""))?Rf.getAttributeNS(e,"http://www.w3.org/ns/ttml#styling",n):null}function rp(e,t,n){return(e=ip(e,"style",t,""))?Rf.getAttributeNS(e,"http://www.w3.org/ns/ttml#styling",n):null}function ip(e,t,n,r){if(!e||1>n.length)return null;var i=null,a=e;for(e=null;a&&!(e=a.getAttribute(t))&&(a=a.parentNode)instanceof Element;);if(t=e)for(e=0;e<n.length;e++)if(r+n[e].getAttribute("xml:id")==t){i=n[e];break}return i}function ap(e,t){var n=null;if(pd.test(e)){n=pd.exec(e);var r=Number(n[1]),i=Number(n[2]),a=Number(n[3]),o=Number(n[4]);o+=(Number(n[5])||0)/t.b,a+=o/t.frameRate,n=a+60*i+3600*r}else fd.test(e)?n=op(fd,e):dd.test(e)?n=op(dd,e):hd.test(e)?(n=hd.exec(e),n=Number(n[1])/t.frameRate):yd.test(e)?(n=yd.exec(e),n=Number(n[1])/t.a):vd.test(e)&&(n=op(vd,e));return n}function op(e,t){var n=e.exec(t);return null==n||""==n[0]?null:(Number(n[4])||0)/1e3+(Number(n[3])||0)+60*(Number(n[2])||0)+3600*(Number(n[1])||0)}function sp(e,t,n,r){this.frameRate=Number(e)||30,this.b=Number(t)||1,this.a=Number(r),0==this.a&&(this.a=e?this.frameRate*this.b:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}function lp(){this.a=new Xc}function up(){}function cp(e,t,n){var r;(r=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=r[1],e.textAlign="middle"==t?Jp:Qp[t.toUpperCase()]):(r=/^vertical:(lr|rl)$/.exec(t))?e.writingMode="lr"==r[1]?"vertical-lr":"vertical-rl":(r=/^size:([\d.]+)%$/.exec(t))?e.size=Number(r[1]):(r=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(t))?(e.position=Number(r[1]),r[2]&&(t=r[2],e.positionAlign="line-left"==t||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center")):(r=/^region:(.*)$/.exec(t))?(t=pp(n,r[1]))&&(e.region=t):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=af[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=nf,e.line=Number(n[1]),n[2]&&(e.lineAlign=af[n[2].toUpperCase()]))}function pp(e,t){var n=e.filter(function(e){return e.id==t});return n.length?n[0]:null}function fp(e){if(null==(e=Oi(e,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function dp(){this.a=null}function hp(e,t,n){var r,i,a;return(new pr).H("payl",hr(function(e){r=ze(e)})).H("iden",hr(function(e){i=ze(e)})).H("sttg",hr(function(e){a=ze(e)})).parse(e),r?yp(r,i,a,t,n):null}function yp(e,t,n,r,i){if(e=new Yt(r,i,e),t&&(e.id=t),n)for(t=new Si(n),n=Ci(t);n;)cp(e,n,[]),Pi(t),n=Ci(t);return e}var vp,gp="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},mp=void 0!==e&&e===this?this:void 0!==t&&null!=t?t:this,bp=function(){var e=0;return function(t){return"jscomp_symbol_"+(t||"")+e++}}();s("Promise",function(e){function t(e){this.b=0,this.g=void 0,this.a=[];var t=this.c();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function n(){this.a=null}function r(e){return e instanceof t?e:new t(function(t){t(e)})}if(e)return e;n.prototype.b=function(e){null==this.a&&(this.a=[],this.f()),this.a.push(e)},n.prototype.f=function(){var e=this;this.c(function(){e.h()})};var i=mp.setTimeout;n.prototype.c=function(e){i(e,0)},n.prototype.h=function(){for(;this.a&&this.a.length;){var e=this.a;this.a=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(e){this.g(e)}}}this.a=null},n.prototype.g=function(e){this.c(function(){throw e})},t.prototype.c=function(){function e(e){return function(r){n||(n=!0,e.call(t,r))}}var t=this,n=!1;return{resolve:e(this.s),reject:e(this.f)}},t.prototype.s=function(e){if(e===this)this.f(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.v(e);else{e:switch(typeof e){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.m(e):this.h(e)}},t.prototype.m=function(e){var t=void 0;try{t=e.then}catch(e){return void this.f(e)}"function"==typeof t?this.C(t,e):this.h(e)},t.prototype.f=function(e){this.i(2,e)},t.prototype.h=function(e){this.i(1,e)},t.prototype.i=function(e,t){if(0!=this.b)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.b);this.b=e,this.g=t,this.l()},t.prototype.l=function(){if(null!=this.a){for(var e=0;e<this.a.length;++e)a.b(this.a[e]);this.a=null}};var a=new n;return t.prototype.v=function(e){var t=this.c();e.Yb(t.resolve,t.reject)},t.prototype.C=function(e,t){var n=this.c();try{e.call(t,n.resolve,n.reject)}catch(e){n.reject(e)}},t.prototype.then=function(e,n){function r(e,t){return"function"==typeof e?function(t){try{i(e(t))}catch(e){a(e)}}:t}var i,a,o=new t(function(e,t){i=e,a=t});return this.Yb(r(e,i),r(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.Yb=function(e,t){function n(){switch(r.b){case 1:e(r.g);break;case 2:t(r.g);break;default:throw Error("Unexpected state: "+r.b)}}var r=this;null==this.a?a.b(n):this.a.push(n)},t.resolve=r,t.reject=function(e){return new t(function(t,n){n(e)})},t.race=function(e){return new t(function(t,n){for(var i=o(e),a=i.next();!a.done;a=i.next())r(a.value).Yb(t,n)})},t.all=function(e){var n=o(e),i=n.next();return i.done?r([]):new t(function(e,t){var a=[],o=0;do{a.push(void 0),o++,r(i.value).Yb(function(t){return function(n){a[t]=n,0==--o&&e(a)}}(a.length-1),t),i=n.next()}while(!i.done)})},t}),s("Promise.prototype.finally",function(e){return e||function(e){return this.then(function(t){return Promise.resolve(e()).then(function(){return t})},function(t){return Promise.resolve(e()).then(function(){throw t})})}});var _p,Ep="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)_p=Object.setPrototypeOf;else{var kp;e:{var Tp={ne:!0},Ap={};try{Ap.__proto__=Tp,kp=Ap.ne;break e}catch(e){}kp=!1}_p=kp?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var wp=_p;c.prototype.h=function(e){this.o=e},c.prototype.return=function(e){this.a={return:e},this.j=this.b},c.prototype.A=function(e){this.j=e},s("WeakMap",function(e){function t(e){if(this.a=(l+=Math.random()+1).toString(),e){n(),r(),e=o(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function i(e){O(e,s)||gp(e,s,{value:{}})}function a(e){var t=Object[e];t&&(Object[e]=function(e){return i(e),t(e)})}if(function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}),n=Object.seal({}),r=new e([[t,2],[n,3]]);return 2==r.get(t)&&3==r.get(n)&&(r.delete(t),r.set(n,4),!r.has(t)&&4==r.get(n))}catch(e){return!1}}())return e;var s="$jscomp_hidden_"+Math.random();a("freeze"),a("preventExtensions"),a("seal");var l=0;return t.prototype.set=function(e,t){if(i(e),!O(e,s))throw Error("WeakMap key fail: "+e);return e[s][this.a]=t,this},t.prototype.get=function(e){return O(e,s)?e[s][this.a]:void 0},t.prototype.has=function(e){return O(e,s)&&O(e[s],this.a)},t.prototype.delete=function(e){return!(!O(e,s)||!O(e[s],this.a))&&delete e[s][this.a]},t}),s("Map",function(e){function t(){var e={};return e.Ca=e.next=e.head=e}function i(e,t){var n=e.a;return a(function(){if(n){for(;n.head!=e.a;)n=n.Ca;for(;n.next!=n.head;)return n=n.next,{done:!1,value:t(n)};n=null}return{done:!0,value:void 0}})}function s(e,t){var n=t&&typeof t;"object"==n||"function"==n?u.has(t)?n=u.get(t):(n=""+ ++c,u.set(t,n)):n="p_"+t;var r=e.b[n];if(r&&O(e.b,n))for(var i=0;i<r.length;i++){var a=r[i];if(t!==t&&a.key!==a.key||t===a.key)return{id:n,list:r,index:i,X:a}}return{id:n,list:r,index:-1,X:void 0}}function l(e){if(this.b={},this.a=t(),this.size=0,e){e=o(e);for(var n;!(n=e.next()).done;)n=n.value,this.set(n[0],n[1])}}if(function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(o([[t,"s"]]));if("s"!=n.get(t)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var r=n.entries(),i=r.next();return!i.done&&i.value[0]==t&&"s"==i.value[1]&&(i=r.next(),!(i.done||4!=i.value[0].x||"t"!=i.value[1]||!r.next().done))}catch(e){return!1}}())return e;n(),r();var u=new WeakMap;l.prototype.set=function(e,t){var n=s(this,e);return n.list||(n.list=this.b[n.id]=[]),n.X?n.X.value=t:(n.X={next:this.a,Ca:this.a.Ca,head:this.a,key:e,value:t},n.list.push(n.X),this.a.Ca.next=n.X,this.a.Ca=n.X,this.size++),this},l.prototype.delete=function(e){return e=s(this,e),!(!e.X||!e.list)&&(e.list.splice(e.index,1),e.list.length||delete this.b[e.id],e.X.Ca.next=e.X.next,e.X.next.Ca=e.X.Ca,e.X.head=null,this.size--,!0)},l.prototype.clear=function(){this.b={},this.a=this.a.Ca=t(),this.size=0},l.prototype.has=function(e){return!!s(this,e).X},l.prototype.get=function(e){return(e=s(this,e).X)&&e.value},l.prototype.entries=function(){return i(this,function(e){return[e.key,e.value]})},l.prototype.keys=function(){return i(this,function(e){return e.key})},l.prototype.values=function(){return i(this,function(e){return e.value})},l.prototype.forEach=function(e,t){for(var n,r=this.entries();!(n=r.next()).done;)n=n.value,e.call(t,n[1],n[0],this)},l.prototype[Symbol.iterator]=l.prototype.entries;var c=0;return l}),s("Set",function(e){function t(e){if(this.a=new Map,e){e=o(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.a.size}return function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(o([t]));if(!n.has(t)||1!=n.size||n.add(t)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var r=n.entries(),i=r.next();return!i.done&&i.value[0]==t&&i.value[1]==t&&(i=r.next(),!i.done&&i.value[0]!=t&&4==i.value[0].x&&i.value[1]==i.value[0]&&r.next().done)}catch(e){return!1}}()?e:(n(),r(),t.prototype.add=function(e){return this.a.set(e,e),this.size=this.a.size,this},t.prototype.delete=function(e){return e=this.a.delete(e),this.size=this.a.size,e},t.prototype.clear=function(){this.a.clear(),this.size=0},t.prototype.has=function(e){return this.a.has(e)},t.prototype.entries=function(){return this.a.entries()},t.prototype.values=function(){return this.a.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(e,t){var n=this;this.a.forEach(function(r){return e.call(t,r,r,n)})},t)}),s("Array.prototype.findIndex",function(e){return e||function(e,t){return C(this,e,t).Cd}}),s("Array.prototype.keys",function(e){return e||function(){return x(this,function(e){return e})}}),s("Object.is",function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}}),s("Array.prototype.includes",function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var r=n.length,i=t||0;for(0>i&&(i=Math.max(i+r,0));i<r;i++){var a=n[i];if(a===e||Object.is(a,e))return!0}return!1}}),s("String.prototype.includes",function(e){return e||function(e,t){return-1!==R(this,e,"includes").indexOf(e,t||0)}}),s("Array.from",function(e){return e||function(e,t,n){r(),t=null!=t?t:function(e){return e};var i=[],a=e[Symbol.iterator];if("function"==typeof a)for(e=a.call(e);!(a=e.next()).done;)i.push(t.call(n,a.value));else{a=e.length;for(var o=0;o<a;o++)i.push(t.call(n,e[o]))}return i}}),s("String.prototype.startsWith",function(e){return e||function(e,t){for(var n=R(this,e,"startsWith"),r=n.length,i=e.length,a=Math.max(0,Math.min(0|t,n.length)),o=0;o<i&&a<r;)if(n[a++]!=e[o++])return!1;return o>=i}}),s("Array.prototype.find",function(e){return e||function(e,t){return C(this,e,t).ie}});var Sp=this;Sp.a=!0,j.prototype.getBandwidthEstimate=function(e){return 128e3>this.a?e:Math.min(N(this.b),N(this.c))},e.console&&e.console.log.bind&&(F=console.warn.bind(console),U=console.error.bind(console));var Pp=/^(?:([^:\/?#.]+):)?(?:\/\/(?:([^\/?#]*)@)?([^\/#?]*?)(?::([0-9]+))?(?=[\/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;vp=V.prototype,vp.va="",vp.$a="",vp.ra="",vp.xb=null,vp.ia="",vp.Qa="",vp.toString=function(){var e=[],t=this.va;if(t&&e.push(Y(t,Op,!0),":"),t=this.ra){e.push("//");var n=this.$a;n&&e.push(Y(n,Op,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t=this.xb,null!=t&&e.push(":",String(t))}return(t=this.ia)&&(this.ra&&"/"!=t.charAt(0)&&e.push("/"),e.push(Y(t,"/"==t.charAt(0)?xp:Cp,!0))),(t=this.a.toString())&&e.push("?",t),(t=this.Qa)&&e.push("#",Y(t,Ip)),e.join("")},vp.resolve=function(e){var t=this.clone();"data"===t.va&&(t=new V);var n=!!e.va;n?G(t,e.va):n=!!e.$a,n?t.$a=e.$a:n=!!e.ra,n?t.ra=e.ra:n=null!=e.xb;var r=e.ia;if(n)H(t,e.xb);else if(n=!!e.ia){if("/"!=r.charAt(0))if(this.ra&&!this.ia)r="/"+r;else{var i=t.ia.lastIndexOf("/");-1!=i&&(r=t.ia.substr(0,i+1)+r)}if(".."==r||"."==r)r="";else if(-1!=r.indexOf("./")||-1!=r.indexOf("/.")){i=0==r.lastIndexOf("/",0),r=r.split("/");for(var a=[],o=0;o<r.length;){var s=r[o++];"."==s?i&&o==r.length&&a.push(""):".."==s?((1<a.length||1==a.length&&""!=a[0])&&a.pop(),i&&o==r.length&&a.push("")):(a.push(s),i=!0)}r=a.join("/")}}return n?t.ia=r:n=""!==e.a.toString(),n?K(t,e.a.clone()):n=!!e.Qa,n&&(t.Qa=e.Qa),t},vp.clone=function(){return new V(this)};var Op=/[#\/\?@]/g,Cp=/[#\?:]/g,xp=/[#\?]/g,Rp=/[#\?@]/g,Ip=/#/g;vp=q.prototype,vp.ha=null,vp.$b=null,vp.add=function(e,t){if(!this.ha&&(this.ha={},this.$b=0,this.a))for(var n=this.a.split("&"),r=0;r<n.length;r++){var i=n[r].indexOf("="),a=null;if(0<=i){var o=n[r].substring(0,i);a=n[r].substring(i+1)}else o=n[r];o=decodeURIComponent(o.replace(/\+/g," ")),a=a||"",this.add(o,decodeURIComponent(a.replace(/\+/g," ")))}return this.a=null,(n=this.ha.hasOwnProperty(e)&&this.ha[e])||(this.ha[e]=n=[]),n.push(t),this.$b++,this},vp.toString=function(){if(this.a)return this.a;if(!this.ha)return"";var e,t=[];for(e in this.ha)for(var n=encodeURIComponent(e),r=this.ha[e],i=0;i<r.length;i++){var a=n;""!==r[i]&&(a+="="+encodeURIComponent(r[i])),t.push(a)}return this.a=t.join("&")},vp.clone=function(){var e=new q;if(e.a=this.a,this.ha){var t,n={};for(t in this.ha)n[t]=this.ha[t].concat();e.ha=n,e.$b=this.$b}return e},X.prototype.O=function(t){var n=this;this.stop();var r=!0,i=null;return this.a=function(){e.clearTimeout(i),r=!1},i=e.setTimeout(function(){r&&n.b()},1e3*t),this},X.prototype.stop=function(){this.a&&(this.a(),this.a=null)},I("shaka.util.Timer",J),J.prototype.sc=function(){return this.stop(),this.b(),this},J.prototype.tickNow=J.prototype.sc,J.prototype.O=function(e){var t=this;return this.stop(),this.a=new X(function(){t.b()}).O(e),this},J.prototype.tickAfter=J.prototype.O,J.prototype.La=function(e){var t=this;return this.stop(),this.a=new X(function(){t.a.O(e),t.b()}).O(e),this},J.prototype.tickEvery=J.prototype.La,J.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)},J.prototype.stop=J.prototype.stop,I("shaka.util.Error",ee),ee.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")},ee.Severity={RECOVERABLE:1,CRITICAL:2},ee.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9},ee.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,CAST_RECEIVER_APP_ID_MISSING:8007,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013},te.prototype.resolve=function(){},te.prototype.reject=function(){},I("shaka.util.AbortableOperation",ne),ne.failed=re,ne.aborted=ie,ne.completed=ae,ne.notAbortable=oe,ne.prototype.abort=function(){return this.a=!0,this.Jd()},ne.prototype.abort=ne.prototype.abort,ne.all=se,ne.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},ne.prototype.finally=ne.prototype.finally,ne.prototype.U=function(e,t){function n(){return i.reject(new ee(2,7,7001)),r.abort()}var r=this,i=new te;return this.promise.then(function(t){r.a?i.reject(new ee(2,7,7001)):e?n=le(e,t,i):i.resolve(t)},function(e){t?n=le(t,e,i):i.reject(e)}),new ne(i,function(){return n()})},ne.prototype.chain=ne.prototype.U,ue.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},ue.prototype.stopImmediatePropagation=function(){this.a=!0},ue.prototype.stopPropagation=function(){},vp=ce.prototype,vp.push=function(e,t){this.a.hasOwnProperty(e)?this.a[e].push(t):this.a[e]=[t]},vp.get=function(e){return(e=this.a[e])?e.slice():null},vp.getAll=function(){var e,t=[];for(e in this.a)t.push.apply(t,this.a[e]);return t},vp.remove=function(e,t){var n=this.a[e];if(n)for(var r=0;r<n.length;++r)n[r]==t&&(n.splice(r,1),--r)},vp.forEach=function(e){for(var t in this.a)e(t,this.a[t])},pe.prototype.addEventListener=function(e,t){this.Bc.push(e,t)},pe.prototype.removeEventListener=function(e,t){this.Bc.remove(e,t)},pe.prototype.dispatchEvent=function(e){for(var t=this.Bc.get(e.type)||[],n=0;n<t.length;++n){e.target=this.Vb,e.currentTarget=this.Vb;var r=t[n];try{r.handleEvent?r.handleEvent(e):r.call(this,e)}catch(e){}if(e.a)break}return e.defaultPrevented},ge.prototype.destroy=function(){var e=[];return this.a.forEach(function(t){t.promise.catch(function(){}),e.push(t.abort())}),this.a=[],Promise.all(e)},D(be,pe),I("shaka.net.NetworkingEngine",be);var Dp={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4};be.RequestType=Dp,be.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var Mp={};be.registerScheme=_e,be.unregisterScheme=function(e){delete Mp[e]},be.prototype.Bf=function(e){this.a.add(e)},be.prototype.registerRequestFilter=be.prototype.Bf,be.prototype.cg=function(e){this.a.delete(e)},be.prototype.unregisterRequestFilter=be.prototype.cg,be.prototype.we=function(){this.a.clear()},be.prototype.clearAllRequestFilters=be.prototype.we,be.prototype.Cf=function(e){this.b.add(e)},be.prototype.registerResponseFilter=be.prototype.Cf,be.prototype.dg=function(e){this.b.delete(e)},be.prototype.unregisterResponseFilter=be.prototype.dg,be.prototype.xe=function(){this.b.clear()},be.prototype.clearAllResponseFilters=be.prototype.xe,be.prototype.destroy=function(){return this.f=!0,this.a.clear(),this.b.clear(),this.g.destroy()},be.prototype.destroy=be.prototype.destroy,be.prototype.request=function(e,t){var n=this,r=new we;if(this.f){var i=Promise.reject(new ee(2,7,7001));return i.catch(function(){}),new Se(i,function(){return Promise.resolve()},r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?fe(t.retryParameters):Z(),t.uris=fe(t.uris),i=ke(this,e,t);var a=i.U(function(){return Te(n,e,t,new Q(t.retryParameters,!1),0,null,r)}),o=a.U(function(t){return Ae(n,e,t)}),s=Date.now(),l=0;i.promise.then(function(){l=Date.now()-s},function(){});var u=0;return a.promise.then(function(){u=Date.now()},function(){}),i=o.U(function(t){var r=Date.now()-u,i=t.response;return i.timeMs+=l,i.timeMs+=r,t.Ze||!n.c||i.fromCache||1!=e||n.c(i.timeMs,i.data.byteLength),i},function(e){throw e&&(e.severity=2),e}),i=new Se(i.promise,i.Jd,r),me(this.g,i),i},be.prototype.request=be.prototype.request,be.NumBytesRemainingClass=we;var Lp=Se;if(Lp.prototype=Ep(ne.prototype),Lp.prototype.constructor=Lp,wp)wp(Lp,ne);else for(var Np in ne)if("prototype"!=Np)if(Object.defineProperties){var jp=Object.getOwnPropertyDescriptor(ne,Np);jp&&Object.defineProperty(Lp,Np,jp)}else Lp[Np]=ne[Np];Lp.ag=ne.prototype,be.PendingRequest=Se,Se.all=se,Se.notAbortable=oe,Se.completed=ae,Se.aborted=ie,Se.failed=re,I("shaka.util.IReleasable",Pe),Pe.prototype.release=function(){},I("shaka.util.EventManager",Oe),Oe.prototype.release=function(){this.Ya(),this.a=null},Oe.prototype.release=Oe.prototype.release,Oe.prototype.w=function(e,t,n,r){this.a&&(e=new Ce(e,t,n,r),this.a.push(t,e))},Oe.prototype.listen=Oe.prototype.w,Oe.prototype.da=function(e,t,n,r){function i(r){a.ea(e,t,i),n(r)}var a=this;this.w(e,t,i,r)},Oe.prototype.listenOnce=Oe.prototype.da,Oe.prototype.ea=function(e,t,n){if(this.a){var r=this.a.get(t)||[];r=o(r);for(var i=r.next();!i.done;i=r.next())i=i.value,i.target!=e||n!=i.listener&&n||(i.ea(),this.a.remove(t,i))}},Oe.prototype.unlisten=Oe.prototype.ea,Oe.prototype.Ya=function(){if(this.a){var e=this.a.getAll();e=o(e);for(var t=e.next();!t.done;t=e.next())t.value.ea();this.a.a={}}},Oe.prototype.removeAll=Oe.prototype.Ya,Ce.prototype.ea=function(){this.target.removeEventListener(this.type,this.listener,this.a),this.listener=this.target=null,this.a=!1},Ce.prototype.unlisten=Ce.prototype.ea;var Up=void 0;I("shaka.util.FairPlayUtils.defaultGetContentId",Ie),I("shaka.util.FairPlayUtils.initDataTransform",De);var Fp=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),Bp=null,Vp=null;I("shaka.util.StringUtils.fromUTF8",ze),I("shaka.util.StringUtils.fromUTF16",Ye),I("shaka.util.StringUtils.fromBytesAutoDetect",We),I("shaka.util.StringUtils.toUTF8",qe),I("shaka.util.StringUtils.toUTF16",Xe);var Gp=null;I("shaka.util.Uint8ArrayUtils.toBase64",Qe),I("shaka.util.Uint8ArrayUtils.fromBase64",$e),I("shaka.util.Uint8ArrayUtils.fromHex",Ze),I("shaka.util.Uint8ArrayUtils.toHex",et),I("shaka.util.Uint8ArrayUtils.equal",tt),I("shaka.util.Uint8ArrayUtils.concat",nt),vp=rt.prototype,vp.destroy=function(){var e=this;return u(function t(){return S(t,function(t){switch(t.j){case 1:return e.f?d(t,e.$,0):(e.f=!0,d(t,it(e),4));case 4:e.$.resolve(),t.A(0)}})})},vp.configure=function(e){this.c=e},vp.Cb=function(e){var t=this;if(!this.h)return this.i.da(e,"encrypted",function(){t.g(new ee(2,6,6010))}),Promise.resolve();this.m=e,this.i.da(this.m,"play",function(){for(var e=0;e<t.G.length;e++)_t(t,t.G[e]);t.ma=!0,t.G=[]}),e=this.m.setMediaKeys(this.h),e=e.catch(function(e){return Promise.reject(new ee(2,6,6003,e.message))});var n=ut(this);return Promise.all([e,n]).then(function(){if(t.f)return Promise.reject();pt(t),t.a.initData.length||t.s.length||t.i.w(t.m,"encrypted",function(e){return ft(t,e.initDataType,new Uint8Array(e.initData))})}).catch(function(e){if(!t.f)return Promise.reject(e)})},vp.keySystem=function(){return this.a?this.a.keySystem:""},vp.dc=function(){var e=1/0,t=this.b.keys();t=o(t);for(var n=t.next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e},vp.Rd=function(e){this.c.delayLicenseRequestUntilPlayed&&this.m.paused&&!this.ma?this.G.push(e):_t(this,e)},vp.Pd=function(e){e=e.target;var t=this.b.get(e),n=!1;e.keyStatuses.forEach(function(e,r){if("string"==typeof r){var i=r;r=e,e=i}if("com.microsoft.playready"==this.a.keySystem&&16==r.byteLength&&!He("Tizen")){i=new DataView(r);var a=i.getUint32(0,!0),o=i.getUint16(4,!0),s=i.getUint16(6,!0);i.setUint32(0,a,!1),i.setUint16(4,o,!1),i.setUint16(6,s,!1)}"com.microsoft.playready"==this.a.keySystem&&"status-pending"==e&&(e="usable"),"status-pending"!=e&&(t.loaded=!0),"expired"==e&&(n=!0),i=et(new Uint8Array(r)),this.na.set(i,e)}.bind(this));var r=e.expiration-Date.now();(0>r||n&&1e3>r)&&t&&!t.xa&&(this.b.delete(e),e.close().catch(function(){})),Ct(this)&&(this.l.resolve(),this.M.O(zp))};var Hp=1,Kp=5,zp=.5;Mt.prototype.init=function(e){var t=muxjs.mp4.probe;e=new Uint8Array(e),this.g=t.videoTrackIds(e),this.f=t.timescale(e),this.a.init()},Mt.prototype.b=function(e,t){var n=new Uint8Array(e);(n=this.a.parse(n,this.g,this.f))&&n.captions&&t(n.captions),this.a.clearParsedCaptions()},Mt.prototype.c=function(){this.a.resetCaptionStream()},Lt.prototype.init=function(){},Lt.prototype.b=function(){},Lt.prototype.c=function(){};var Yp={ye:function(e,t){return e.reduce(function(e,t,n){return t.catch(e.bind(null,n))}.bind(null,t),Promise.reject())},yc:function(e,t){return e.concat(t)},ic:function(){},Ga:function(e){return null!=e}},Wp={Na:"video",Ab:"audio",qa:"text",kg:"application"},qp=1/15;Gt.prototype.destroy=function(){return this.a.dispose(),this.a=null,Promise.resolve()},Gt.prototype.i=function(e){this.c=e.captions;var t=new Uint8Array(e.data.byteLength+e.initSegment.byteLength);t.set(e.initSegment,0),t.set(e.data,e.initSegment.byteLength),this.g.push(t)},Gt.prototype.h=function(){var e={data:nt.apply(null,this.g),captions:this.c};this.b.resolve(e),this.f=!1},I("shaka.text.Cue",Yt);var Xp="auto";Yt.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Xp};var Jp="center",Qp={LEFT:"left",RIGHT:"right",CENTER:Jp,START:"start",END:"end"};Yt.textAlign=Qp;var $p="after",Zp={BEFORE:"before",CENTER:"center",AFTER:$p};Yt.displayAlign=Zp;var ef="ltr";Yt.direction={HORIZONTAL_LEFT_TO_RIGHT:ef,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var tf="horizontal-tb";Yt.writingMode={HORIZONTAL_TOP_TO_BOTTOM:tf,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var nf=0;Yt.lineInterpretation={LINE_NUMBER:nf,PERCENTAGE:1};var rf="start",af={CENTER:"center",START:rf,END:"end"};Yt.lineAlign=af;var of=400;Yt.fontWeight={NORMAL:of,BOLD:700};var sf="normal",lf={NORMAL:sf,ITALIC:"italic",OBLIQUE:"oblique"};Yt.fontStyle=lf,Yt.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},I("shaka.text.CueRegion",Wt);var uf=1;Wt.units={PX:0,PERCENTAGE:uf,LINES:2};var cf="";Wt.scrollMode={NONE:cf,UP:"up"};var pf={};I("shaka.text.TextEngine.registerParser",function(e,t){pf[e]=t}),I("shaka.text.TextEngine.unregisterParser",function(e){delete pf[e]}),qt.prototype.destroy=function(){return this.c=this.g=null,this.i.clear(),Promise.resolve()},qt.prototype.Mc=function(e){var t={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.g.parseMedia(new Uint8Array(e),t)[0].startTime}catch(e){throw new ee(2,2,2009,e)}},qt.prototype.remove=function(e,t){return Promise.resolve().then(function(){!this.c||!this.c.remove(e,t)||null==this.a||t<=this.a||e>=this.b||(e<=this.a&&t>=this.b?this.a=this.b=null:e<=this.a&&t<this.b?this.a=t:e>this.a&&t>=this.b&&(this.b=e))}.bind(this))},qt.prototype.qe=function(e){this.c.append(e)},qt.prototype.appendCues=qt.prototype.qe,qt.prototype.rc=function(e,t){this.l=e;var n=this.i.get(e);if(n)for(var r=o(n.keys()),i=r.next();!i.done;i=r.next())(i=n.get(i.value))&&(i=i.filter(function(e){return e.endTime<=t}),this.c.append(i))},qt.prototype.setSelectedClosedCaptionId=qt.prototype.rc;var ff=e.URL.createObjectURL;vp=Zt.prototype,vp.destroy=function(){var e=this;this.v=!0;var t,n=[];for(t in this.c){var r=this.c[t],i=r[0];for(this.c[t]=r.slice(0,1),i&&n.push(i.p.catch(Yp.ic)),i=1;i<r.length;++i)r[i].p.reject()}this.a&&n.push(this.a.destroy()),this.g&&n.push(this.g.destroy());for(var a in this.l)n.push(this.l[a].destroy());return Promise.all(n).then(function(){e.i&&(e.i.release(),e.i=null),e.f&&(e.f.removeAttribute("src"),e.f.load(),e.f=null),e.h=null,e.a=null,e.g=null,e.b={},e.l={},e.m=null,e.c={}})},vp.init=function(e,t){var n=this;return u(function r(){var i;return S(r,function(r){switch(r.j){case 1:return i=Wp,d(r,n.s,2);case 2:e.forEach(function(e,r){var a=Ue(e.mimeType,e.codecs);r==i.qa?tn(n,a):(!t&&MediaSource.isTypeSupported(a)||!Ht(a,r)||(n.l[r]=new Gt,a=Kt(r,a)),a=n.h.addSourceBuffer(a),n.i.w(a,"error",n.Tf.bind(n,r)),n.i.w(a,"updateend",n.ub.bind(n,r)),n.b[r]=a,n.c[r]=[])}),h(r)}})})},vp.Jc=function(e){if(e.total=Ft(this.f.buffered),e.audio=Ft(sn(this,"audio")),e.video=Ft(sn(this,"video")),e.text=[],this.a){var t=this.a.a,n=this.a.b;null!=t&&null!=n&&e.text.push({start:t,end:n})}},vp.rc=function(e){var t=an(this,"video")||0;this.a.rc(e,t)},vp.remove=function(e,t,n){return"text"==e?this.a.remove(t,n):pn(this,e,this.fe.bind(this,e,t,n))},vp.flush=function(e){return"text"==e?Promise.resolve():pn(this,e,this.Ce.bind(this,e))},vp.endOfStream=function(e){return fn(this,function(){nn(this)||(e?this.h.endOfStream(e):this.h.endOfStream())}.bind(this))},vp.wa=function(e){return fn(this,function(){this.h.duration=e}.bind(this))},vp.Y=function(){return this.h.duration},vp.ee=function(e,t){this.b[e].appendBuffer(t)},vp.fe=function(e,t,n){n<=t?this.ub(e):this.b[e].remove(t,n)},vp.oe=function(e){var t=this.b[e].appendWindowStart,n=this.b[e].appendWindowEnd;this.b[e].abort(),this.b[e].appendWindowStart=t,this.b[e].appendWindowEnd=n,this.ub(e)},vp.Ce=function(e){this.f.currentTime-=.001,this.ub(e)},vp.Sf=function(e,t){0>t&&(t+=.001),this.b[e].timestampOffset=t,this.ub(e)},vp.Pf=function(e,t,n){this.b[e].appendWindowStart=0,this.b[e].appendWindowEnd=n,this.b[e].appendWindowStart=t,this.ub(e)},vp.Tf=function(e){this.c[e][0].p.reject(new ee(2,3,3014,this.f.error?this.f.error.code:0))},vp.ub=function(e){var t=this.c[e][0];t&&(t.p.resolve(),dn(this,e))};var df=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]),hf=0;I("shaka.abr.SimpleAbrManager",Mn),Mn.prototype.stop=function(){this.h=null,this.f=!1,this.c=[],this.g=null},Mn.prototype.stop=Mn.prototype.stop,Mn.prototype.init=function(e){this.h=e},Mn.prototype.init=Mn.prototype.init,Mn.prototype.chooseVariant=function(){var e=Ln(this.a.restrictions,this.c),t=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.c.length&&!e.length&&(e=Ln(null,this.c),e=[e[0]]);for(var n=e[0]||null,r=0;r<e.length;++r){var i=e[r],a=(e[r+1]||{bandwidth:1/0}).bandwidth/this.a.bandwidthUpgradeTarget;t>=i.bandwidth/this.a.bandwidthDowngradeTarget&&t<=a&&(n=i)}return this.g=Date.now(),n},Mn.prototype.chooseVariant=Mn.prototype.chooseVariant,Mn.prototype.enable=function(){this.f=!0},Mn.prototype.enable=Mn.prototype.enable,Mn.prototype.disable=function(){this.f=!1},Mn.prototype.disable=Mn.prototype.disable,Mn.prototype.segmentDownloaded=function(e,t){var n=this.b;if(!(16e3>t)){var r=8e3*t/e,i=e/1e3;n.a+=t,L(n.b,i,r),L(n.c,i,r)}if(null!=this.g&&this.f)e:{if(this.i){if(Date.now()-this.g<1e3*this.a.switchInterval)break e}else{if(!(128e3<=this.b.a))break e;this.i=!0}n=this.chooseVariant(),this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate),this.h(n)}},Mn.prototype.segmentDownloaded=Mn.prototype.segmentDownloaded,Mn.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)},Mn.prototype.getBandwidthEstimate=Mn.prototype.getBandwidthEstimate,Mn.prototype.setVariants=function(e){this.c=e},Mn.prototype.setVariants=Mn.prototype.setVariants,Mn.prototype.configure=function(e){this.a=e},Mn.prototype.configure=Mn.prototype.configure,Nn.prototype.toString=function(){return"v"+this.a+"."+this.b};var yf=null,vf="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),gf="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),mf=["loop","playbackRate"],bf=["pause","play"],_f="abrstatuschanged adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged textchanged".split(" "),Ef={getAssetUri:2,getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},kf={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Tf=[["getConfiguration","configure"]],Af=[["isTextTrackVisible","setTextTrackVisibility"]],wf="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),Sf=["attach","detach","load","unload"],Pf=!1,Of=null;vp=Hn.prototype,vp.destroy=function(){return zn(this),Of&&Kn(this),this.f&&(this.f.stop(),this.f=null),this.M=this.G=null,this.b=this.h=!1,this.s=this.m=this.g=this.c=this.a=this.i=null,Promise.resolve()},vp.ga=function(){return this.b},vp.cd=function(){return this.D},vp.init=function(){if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){delete e.__onGCastApiAvailable,this.h=!0,this.f.sc();var t=new chrome.cast.SessionRequest(this.T);t=new chrome.cast.ApiConfig(t,this.Od.bind(this),this.pf.bind(this),"origin_scoped"),chrome.cast.initialize(t,function(){},function(){}),Pf&&this.f.O(.02),(t=Of)&&t.status!=chrome.cast.SessionStatus.STOPPED?this.Od(t):Of=null}else e.__onGCastApiAvailable=function(e){e&&this.init()}.bind(this)},vp.jd=function(e){this.i=e,this.b&&Yn({type:"appData",appData:this.i})},vp.cast=function(e){return this.h?Pf?this.b?Promise.reject(new ee(1,8,8002)):(this.g=new te,chrome.cast.requestSession(this.$c.bind(this,e),this.Md.bind(this)),this.g):Promise.reject(new ee(1,8,8001)):Promise.reject(new ee(1,8,8e3))},vp.Eb=function(){this.b&&(zn(this),Of&&(Kn(this),Of.stop(function(){},function(){}),Of=null))},vp.get=function(e,t){if("video"==e){if(bf.includes(t))return this.Yd.bind(this,e,t)}else if("player"==e){if(kf[t]&&!this.get("player","isLive")())return function(){};if(wf.includes(t))return this.Yd.bind(this,e,t);if(Sf.includes(t))return this.Ef.bind(this,e,t);if(Ef[t])return this.Vd.bind(this,e,t)}return this.Vd(e,t)},vp.set=function(e,t,n){this.a[e][t]=n,Yn({type:"set",targetName:e,property:t,value:n})},vp.$c=function(e,t){Of=t,t.addUpdateListener(this.m),t.addMessageListener("urn:x-cast:com.google.shaka.v2",this.s),this.Nd(),Yn({type:"init",initState:e,appData:this.i}),this.g.resolve()},vp.Md=function(e){var t=8003;switch(e.code){case"cancel":t=8004;break;case"timeout":t=8005;break;case"receiver_unavailable":t=8006}this.g.reject(new ee(2,8,t,e))},vp.Vd=function(e,t){return this.a[e][t]},vp.Yd=function(e,t,n){for(var r=[],i=2;i<arguments.length;++i)r[i-2]=arguments[i];Yn({type:"call",targetName:e,methodName:t,args:r})},vp.Ef=function(e,t,n){for(var r=[],i=2;i<arguments.length;++i)r[i-2]=arguments[i];i=new te;var a=this.v.toString();return this.v++,this.c[a]=i,Yn({type:"asyncCall",targetName:e,methodName:t,args:r,id:a}),i},vp.Od=function(e){var t=this.C();this.g=new te,this.l=!0,this.$c(t,e)},vp.pf=function(e){Pf="available"==e,this.f.sc()},vp.Nd=function(){var e=!!Of&&"connected"==Of.status;if(this.b&&!e){this.M();for(var t in this.a)this.a[t]={};zn(this)}this.D=(this.b=e)?Of.receiver.friendlyName:"",this.f.sc()},vp.kf=function(e,t){var n=Vn(t);switch(n.type){case"event":var r=n.event;this.G(n.targetName,new ue(r.type,r));break;case"update":r=n.update;for(var i in r){n=this.a[i]||{};for(var a in r[i])n[a]=r[i][a]}this.l&&(this.P(),this.l=!1);break;case"asyncComplete":if(i=n.id,n=n.error,a=this.c[i],delete this.c[i],a)if(n){i=new ee(n.severity,n.category,n.code);for(r in n)i[r]=n[r];a.reject(i)}else a.resolve()}},D(Wn,pe),I("shaka.cast.CastProxy",Wn),Wn.prototype.destroy=function(e){return e&&this.a&&this.a.Eb(),this.i&&(this.i.release(),this.i=null),e=[],this.b&&(e.push(this.b.destroy()),this.b=null),this.a&&(e.push(this.a.destroy()),this.a=null),this.l=this.h=this.c=null,Promise.all(e)},Wn.prototype.destroy=Wn.prototype.destroy,Wn.prototype.Ye=function(){return this.h},Wn.prototype.getVideo=Wn.prototype.Ye,Wn.prototype.Re=function(){return this.l},Wn.prototype.getPlayer=Wn.prototype.Re,Wn.prototype.se=function(){return!!this.a&&(this.a.h&&Pf)},Wn.prototype.canCast=Wn.prototype.se,Wn.prototype.ga=function(){return!!this.a&&this.a.ga()},Wn.prototype.isCasting=Wn.prototype.ga,Wn.prototype.cd=function(){return this.a?this.a.cd():""},Wn.prototype.receiverName=Wn.prototype.cd,Wn.prototype.cast=function(){if(!this.a)throw new ee(1,8,8007);var e=Xn(this);return this.a.cast(e).then(function(){if(this.b)return this.b.rd()}.bind(this))},Wn.prototype.cast=Wn.prototype.cast,Wn.prototype.jd=function(e){this.a&&this.a.jd(e)},Wn.prototype.setAppData=Wn.prototype.jd,Wn.prototype.$f=function(){if(this.a){var e=this.a;if(e.b){var t=e.C();chrome.cast.requestSession(e.$c.bind(e,t),e.Md.bind(e))}}},Wn.prototype.suggestDisconnect=Wn.prototype.$f,Wn.prototype.ve=function(e){var t=this;return u(function n(){return S(n,function(n){switch(n.j){case 1:if(e==t.m)return n.return();if(t.m=e,!t.a){n.A(2);break}return t.a.Eb(),d(n,t.a.destroy(),3);case 3:t.a=null;case 2:t.a=new Hn(e,function(){return Jn(t)},function(){return Qn(t)},function(e,n){return Zn(t,e,n)},function(){return $n(t)},function(){return Xn(t)}),t.a.init(),h(n)}})})},Wn.prototype.changeReceiverId=Wn.prototype.ve,Wn.prototype.Eb=function(){this.a&&this.a.Eb()},Wn.prototype.forceDisconnect=Wn.prototype.Eb,vp=Wn.prototype,vp.hg=function(e){if("addEventListener"==e)return this.f.addEventListener.bind(this.f);if("removeEventListener"==e)return this.f.removeEventListener.bind(this.f);if(this.a&&this.a.ga()&&0==Object.keys(this.a.a.video).length){var t=this.c[e];if("function"!=typeof t)return t}return this.a&&this.a.ga()?this.a.get("video",e):(e=this.c[e],"function"==typeof e&&(e=e.bind(this.c)),e)},vp.jg=function(e,t){this.a&&this.a.ga()?this.a.set("video",e,t):this.c[e]=t},vp.ig=function(e){this.a&&this.a.ga()||this.f.dispatchEvent(new ue(e.type,e))},vp.Ud=function(e){if("addEventListener"==e)return this.g.addEventListener.bind(this.g);if("removeEventListener"==e)return this.g.removeEventListener.bind(this.g);if("getMediaElement"==e)return function(){return this.h}.bind(this);if("getSharedConfiguration"==e)return this.a?this.a.get("player","getConfiguration"):this.b.getConfiguration();if("getNetworkingEngine"==e)return this.b.Fb.bind(this.b);if(this.a&&this.a.ga()){if("getManifest"==e||"drmInfo"==e)return function(){return F(e+"() does not work while casting!"),null};if("getManifestUri"==e)return jn("getManifestUri",'Please use "getAssetUri" instead.'),this.Ud("getAssetUri");if("attach"==e||"detach"==e)return function(){return F(e+"() does not work while casting!"),Promise.resolve()}}return this.a&&this.a.ga()&&0==Object.keys(this.a.a.video).length&&Ef[e]||!this.a||!this.a.ga()?this.b[e].bind(this.b):this.a.get("player",e)},vp.yf=function(e){this.a&&this.a.ga()||this.g.dispatchEvent(e)},D(er,pe),I("shaka.cast.CastReceiver",er),er.prototype.isConnected=function(){return this.v},er.prototype.isConnected=er.prototype.isConnected,er.prototype.bf=function(){return this.h},er.prototype.isIdle=er.prototype.bf,er.prototype.destroy=function(){var e=this;return u(function t(){var n,r;return S(t,function(t){switch(t.j){case 1:return e.c&&(e.c.release(),e.c=null),n=[],e.b&&(n.push(e.b.destroy()),e.b=null),e.C&&(e.C.stop(),e.C=null),e.a=null,e.D=null,e.s=null,e.v=!1,e.h=!0,e.f=null,e.i=null,d(t,Promise.all(n),2);case 2:r=cast.receiver.CastReceiverManager.getInstance(),r.stop(),h(t)}})})},er.prototype.destroy=er.prototype.destroy,vp=er.prototype,vp.Qd=function(){this.g=0,this.l=!0,this.v=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,nr(this)},vp.Wd=function(e,t){this.b&&(ir(this),sr(this,{type:"event",targetName:e,event:t},this.f))},vp.Be=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&sr(this,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},this.f),sr(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.f)},vp.rf=function(e){var t=Vn(e.data);switch(t.type){case"init":this.g=0,this.m=!1,this.l=!0,rr(this,t.initState,t.appData),ir(this);break;case"appData":this.s(t.appData);break;case"set":var n=t.targetName,r=t.property;if(t=t.value,"video"==n){var i=cast.receiver.CastReceiverManager.getInstance();if("volume"==r){i.setSystemVolumeLevel(t);break}if("muted"==r){i.setSystemVolumeMuted(t);break}}this.D[n][r]=t;break;case"call":n=this.D[t.targetName],n[t.methodName].apply(n,t.args);break;case"asyncCall":n=t.targetName,r=t.methodName,"player"==n&&"load"==r&&(this.g=0,this.m=!1),i=t.id,e=e.senderId;var a=this.D[n];t=a[r].apply(a,t.args),"player"==n&&"load"==r&&(t=t.then(function(){this.l=!0}.bind(this))),t.then(this.be.bind(this,e,i,null),this.be.bind(this,e,i))}},vp.ef=function(e){var t=Vn(e.data);switch(t.type){case"PLAY":this.a.play(),lr(this,0);break;case"PAUSE":this.a.pause(),lr(this,0);break;case"SEEK":e=t.currentTime;var n=t.resumeState;null!=e&&(this.a.currentTime=Number(e)),n&&"PLAYBACK_START"==n?(this.a.play(),lr(this,0)):n&&"PLAYBACK_PAUSE"==n&&(this.a.pause(),lr(this,0));break;case"STOP":this.b.rd().then(function(){this.b&&lr(this,0)}.bind(this));break;case"GET_STATUS":lr(this,Number(t.requestId));break;case"VOLUME":n=t.volume,e=n.level,n=n.muted;var r=this.a.volume,i=this.a.muted;null!=e&&(this.a.volume=Number(e)),null!=n&&(this.a.muted=n),r==this.a.volume&&i==this.a.muted||lr(this,0);break;case"LOAD":this.g=0,this.l=this.m=!1,e=t.media,n=t.currentTime,r=this.G(e.contentId),i=t.autoplay||!0,this.s(e.customData),i&&(this.a.autoplay=!0),this.b.load(r,n).then(function(){this.b&&or(this)}.bind(this)).catch(function(e){var n="LOAD_FAILED";7==e.category&&7e3==e.code&&(n="LOAD_CANCELLED"),sr(this,{requestId:Number(t.requestId),type:n},this.i)}.bind(this));break;default:sr(this,{requestId:Number(t.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.i)}},vp.be=function(e,t,n){this.b&&sr(this,{type:"asyncComplete",id:t,error:n},this.f,e)};var Cf={IDLE:"IDLE",me:"PLAYING",je:"BUFFERING",le:"PAUSED"};I("shaka.util.DataViewReader",ur);var xf=1;ur.Endianness={lg:0,mg:xf},ur.prototype.sa=function(){return this.a<this.K.byteLength},ur.prototype.hasMoreData=ur.prototype.sa,ur.prototype.ba=function(){return this.a},ur.prototype.getPosition=ur.prototype.ba,ur.prototype.Ie=function(){return this.K.byteLength},ur.prototype.getLength=ur.prototype.Ie,ur.prototype.ka=function(){try{var e=this.K.getUint8(this.a);return this.a+=1,e}catch(e){cr()}},ur.prototype.readUint8=ur.prototype.ka,ur.prototype.Mb=function(){try{var e=this.K.getUint16(this.a,this.b);return this.a+=2,e}catch(e){cr()}},ur.prototype.readUint16=ur.prototype.Mb,ur.prototype.F=function(){try{var e=this.K.getUint32(this.a,this.b);return this.a+=4,e}catch(e){cr()}},ur.prototype.readUint32=ur.prototype.F,ur.prototype.Xd=function(){try{var e=this.K.getInt32(this.a,this.b);return this.a+=4,e}catch(e){cr()}},ur.prototype.readInt32=ur.prototype.Xd,ur.prototype.yb=function(){try{if(this.b)var e=this.K.getUint32(this.a,!0),t=this.K.getUint32(this.a+4,!0);else t=this.K.getUint32(this.a,!1),e=this.K.getUint32(this.a+4,!1)}catch(e){cr()}if(2097151<t)throw new ee(2,3,3001);return this.a+=8,t*Math.pow(2,32)+e},ur.prototype.readUint64=ur.prototype.yb,ur.prototype.Xa=function(e){this.a+e>this.K.byteLength&&cr();var t=new Uint8Array(this.K.buffer,this.K.byteOffset+this.a,e);return this.a+=e,new Uint8Array(t)},ur.prototype.readBytes=ur.prototype.Xa,ur.prototype.L=function(e){this.a+e>this.K.byteLength&&cr(),this.a+=e},ur.prototype.skip=ur.prototype.L,ur.prototype.$d=function(e){this.a<e&&cr(),this.a-=e},ur.prototype.rewind=ur.prototype.$d,ur.prototype.seek=function(e){(0>e||e>this.K.byteLength)&&cr(),this.a=e},ur.prototype.seek=ur.prototype.seek,ur.prototype.bd=function(){for(var e=this.a;this.sa()&&0!=this.K.getUint8(this.a);)this.a+=1;return e=new Uint8Array(this.K.buffer,this.K.byteOffset+e,this.a-e),this.a+=1,ze(e)},ur.prototype.readTerminatedString=ur.prototype.bd,I("shaka.util.Mp4Parser",pr),pr.prototype.H=function(e,t){var n=yr(e);return this.c[n]=0,this.b[n]=t,this},pr.prototype.box=pr.prototype.H,pr.prototype.fa=function(e,t){var n=yr(e);return this.c[n]=1,this.b[n]=t,this},pr.prototype.fullBox=pr.prototype.fa,pr.prototype.stop=function(){this.a=!0},pr.prototype.stop=pr.prototype.stop,pr.prototype.parse=function(e,t){var n=new Uint8Array(e);for(n=new ur(new DataView(n.buffer,n.byteOffset,n.byteLength),0),this.a=!1;n.sa()&&!this.a;)this.mc(0,n,t)},pr.prototype.parse=pr.prototype.parse,pr.prototype.mc=function(e,t,n){var r=t.ba(),i=t.F(),a=t.F();switch(i){case 0:i=t.K.byteLength-r;break;case 1:i=t.yb()}var o=this.b[a];if(o){var s=null,l=null;1==this.c[a]&&(l=t.F(),s=l>>>24,l&=16777215),a=r+i,n&&a>t.K.byteLength&&(a=t.K.byteLength),a-=t.ba(),t=0<a?t.Xa(a):new Uint8Array(0),t=new ur(new DataView(t.buffer,t.byteOffset,t.byteLength),0),o({parser:this,partialOkay:n||!1,version:s,flags:l,reader:t,size:i,start:r+e})}else t.L(Math.min(r+i-t.ba(),t.K.byteLength-t.ba()))},pr.prototype.parseNext=pr.prototype.mc,pr.children=fr,pr.sampleDescription=dr,pr.allData=hr,pr.typeToString=vr,gr.prototype.c=function(e){if(!(1<e.version)){var t=et(e.reader.Xa(16)),n=[];if(0<e.version)for(var r=e.reader.F(),i=0;i<r;++i){var a=et(e.reader.Xa(16));n.push(a)}r=e.reader.F(),e.reader.L(r),this.b.push.apply(this.b,n),this.f.push(t),this.a.push({start:e.start,end:e.start+e.size-1})}};var Rf={ac:function(e,t){var n=Rf.R(e,t);return 1!=n.length?null:n[0]},Gc:function(e,t,n){return e=Rf.zd(e,t,n),1!=e.length?null:e[0]},R:function(e,t){return Array.prototype.filter.call(e.childNodes,function(e){return e instanceof Element&&e.tagName==t})},zd:function(e,t,n){return Array.prototype.filter.call(e.childNodes,function(e){return e instanceof Element&&e.localName==n&&e.namespaceURI==t})},getAttributeNS:function(e,t,n){return e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null},cc:function(e){return Array.prototype.every.call(e.childNodes,function(e){return e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE})?e.textContent.trim():null},J:function(e,t,n,r){r=void 0===r?null:r;var i=null;return e=e.getAttribute(t),null!=e&&(i=n(e)),null==i?r:i},vf:function(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:Math.floor(e/1e3)):null},Ba:function(e){return e&&(e=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(e))?(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null),isFinite(e)?e:null):null},oc:function(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t?(e=Number(t[1]),isFinite(e)?(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null):null):null},parseInt:function(e){return e=Number(e),0==e%1?e:null},nc:function(e){return e=Number(e),0==e%1&&0<e?e:null},vb:function(e){return e=Number(e),0==e%1&&0<=e?e:null},parseFloat:function(e){return e=Number(e),isNaN(e)?null:e},Ae:function(e){var t;return e=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e),isNaN(e)?null:e},Td:function(e,t){var n=new DOMParser;try{var r=n.parseFromString(e,"text/xml")}catch(e){}if(r&&r.documentElement.tagName==t)var i=r.documentElement;return i&&0<i.getElementsByTagName("parsererror").length?null:i},Sd:function(e,t){try{var n=ze(e);return Rf.Td(n,t)}catch(e){}}},If=(new Map).set("urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","org.w3.clearkey").set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine.alpha").set("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime"),Df=(new Map).set("com.widevine.alpha",function(e){return(e=Rf.Gc(e.node,"urn:microsoft","laurl"))?e.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",function(e){return(e=Rf.Gc(e.node,"urn:microsoft:playready","pro"))?(e=$e(e.textContent),(e=_r(e.buffer).filter(function(e){return 1===e.type})[0])?(e=Ye(e.value,!0),(e=Rf.Td(e,"WRMHEADER"))?Er(e):""):""):""});I("shaka.media.InitSegmentReference",Rr),Rr.prototype.Ac=function(){return this.c()},Rr.prototype.createUris=Rr.prototype.Ac,Rr.prototype.Lc=function(){return this.b},Rr.prototype.getStartByte=Rr.prototype.Lc,Rr.prototype.Kc=function(){return this.a},Rr.prototype.getEndByte=Rr.prototype.Kc,I("shaka.media.SegmentReference",Ir),Ir.prototype.ba=function(){return this.position},Ir.prototype.getPosition=Ir.prototype.ba,Ir.prototype.Mc=function(){return this.startTime},Ir.prototype.getStartTime=Ir.prototype.Mc,Ir.prototype.Ge=function(){return this.endTime},Ir.prototype.getEndTime=Ir.prototype.Ge,Ir.prototype.Ac=function(){return this.c()},Ir.prototype.createUris=Ir.prototype.Ac,Ir.prototype.Lc=function(){return this.b},Ir.prototype.getStartByte=Ir.prototype.Lc,Ir.prototype.Kc=function(){return this.a},Ir.prototype.getEndByte=Ir.prototype.Kc,I("shaka.media.SegmentIndex",Lr),Lr.prototype.destroy=function(){return this.a=null,Promise.resolve()},Lr.prototype.destroy=Lr.prototype.destroy,Lr.prototype.find=function(e){for(var t=this.a.length-1;0<=t;--t){var n=this.a[t];if(e>=n.startTime&&e<n.endTime)return n.position}return this.a.length&&e<this.a[0].startTime?this.a[0].position:null},Lr.prototype.find=Lr.prototype.find,Lr.prototype.get=function(e){return 0==this.a.length?null:(e-=this.a[0].position,0>e||e>=this.a.length?null:this.a[e])},Lr.prototype.get=Lr.prototype.get,Lr.prototype.offset=function(e){for(var t=0;t<this.a.length;++t)this.a[t].startTime+=e,this.a[t].endTime+=e},Lr.prototype.offset=Lr.prototype.offset,Lr.prototype.Tc=function(e){for(var t=[],n=0,r=0;n<this.a.length&&r<e.length;){var i=this.a[n],a=e[r];i.startTime<a.startTime?(t.push(i),n++):(i.startTime>a.startTime?0==n&&t.push(a):(.1<Math.abs(i.endTime-a.endTime)?t.push(new Ir(i.position,a.startTime,a.endTime,a.c,a.b,a.a)):t.push(i),n++),r++)}for(;n<this.a.length;)t.push(this.a[n++]);if(t.length)for(n=t[t.length-1].position+1;r<e.length;)i=e[r++],i=new Ir(n++,i.startTime,i.endTime,i.c,i.b,i.a),t.push(i);else t=e;this.a=t},Lr.prototype.merge=Lr.prototype.Tc,Lr.prototype.Dc=function(e){for(var t=0;t<this.a.length;++t)if(this.a[t].endTime>e)return void this.a.splice(0,t);this.a=[]},Lr.prototype.evict=Lr.prototype.Dc;var Mf;jr.prototype.sa=function(){return this.a.sa()},Gr.prototype.parse=function(e,t,n,r){var i;if(t=new jr(new DataView(t)),440786851!=Ur(t).id)throw new ee(2,3,3008);var a=Ur(t);if(408125543!=a.id)throw new ee(2,3,3009);for(t=a.a.byteOffset,a=new jr(a.a),i=null;a.sa();){var o=Ur(a);if(357149030==o.id){i=o;break}}if(!i)throw new ee(2,3,3010);for(a=new jr(i.a),i=1e6,o=null;a.sa();){var s=Ur(a);if(2807729==s.id)i=Vr(s);else if(17545==s.id)if(o=s,4==o.a.byteLength)o=o.a.getFloat32(0);else{if(8!=o.a.byteLength)throw new ee(2,3,3003);o=o.a.getFloat64(0)}}if(null==o)throw new ee(2,3,3011);if(a=i/1e9,i=o*a,e=Ur(new jr(new DataView(e))),475249515!=e.id)throw new ee(2,3,3007);return Hr(e,t,a,i,n,r)};var Lf={wb:{},Lb:{},ed:function(e,t){Lf.Lb[e]=t}};I("shaka.media.ManifestParser.registerParserByExtension",Lf.ed),Lf.Nb=function(e,t){Lf.wb[e]=t},I("shaka.media.ManifestParser.registerParserByMime",Lf.Nb),Lf.Af=function(){var e={};if(Ve()){for(var t in Lf.wb)e[t]=!0;for(var n in Lf.Lb)e[n]=!0}t={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"},n=o(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var r=n.next();!r.done;r=n.next())r=r.value,e[r]=Ve()?!!Lf.wb[r]:Ge(r);for(var i in t)e[i]=Ve()?!!Lf.Lb[i]:Ge(t[i]);return e},Lf.create=function(e,t,n,r){return u(function i(){var a,o;return S(i,function(i){switch(i.j){case 1:return y(i,2),d(i,Lf.He(e,t,n,r),4);case 4:return a=i.o,i.return(new a);case 2:throw o=m(i),o.severity=2,o}})})},Lf.He=function(e,t,n,r){return u(function i(){var a,o,s,l,u;return S(i,function(i){switch(i.j){case 1:if(a=Lf,r&&(o=a.wb[r.toLowerCase()]))return i.return(o);if((s=a.getExtension(e))&&(l=a.Lb[s]))return i.return(l);if(r){i.A(2);break}return d(i,a.Oe(e,t,n),3);case 3:if((r=i.o)&&(u=Lf.wb[r]))return i.return(u);case 2:throw new ee(2,4,4e3,e)}})})},Lf.Oe=function(e,t,n){return u(function r(){var i,a,o;return S(r,function(r){switch(r.j){case 1:return i=Ee([e],n),i.method="HEAD",d(r,t.request(0,i).promise,2);case 2:return a=r.o,o=a.headers["content-type"],r.return(o?o.toLowerCase():"")}})})},Lf.getExtension=function(e){return e=new V(e).ia.split("/").pop().split("."),1==e.length?"":e.pop().toLowerCase()},Lf.isSupported=function(e,t){return!!Ve()&&(t in Lf.wb||Lf.getExtension(e)in Lf.Lb)},I("shaka.media.PresentationTimeline",ii),ii.prototype.Y=function(){return this.g},ii.prototype.getDuration=ii.prototype.Y,ii.prototype.wa=function(e){this.g=e},ii.prototype.setDuration=ii.prototype.wa,ii.prototype.Te=function(){return this.f},ii.prototype.getPresentationStartTime=ii.prototype.Te,ii.prototype.ce=function(e){this.l=e},ii.prototype.setClockOffset=ii.prototype.ce,ii.prototype.Rb=function(e){this.m=e},ii.prototype.setStatic=ii.prototype.Rb,ii.prototype.md=function(e){this.h=e},ii.prototype.setSegmentAvailabilityDuration=ii.prototype.md,ii.prototype.Qf=function(e){this.pc=e},ii.prototype.setDelay=ii.prototype.Qf,ii.prototype.Fe=function(){return this.pc},ii.prototype.getDelay=ii.prototype.Fe,ii.prototype.sb=function(e,t){if(0!=e.length){var n=e[e.length-1].endTime+t;this.Wc(e[0].startTime+t),this.a=e.reduce(function(e,t){return Math.max(e,t.endTime-t.startTime)},this.a),this.b=Math.max(this.b,n),null!=this.f&&this.s&&(this.f=(Date.now()+this.l)/1e3-this.b-this.a)}},ii.prototype.notifySegments=ii.prototype.sb,ii.prototype.Wc=function(e){this.c=null==this.c?e:Math.min(this.c,e)},ii.prototype.notifyMinSegmentStartTime=ii.prototype.Wc,ii.prototype.Vc=function(e){this.a=Math.max(this.a,e)},ii.prototype.notifyMaxSegmentDuration=ii.prototype.Vc,ii.prototype.offset=function(e){null!=this.c&&(this.c+=e),null!=this.b&&(this.b+=e)},ii.prototype.offset=ii.prototype.offset,ii.prototype.V=function(){return 1/0==this.g&&!this.m},ii.prototype.isLive=ii.prototype.V,ii.prototype.Va=function(){return 1/0!=this.g&&!this.m},ii.prototype.isInProgress=ii.prototype.Va,ii.prototype.Hb=function(){if(1/0==this.h)return this.i;var e=this.nb()-this.h;return Math.max(this.i,e)},ii.prototype.getSegmentAvailabilityStart=ii.prototype.Hb,ii.prototype.de=function(e){this.i=e},ii.prototype.setUserSeekStart=ii.prototype.de,ii.prototype.nb=function(){return this.V()||this.Va()?Math.min(Math.max(0,(Date.now()+this.l)/1e3-this.a-this.f),this.g):this.g},ii.prototype.getSegmentAvailabilityEnd=ii.prototype.nb,ii.prototype.Gb=function(e){var t=Math.max(this.c,this.i);if(1/0==this.h)return t;var n=this.nb()-this.h;return e=Math.min(n+e,this.za()),Math.max(t,e)},ii.prototype.getSafeSeekRangeStart=ii.prototype.Gb,ii.prototype.mb=function(){return this.Gb(0)},ii.prototype.getSeekRangeStart=ii.prototype.mb,ii.prototype.za=function(){var e=this.V()||this.Va()?this.pc:0;return Math.max(0,this.nb()-e)},ii.prototype.getSeekRangeEnd=ii.prototype.za,ii.prototype.he=function(){return null!=this.f&&null==this.b},ii.prototype.usingPresentationStartTime=ii.prototype.he,I("shaka.dash.DashParser",oi),vp=oi.prototype,vp.configure=function(e){this.b=e},vp.start=function(e,t){var n=this;return u(function r(){var i;return S(r,function(r){switch(r.j){case 1:return n.f=[e],n.a=t,d(r,si(n),2);case 2:if(i=r.o,n.a&&hi(n,i),!n.a)throw new ee(2,7,7001);return r.return(n.c)}})})},vp.stop=function(){return this.b=this.a=null,this.f=[],this.c=null,this.l=[],this.m={},null!=this.i&&(this.i.stop(),this.i=null),this.g.destroy()},vp.update=function(){si(this).catch(function(e){this.a&&this.a.onError(e)}.bind(this))},vp.onExpirationUpdated=function(){},vp.uf=function(e,t){e.ca=yi(t,e.ja,null);var n=!1,r=Rf.R(t,"Role"),i=r.map(function(e){return e.getAttribute("value")}).filter(Yp.Ga),a=void 0,s="text"==e.ca.contentType;s&&(a="subtitle");for(var l=0;l<r.length;l++){var u=r[l].getAttribute("schemeIdUri");if(null==u||"urn:mpeg:dash:role:2011"==u)switch(u=r[l].getAttribute("value")){case"main":n=!0;break;case"caption":case"subtitle":a=u}}var c=null,p=!1;Rf.R(t,"EssentialProperty").forEach(function(e){"http://dashif.org/guidelines/trickmode"==e.getAttribute("schemeIdUri")?c=e.getAttribute("value"):p=!0}),l=Rf.R(t,"Accessibility");var f=new Map;for(r={},l=o(l),u=l.next();!u.done;r={Db:r.Db},u=l.next()){var d=u.value;u=d.getAttribute("schemeIdUri"),d=d.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==u||"urn:scte:dash:cc:cea-708:2015"==u?(r.Db=1,null!=d?d.split(";").forEach(function(e){return function(t){if(t.includes("=")){t=t.split("=");var n=t[0].startsWith("CC")?t[0]:"CC"+t[0];t=t[1].split(",")[0].split(":").pop()}else n="CC"+e.Db,e.Db+=2;f.set(n,vn(t))}}(r)):f.set("CC1","und")):"urn:mpeg:dash:role:2011"==u&&null!=d&&(i.push(d),"captions"==d&&(a="caption"))}if(p)return null;r=Rf.R(t,"ContentProtection");var h=mr(r,this.b.dash.customScheme,this.b.dash.ignoreDrmInfo);if(r=vn(t.getAttribute("lang")||"und"),u=t.getAttribute("label"),l=Rf.R(t,"Representation"),i=l.map(this.xf.bind(this,e,h,a,r,u,n,i,f)).filter(function(e){return!!e}),0==i.length){if(s)return null;throw new ee(2,4,4003)}return e.ca.contentType&&"application"!=e.ca.contentType||(e.ca.contentType=_i(i[0].mimeType,i[0].codecs),i.forEach(function(t){t.type=e.ca.contentType})),i.forEach(function(e){h.drmInfos.forEach(function(t){e.keyId&&t.keyIds.push(e.keyId)})}),s=l.map(function(e){return e.getAttribute("id")}).filter(Yp.Ga),{id:e.ca.id||"__fake__"+this.h++,contentType:e.ca.contentType,language:r,Rc:n,streams:i,drmInfos:h.drmInfos,qd:c,Gf:s}},vp.xf=function(e,t,n,r,i,a,o,s,l){if(e.B=yi(l,e.ca,null),!gi(e.B))return null;e.bandwidth=Rf.J(l,"bandwidth",Rf.nc)||0;var u=e.B.contentType;u="text"==u||"application"==u;try{var c=this.Hf.bind(this);if(e.B.Ob)var p=Yr(e,c);else if(e.B.Ja)p=Xr(e,this.m);else if(e.B.Qb)p=Zr(e,c,this.m,!!this.c);else{var f=e.B.oa,d=e.S.duration||0;p={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(e){return 0<=e&&e<d?1:null},getSegmentReference:function(e){return 1!=e?null:new Ir(1,0,d,function(){return f},0,null)},initSegmentReference:null,la:0}}}catch(e){if(u&&4002==e.code)return null;throw e}return l=Rf.R(l,"ContentProtection"),l=br(l,this.b.dash.customScheme,t,this.b.dash.ignoreDrmInfo),{id:this.h++,originalId:e.B.id,createSegmentIndex:p.createSegmentIndex,findSegmentPosition:p.findSegmentPosition,getSegmentReference:p.getSegmentReference,initSegmentReference:p.initSegmentReference,presentationTimeOffset:p.la,mimeType:e.B.mimeType,codecs:e.B.codecs,frameRate:e.B.frameRate,bandwidth:e.bandwidth,width:e.B.width,height:e.B.height,kind:n,encrypted:0<t.drmInfos.length,keyId:l,language:r,label:i,type:e.ca.contentType,primary:a,trickModeVideo:null,emsgSchemeIdUris:e.B.emsgSchemeIdUris,roles:o,channelsCount:e.B.Xc,closedCaptions:s}},vp.wf=function(e,t,n){var r=Rf.vb,i=n.getAttribute("schemeIdUri")||"",a=n.getAttribute("value")||"",o=Rf.J(n,"timescale",r)||1;Rf.R(n,"Event").forEach(function(n){var s=Rf.J(n,"presentationTime",r)||0,l=Rf.J(n,"duration",r)||0;s=s/o+e,l=s+l/o,null!=t&&(s=Math.min(s,e+t),l=Math.min(l,e+t)),n={schemeIdUri:i,value:a,startTime:s,endTime:l,id:n.getAttribute("id")||"",eventElement:n},this.a.onTimelineRegionAdded(n)}.bind(this))},vp.Hf=function(e,t,n){return e=ai(e,t,n,this.b.retryParameters),e=this.a.networkingEngine.request(1,e),me(this.g,e),e.promise.then(function(e){return e.data})},Lf.ed("mpd",oi),Lf.Nb("application/dash+xml",oi),ki.prototype.toString=function(){function e(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var t="#"+this.name,n=this.a?this.a.map(e):[];return this.value&&n.unshift(this.value),0<n.length&&(t+=":"+n.join(",")),t},ki.prototype.getAttribute=function(e){var t=this.a.filter(function(t){return t.name==e});return t.length?t[0]:null};var Nf={lb:function(e,t){return e.filter(function(e){return e.name==t})},Ra:function(e,t){var n=Nf.lb(e,t);return n.length?n[0]:null},Hc:function(e,t,n){return e.filter(function(e){var r=e.getAttribute("TYPE");return e=e.getAttribute("GROUP-ID"),r.value==t&&e.value==n})},zc:function(e,t){return Bt([e],[t])[0]},Pc:function(e){return/^#(?!EXT)/m.test(e)}},jf="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),Uf="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");I("shaka.net.DataUriPlugin",Mi),Mi.parse=function(t){var n=t.split(":");if(2>n.length||"data"!=n[0])throw new ee(2,1,1004,t);if(n=n.slice(1).join(":").split(","),2>n.length)throw new ee(2,1,1004,t);var r=n[0];n=e.decodeURIComponent(n.slice(1).join(",")),r=r.split(";");var i=null;if(1<r.length&&(i=r[1]),"base64"==i)t=$e(n).buffer;else{if(i)throw new ee(2,1,1005,t);t=qe(n)}return{data:t,contentType:r[0]}},_e("data",Mi),I("shaka.hls.HlsParser",Li),vp=Li.prototype,vp.configure=function(e){this.c=e},vp.start=function(e,t){var n=this;return u(function r(){var i,a;return S(r,function(r){switch(r.j){case 1:return n.g=t,d(r,ca(n,e),2);case 2:return i=r.o,n.v=i.uri,d(r,ji(n,i.data),3);case 3:return a=n.P,0<a&&n.h.O(a),r.return(n.m)}})})},vp.stop=function(){this.h&&(this.h.stop(),this.h=null);var e=[];return this.i&&(e.push(this.i.destroy()),this.i=null),this.c=this.g=null,this.D.clear(),this.T.clear(),this.a.clear(),this.m=null,Promise.all(e)},vp.update=function(){if(this.f!=Hf.Oa){for(var e=[],t=o(this.a.values()),n=t.next();!n.done;n=t.next())e.push(Ni(this,n.value));return Promise.all(e)}},vp.onExpirationUpdated=function(){};var Ff={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},Bf={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}},Vf={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=la(e,"METHOD");return jn("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227"),["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].includes(t)?(t=la(e,"URI"),t=Mi.parse(t),t=new Uint8Array(t.data),t=Vt("com.widevine.alpha",[{initDataType:"cenc",initData:t}]),(e=Ai(e,"KEYID"))&&(t.keyIds=[e.substr(2).toLowerCase()]),t):null}},Gf="VOD",Hf={Oa:Gf,ke:"EVENT",td:"LIVE"};Lf.ed("m3u8",Li),Lf.Nb("application/x-mpegurl",Li),Lf.Nb("application/vnd.apple.mpegurl",Li),ma.prototype.add=function(e){return!!ba(this.a,e)&&(this.b.add(e),!0)},ma.prototype.values=function(){return this.b.values()},ka.prototype.create=function(e){var t=this,n=e.filter(function(e){return ba(t.a,e)});return n.length?new ma(n[0],n):this.b.create(e)},Ta.prototype.create=function(e){var t=[];t=Aa(e,this.c);var n=e.filter(function(e){return e.primary});for(t=t.length?t:n.length?n:e,this.b&&(e=wa(t,this.b),e.length&&(t=e)),this.a&&(e=Cn(t,this.a),e.length&&(t=e)),e=new ma(t[0]),t=o(t),n=t.next();!n.done;n=t.next())n=n.value,ba(e.a,n)&&e.add(n);return e};var Kf=0,zf=1;Pa.prototype.release=function(){this.f=null,this.a=function(){}},Ra.prototype.release=function(){this.f&&(this.f.release(),this.f=null),null!=this.g&&(this.g.stop(),this.g=null),this.b&&(this.b.release(),this.b=null),this.a=this.v=this.l=null},Ra.prototype.Zc=function(){this.h=!0,Ia(this)},Da.prototype.release=function(){this.b.stop();for(var e=o(this.a),t=e.next();!t.done;t=e.next())t.value.release();this.a.clear()},ja.prototype.release=function(){this.a=this.c=null,this.b=function(){}},ja.prototype.g=function(e){var t=this.a,n=this.c.periods;e=Na(n,e)||n[0],t!=e&&this.b(e),this.a=e},Fa.prototype.release=function(){this.b&&(this.b.stop(),this.b=null),this.a=null},Fa.prototype.set=function(e){this.c=e,Ba(this)},Va.prototype.release=function(){this.b&&(this.b.release(),this.b=null),null!=this.c&&(this.c.release(),this.c=null),this.f=function(){},this.a=null},Ya.prototype.release=function(){this.a&&(this.a.stop(),this.a=null),this.b=null},qa.prototype.release=function(){this.b&&(this.b.release(),this.b=null),this.a=null},qa.prototype.m=function(e){this.c=this.f?this.c:e},qa.prototype.h=function(){return(this.f?this.a.currentTime:this.c)||0},qa.prototype.s=function(){},Xa.prototype.release=function(){this.c&&(this.c.release(),this.c=null),this.f&&(this.f.release(),this.f=null),this.i&&(this.i.stop(),this.i=null),this.b=this.c=this.a=this.g=null,this.v=function(){}},Xa.prototype.m=function(e){var t=this.c;0<t.a.readyState?Wa(t.c,e):Ha(t,e)},Xa.prototype.h=function(){var e=Ga(this.c);return 0<this.b.readyState&&!this.b.paused?Za(this,e):e},Xa.prototype.s=function(){this.f.Zc()},to.prototype.release=function(){this.b=function(){},this.a.clear()},ro.prototype.release=function(){this.h=null,this.f.clear(),this.a=function(){},this.b=function(){},this.c=function(){}},ro.prototype.g=function(e,t){for(var n=o(this.h.a),r=n.next();!r.done;r=n.next()){r=r.value;var i=this.f.get(r),a=e<r.startTime?Yf:e>r.endTime?qf:Wf;this.f.set(r,a);for(var s=o(this.i),l=s.next();!l.done;l=s.next())l=l.value,l.bb==i&&l.ab==a&&l.Ua(r,t)}};var Yf=1,Wf=2,qf=3;ao.prototype.destroy=function(){for(var e=o(this.b.values()),t=e.next();!t.done;t=e.next())Vo(t.value);return this.b.clear(),this.i.clear(),this.g=this.h=this.v=this.c=this.a=null,this.f=!0,Promise.resolve()},ao.prototype.configure=function(e){this.g=e,this.G=new Q({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0},!0)},ao.prototype.start=function(){var e=this;return u(function t(){var n,r,i;return S(t,function(t){switch(t.j){case 1:return n=e.a.Sa(),r=No(e,n),i=e.a.Ld(e.c.periods[r]),i.variant||i.text?d(t,go(e,i.variant?i.variant.audio:null,i.variant?i.variant.video:null,i.text,n),2):t.return(new ee(2,5,5005));case 2:if(e.f)return t.return();e.a&&e.a.gf&&e.a.gf(),h(t)}})})},ao.prototype.M=function(e,t,n,r){var i=r.reader.bd(),a=r.reader.bd(),o=r.reader.F(),s=r.reader.F(),l=r.reader.F(),u=r.reader.F();r=r.reader.Xa(r.reader.K.byteLength-r.reader.ba()),e=e.startTime+t.startTime+s/o,n.includes(i)&&("urn:mpeg:dash:event:2012"==i?this.a.hf():this.a.onEvent(new ue("emsg",{detail:{startTime:e,endTime:e+l/o,schemeIdUri:i,value:a,timescale:o,presentationTimeDelta:s,eventDuration:l,id:u,messageData:r}})))},I("shaka.net.HttpFetchPlugin",Ko),Ko.l=function(e,t,n,r,i){return u(function a(){var o,s,l,c,p,f,v,b,_,E,k,T,A,w;return S(a,function(a){switch(a.j){case 1:return o=Ko.g,s=Ko.c,f=p=0,v=Date.now(),y(a,2),d(a,o(e,n),4);case 4:return l=a.o,b=l.clone().body.getReader(),E=(_=l.headers.get("Content-Length"))?parseInt(_,10):0,k=function(e){function t(){return u(function n(){var r,a;return S(n,function(n){switch(n.j){case 1:return y(n,2),d(n,b.read(),4);case 4:r=n.o,g(n,3);break;case 2:return m(n),n.return();case 3:r.done||(p+=r.value.byteLength),a=Date.now(),(100<a-v||r.done)&&(i(a-v,p-f,E-p),f=p,v=a),r.done?e.close():(e.enqueue(r.value),t()),h(n)}})})}t()},new s({start:k}),d(a,l.arrayBuffer(),5);case 5:c=a.o,g(a,3);break;case 2:if(T=m(a),r.vd)throw new ee(1,1,7001,e,t);if(r.ge)throw new ee(1,1,1003,e,t);throw new ee(1,1,1002,e,T,t);case 3:return A={},w=l.headers,w.forEach(function(e,t){A[t.trim()]=e}),a.return(Ho(A,c,l.status,e,l.url,t))}})})},Ko.isSupported=function(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!(!e.fetch||!e.AbortController)},Ko.isSupported=Ko.isSupported,Ko.g=e.fetch,Ko.a=e.AbortController,Ko.c=e.ReadableStream,Ko.b=e.Headers,Ko.isSupported()&&(_e("http",Ko,2),_e("https",Ko,2)),I("shaka.net.HttpXHRPlugin",zo),zo.f=e.XMLHttpRequest,_e("http",zo,1),_e("https",zo,1),Yo.prototype.close=function(e,t){if(this.c.has(e)){var n=this.c.get(e);this.c.delete(e),this.f+=n,this.a+=t}},qo.prototype.destroy=function(){return this.c=!0,Promise.all(this.b.values()).then(function(){},function(){})},$o.prototype.abort=function(){try{this.c.abort()}catch(e){}return this.a.catch(function(){})},$o.prototype.store=function(){return this.b},$o.prototype.promise=function(){return this.a},es.prototype.destroy=function(){return Promise.all(this.a.map(function(e){return e.abort()}))},is.prototype.destroy=function(){return this.a.destroy()},is.prototype.getAll=function(){var e=this;return u(function t(){var n,r;return S(t,function(t){switch(t.j){case 1:return n=ts(e.a,"session-ids"),r=[],d(t,Zo(n,function(e,t){r.push(t)}),2);case 2:return d(t,n.promise(),3);case 3:return t.return(r)}})})},is.prototype.add=function(e){var t=ns(this.a,"session-ids"),n=t.store();e=o(e);for(var r=e.next();!r.done;r=e.next())n.add(r.value);return t.promise()},is.prototype.remove=function(e){var t=this;return u(function n(){var r;return S(n,function(n){switch(n.j){case 1:return r=ns(t.a,"session-ids"),d(n,Zo(r,function(t,n,r){0<=e.indexOf(n.sessionId)&&r.delete()}),2);case 2:return d(n,r.promise(),0)}})})},as.prototype.destroy=function(){for(var e=[],t=o(this.a.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.a.clear(),Promise.all(e)},as.prototype.init=function(){var e=this;Xf.forEach(function(t,n){var r=t();r&&e.a.set(n,r)});for(var t=[],n=o(this.a.values()),r=n.next();!r.done;r=n.next())t.push(r.value.init());return Promise.all(t)},as.prototype.erase=function(){var e=this;return u(function t(){var n,r,i;return S(t,function(t){switch(t.j){case 1:return n=Array.from(e.a.values()),r=0<n.length,r||(i=Xf,i.forEach(function(e){(e=e())&&n.push(e)})),d(t,Promise.all(n.map(function(e){return e.erase()})),2);case 2:if(!r)return d(t,Promise.all(n.map(function(e){return e.destroy()})),0);t.A(0)}})})},I("shaka.offline.StorageMuxer.register",ps),I("shaka.offline.StorageMuxer.unregister",function(e){Xf.delete(e)});var Xf=new Map;vp=fs.prototype,vp.destroy=function(){return this.a.destroy()},vp.hasFixedKeySpace=function(){return!0},vp.addSegments=function(){return ds("segment")},vp.removeSegments=function(e,t){return hs(this,"segment",e,t)},vp.getSegments=function(e){return ys(this,"segment",e).then(function(e){return e.map(_s)})},vp.addManifests=function(){return ds("manifest")},vp.updateManifestExpiration=function(e,t){var n=ns(this.a,"manifest"),r=n.store(),i=new te;return r.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,r.put(n),i.resolve()):i.reject(new ee(2,9,9012,"Could not find values for "+e))},n.promise().then(function(){return i})},vp.removeManifests=function(e,t){return hs(this,"manifest",e,t)},vp.getManifests=function(e){return ys(this,"manifest",e).then(function(e){return e.map(vs)})},vp.getAllManifests=function(){var e=this;return u(function t(){var n,r;return S(t,function(t){switch(t.j){case 1:return n=ts(e.a,"manifest"),r=new Map,d(t,Zo(n,function(e,t){r.set(e,vs(t))}),2);case 2:return d(t,n.promise(),3);case 3:return t.return(r)}})})},vp=Ts.prototype,vp.destroy=function(){return this.a.destroy()},vp.hasFixedKeySpace=function(){return this.f},vp.addSegments=function(e){return As(this,this.c,e)},vp.removeSegments=function(e,t){return ws(this,this.c,e,t)},vp.getSegments=function(e){return Ss(this,this.c,e)},vp.addManifests=function(e){return As(this,this.b,e)},vp.updateManifestExpiration=function(e,t){var n=ns(this.a,this.b),r=n.store();return r.get(e).onsuccess=function(n){(n=n.target.result)&&(n.expiration=t,r.put(n,e))},n.promise()},vp.removeManifests=function(e,t){return ws(this,this.b,e,t)},vp.getManifests=function(e){return Ss(this,this.b,e)},vp.getAllManifests=function(){var e=this;return u(function t(){var n,r;return S(t,function(t){switch(t.j){case 1:return n=ts(e.a,e.b),r=new Map,d(t,Zo(n,function(e,t){r.set(e,t)}),2);case 2:return d(t,n.promise(),3);case 3:return t.return(r)}})})},vp=Ps.prototype,vp.init=function(){var t=this,n=new te,r=e.indexedDB.open("shaka_offline_db",4);return r.onsuccess=function(e){e=e.target.result,t.f=e;var r=e.objectStoreNames;r=r.contains("manifest")&&r.contains("segment")?new fs(e):null,t.a=r,r=e.objectStoreNames,r=r.contains("manifest-v2")&&r.contains("segment-v2")?new Ts(e,"segment-v2","manifest-v2",!0):null,t.b=r,r=e.objectStoreNames,r=r.contains("manifest-v3")&&r.contains("segment-v3")?new Ts(e,"segment-v3","manifest-v3",!1):null,t.c=r,e=e.objectStoreNames.contains("session-ids")?new is(e):null,t.g=e,n.resolve()},r.onupgradeneeded=function(e){e=e.target.result;for(var t=o(["segment-v3","manifest-v3","session-ids"]),n=t.next();!n.done;n=t.next())n=n.value,e.objectStoreNames.contains(n)||e.createObjectStore(n,{autoIncrement:!0})},r.onerror=function(e){n.reject(new ee(2,9,9001,r.error)),e.preventDefault()},n},vp.destroy=function(){var e=this;return u(function t(){return S(t,function(t){switch(t.j){case 1:if(!e.a){t.A(2);break}return d(t,e.a.destroy(),2);case 2:if(!e.b){t.A(4);break}return d(t,e.b.destroy(),4);case 4:if(!e.c){t.A(6);break}return d(t,e.c.destroy(),6);case 6:if(!e.g){t.A(8);break}return d(t,e.g.destroy(),8);case 8:e.f&&e.f.close(),h(t)}})})},vp.getCells=function(){var e=new Map;return this.a&&e.set("v1",this.a),this.b&&e.set("v2",this.b),this.c&&e.set("v3",this.c),e},vp.getEmeSessionCell=function(){return this.g},vp.erase=function(){var e=this;return u(function t(){return S(t,function(t){switch(t.j){case 1:if(!e.a){t.A(2);break}return d(t,e.a.destroy(),2);case 2:if(!e.b){t.A(4);break}return d(t,e.b.destroy(),4);case 4:if(!e.c){t.A(6);break}return d(t,e.c.destroy(),6);case 6:return e.f&&e.f.close(),d(t,Os(),8);case 8:return e.f=null,e.a=null,e.b=null,e.c=null,d(t,e.init(),0)}})})},ps("idb",function(){return e.indexedDB?new Ps:null}),Cs.prototype.ua=function(){return this.g},Cs.prototype.aa=function(){return this.f},Cs.prototype.key=function(){return this.c},Cs.prototype.toString=function(){return this.b},vp=Us.prototype,vp.configure=function(){},vp.start=function(e){var t=this;return u(function n(){var r,i,a,o,s,l;return S(n,function(n){switch(n.j){case 1:return r=xs(e),(t.a=r,null==r||"manifest"!=r.a)?n.return(Promise.reject(new ee(2,1,9004,r))):(i=new as,v(n,2),d(n,i.init(),4));case 4:return d(n,ls(i,r.ua(),r.aa()),5);case 5:return a=n.o,d(n,a.getManifests([r.key()]),6);case 6:return o=n.o,s=o[0],l=new Rs(r.ua(),r.aa()),n.return(Is(l,s));case 2:return b(n),d(n,i.destroy(),7);case 7:_(n,0)}})})},vp.stop=function(){return Promise.resolve()},vp.update=function(){},vp.onExpirationUpdated=function(e,t){var n=this;return u(function r(){var i,a,o,s,l,u,c;return S(r,function(r){switch(r.j){case 1:return i=n.a,a=new as,y(r,2,3),d(r,a.init(),5);case 5:return d(r,ls(a,i.ua(),i.aa()),6);case 6:return o=r.o,d(r,o.getManifests([i.key()]),7);case 7:if(s=r.o,l=s[0],u=l.sessionIds.includes(e),c=void 0==l.expiration||l.expiration>t,!u||!c){r.A(3);break}return d(r,o.updateManifestExpiration(i.key(),t),3);case 3:return b(r),d(r,a.destroy(),10);case 10:_(r,0);break;case 2:m(r),r.A(3)}})})},Lf.Nb("application/x-offline-manifest",Us),I("shaka.offline.OfflineScheme",Fs),Fs.h=function(e){return e={uri:e,ad:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},ae(e)},Fs.i=function(e,t){var n=new as;return ae(void 0).U(function(){return n.init()}).U(function(){return ls(n,t.ua(),t.aa())}).U(function(e){return e.getSegments([t.key()])}).U(function(e){return{uri:t,ad:t,data:e[0].data,headers:{}}}).finally(function(){return n.destroy()})},_e("offline",Fs),Hs.prototype.destroy=function(){var e=this;return u(function t(){var n;return S(t,function(t){switch(t.j){case 1:return e.l=!1,e.b&&e.b.abort(),Ws(e),d(t,e.m,2);case 2:e.a&&e.a.ta.Wa();for(var r=o(e.f),i=r.next();!i.done;i=r.next())n=i.value,n.ta.Wa();e.a=null,e.f=[],e.g=null,h(t)}})})},I("shaka.text.SimpleTextDisplayer",qs),qs.prototype.remove=function(e,t){return!!this.a&&(Js(this.a,function(n){return n.startTime<t&&n.endTime>e}),!0)},qs.prototype.remove=qs.prototype.remove,qs.prototype.append=function(e){for(var t=Xs,n=[],r=0;r<e.length;r++){var i=t(e[r]);i&&n.push(i)}n.slice().sort(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:n.indexOf(t)-n.indexOf(e)}).forEach(function(e){this.a.addCue(e)}.bind(this))},qs.prototype.append=qs.prototype.append,qs.prototype.destroy=function(){return this.a&&Js(this.a,function(){return!0}),this.a=null,Promise.resolve()},qs.prototype.destroy=qs.prototype.destroy,qs.prototype.isTextVisible=function(){return"showing"==this.a.mode},qs.prototype.isTextVisible=qs.prototype.isTextVisible,qs.prototype.setTextVisibility=function(e){this.a.mode=e?"showing":"hidden"},qs.prototype.setTextVisibility=qs.prototype.setTextVisibility,I("shaka.util.ConfigUtils.mergeConfigObjects",Qs),I("shaka.util.ConfigUtils.convertToConfigObject",$s),I("shaka.util.PlayerConfiguration",Zs),Zs.mergeConfigObjects=tl,D(ul,pe),I("shaka.Player",ul),ul.prototype.destroy=function(){var e=this;return u(function t(){var n;return S(t,function(t){switch(t.j){case 1:return e.h==Zf?t.return():(e.h=Zf,n=Ks(e.jb,function(){return{node:e.C,payload:lu(),Ta:!1}}),d(t,new Promise(function(e){n.tb=function(){},n.jc=function(){e()},n.Wa=function(){e()},n.onError=function(){e()},n.lc=function(){e()}}),2));case 2:return d(t,e.jb.destroy(),3);case 3:if(e.i&&(e.i.release(),e.i=null),e.vc=null,e.l=null,e.b=null,!e.G){t.A(0);break}return d(t,e.G.destroy(),5);case 5:e.G=null,h(t)}})})},ul.prototype.destroy=ul.prototype.destroy,ul.version="v2.5.5";var Jf=["2","5"];yf=new function(e){this.a=e,this.c=Un,this.b=Fn}(new Nn(Number(Jf[0]),Number(Jf[1])));var Qf=["output-restricted","internal-error"],$f={};ul.registerSupportPlugin=function(e,t){$f[e]=t},ul.isBrowserSupported=function(){return!!(e.Promise&&e.Uint8Array&&Array.prototype.forEach&&e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration)&&(!!Ve()||Ge("application/x-mpegurl"))},ul.probeSupport=function(){return wt().then(function(e){for(var t=Lf.Af(),n={},r=o('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",")),i=r.next();!i.done;i=r.next()){i=i.value,n[i]=Ve()?!!Xt(i)||(MediaSource.isTypeSupported(i)||Ht(i)):Ge(i);var a=i.split(";")[0];n[a]=n[a]||n[i]}e={manifest:t,media:n,drm:e};for(var s in $f)e[s]=$f[s]();return e})},ul.prototype.Cb=function(e,t){if(t=void 0===t||t,this.h==Zf)return Promise.reject(ou());var n=lu();n.u=e,Ve()||(t=!1);var r=t?this.fb:this.M,i=Ks(this.jb,function(){return{node:r,payload:n,Ta:!1}});return i.tb=function(){},uu(i)},ul.prototype.attach=ul.prototype.Cb,ul.prototype.detach=function(){var e=this;if(this.h==Zf)return Promise.reject(ou());var t=Ks(this.jb,function(){return{node:e.C,payload:lu(),Ta:!1}});return t.tb=function(){},uu(t)},ul.prototype.detach=ul.prototype.detach,ul.prototype.rd=function(e){var t=this;if(e=void 0===e||e,this.h==Zf)return Promise.reject(ou());Ve()||(e=!1);var n=lu(),r=Ks(this.jb,function(r){var i=r.u&&e?t.fb:r.u?t.M:t.C;return n.u=r.u,{node:i,payload:n,Ta:!1}});return r.tb=function(){},uu(r)},ul.prototype.unload=ul.prototype.rd,ul.prototype.load=function(e,t,n){if(this.h==Zf)return Promise.reject(ou());this.dispatchEvent(new ue("loading"));var r=lu();r.uri=e,r.od=Date.now()/1e3,n&&"string"!=typeof n&&(jn("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),r.ya=function(){return new n}),n&&"string"==typeof n&&(r.mimeType=n),void 0!==t&&(r.startTime=t);var i=cl(r)?this.hb:this.T,a=Ks(this.jb,function(e){return null==e.u?null:(r.u=e.u,{node:i,payload:r,Ta:!0})});return a.tb=function(){},new Promise(function(e,t){a.lc=function(){return t(new ee(2,7,7002))},a.jc=function(){return e()},a.Wa=function(){return t(ou())},a.onError=function(e){return t(e)}})},ul.prototype.load=ul.prototype.load,ul.prototype.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=$s(e,t));var n=tl(this.b,e,xl(this));return Pl(this),n},ul.prototype.configure=ul.prototype.configure,ul.prototype.getConfiguration=function(){var e=xl(this);return tl(e,this.b,xl(this)),e},ul.prototype.getConfiguration=ul.prototype.getConfiguration,ul.prototype.If=function(){for(var e in this.b)delete this.b[e];tl(this.b,xl(this),xl(this)),Pl(this)},ul.prototype.resetConfiguration=ul.prototype.If,ul.prototype.Je=function(){return this.h},ul.prototype.getLoadMode=ul.prototype.Je,ul.prototype.Ne=function(){return this.a},ul.prototype.getMediaElement=ul.prototype.Ne,ul.prototype.Fb=function(){return this.G},ul.prototype.getNetworkingEngine=ul.prototype.Fb,ul.prototype.bc=function(){return this.Bb},ul.prototype.getAssetUri=ul.prototype.bc,ul.prototype.Me=function(){return jn("getManifestUri",'Please use "getAssetUri" instead.'),this.bc()},ul.prototype.getManifestUri=ul.prototype.Me,ul.prototype.V=function(){return this.c?this.c.presentationTimeline.V():!(!this.a||!this.a.src)&&1/0==this.a.duration},ul.prototype.isLive=ul.prototype.V,ul.prototype.Va=function(){return!!this.c&&this.c.presentationTimeline.Va()},ul.prototype.isInProgress=ul.prototype.Va,ul.prototype.af=function(){if(this.c){if(!this.c.periods.length)return!1;var e=this.c.periods[0].variants;return!!e.length&&!e[0].video}return!(!this.a||!this.a.src)&&(this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight)},ul.prototype.isAudioOnly=ul.prototype.af,ul.prototype.Kf=function(){if(this.c){var e=this.c.presentationTimeline;return{start:e.mb(),end:e.za()}}return this.a&&this.a.src&&(e=this.a.seekable,e.length)?{start:e.start(0),end:e.end(e.length-1)}:{start:0,end:0}},ul.prototype.seekRange=ul.prototype.Kf,ul.prototype.keySystem=function(){return this.g?this.g.keySystem():""},ul.prototype.keySystem=ul.prototype.keySystem,ul.prototype.drmInfo=function(){return this.g?this.g.a:null},ul.prototype.drmInfo=ul.prototype.drmInfo,ul.prototype.dc=function(){return this.g?this.g.dc():1/0},ul.prototype.getExpiration=ul.prototype.dc,ul.prototype.Oc=function(){return!!this.P&&this.P.a==Kf},ul.prototype.isBuffering=ul.prototype.Oc,ul.prototype.Qe=function(){if(this.W){var e=this.W;e=e.f?0:e.c}else e=0;return e},ul.prototype.getPlaybackRate=ul.prototype.Qe,ul.prototype.bg=function(e){0==e?F("A trick play rate of 0 is unsupported!"):(this.a.paused&&this.a.play(),this.W.set(e),this.h==td&&co(this.f,1<Math.abs(e)))},ul.prototype.trickPlay=ul.prototype.bg,ul.prototype.ue=function(){this.h==nd&&this.W.set(1),this.h==td&&(this.W.set(1),co(this.f,!1))},ul.prototype.cancelTrickPlay=ul.prototype.ue,ul.prototype.Nc=function(){if(this.c&&this.s){for(var e=iu(this),t=[],n=o(tu(this)),r=n.next();!r.done;r=n.next()){r=r.value;var i=Tn(r);i.active=r==e,t.push(i)}return t}return this.a&&this.a.audioTracks?Array.from(this.a.audioTracks).map(function(e){var t=Sn(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,"main"==e.kind?(t.primary=!0,t.roles=["main"],t.audioRoles=["main"]):t.audioRoles=[],t}):[]},ul.prototype.getVariantTracks=ul.prototype.Nc,ul.prototype.ob=function(){if(this.c&&this.s){for(var e=au(this),t=[],n=o(nu(this)),r=n.next();!r.done;r=n.next()){r=r.value;var i=An(r);i.active=r==e,t.push(i)}return t}return this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).map(function(e){var t=Sn(e);return t.active="disabled"!=e.mode,t.type="text",t.originalTextId=e.id,"captions"==e.kind&&(t.mimeType="application/cea-608"),t}):[]},ul.prototype.getTextTracks=ul.prototype.ob,ul.prototype.hd=function(e){if(this.c&&this.f){var t=ru(this),n=t.textStreams.find(function(t){return t.id==e.id});n&&(Cl(this,t,n,!1),Ml(this,n),this.ma=n.language)}else if(this.a&&this.a.src&&this.a.textTracks){for(t=Array.from(this.a.textTracks),t=o(t),n=t.next();!n.done;n=t.next())n=n.value,wn(n)==e.id?n.mode=this.eb?"showing":"hidden":n.mode="disabled";Hl(this)}},ul.prototype.selectTextTrack=ul.prototype.hd,ul.prototype.Mf=function(){jn("selectEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. Please use SelectTextTrack.");var e=this.ob().filter(function(e){return"application/cea-608"==e.mimeType});0<e.length&&this.hd(e[0])},ul.prototype.selectEmbeddedTextTrack=ul.prototype.Mf,ul.prototype.gg=function(){jn("usingEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. There should be no reason to know if the player is playing embedded text.");var e=this.ob().filter(function(e){return e.active})[0];return!!e&&"application/cea-608"==e.mimeType},ul.prototype.usingEmbeddedTextTrack=ul.prototype.gg,ul.prototype.Of=function(e,t,n){if(n=void 0===n?0:n,this.c&&this.f){var r=ru(this);this.b.abr.enabled&&F("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var i=r.variants.find(function(t){return t.id==e.id});i&&Pn(i)&&(Ol(this,r,i,!1),Dl(this,i,t,n),this.Ub=new ka(i),Ul(this,r.variants))}else if(this.a&&this.a.audioTracks){for(t=Array.from(this.a.audioTracks),t=o(t),n=t.next();!n.done;n=t.next())n=n.value,wn(n)==e.id&&(n.enabled=!0);Gl(this)}},ul.prototype.selectVariantTrack=ul.prototype.Of,ul.prototype.Ee=function(){return eu(this.Nc())},ul.prototype.getAudioLanguagesAndRoles=ul.prototype.Ee,ul.prototype.Xe=function(){return eu(this.ob())},ul.prototype.getTextLanguagesAndRoles=ul.prototype.Xe,ul.prototype.De=function(){return Array.from(Zl(this.Nc()))},ul.prototype.getAudioLanguages=ul.prototype.De,ul.prototype.We=function(){return Array.from(Zl(this.ob()))},ul.prototype.getTextLanguages=ul.prototype.We,ul.prototype.Lf=function(e,t){if(this.c&&this.s){var n=ru(this);this.Ub=new Ta(e,t||"",0),Fl(this,n)}else if(this.a&&this.a.audioTracks){n=Array.from(this.a.audioTracks),n=o(n);for(var r=n.next();!r.done;r=n.next())r=r.value,r.language==e&&(r.enabled=!0);Gl(this)}},ul.prototype.selectAudioLanguage=ul.prototype.Lf,ul.prototype.Nf=function(e,t){if(this.c&&this.s){var n=ru(this);this.ma=e,this.cb=t||"";var r=xn(n.textStreams,this.ma,this.cb)[0]||null;r&&(Cl(this,n,r,!1),(this.b.streaming.alwaysStreamText||this.gc())&&Ml(this,r))}else(n=this.ob().filter(function(t){return t.language==e})[0])&&this.hd(n)},ul.prototype.selectTextLanguage=ul.prototype.Nf,ul.prototype.gc=function(){var e=this.eb;return this.c?this.D.g.isTextVisible():this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).some(function(e){return"showing"==e.mode}):e},ul.prototype.isTextTrackVisible=ul.prototype.gc,ul.prototype.Rf=function(e){var t=this;return u(function n(){var r,i,a,s,l,u;return S(n,function(n){switch(n.j){case 1:if(r=t.eb,i=e,r==i)return n.return();if(t.eb=i,t.h!=td){if(t.a&&t.a.src&&t.a.textTracks){a=Array.from(t.a.textTracks);for(var c=o(a),p=c.next();!p.done;p=c.next())s=p.value,"disabled"!=s.mode&&(s.mode=e?"showing":"hidden")}n.A(2);break}if(t.D.g.setTextVisibility(e),t.b.streaming.alwaysStreamText){n.A(2);break}if(!e){c=t.f,c.D=!0,(p=c.b.get("text"))&&(Vo(p),c.b.delete("text")),n.A(2);break}if(l=ru(t),u=xn(l.textStreams,t.ma,t.cb),!(0<u.length)){n.A(2);break}return d(n,uo(t.f,u[0]),2);case 2:Kl(t),h(n)}})})},ul.prototype.setTextTrackVisibility=ul.prototype.Rf,ul.prototype.Se=function(){if(!this.V())return null;if(this.c)return new Date(1e3*(this.c.presentationTimeline.f+this.a.currentTime));if(this.a&&this.a.getStartDate){var e=this.a.getStartDate();return isNaN(e.getTime())?null:new Date(e.getTime()+1e3*this.a.currentTime)}return null},ul.prototype.getPlayheadTimeAsDate=ul.prototype.Se,ul.prototype.Ue=function(){if(!this.V())return null;if(this.c)return new Date(1e3*this.c.presentationTimeline.f);if(this.a&&this.a.getStartDate){var e=this.a.getStartDate();return isNaN(e.getTime())?null:e}return null},ul.prototype.getPresentationStartTimeAsDate=ul.prototype.Ue,ul.prototype.Jc=function(){var e={total:[],audio:[],video:[],text:[]};return this.h==nd&&(e.total=Ft(this.a.buffered)),this.h==td&&this.D.Jc(e),e},ul.prototype.getBufferedInfo=ul.prototype.Jc,ul.prototype.getStats=function(){if(this.h!=td&&this.h!=nd)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]};jl(this);var e=this.a;if(e.getVideoPlaybackQuality){e=e.getVideoPlaybackQuality();var t=this.v,n=Number(e.totalVideoFrames);t.i=Number(e.droppedVideoFrames),t.h=n}this.h==td&&((e=iu(this))&&(this.v.l=e.bandwidth),e&&e.video&&(t=this.v,n=e.video.height||NaN,t.m=e.video.width||NaN,t.g=n),e=this.l.getBandwidthEstimate(),this.v.f=e);var r=this.v;e=r.m,t=r.g,n=r.l;var i=r.h,a=r.i,s=r.f,l=r.b,u=al(r.a,"playing"),c=al(r.a,"paused"),p=al(r.a,"buffering"),f=ol(r.a),d=[];r=o(r.c.a);for(var h=r.next();!h.done;h=r.next())h=h.value,d.push({timestamp:h.timestamp,id:h.id,type:h.type,fromAdaptation:h.fromAdaptation,bandwidth:h.bandwidth});return{width:e,height:t,streamBandwidth:n,decodedFrames:i,droppedFrames:a,estimatedBandwidth:s,loadLatency:l,playTime:u,pauseTime:c,bufferingTime:p,stateHistory:f,switchHistory:d}},ul.prototype.getStats=ul.prototype.getStats,ul.prototype.addTextTrack=function(e,t,n,r,i,a){var o=this;return u(function s(){var l,u,c,p,f,h,y,v,g;return S(s,function(s){switch(s.j){case 1:if(o.h==nd)throw Error("State error!");if(o.h!=td)throw Error("State error!");if(l=ru(o),u=Wp,c=o.c.periods.indexOf(l),p=c+1,f=p>=o.c.periods.length?o.c.presentationTimeline.Y():o.c.periods[p].startTime,h=f-l.startTime,1/0==h)throw new ee(1,4,4033);return y=new Ir(1,0,h,function(){return[e]},0,null),v={id:o.Hd++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return 1},getSegmentReference:function(e){return 1==e?y:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:r,codecs:i||"",kind:n,encrypted:!1,keyId:null,language:t,label:a||null,type:u.qa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null},o.Wb.add(v),l.textStreams.push(v),d(s,uo(o.f,v),2);case 2:return(g=lo(o.f,"text"))&&ya(o.$,l,g),o.Wb.delete(v),Fl(o,l),Vl(o),s.return(An(v))}})})},ul.prototype.addTextTrack=ul.prototype.addTextTrack,ul.prototype.kd=function(e,t){this.Xb.width=e,this.Xb.height=t},ul.prototype.setMaxHardwareResolution=ul.prototype.kd,ul.prototype.gd=function(){if(this.h==td){var e=this.f;if(e.f)e=!1;else if(e.m)e=!1;else{for(var t=o(e.b.values()),n=t.next();!n.done;n=t.next())n=n.value,n.Ib&&(n.Ib=!1,Bo(e,n,.1));e=!0}}else e=!1;return e},ul.prototype.retryStreaming=ul.prototype.gd,ul.prototype.Ke=function(){return this.c},ul.prototype.getManifest=ul.prototype.Ke,ul.prototype.Le=function(){return this.m?this.m.constructor:null},ul.prototype.getManifestParserFactory=ul.prototype.Le,vp=ul.prototype,vp.Fc=function(e){var t=this.f?oo(this.f):null,n=this.f?so(this.f):null;if(En(this.g,t,n,e),t=e.variants,!t.some(Pn))throw new ee(2,4,4011);if(Ql(this,e.variants),_n(t,this.b.restrictions,this.Xb)&&this.f&&ru(this)==e&&Vl(this),e=this.g?this.g.a:null)for(t=o(t),n=t.next();!n.done;n=t.next()){n=o(n.value.drmInfos);for(var r=n.next();!r.done;r=n.next())if(r=r.value,r.keySystem==e.keySystem){r=o(r.initData||[]);for(var i=r.next();!i.done;i=r.next())i=i.value,ft(this.g,i.initDataType,i.initData)}}},vp.df=function(e){try{this.ib=!0,this.l.disable(),zl(this);var t=Ul(this,e.variants),n=xn(e.textStreams,this.ma,this.cb)[0]||null;this.Ea&&(e.variants.includes(this.Ea)&&(t=this.Ea),this.Ea=null),this.na&&(e.textStreams.includes(this.na)&&(n=this.na),this.na=null),t&&Ol(this,e,t,!0),n&&Cl(this,e,n,!0);var r=this.f,i=r.b.get("video");if(i)var a=r.c.periods[i.pa];else{var o=r.b.get("audio");a=o?r.c.periods[o.pa]:null}var s=t?t.audio:null;if(!a&&n){var l;if(l=s){e=n;var u=vn(this.b.preferredTextLanguage),c=vn(s.language),p=vn(e.language);l=hn(p,u)&&!hn(c,p)}l&&(this.eb=!0),this.eb&&this.D.g.setTextVisibility(!0),Kl(this)}return this.b.streaming.alwaysStreamText||this.gc()?{variant:t,text:n}:{variant:t,text:null}}catch(e){return this.Ka(e),{variant:null,text:null}}},vp.te=function(){this.ib=!1,this.b.abr.enabled&&(this.l.enable(),zl(this)),this.Ea&&(po(this.f,this.Ea,this.Dd,this.Bd),Gl(this),this.Ea=null),this.na&&(fo(this.f,this.na,!0,0,!1),Hl(this),this.na=null)},vp.jf=function(){this.m&&this.m.update&&this.m.update()},vp.qf=function(){this.s&&this.s.s()},vp.Ka=function(e){if(this.h!=Zf){var t=new ue("error",{detail:e});this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)}};var Zf=0,ed=1,td=2,nd=3;ul.LoadMode={DESTROYED:Zf,NOT_LOADED:ed,MEDIA_SOURCE:td,SRC_EQUALS:nd},vu.prototype.destroy=function(){var e=this;return this.a?this.b:(this.a=!0,this.c().then(function(){e.b.resolve()},function(){e.b.resolve()}))},Tu.prototype.add=function(e){wu(this,e)||this.a.push(e)},I("shaka.offline.Storage",Pu),Pu.support=Ou,Pu.prototype.destroy=function(){return this.h.destroy()},Pu.prototype.destroy=Pu.prototype.destroy,Pu.prototype.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=$s(e,t));var n=e,r=!1;return null!=n.trackSelectionCallback&&(r=!0,n.offline=n.offline||{},n.offline.trackSelectionCallback=n.trackSelectionCallback,delete n.trackSelectionCallback),null!=n.progressCallback&&(r=!0,n.offline=n.offline||{},n.offline.progressCallback=n.progressCallback,delete n.progressCallback),null!=n.usePersistentLicense&&(r=!0,n.offline=n.offline||{},n.offline.usePersistentLicense=n.usePersistentLicense,delete n.usePersistentLicense),r&&jn("Storage.configure with OfflineConfig","Please configure storage with a player configuration."),tl(this.a,e)},Pu.prototype.configure=Pu.prototype.configure,Pu.prototype.getConfiguration=function(){var e=el();return tl(e,this.a,el()),e},Pu.prototype.getConfiguration=Pu.prototype.getConfiguration,Pu.prototype.Fb=function(){return this.b},Pu.prototype.getNetworkingEngine=Pu.prototype.Fb,Pu.prototype.store=function(e,t,n){var r=this;return Yu(this,Cu(this,e,t||{},function(){return u(function t(){var i,a;return S(t,function(t){switch(t.j){case 1:return n&&"string"!=typeof n?(jn("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),i=n,t.return(new i)):d(t,Lf.create(e,r.b,r.a.manifest.retryParameters,n),2);case 2:return a=t.o,t.return(a)}})})}))},Pu.prototype.store=Pu.prototype.store,Pu.prototype.Ve=function(){return this.f},Pu.prototype.getStoreInProgress=Pu.prototype.Ve,Pu.prototype.remove=function(e){return Yu(this,Iu(this,e))},Pu.prototype.remove=Pu.prototype.remove,Pu.prototype.Ff=function(){return Yu(this,Nu(this))},Pu.prototype.removeEmeSessions=Pu.prototype.Ff,Pu.prototype.list=function(){return Yu(this,ju())},Pu.prototype.list=Pu.prototype.list,Pu.deleteAll=function(){return u(function e(){var t;return S(e,function(e){switch(e.j){case 1:return t=new as,v(e,2),d(e,t.erase(),2);case 2:return b(e),d(e,t.destroy(),5);case 5:_(e,0)}})})},$f.offline=Ou,I("shaka.polyfill.installAll",function(){for(var e=0;e<rd.length;++e)rd[e].re()});var rd=[];I("shaka.polyfill.register",$u),$u(function(){if(e.Document){var t=Element.prototype;t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||t.webkitRequestFullscreen,t=Document.prototype,t.exitFullscreen=t.exitFullscreen||t.mozCancelFullScreen||t.msExitFullscreen||t.webkitExitFullscreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",Zu),document.addEventListener("webkitfullscreenerror",Zu),document.addEventListener("mozfullscreenchange",Zu),document.addEventListener("mozfullscreenerror",Zu),document.addEventListener("MSFullscreenChange",Zu),document.addEventListener("MSFullscreenError",Zu)}}),$u(function(){He("CrKey")&&delete e.indexedDB}),$u(function(){He("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=ec)}),$u(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})}),$u(function(){}),$u(function(){if(e.MediaSource)if(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType)lc();else if(navigator.vendor&&navigator.vendor.includes("Apple")){var t=navigator.appVersion;oc(),t.includes("Version/8")?e.MediaSource=null:t.includes("Version/9")?tc():t.includes("Version/10")?(tc(),rc()):(t.includes("Version/11")||t.includes("Version/12"))&&(tc(),nc())}else He("Tizen")&&sc()}),cc.prototype.createMediaKeys=function(){var e=new fc(this.keySystem);return Promise.resolve(e)},cc.prototype.getConfiguration=function(){return this.a},fc.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new hc(this.b,e)},fc.prototype.setServerCertificate=function(e){return e&&new Uint8Array(e),Promise.resolve(!0)},D(hc,pe),vp=hc.prototype,vp.generateRequest=function(e,t){this.a=new te;try{this.b=this.g.createSession("video/mp4",new Uint8Array(t)),this.sessionId=this.b.sessionId||"",this.f.w(this.b,"webkitkeymessage",this.Wf.bind(this)),this.f.w(this.b,"webkitkeyadded",this.Uf.bind(this)),this.f.w(this.b,"webkitkeyerror",this.Vf.bind(this)),vc(this,"status-pending")}catch(e){this.a.reject(e)}return this.a},vp.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},vp.update=function(e){this.c=new te;try{this.b.update(new Uint8Array(e))}catch(e){this.c.reject(e)}return this.c},vp.close=function(){try{this.b.close(),this.closed.resolve(),this.f.Ya()}catch(e){this.closed.reject(e)}return this.closed},vp.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},vp.Wf=function(e){this.a&&(this.a.resolve(),this.a=null),this.dispatchEvent(new ue("message",{messageType:void 0==this.keyStatuses.a?"license-request":"license-renewal",message:e.message.buffer}))},vp.Uf=function(){this.c&&(vc(this,"usable"),this.c.resolve(),this.c=null)},vp.Vf=function(){var e=Error("EME PatchedMediaKeysApple key error");if(e.errorCode=this.b.error,null!=this.a)this.a.reject(e),this.a=null;else if(null!=this.c)this.c.reject(e),this.c=null;else switch(this.b.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:vc(this,"output-not-allowed");break;default:vc(this,"internal-error")}};var id;vp=gc.prototype,vp.forEach=function(e){this.a&&e(this.a,id)},vp.get=function(e){if(this.has(e))return this.a},vp.has=function(e){var t=id;return!(!this.a||!tt(new Uint8Array(e),new Uint8Array(t)))},vp.entries=function(){},vp.keys=function(){},vp.values=function(){},$u(function(){e.HTMLVideoElement&&e.WebKitMediaKeys&&(id=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=pc,e.MediaKeys=fc,e.MediaKeySystemAccess=cc,navigator.requestMediaKeySystemAccess=uc)}),bc.prototype.createMediaKeys=function(){var e=new Ec(this.keySystem);return Promise.resolve(e)},bc.prototype.getConfiguration=function(){return this.a},Ec.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new Tc(this.a,e)},Ec.prototype.setServerCertificate=function(){return Promise.resolve(!1)},D(Tc,pe),vp=Tc.prototype,vp.generateRequest=function(e,t){this.a=new te;try{this.c=this.g.createSession("video/mp4",new Uint8Array(t),null),this.f.w(this.c,"mskeymessage",this.nf.bind(this)),this.f.w(this.c,"mskeyadded",this.lf.bind(this)),this.f.w(this.c,"mskeyerror",this.mf.bind(this)),Sc(this,"status-pending")}catch(e){this.a.reject(e)}return this.a},vp.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},vp.update=function(e){this.b=new te;try{this.c.update(new Uint8Array(e))}catch(e){this.b.reject(e)}return this.b},vp.close=function(){try{this.c.close(),this.closed.resolve(),this.f.Ya()}catch(e){this.closed.reject(e)}return this.closed},vp.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},vp.nf=function(e){this.a&&(this.a.resolve(),this.a=null),this.dispatchEvent(new ue("message",{messageType:void 0==this.keyStatuses.a?"license-request":"license-renewal",message:e.message.buffer}))},vp.lf=function(){this.a?(Sc(this,"usable"),this.a.resolve(),this.a=null):this.b&&(Sc(this,"usable"),this.b.resolve(),this.b=null)},vp.mf=function(){var e=Error("EME PatchedMediaKeysMs key error");if(e.errorCode=this.c.error,null!=this.a)this.a.reject(e),this.a=null;else if(null!=this.b)this.b.reject(e),this.b=null;else switch(this.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Sc(this,"output-not-allowed");break;default:Sc(this,"internal-error")}};var ad;vp=Pc.prototype,vp.forEach=function(e){this.a&&e(this.a,ad)},vp.get=function(e){if(this.has(e))return this.a},vp.has=function(e){var t=ad;return!(!this.a||!tt(new Uint8Array(e),new Uint8Array(t)))},vp.entries=function(){},vp.keys=function(){},vp.values=function(){},$u(function(){!e.HTMLVideoElement||!e.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(ad=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=_c,e.MediaKeys=Ec,e.MediaKeySystemAccess=bc,navigator.requestMediaKeySystemAccess=mc)}),xc.prototype.createSession=function(){},xc.prototype.setServerCertificate=function(){},Rc.prototype.getConfiguration=function(){},Rc.prototype.createMediaKeys=function(){},$u(function(){!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Oc,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Cc,e.MediaKeys=xc,e.MediaKeySystemAccess=Rc)},-10);var od="";Lc.prototype.createMediaKeys=function(){var e=new Nc(this.a);return Promise.resolve(e)},Lc.prototype.getConfiguration=function(){return this.b},vp=Nc.prototype,vp.createSession=function(e){if("temporary"!=(e=e||"temporary")&&"persistent-license"!=e)throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.b||document.createElement("video");return t.src||(t.src="about:blank"),e=new Fc(t,this.g,e),this.c.push(e),e},vp.setServerCertificate=function(){return Promise.resolve(!1)},vp.tf=function(e){var t=document.createEvent("CustomEvent");t.initCustomEvent("encrypted",!1,!1,null),t.initDataType="webm",t.initData=e.initData,this.b.dispatchEvent(t)},vp.Zf=function(e){var t=Uc(this,e.sessionId);t&&(e=new ue("message",{messageType:void 0==t.keyStatuses.a?"licenserequest":"licenserenewal",message:e.message}),t.b&&(t.b.resolve(),t.b=null),t.dispatchEvent(e))},vp.Xf=function(e){(e=Uc(this,e.sessionId))&&(Vc(e,"usable"),e.a&&e.a.resolve(),e.a=null)},vp.Yf=function(e){var t=Uc(this,e.sessionId);t&&t.handleError(e)},D(Fc,pe),vp=Fc.prototype,vp.handleError=function(e){var t=Error("EME v0.1b key error");t.errorCode=e.errorCode,t.errorCode.systemCode=e.systemCode,!e.sessionId&&this.b?(t.method="generateRequest",45==e.systemCode&&(t.message="Unsupported session type."),this.b.reject(t),this.b=null):e.sessionId&&this.a?(t.method="update",this.a.reject(t),this.a=null):(t=e.systemCode,e.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Vc(this,"output-restricted"):1==t?Vc(this,"expired"):Vc(this,"internal-error"))},vp.nd=function(e,t){if(this.a)this.a.then(this.nd.bind(this,e,t)).catch(this.nd.bind(this,e,t));else{if(this.a=e,"webkit-org.w3.clearkey"==this.c){var n=ze(t),r=JSON.parse(n);"oct"!=r.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null),n=$e(r.keys[0].k),r=$e(r.keys[0].kid)}else n=new Uint8Array(t),r=null;var i=Ic("addKey");try{this.f[i](this.c,n,r,this.sessionId)}catch(e){this.a.reject(e),this.a=null}}},vp.generateRequest=function(e,t){return Bc(this,t,null)},vp.load=function(e){return"persistent-license"==this.g?Bc(this,null,e):Promise.reject(Error("Not a persistent session."))},vp.update=function(e){var t=new te;return this.nd(t,e),t},vp.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=Ic("cancelKeyRequest");try{this.f[e](this.c,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},vp.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};var sd;vp=Gc.prototype,vp.forEach=function(e){this.a&&e(this.a,sd)},vp.get=function(e){if(this.has(e))return this.a},vp.has=function(e){var t=sd;return!(!this.a||!tt(new Uint8Array(e),new Uint8Array(t)))},vp.entries=function(){},vp.keys=function(){},vp.values=function(){},$u(function(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)od="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;sd=new Uint8Array([0]).buffer,navigator.requestMediaKeySystemAccess=Dc,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Mc,e.MediaKeys=Nc,e.MediaKeySystemAccess=Lc}}),$u(function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=Kc,document.exitPictureInPicture=zc,document.addEventListener("webkitpresentationmodechanged",Hc,!0))}}),$u(function(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch(function(){}),e}}}),$u(function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in t&&(t.getVideoPlaybackQuality=Yc)}}),$u(function(){if(!e.VTTCue&&e.TextTrackCue){var t=TextTrackCue.length;if(3==t)e.VTTCue=Wc;else if(6==t)e.VTTCue=qc;else{try{var n=!!Wc(1,2,"")}catch(e){n=!1}n&&(e.VTTCue=Wc)}}}),Xc.prototype.parseInit=function(){},Xc.prototype.parseMedia=function(e,t){var n=ze(e),r=[],i=new DOMParser,a=null;try{a=i.parseFromString(n,"text/xml")}catch(e){throw new ee(2,2,2005)}if(a){if(!(a=a.getElementsByTagName("tt")[0]))throw new ee(2,2,2005);var o=Rf.getAttributeNS(a,"http://www.w3.org/ns/ttml#parameter","frameRate"),s=Rf.getAttributeNS(a,"http://www.w3.org/ns/ttml#parameter","subFrameRate"),l=Rf.getAttributeNS(a,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier"),u=Rf.getAttributeNS(a,"http://www.w3.org/ns/ttml#parameter","tickRate");if(n=a.getAttribute("xml:space")||"default",i=a.getAttribute("tts:extent"),"default"!=n&&"preserve"!=n)throw new ee(2,2,2005);n="default"==n,o=new sp(o,s,l,u),s=Jc(a.getElementsByTagName("metadata")[0]),l=Jc(a.getElementsByTagName("styling")[0]),u=Jc(a.getElementsByTagName("layout")[0]);for(var c=[],p=0;p<u.length;p++){var f=u[p],d=l,h=i,y=new Wt,v=f.getAttribute("xml:id");if(v){y.id=v,v=null,h&&(v=ld.exec(h)||cd.exec(h)),h=v?Number(v[1]):null,v=v?Number(v[2]):null;var g,m;(g=np(f,d,"extent"))&&null!=(g=(m=ld.exec(g))||cd.exec(g))&&(y.width=null!=h?100*Number(g[1])/h:Number(g[1]),y.height=null!=v?100*Number(g[2])/v:Number(g[2]),y.widthUnits=m||null!=h?uf:0,y.heightUnits=m||null!=v?uf:0),(f=np(f,d,"origin"))&&null!=(g=(m=ld.exec(f))||cd.exec(f))&&(y.viewportAnchorX=null!=v?100*Number(g[1])/v:Number(g[1]),y.viewportAnchorY=null!=h?100*Number(g[2])/h:Number(g[2]),y.viewportAnchorUnits=m||null!=h?uf:0)}else y=null;y&&c.push(y)}for(i=Jc(a.getElementsByTagName("body")[0]),a=0;a<i.length;a++)(p=$c(i[a],t.periodStart,o,s,l,u,c,n))&&r.push(p)}return r};var ld=/^(\d{1,2}|100)% (\d{1,2}|100)%$/,ud=/^(\d+px|\d+em)$/,cd=/^(\d+)px (\d+)px$/,pd=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,fd=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,dd=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,hd=/^(\d*(?:\.\d*)?)f$/,yd=/^(\d*(?:\.\d*)?)t$/,vd=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,gd={left:rf,center:"center",right:"end",start:rf,end:"end"},md={left:"line-left",center:"center",right:"line-right"};pf["application/ttml+xml"]=Xc,lp.prototype.parseInit=function(e){var t=!1;if((new pr).H("moov",fr).H("trak",fr).H("mdia",fr).H("minf",fr).H("stbl",fr).fa("stsd",dr).H("stpp",function(e){t=!0,e.parser.stop()}).parse(e),!t)throw new ee(2,2,2007)},lp.prototype.parseMedia=function(e,t){var n=!1,r=[];if((new pr).H("mdat",hr(function(e){n=!0,r=r.concat(this.a.parseMedia(e,t))}.bind(this))).parse(e),!n)throw new ee(2,2,2007);return r},pf['application/mp4; codecs="stpp"']=lp,pf['application/mp4; codecs="stpp.TTML.im1t"']=lp,up.prototype.parseInit=function(){},up.prototype.parseMedia=function(e,t){var n=ze(e);if(n=n.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n"),n=n.split(/\n{2,}/m),!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new ee(2,2,2e3);var r=t.segmentStart;if(null==r&&(r=0,n[0].includes("X-TIMESTAMP-MAP"))){var i=n[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),a=n[0].match(/MPEGTS:(\d+)/m);if(i&&a){if(null==(r=fp(new Si(i[1]))))throw new ee(2,2,2e3);r=t.periodStart+(Number(a[1])/9e4-r)}}a=[];var o=n[0].split("\n");for(i=1;i<o.length;i++)if(/^Region:/.test(o[i])){var s=new Si(o[i]),l=new Wt;Ci(s),Pi(s);for(var u=Ci(s);u;){var c=l,p=u;(u=/^id=(.*)$/.exec(p))?c.id=u[1]:(u=/^width=(\d{1,2}|100)%$/.exec(p))?c.width=Number(u[1]):(u=/^lines=(\d+)$/.exec(p))?(c.height=Number(u[1]),c.heightUnits=2):(u=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(p))?(c.regionAnchorX=Number(u[1]),c.regionAnchorY=Number(u[2])):(u=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(p))?(c.viewportAnchorX=Number(u[1]),c.viewportAnchorY=Number(u[2])):/^scroll=up$/.exec(p)&&(c.scroll="up"),Pi(s),u=Ci(s)}a.push(l)}for(i=[],s=1;s<n.length;s++){if(o=n[s].split("\n"),u=o,p=r,o=a,1==u.length&&!u[0]||/^NOTE($|[ \t])/.test(u[0])||"STYLE"==u[0])o=null;else{l=null,u[0].includes("--\x3e")||(l=u[0],u.splice(0,1)),c=new Si(u[0]);var f=fp(c),d=Oi(c,/[ \t]+--\x3e[ \t]+/g),h=fp(c);if(null==f||null==d||null==h)throw new ee(2,2,2001);for(u=new Yt(f+p,h+p,u.slice(1).join("\n").trim()),Pi(c),p=Ci(c);p;)cp(u,p,o),Pi(c),p=Ci(c);null!=l&&(u.id=l),o=u}o&&i.push(o)}return i},pf["text/vtt"]=up,pf['text/vtt; codecs="vtt"']=up,dp.prototype.parseInit=function(e){var t=!1;if((new pr).H("moov",fr).H("trak",fr).H("mdia",fr).fa("mdhd",function(e){0==e.version?(e.reader.L(4),e.reader.L(4),this.a=e.reader.F(),e.reader.L(4)):(e.reader.L(8),e.reader.L(8),this.a=e.reader.F(),e.reader.L(8)),e.reader.L(4)}.bind(this)).H("minf",fr).H("stbl",fr).fa("stsd",dr).H("wvtt",function(){t=!0}).parse(e),!this.a)throw new ee(2,2,2008);if(!t)throw new ee(2,2,2008)},dp.prototype.parseMedia=function(e,t){var n=this;if(!this.a)throw new ee(2,2,2008);var r,i=0,a=[],o=[],s=!1,l=!1,u=!1,c=null;if((new pr).H("moof",fr).H("traf",fr).fa("tfdt",function(e){s=!0,i=0==e.version?e.reader.F():e.reader.yb()}).fa("tfhd",function(e){var t=e.flags;e=e.reader,e.L(4),1&t&&e.L(8),2&t&&e.L(4),c=8&t?e.F():null}).fa("trun",function(e){l=!0;var t=e.version,n=e.flags;e=e.reader;var r=e.F();1&n&&e.L(4),4&n&&e.L(4);for(var i=[],o=0;o<r;o++){var s={duration:null,sampleSize:null,pd:null};256&n&&(s.duration=e.F()),512&n&&(s.sampleSize=e.F()),1024&n&&e.L(4),2048&n&&(s.pd=0==t?e.F():e.Xd()),i.push(s)}a=i}).H("mdat",hr(function(e){u=!0,r=e})).parse(e),!u&&!s&&!l)throw new ee(2,2,2008);var p=i,f=new DataView(r.buffer,r.byteOffset,r.byteLength),d=new ur(f,0);return a.forEach(function(e){var r=e.duration||c,a=e.pd?i+e.pd:p;p=a+(r||0);var s=0;do{var l=d.F();s+=l;var u=d.F(),f=null;"vttc"==vr(u)?8<l&&(f=d.Xa(l-8)):d.L(l-8),r&&f&&o.push(hp(f,t.periodStart+a/n.a,t.periodStart+p/n.a))}while(e.sampleSize&&s<e.sampleSize)}),o.filter(Yp.Ga)},pf['application/mp4; codecs="wvtt"']=dp,I("shaka.util.Dom.createHTMLElement",function(e){return document.createElement(e)}),I("shaka.util.Dom.createVideoElement",function(){var e=document.createElement("video");return e.muted=!0,e.width=600,e.height=400,e}),I("shaka.util.Dom.asHTMLElement",function(e){return e}),I("shaka.util.Dom.asHTMLMediaElement",function(e){return e}),I("shaka.util.Dom.removeAllChildren",function(e){for(;e.firstChild;)e.removeChild(e.firstChild)})}).call(r,n,n);for(var i in r.shaka)t[i]=r.shaka[i]}()}).call(t,n(49))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(!e)throw new Error(j.ValidationErrorType.INITIAL_CONFIG_REQUIRED);a(e.targetId),o(e.provider)}function a(e){if(!e)throw new Error(j.ValidationErrorType.TARGET_ID_REQUIRED);var t=document.getElementById(e);if(!t)throw new Error(j.ValidationErrorType.DOM_ELEMENT_WITH_TARGET_ID_REQUIRED+e);if(t.getElementsByClassName(W).length>0)throw new Error(j.ValidationErrorType.TARGET_ID_ALREADY_USED+e)}function o(e){if(!e.partnerId){var t={url:X,mimetype:""};(0,z.addReferrer)(t),(0,z.addClientTag)(t),(0,z.updateSessionIdInUrl)(t,N.Utils.Generator.guid()+":"+N.Utils.Generator.guid()),navigator.sendBeacon&&navigator.sendBeacon(t.url)}}function s(e){var t=document.createElement("div");t.id=N.Utils.Generator.uniqueId(5),t.className=W,t.setAttribute("tabindex","-1");var n=document.getElementById(e);return n&&t&&n.appendChild(t),t.id}function l(e){!e.disableUserCache&&F.default.isLocalStorageAvailable()&&F.default.hasStorage()&&N.Utils.Object.mergeDeep(e,F.default.getStorageConfig())}function u(e){F.default.isLocalStorageAvailable()&&F.default.attach(e)}function c(e,t){e.cast&&H.RemotePlayerManager.load(e.cast,new K.RemoteControl(t))}function p(e){if(F.default.isLocalStorageAvailable()){var t=F.default.getPlayerTextStyle();t&&(e.textStyle=N.Utils.Object.mergeDeep(new N.TextStyle,t))}}function f(e){if(R()){var t=function t(){e.removeEventListener(e.Event.UI.UI_CLICKED,t),(0,N.setCapabilities)(N.EngineType.HTML5,{autoplay:!0})},n=function n(){e.removeEventListener(e.Event.SOURCE_SELECTED,n),e.addEventListener(e.Event.UI.UI_CLICKED,t)};e.addEventListener(e.Event.SOURCE_SELECTED,n)}}function d(){var e=!1;if(!0===window.DEBUG_KALTURA_PLAYER)e=!0;else if(window.URLSearchParams){var t=new URLSearchParams(window.location.search);e=t.has(q)}else e=!!y(q);return e}function h(e){N.Utils.Object.getPropertyPath(e,"ui.log")||N.Utils.Object.createPropertyPath(e,"ui.log",{}),N.Utils.Object.getPropertyPath(e,"provider.log")||N.Utils.Object.createPropertyPath(e,"provider.log",{}),N.Utils.Object.getPropertyPath(e,"log")||N.Utils.Object.createPropertyPath(e,"log",{}),e.log&&"function"==typeof e.log.handler&&((0,B.setLogHandler)(e.log.handler),e.ui.log.handler=e.provider.log.handler=e.log.handler);var t=B.LogLevel.ERROR;e.log&&d()?(t=B.LogLevel.DEBUG,e.log.level=B.LogLevel.DEBUG.name):e.log&&e.log.level&&B.LogLevel[e.log.level]&&(t=B.LogLevel[e.log.level]),e.ui.log.level=e.provider.log.level=t.name,(0,B.setLogLevel)(t)}function y(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)"),n=t.exec(location.search);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))}function v(e){var t=N.Utils.Object.getPropertyPath(window,"__kalturaplayerdata.UIConf");return null!==e&&void 0!==e&&(void 0!==t&&void 0!==t[e]||!1)}function g(e){var t={};return v(e)&&(t=window.__kalturaplayerdata.UIConf[e]),t}function m(e){var t=s(e.targetId),n={targetId:e.targetId,provider:{partnerId:e.provider.partnerId},ui:{targetId:t}};if(N.Utils.Object.mergeDeep(n,e),n.provider.uiConfId){var r=P(g(n.provider.uiConfId));n=N.Utils.Object.mergeDeep({},r,n)}return b(n),_(n),(0,L.setDefaultAnalyticsPlugin)(n),k(n),T(n),A(n),w(n),(0,G.configureExternalStreamRedirect)(n),M(n),n}function b(e){if(x()&&C()||R()){"boolean"!=typeof N.Utils.Object.getPropertyPath(e,"playback.preferNative.hls")&&N.Utils.Object.mergeDeep(e,{playback:{preferNative:{hls:!0}}})}}function _(e){if(x()&&C()||R()){"boolean"!=typeof N.Utils.Object.getPropertyPath(e,"playback.useNativeTextTrack")&&N.Utils.Object.mergeDeep(e,{playback:{useNativeTextTrack:!0}})}}function E(e){"boolean"!=typeof N.Utils.Object.getPropertyPath(e,"playback.playAdsWithMSE")&&(e=e.plugins&&e.plugins.imadai&&!e.plugins.imadai.disable?N.Utils.Object.createPropertyPath(e,"playback.playAdsWithMSE",!1):N.Utils.Object.createPropertyPath(e,"playback.playAdsWithMSE",!0));var t=N.Utils.Object.getPropertyPath(e,"plugins.ima.disableMediaPreload"),n=N.Utils.Object.getPropertyPath(e,"plugins.bumper.disableMediaPreload");e.plugins&&e.plugins.ima&&"boolean"!=typeof t&&(e=N.Utils.Object.createPropertyPath(e,"plugins.ima.disableMediaPreload",!0)),e.plugins&&e.plugins.bumper&&"boolean"!=typeof n&&(e=N.Utils.Object.createPropertyPath(e,"plugins.bumper.disableMediaPreload",!0))}function k(e){if(N.Env.isSmartTV&&((0,N.setCapabilities)(N.EngineType.HTML5,{autoplay:!0}),E(e),e.plugins&&e.plugins.ima)){var t=N.Utils.Object.getPropertyPath(e,"plugins.ima.forceReloadMediaAfterAds"),n=N.Utils.Object.getPropertyPath(e,"plugins.ima.delayInitUntilSourceSelected");"boolean"!=typeof t&&(e=N.Utils.Object.createPropertyPath(e,"plugins.ima.forceReloadMediaAfterAds",!0)),"boolean"!=typeof n&&(e=N.Utils.Object.createPropertyPath(e,"plugins.ima.delayInitUntilSourceSelected",!0))}}function T(e){if(R()&&e.plugins&&e.plugins.ima&&!e.plugins.ima.disable){var t=N.Utils.Object.getPropertyPath(e,"playback.playsinline"),n=N.Utils.Object.getPropertyPath(e,"plugins.ima.disableMediaPreload");!1===t&&"boolean"!=typeof n&&N.Utils.Object.createPropertyPath(e,"plugins.ima.disableMediaPreload",!0)}}function A(e){if(e.plugins&&e.plugins.imadai&&!e.plugins.imadai.disable){"boolean"!=typeof N.Utils.Object.getPropertyPath(e,"playback.options.html5.hls.autoStartLoad")&&N.Utils.Object.mergeDeep(e,{playback:{options:{html5:{hls:{autoStartLoad:!1}}}}})}}function w(e){var t=N.Utils.Object.getPropertyPath(e,"plugins.bumper"),n=N.Utils.Object.getPropertyPath(e,"plugins.imadai");if(t){var r={};"boolean"!=typeof t.playOnMainVideoTag&&(N.Env.isSmartTV||R()&&e.playback&&!1===e.playback.playsinline)&&(r.playOnMainVideoTag=!0),n&&!n.disable&&(Array.isArray(t.position)||(r.position=[0]),"boolean"!=typeof t.disableMediaPreload&&(r.disableMediaPreload=!0)),N.Utils.Object.mergeDeep(e,{plugins:{bumper:r}})}}function S(e){!1!==N.Utils.Object.getPropertyPath(e,"log.playerVersion")&&((0,B.setLogLevel)(B.LogLevel.INFO),(0,V.default)().log("%c kaltura-player-js 0.46.0","color: #ff98f9;  font-size: large"),(0,V.default)().log("%c For more details see https://github.com/kaltura/kaltura-player-js","color: #ff98f9;"))}function P(e){var t=function(t,n){if(N.Utils.Object.hasPropertyPath(e,t))if(Y.push({level:"warn",msg:"Path config.player."+t+" will be deprecated soon. Please update your config structure as describe here: https://github.com/kaltura/kaltura-player-js/blob/master/docs/configuration.md"}),N.Utils.Object.hasPropertyPath(e,n))N.Utils.Object.deletePropertyPath(e,t);else{var r=N.Utils.Object.getPropertyPath(e,t),i=N.Utils.Object.createPropertyPath({},n,r);N.Utils.Object.mergeDeep(e,i),N.Utils.Object.deletePropertyPath(e,t)}},n=[["duration","sources.duration"],["type","sources.type"],["dvr","sources.dvr"],["id","sources.id"],["name","metadata.name"],["metadata.poster","sources.poster"],["metadata","sources.metadata"],["logLevel","log.level"],["ui.components.fullscreen.inBrowserFullscreenForIOS","playback.inBrowserFullscreen"]];return function(){if(e.player){Y.push({level:"warn",msg:"Path config.player will be deprecated soon. Please update your config structure as describe here: https://github.com/kaltura/kaltura-player-js/blob/master/docs/configuration.md"});var t=N.Utils.Object.copyDeep(e.player);delete e.player,N.Utils.Object.mergeDeep(e,t)}}(),n.forEach(function(e){return t(e[0],e[1])}),e}function O(){Y.forEach(function(e){return(0,V.default)("KalturaPlayer:Setup")[e.level](e.msg)})}function C(){return N.Utils.Object.hasPropertyPath(N.Env,"browser.name")&&N.Env.browser.name.includes("Safari")}function x(){return"Mac OS"===N.Env.os.name}function R(){return"iOS"===N.Env.os.name}function I(e,t){if(t.sources&&D(t.sources)){var n=e.config.playback,r=!1;n.streamPriority.forEach(function(e){"youtube"===e.engine&&(r=!0)}),r||n.streamPriority.push({engine:"youtube",format:"progressive"}),t.playback=n}}function D(e){var t=e&&e.progressive;return!(!t||!t[0]||"video/youtube"!==t[0].mimetype)}function M(e){var t=N.Utils.Object.getPropertyPath(e,"plugins.vr");if(t&&!t.disable){"boolean"!=typeof N.Utils.Object.getPropertyPath(e,"playback.inBrowserFullscreen")&&N.Utils.Object.mergeDeep(e,{playback:{inBrowserFullscreen:!0}})}}Object.defineProperty(t,"__esModule",{value:!0}),t.hasYoutubeSource=t.maybeSetStreamPriority=t.isIos=t.isSafari=t.getDefaultOptions=t.checkNativeHlsSupport=t.createKalturaPlayerContainer=t.setLogOptions=t.validateConfig=t.attachToFirstClick=t.setStorageTextStyle=t.applyCastSupport=t.applyStorageSupport=t.setStorageConfig=t.printKalturaPlayerVersionToLog=t.supportLegacyOptions=t.printSetupMessages=void 0;var L=n(363),N=n(9),j=n(364),U=n(365),F=r(U),B=n(19),V=r(B),G=n(367),H=n(98),K=n(69),z=(n(44),n(101)),Y=[],W="kaltura-player-container",q="debugKalturaPlayer",X="https://analytics.kaltura.com/api_v3/index.php?service=analytics&action=trackEvent&apiVersion=3.3.0&format=1&eventType=1&partnerId=2504201&entryId=1_3bwzbc9o&&eventIndex=1&position=0";t.printSetupMessages=O,t.supportLegacyOptions=P,t.printKalturaPlayerVersionToLog=S,t.setStorageConfig=l,t.applyStorageSupport=u,t.applyCastSupport=c,t.setStorageTextStyle=p,t.attachToFirstClick=f,t.validateConfig=i,t.setLogOptions=h,t.createKalturaPlayerContainer=s,t.checkNativeHlsSupport=b,t.getDefaultOptions=m,t.isSafari=C,t.isIos=R,t.maybeSetStreamPriority=I,t.hasYoutubeSource=D},function(e,t,n){"use strict";function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteAvailablePayload=t.RemoteDisconnectedPayload=t.RemoteConnectedPayload=t.RemotePayload=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=(n(70),n(53),n(99),n(141),function(){function e(t){a(this,e),this._player=t}return o(e,[{key:"player",get:function(){return this._player}}]),e}()),l=function(e){function t(e,n,i){a(this,t);var o=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o._session=n,i&&(o._ui=i),o}return i(t,e),o(t,[{key:"ui",get:function(){return this._ui}},{key:"session",get:function(){return this._session}}]),t}(s),u=function(e){function t(e,n){a(this,t);var i=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return i._snapshot=n,i}return i(t,e),o(t,[{key:"snapshot",get:function(){return this._snapshot}}]),t}(s),c=function(e){function t(e,n){a(this,t);var i=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return i._available=n,i}return i(t,e),o(t,[{key:"available",get:function(){return this._available}}]),t}(s);t.RemotePayload=s,t.RemoteConnectedPayload=l,t.RemoteDisconnectedPayload=u,t.RemoteAvailablePayload=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.RemotePlayerUI=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(68),o=function(){function e(){var t=this;r(this,e),this._uis=[{template:function(e){return t.idleUI(e)},condition:function(e){return e.engine.isIdle}},{template:function(e){return t.errorUI(e)},condition:function(e){return e.engine.hasError}},{template:function(e){return t.adsUI(e)},condition:function(e){return e.engine.adBreak}},{template:function(e){return t.liveUI(e)},condition:function(e){return e.engine.isLive}},{template:function(e){return t.playbackUI(e)}}]}return i(e,[{key:"playbackUI",value:function(e){return a.Presets.playbackUI(e)}},{key:"idleUI",value:function(e){return a.Presets.idleUI(e)}},{key:"adsUI",value:function(e){return a.Presets.adsUI(e)}},{key:"liveUI",value:function(e){return a.Presets.liveUI(e)}},{key:"errorUI",value:function(e){return a.Presets.errorUI(e)}},{key:"uis",get:function(){return this._uis}}]),e}();t.RemotePlayerUI=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){var n=document.getElementById(e);n&&n.appendChild(t)}function a(e,t){return{thumbsSprite:(0,u.getThumbSlicesUrl)(e,t),thumbsWidth:u.DEFAULT_THUMBS_WIDTH,thumbsSlices:u.DEFAULT_THUMBS_SLICES}}Object.defineProperty(t,"__esModule",{value:!0}),t.UIWrapper=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(68),l=n(9),u=n(369),c=(n(44),function(){function e(t,n){var a=this;r(this,e),this._disabled=!1;var o=n.ui;return o.disable?(this._disabled=!0,i(o.targetId,t.getView())):(this._uiManager=new s.UIManager(t,o),o.customPreset?this._uiManager.buildCustomUI(o.customPreset):this._uiManager.buildDefaultUI(),this._handleVr(n.plugins)),new Proxy(this,{get:function(e,t){return a._disabled?function(){}:e[t]}})}return o(e,[{key:"destroy",value:function(){this._uiManager.destroy()}},{key:"reset",value:function(){this._resetErrorState()}},{key:"setConfig",value:function(e,t){this._uiManager.setConfig(e,t)}},{key:"_resetErrorState",value:function(){this.setConfig({hasError:!1},"engine")}},{key:"setSeekbarConfig",value:function(e,t){var n=l.Utils.Object.getPropertyPath(t,"components.seekbar"),r=a(e,n);this.setConfig(l.Utils.Object.mergeDeep({},r,n),"seekbar")}},{key:"setLoadingSpinnerState",value:function(e){this.setConfig({show:e},"loading")}},{key:"_handleVr",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.vr&&!e.vr.disable&&this._setStereoConfig(e.vr)}},{key:"_setStereoConfig",value:function(e){(e.toggleStereo||(l.Env.isMobile||l.Env.isTablet)&&!1!==e.toggleStereo)&&this.setConfig(l.Utils.Object.mergeDeep({},{vrStereoMode:!!e.startInStereo}),"vrStereo")}}]),e}());t.UIWrapper=c},function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{var n=void 0,r=e;for(var i in t){var a=void 0!==t[i]&&null!==t[i]?t[i]:"";"string"==typeof a&&a.indexOf('"')>-1&&(a=a.replace(/"/g,'\\"')),n=new RegExp("{{"+i+"}}","g"),r=r.replace(n,a)}return r}catch(e){return""}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e,t){if(e){l.pluginConfig.set(e);var n=y(t),r=f.Utils.Object.mergeDeep({},l.pluginConfig.get(),e);o(e,a((0,c.default)(JSON.stringify(r),n)))}}function i(e,t){if(e){var n={components:{share:{shareUrl:"{{embedBaseUrl}}/index.php/extwidget/preview/partner_id/{{partnerId}}/uiconf_id/{{uiConfId}}/entry_id/{{entryId}}/embed/dynamic",embedUrl:"{{embedBaseUrl}}/p/{{partnerId}}/embedPlaykitJs/uiconf_id/{{uiConfId}}?iframeembed=true&entry_id={{entryId}}"}}},r=y(t),i=f.Utils.Object.mergeDeep({},n,e);o(e,a((0,c.default)(JSON.stringify(i),r)))}}function a(e){var t=void 0;try{t=JSON.parse(e,function(e){try{return JSON.parse(this[e])}catch(t){return this[e]}})}catch(e){t={}}return t}function o(e,t){var n=h(t),r=h(e);r&&n&&Object.keys(e).forEach(function(t){e&&e[t]&&(e[t]=f.Utils.Object.mergeDeep({},n[t],r[t]))})}Object.defineProperty(t,"__esModule",{value:!0}),t.evaluateUIConfig=t.evaluatePluginsConfig=void 0;var s=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=n(370),u=n(143),c=function(e){return e&&e.__esModule?e:{default:e}}(u),p=n(101),f=n(9),d=function(e){return("number"==typeof e||"function"==typeof e||"string"==typeof e||"boolean"==typeof e)&&!l.templateRegex.test(e.toString())},h=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(t).reduce(function(t,n){var r=s(n,2),i=r[0],a=r[1];return"function"!=typeof a&&f.Utils.Object.isObject(a)?t[i]=e(a):Array.isArray(a)?t[i]=a.filter(function(e){return d(e)}):d(a)&&(t[i]=a),t},{})},y=function(e){var t={pVersion:"0.46.0",pName:"kaltura-player-js"};e.targetId&&(t.domRootElementId=e.targetId),e.provider&&e.provider.env&&(t.serviceUrl=e.provider.env.serviceUrl,t.serviceUrl&&(t.embedBaseUrl=t.serviceUrl.replace("api_v3","")));var n={referrer:(0,p.getReferrer)()};return e.provider&&f.Utils.Object.mergeDeep(n,{ks:e.provider.ks,uiConfId:e.provider.uiConfId,partnerId:e.provider.partnerId}),e.session&&f.Utils.Object.mergeDeep(n,{sessionId:e.session.id,ks:e.session.ks,isAnonymous:e.session.isAnonymous,uiConfId:e.session.uiConfId,partnerId:e.session.partnerId}),e.sources&&f.Utils.Object.mergeDeep(n,{entryId:e.sources.id,entryName:e.sources.metadata&&e.sources.metadata.name,entryType:e.sources.type}),e.playlist&&f.Utils.Object.mergeDeep(n,{playlistId:e.playlist.id}),Object.keys(n).forEach(function(e){void 0===n[e]&&delete n[e]}),f.Utils.Object.mergeDeep(t,n),t};t.evaluatePluginsConfig=r,t.evaluateUIConfig=i},function(e,t,n){"use strict";function r(e,t,n){var r=e.poster,i=t.poster,a=n.width,o=n.height;"string"==typeof r&&r===i&&(e.poster=r+"/height/"+o+"/width/"+a)}Object.defineProperty(t,"__esModule",{value:!0}),t.addKalturaPoster=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=["hls","dash","progressive"],o=function(){function e(t,n){r(this,e),this._sources=t,this._config=n}return i(e,[{key:"updateSources",value:function(e){var t=this;a.forEach(function(n){t._sources&&(t._sources[n]=e[n])})}},{key:"isPlayable",value:function(){var e=this;return!!a.find(function(t){return e._sources&&e._sources[t]&&e._sources[t].length})}},{key:"sources",get:function(){var e=this;return a.forEach(function(t){e._sources&&e._sources[t]&&0===e._sources[t].length&&delete e._sources[t]}),this._sources}},{key:"config",get:function(){return this._config}}]),e}();t.PlaylistItem=o},function(e,t,n){"use strict";function r(){return s}function i(e){return s[e]?s[e]:null}Object.defineProperty(t,"__esModule",{value:!0}),t.getPlayers=t.getPlayer=t.getPlayerProxy=void 0;var a=n(44),o=n(9),s={},l=["_remotePlayer","_listeners","_uiWrapper"],u={get:function(e,t){if("destroy"===t){var n=e.config.targetId;delete s[n]}return t in o.FakeEventTarget.prototype||l.includes(t)?e[t]:e._remotePlayer&&t in e._remotePlayer?e._remotePlayer[t]:e[t]},set:function(e,t,n){return e._remotePlayer&&!l.includes(t)?t in e._remotePlayer&&(e._remotePlayer[t]=n):e[t]=n,!0}},c=function(e){var t=new a.KalturaPlayer(e),n=new Proxy(t,u);return s[e.targetId]=n,n};t.getPlayerProxy=c,t.getPlayer=i,t.getPlayers=r},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.PLAYER_NAME=t.VERSION=t.PLAYER_TYPE=t.playlist=t.cast=t.shaka=t.setup=t.providers=t.ui=t.core=t.getPlayer=t.getPlayers=void 0;var i=n(71),a=function(e){return e&&e.__esModule?e:{default:e}}(i);n(352);var o=n(9),s=r(o),l=n(68),u=r(l),c=n(137),p=r(c);n(357),n(359),n(360);var f=n(138),d=r(f),h=n(362),y=n(147),v=n(378),g=n(382);a.default.installAll(),t.getPlayers=y.getPlayers,t.getPlayer=y.getPlayer,t.core=s,t.ui=u,t.providers=p,t.setup=h.setup,t.shaka=d,t.cast=v.cast,t.playlist=g.playlist,t.PLAYER_TYPE="ovp",t.VERSION="0.46.0",t.PLAYER_NAME="kaltura-player-js"},function(e,t,n){var r,i;/*!
 * js-logger - http://github.com/jonnyreeves/js-logger
 * Jonny Reeves, http://jonnyreeves.co.uk/
 * js-logger may be freely distributed under the MIT license.
 */
!function(a){"use strict";var o={};o.VERSION="1.4.1";var s,l={},u=function(e,t){return function(){return t.apply(e,arguments)}},c=function(){var e,t,n=arguments,r=n[0];for(t=1;t<n.length;t++)for(e in n[t])e in r||!n[t].hasOwnProperty(e)||(r[e]=n[t][e]);return r},p=function(e,t){return{value:e,name:t}};o.DEBUG=p(1,"DEBUG"),o.INFO=p(2,"INFO"),o.TIME=p(3,"TIME"),o.WARN=p(4,"WARN"),o.ERROR=p(8,"ERROR"),o.OFF=p(99,"OFF");var f=function(e){this.context=e,this.setLevel(e.filterLevel),this.log=this.info};f.prototype={setLevel:function(e){e&&"value"in e&&(this.context.filterLevel=e)},getLevel:function(){return this.context.filterLevel},enabledFor:function(e){var t=this.context.filterLevel;return e.value>=t.value},debug:function(){this.invoke(o.DEBUG,arguments)},info:function(){this.invoke(o.INFO,arguments)},warn:function(){this.invoke(o.WARN,arguments)},error:function(){this.invoke(o.ERROR,arguments)},time:function(e){"string"==typeof e&&e.length>0&&this.invoke(o.TIME,[e,"start"])},timeEnd:function(e){"string"==typeof e&&e.length>0&&this.invoke(o.TIME,[e,"end"])},invoke:function(e,t){s&&this.enabledFor(e)&&s(t,c({level:e},this.context))}};var d=new f({filterLevel:o.OFF});!function(){var e=o;e.enabledFor=u(d,d.enabledFor),e.debug=u(d,d.debug),e.time=u(d,d.time),e.timeEnd=u(d,d.timeEnd),e.info=u(d,d.info),e.warn=u(d,d.warn),e.error=u(d,d.error),e.log=e.info}(),o.setHandler=function(e){s=e},o.setLevel=function(e){d.setLevel(e);for(var t in l)l.hasOwnProperty(t)&&l[t].setLevel(e)},o.getLevel=function(){return d.getLevel()},o.get=function(e){return l[e]||(l[e]=new f(c({name:e},d.context)))},o.createDefaultHandler=function(e){e=e||{},e.formatter=e.formatter||function(e,t){t.name&&e.unshift("["+t.name+"]")};var t={},n=function(e,t){Function.prototype.apply.call(e,console,t)};return"undefined"==typeof console?function(){}:function(r,i){r=Array.prototype.slice.call(r);var a,s=console.log;i.level===o.TIME?(a=(i.name?"["+i.name+"] ":"")+r[0],"start"===r[1]?console.time?console.time(a):t[a]=(new Date).getTime():console.timeEnd?console.timeEnd(a):n(s,[a+": "+((new Date).getTime()-t[a])+"ms"])):(i.level===o.WARN&&console.warn?s=console.warn:i.level===o.ERROR&&console.error?s=console.error:i.level===o.INFO&&console.info?s=console.info:i.level===o.DEBUG&&console.debug&&(s=console.debug),e.formatter(r,i),n(s,r))}},o.useDefaults=function(e){o.setLevel(e&&e.defaultLevel||o.DEBUG),o.setHandler(o.createDefaultHandler(e))},r=o,void 0!==(i="function"==typeof r?r.call(t,n,t,e):r)&&(e.exports=i)}()},function(e,t,n){"use strict";(function(e){function t(e,t,n){e[t]||Object[r](e,t,{writable:!0,configurable:!0,value:n})}if(n(151),n(348),n(349),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0;var r="defineProperty";t(String.prototype,"padLeft","".padStart),t(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(e){[][e]&&t(Array,e,Function.call.bind([][e]))})}).call(t,n(49))},function(e,t,n){n(152),n(154),n(155),n(156),n(157),n(158),n(159),n(160),n(161),n(162),n(163),n(164),n(165),n(166),n(167),n(168),n(170),n(171),n(172),n(173),n(174),n(175),n(176),n(177),n(178),n(179),n(180),n(181),n(182),n(183),n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(232),n(233),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(255),n(93),n(256),n(257),n(121),n(258),n(259),n(260),n(261),n(262),n(124),n(126),n(127),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(341),n(342),n(343),n(344),n(345),n(346),n(347),e.exports=n(23)},function(e,t,n){"use strict";var r=n(2),i=n(12),a=n(6),o=n(0),s=n(14),l=n(31).KEY,u=n(3),c=n(54),p=n(45),f=n(34),d=n(5),h=n(104),y=n(73),v=n(153),g=n(57),m=n(1),b=n(16),_=n(24),E=n(33),k=n(38),T=n(107),A=n(17),w=n(7),S=n(36),P=A.f,O=w.f,C=T.f,x=r.Symbol,R=r.JSON,I=R&&R.stringify,D=d("_hidden"),M=d("toPrimitive"),L={}.propertyIsEnumerable,N=c("symbol-registry"),j=c("symbols"),U=c("op-symbols"),F=Object.prototype,B="function"==typeof x,V=r.QObject,G=!V||!V.prototype||!V.prototype.findChild,H=a&&u(function(){return 7!=k(O({},"a",{get:function(){return O(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=P(F,t);r&&delete F[t],O(e,t,n),r&&e!==F&&O(F,t,r)}:O,K=function(e){var t=j[e]=k(x.prototype);return t._k=e,t},z=B&&"symbol"==typeof x.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof x},Y=function(e,t,n){return e===F&&Y(U,t,n),m(e),t=_(t,!0),m(n),i(j,t)?(n.enumerable?(i(e,D)&&e[D][t]&&(e[D][t]=!1),n=k(n,{enumerable:E(0,!1)})):(i(e,D)||O(e,D,E(1,{})),e[D][t]=!0),H(e,t,n)):O(e,t,n)},W=function(e,t){m(e);for(var n,r=v(t=b(t)),i=0,a=r.length;a>i;)Y(e,n=r[i++],t[n]);return e},q=function(e,t){return void 0===t?k(e):W(k(e),t)},X=function(e){var t=L.call(this,e=_(e,!0));return!(this===F&&i(j,e)&&!i(U,e))&&(!(t||!i(this,e)||!i(j,e)||i(this,D)&&this[D][e])||t)},J=function(e,t){if(e=b(e),t=_(t,!0),e!==F||!i(j,t)||i(U,t)){var n=P(e,t);return!n||!i(j,t)||i(e,D)&&e[D][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=C(b(e)),r=[],a=0;n.length>a;)i(j,t=n[a++])||t==D||t==l||r.push(t);return r},$=function(e){for(var t,n=e===F,r=C(n?U:b(e)),a=[],o=0;r.length>o;)!i(j,t=r[o++])||n&&!i(F,t)||a.push(j[t]);return a};B||(x=function(){if(this instanceof x)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===F&&t.call(U,n),i(this,D)&&i(this[D],e)&&(this[D][e]=!1),H(this,e,E(1,n))};return a&&G&&H(F,e,{configurable:!0,set:t}),K(e)},s(x.prototype,"toString",function(){return this._k}),A.f=J,w.f=Y,n(39).f=T.f=Q,n(51).f=X,n(56).f=$,a&&!n(35)&&s(F,"propertyIsEnumerable",X,!0),h.f=function(e){return K(d(e))}),o(o.G+o.W+o.F*!B,{Symbol:x});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Z.length>ee;)d(Z[ee++]);for(var te=S(d.store),ne=0;te.length>ne;)y(te[ne++]);o(o.S+o.F*!B,"Symbol",{for:function(e){return i(N,e+="")?N[e]:N[e]=x(e)},keyFor:function(e){if(!z(e))throw TypeError(e+" is not a symbol!");for(var t in N)if(N[t]===e)return t},useSetter:function(){G=!0},useSimple:function(){G=!1}}),o(o.S+o.F*!B,"Object",{create:q,defineProperty:Y,defineProperties:W,getOwnPropertyDescriptor:J,getOwnPropertyNames:Q,getOwnPropertySymbols:$}),R&&o(o.S+o.F*(!B||u(function(){var e=x();return"[null]"!=I([e])||"{}"!=I({a:e})||"{}"!=I(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!z(e)){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);return t=r[1],"function"==typeof t&&(n=t),!n&&g(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!z(t))return t}),r[1]=t,I.apply(R,r)}}}),x.prototype[M]||n(13)(x.prototype,M,x.prototype.valueOf),p(x,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},function(e,t,n){var r=n(36),i=n(56),a=n(51);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var o,s=n(e),l=a.f,u=0;s.length>u;)l.call(e,o=s[u++])&&t.push(o);return t}},function(e,t,n){var r=n(0);r(r.S,"Object",{create:n(38)})},function(e,t,n){var r=n(0);r(r.S+r.F*!n(6),"Object",{defineProperty:n(7).f})},function(e,t,n){var r=n(0);r(r.S+r.F*!n(6),"Object",{defineProperties:n(106)})},function(e,t,n){var r=n(16),i=n(17).f;n(27)("getOwnPropertyDescriptor",function(){return function(e,t){return i(r(e),t)}})},function(e,t,n){var r=n(10),i=n(18);n(27)("getPrototypeOf",function(){return function(e){return i(r(e))}})},function(e,t,n){var r=n(10),i=n(36);n(27)("keys",function(){return function(e){return i(r(e))}})},function(e,t,n){n(27)("getOwnPropertyNames",function(){return n(107).f})},function(e,t,n){var r=n(4),i=n(31).onFreeze;n(27)("freeze",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(4),i=n(31).onFreeze;n(27)("seal",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(4),i=n(31).onFreeze;n(27)("preventExtensions",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(4);n(27)("isFrozen",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(4);n(27)("isSealed",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(4);n(27)("isExtensible",function(e){return function(t){return!!r(t)&&(!e||e(t))}})},function(e,t,n){var r=n(0);r(r.S+r.F,"Object",{assign:n(108)})},function(e,t,n){var r=n(0);r(r.S,"Object",{is:n(169)})},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){var r=n(0);r(r.S,"Object",{setPrototypeOf:n(77).set})},function(e,t,n){"use strict";var r=n(52),i={};i[n(5)("toStringTag")]="z",i+""!="[object z]"&&n(14)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(e,t,n){var r=n(0);r(r.P,"Function",{bind:n(109)})},function(e,t,n){var r=n(7).f,i=Function.prototype,a=/^\s*function ([^ (]*)/;"name"in i||n(6)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(4),i=n(18),a=n(5)("hasInstance"),o=Function.prototype;a in o||n(7).f(o,a,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(0),i=n(111);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(e,t,n){var r=n(0),i=n(112);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(e,t,n){"use strict";var r=n(2),i=n(12),a=n(21),o=n(79),s=n(24),l=n(3),u=n(39).f,c=n(17).f,p=n(7).f,f=n(46).trim,d=r.Number,h=d,y=d.prototype,v="Number"==a(n(38)(y)),g="trim"in String.prototype,m=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){t=g?t.trim():f(t,3);var n,r,i,a=t.charCodeAt(0);if(43===a||45===a){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===a){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t}for(var o,l=t.slice(2),u=0,c=l.length;u<c;u++)if((o=l.charCodeAt(u))<48||o>i)return NaN;return parseInt(l,r)}}return+t};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof d&&(v?l(function(){y.valueOf.call(n)}):"Number"!=a(n))?o(new h(m(t)),n,d):m(t)};for(var b,_=n(6)?u(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),E=0;_.length>E;E++)i(h,b=_[E])&&!i(d,b)&&p(d,b,c(h,b));d.prototype=y,y.constructor=d,n(14)(r,"Number",d)}},function(e,t,n){"use strict";var r=n(0),i=n(26),a=n(113),o=n(80),s=1..toFixed,l=Math.floor,u=[0,0,0,0,0,0],c="Number.toFixed: incorrect invocation!",p=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*u[n],u[n]=r%1e7,r=l(r/1e7)},f=function(e){for(var t=6,n=0;--t>=0;)n+=u[t],u[t]=l(n/e),n=n%e*1e7},d=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==u[e]){var n=String(u[e]);t=""===t?n:t+o.call("0",7-n.length)+n}return t},h=function(e,t,n){return 0===t?n:t%2==1?h(e,t-1,n*e):h(e*e,t/2,n)},y=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(3)(function(){s.call({})})),"Number",{toFixed:function(e){var t,n,r,s,l=a(this,c),u=i(e),v="",g="0";if(u<0||u>20)throw RangeError(c);if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(v="-",l=-l),l>1e-21)if(t=y(l*h(2,69,1))-69,n=t<0?l*h(2,-t,1):l/h(2,t,1),n*=4503599627370496,(t=52-t)>0){for(p(0,n),r=u;r>=7;)p(1e7,0),r-=7;for(p(h(10,r,1),0),r=t-1;r>=23;)f(1<<23),r-=23;f(1<<r),p(1,1),f(2),g=d()}else p(0,n),p(1<<-t,0),g=d()+o.call("0",u);return u>0?(s=g.length,g=v+(s<=u?"0."+o.call("0",u-s)+g:g.slice(0,s-u)+"."+g.slice(s-u))):g=v+g,g}})},function(e,t,n){"use strict";var r=n(0),i=n(3),a=n(113),o=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==o.call(1,void 0)})||!i(function(){o.call({})})),"Number",{toPrecision:function(e){var t=a(this,"Number#toPrecision: incorrect invocation!");return void 0===e?o.call(t):o.call(t,e)}})},function(e,t,n){var r=n(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(0),i=n(2).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,t,n){var r=n(0);r(r.S,"Number",{isInteger:n(114)})},function(e,t,n){var r=n(0);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(0),i=n(114),a=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&a(e)<=9007199254740991}})},function(e,t,n){var r=n(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(0),i=n(112);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(e,t,n){var r=n(0),i=n(111);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(e,t,n){var r=n(0),i=n(115),a=Math.sqrt,o=Math.acosh;r(r.S+r.F*!(o&&710==Math.floor(o(Number.MAX_VALUE))&&o(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+a(e-1)*a(e+1))}})},function(e,t,n){function r(e){return isFinite(e=+e)&&0!=e?e<0?-r(-e):Math.log(e+Math.sqrt(e*e+1)):e}var i=n(0),a=Math.asinh;i(i.S+i.F*!(a&&1/a(0)>0),"Math",{asinh:r})},function(e,t,n){var r=n(0),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(0),i=n(81);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var r=n(0);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(0),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,n){var r=n(0),i=n(82);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(e,t,n){var r=n(0);r(r.S,"Math",{fround:n(116)})},function(e,t,n){var r=n(0),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,a=0,o=0,s=arguments.length,l=0;o<s;)n=i(arguments[o++]),l<n?(r=l/n,a=a*r*r+1,l=n):n>0?(r=n/l,a+=r*r):a+=n;return l===1/0?1/0:l*Math.sqrt(a)}})},function(e,t,n){var r=n(0),i=Math.imul;r(r.S+r.F*n(3)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(e,t){var n=+e,r=+t,i=65535&n,a=65535&r;return 0|i*a+((65535&n>>>16)*a+i*(65535&r>>>16)<<16>>>0)}})},function(e,t,n){var r=n(0);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var r=n(0);r(r.S,"Math",{log1p:n(115)})},function(e,t,n){var r=n(0);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(0);r(r.S,"Math",{sign:n(81)})},function(e,t,n){var r=n(0),i=n(82),a=Math.exp;r(r.S+r.F*n(3)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(a(e-1)-a(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(0),i=n(82),a=Math.exp;r(r.S,"Math",{tanh:function(e){var t=i(e=+e),n=i(-e);return t==1/0?1:n==1/0?-1:(t-n)/(a(e)+a(-e))}})},function(e,t,n){var r=n(0);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(0),i=n(37),a=String.fromCharCode,o=String.fromCodePoint;r(r.S+r.F*(!!o&&1!=o.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,o=0;r>o;){if(t=+arguments[o++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?a(t):a(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(0),i=n(16),a=n(8);r(r.S,"String",{raw:function(e){for(var t=i(e.raw),n=a(t.length),r=arguments.length,o=[],s=0;n>s;)o.push(String(t[s++])),s<r&&o.push(String(arguments[s]));return o.join("")}})},function(e,t,n){"use strict";n(46)("trim",function(e){return function(){return e(this,3)}})},function(e,t,n){"use strict";var r=n(83)(!0);n(84)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){"use strict";var r=n(0),i=n(83)(!1);r(r.P,"String",{codePointAt:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(0),i=n(8),a=n(86),o="".endsWith;r(r.P+r.F*n(87)("endsWith"),"String",{endsWith:function(e){var t=a(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(t.length),s=void 0===n?r:Math.min(i(n),r),l=String(e);return o?o.call(t,l,s):t.slice(s-l.length,s)===l}})},function(e,t,n){"use strict";var r=n(0),i=n(86);r(r.P+r.F*n(87)("includes"),"String",{includes:function(e){return!!~i(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(0);r(r.P,"String",{repeat:n(80)})},function(e,t,n){"use strict";var r=n(0),i=n(8),a=n(86),o="".startsWith;r(r.P+r.F*n(87)("startsWith"),"String",{startsWith:function(e){var t=a(this,e,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return o?o.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(15)("anchor",function(e){return function(t){return e(this,"a","name",t)}})},function(e,t,n){"use strict";n(15)("big",function(e){return function(){return e(this,"big","","")}})},function(e,t,n){"use strict";n(15)("blink",function(e){return function(){return e(this,"blink","","")}})},function(e,t,n){"use strict";n(15)("bold",function(e){return function(){return e(this,"b","","")}})},function(e,t,n){"use strict";n(15)("fixed",function(e){return function(){return e(this,"tt","","")}})},function(e,t,n){"use strict";n(15)("fontcolor",function(e){return function(t){return e(this,"font","color",t)}})},function(e,t,n){"use strict";n(15)("fontsize",function(e){return function(t){return e(this,"font","size",t)}})},function(e,t,n){"use strict";n(15)("italics",function(e){return function(){return e(this,"i","","")}})},function(e,t,n){"use strict";n(15)("link",function(e){return function(t){return e(this,"a","href",t)}})},function(e,t,n){"use strict";n(15)("small",function(e){return function(){return e(this,"small","","")}})},function(e,t,n){"use strict";n(15)("strike",function(e){return function(){return e(this,"strike","","")}})},function(e,t,n){"use strict";n(15)("sub",function(e){return function(){return e(this,"sub","","")}})},function(e,t,n){"use strict";n(15)("sup",function(e){return function(){return e(this,"sup","","")}})},function(e,t,n){var r=n(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(0),i=n(10),a=n(24);r(r.P+r.F*n(3)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(e){var t=i(this),n=a(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var r=n(0),i=n(231);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(e,t,n){"use strict";var r=n(3),i=Date.prototype.getTime,a=Date.prototype.toISOString,o=function(e){return e>9?e:"0"+e};e.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=a.call(new Date(-5e13-1))})||!r(function(){a.call(new Date(NaN))})?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+o(e.getUTCMonth()+1)+"-"+o(e.getUTCDate())+"T"+o(e.getUTCHours())+":"+o(e.getUTCMinutes())+":"+o(e.getUTCSeconds())+"."+(n>99?n:"0"+o(n))+"Z"}:a},function(e,t,n){var r=Date.prototype,i=r.toString,a=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(14)(r,"toString",function(){var e=a.call(this);return e===e?i.call(this):"Invalid Date"})},function(e,t,n){var r=n(5)("toPrimitive"),i=Date.prototype;r in i||n(13)(i,r,n(234))},function(e,t,n){"use strict";var r=n(1),i=n(24);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return i(r(this),"number"!=e)}},function(e,t,n){var r=n(0);r(r.S,"Array",{isArray:n(57)})},function(e,t,n){"use strict";var r=n(20),i=n(0),a=n(10),o=n(117),s=n(88),l=n(8),u=n(89),c=n(90);i(i.S+i.F*!n(59)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,i,p,f=a(e),d="function"==typeof this?this:Array,h=arguments.length,y=h>1?arguments[1]:void 0,v=void 0!==y,g=0,m=c(f);if(v&&(y=r(y,h>2?arguments[2]:void 0,2)),void 0==m||d==Array&&s(m))for(t=l(f.length),n=new d(t);t>g;g++)u(n,g,v?y(f[g],g):f[g]);else for(p=m.call(f),n=new d;!(i=p.next()).done;g++)u(n,g,v?o(p,y,[i.value,g],!0):i.value);return n.length=g,n}})},function(e,t,n){"use strict";var r=n(0),i=n(89);r(r.S+r.F*n(3)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(0),i=n(16),a=[].join;r(r.P+r.F*(n(50)!=Object||!n(22)(a)),"Array",{join:function(e){return a.call(i(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(0),i=n(76),a=n(21),o=n(37),s=n(8),l=[].slice;r(r.P+r.F*n(3)(function(){i&&l.call(i)}),"Array",{slice:function(e,t){var n=s(this.length),r=a(this);if(t=void 0===t?n:t,"Array"==r)return l.call(this,e,t);for(var i=o(e,n),u=o(t,n),c=s(u-i),p=Array(c),f=0;f<c;f++)p[f]="String"==r?this.charAt(i+f):this[i+f];return p}})},function(e,t,n){"use strict";var r=n(0),i=n(11),a=n(10),o=n(3),s=[].sort,l=[1,2,3];r(r.P+r.F*(o(function(){l.sort(void 0)})||!o(function(){l.sort(null)})||!n(22)(s)),"Array",{sort:function(e){return void 0===e?s.call(a(this)):s.call(a(this),i(e))}})},function(e,t,n){"use strict";var r=n(0),i=n(28)(0),a=n(22)([].forEach,!0);r(r.P+r.F*!a,"Array",{forEach:function(e){return i(this,e,arguments[1])}})},function(e,t,n){var r=n(4),i=n(57),a=n(5)("species");e.exports=function(e){var t;return i(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&null===(t=t[a])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){"use strict";var r=n(0),i=n(28)(1);r(r.P+r.F*!n(22)([].map,!0),"Array",{map:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),i=n(28)(2);r(r.P+r.F*!n(22)([].filter,!0),"Array",{filter:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),i=n(28)(3);r(r.P+r.F*!n(22)([].some,!0),"Array",{some:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),i=n(28)(4);r(r.P+r.F*!n(22)([].every,!0),"Array",{every:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),i=n(118);r(r.P+r.F*!n(22)([].reduce,!0),"Array",{reduce:function(e){return i(this,e,arguments.length,arguments[1],!1)}})},function(e,t,n){"use strict";var r=n(0),i=n(118);r(r.P+r.F*!n(22)([].reduceRight,!0),"Array",{reduceRight:function(e){return i(this,e,arguments.length,arguments[1],!0)}})},function(e,t,n){"use strict";var r=n(0),i=n(55)(!1),a=[].indexOf,o=!!a&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(o||!n(22)(a)),"Array",{indexOf:function(e){return o?a.apply(this,arguments)||0:i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),i=n(16),a=n(26),o=n(8),s=[].lastIndexOf,l=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(l||!n(22)(s)),"Array",{lastIndexOf:function(e){if(l)return s.apply(this,arguments)||0;var t=i(this),n=o(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,a(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(0);r(r.P,"Array",{copyWithin:n(119)}),n(32)("copyWithin")},function(e,t,n){var r=n(0);r(r.P,"Array",{fill:n(92)}),n(32)("fill")},function(e,t,n){"use strict";var r=n(0),i=n(28)(5),a=!0;"find"in[]&&Array(1).find(function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(32)("find")},function(e,t,n){"use strict";var r=n(0),i=n(28)(6),a="findIndex",o=!0;a in[]&&Array(1)[a](function(){o=!1}),r(r.P+r.F*o,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(32)(a)},function(e,t,n){n(40)("Array")},function(e,t,n){var r=n(2),i=n(79),a=n(7).f,o=n(39).f,s=n(58),l=n(60),u=r.RegExp,c=u,p=u.prototype,f=/a/g,d=/a/g,h=new u(f)!==f;if(n(6)&&(!h||n(3)(function(){return d[n(5)("match")]=!1,u(f)!=f||u(d)==d||"/a/i"!=u(f,"i")}))){u=function(e,t){var n=this instanceof u,r=s(e),a=void 0===t;return!n&&r&&e.constructor===u&&a?e:i(h?new c(r&&!a?e.source:e,t):c((r=e instanceof u)?e.source:e,r&&a?l.call(e):t),n?this:p,u)};for(var y=o(c),v=0;y.length>v;)!function(e){e in u||a(u,e,{configurable:!0,get:function(){return c[e]},set:function(t){c[e]=t}})}(y[v++]);p.constructor=u,u.prototype=p,n(14)(r,"RegExp",u)}n(40)("RegExp")},function(e,t,n){"use strict";n(121);var r=n(1),i=n(60),a=n(6),o=/./.toString,s=function(e){n(14)(RegExp.prototype,"toString",e,!0)};n(3)(function(){return"/a/b"!=o.call({source:"a",flags:"b"})})?s(function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!a&&e instanceof RegExp?i.call(e):void 0)}):"toString"!=o.name&&s(function(){return o.call(this)})},function(e,t,n){n(61)("match",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){n(61)("replace",2,function(e,t,n){return[function(r,i){"use strict";var a=e(this),o=void 0==r?void 0:r[t];return void 0!==o?o.call(r,a,i):n.call(String(a),r,i)},n]})},function(e,t,n){n(61)("search",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){n(61)("split",2,function(e,t,r){"use strict";var i=n(58),a=r,o=[].push,s="length";if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[s]||2!="ab".split(/(?:ab)*/)[s]||4!=".".split(/(.?)(.?)/)[s]||".".split(/()()/)[s]>1||"".split(/.?/)[s]){var l=void 0===/()??/.exec("")[1];r=function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!i(e))return a.call(n,e,t);var r,u,c,p,f,d=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),y=0,v=void 0===t?4294967295:t>>>0,g=new RegExp(e.source,h+"g");for(l||(r=new RegExp("^"+g.source+"$(?!\\s)",h));(u=g.exec(n))&&!((c=u.index+u[0][s])>y&&(d.push(n.slice(y,u.index)),!l&&u[s]>1&&u[0].replace(r,function(){for(f=1;f<arguments[s]-2;f++)void 0===arguments[f]&&(u[f]=void 0)}),u[s]>1&&u.index<n[s]&&o.apply(d,u.slice(1)),p=u[0][s],y=c,d[s]>=v));)g.lastIndex===u.index&&g.lastIndex++;return y===n[s]?!p&&g.test("")||d.push(""):d.push(n.slice(y)),d[s]>v?d.slice(0,v):d}}else"0".split(void 0,0)[s]&&(r=function(e,t){return void 0===e&&0===t?[]:a.call(this,e,t)});return[function(n,i){var a=e(this),o=void 0==n?void 0:n[t];return void 0!==o?o.call(n,a,i):r.call(String(a),n,i)},r]})},function(e,t,n){"use strict";var r,i,a,o,s=n(35),l=n(2),u=n(20),c=n(52),p=n(0),f=n(4),d=n(11),h=n(41),y=n(42),v=n(62),g=n(94).set,m=n(95)(),b=n(96),_=n(122),E=n(123),k=l.TypeError,T=l.process,A=l.Promise,w="process"==c(T),S=function(){},P=i=b.f,O=!!function(){try{var e=A.resolve(1),t=(e.constructor={})[n(5)("species")]=function(e){e(S,S)};return(w||"function"==typeof PromiseRejectionEvent)&&e.then(S)instanceof t}catch(e){}}(),C=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},x=function(e,t){if(!e._n){e._n=!0;var n=e._c;m(function(){for(var r=e._v,i=1==e._s,a=0;n.length>a;)!function(t){var n,a,o=i?t.ok:t.fail,s=t.resolve,l=t.reject,u=t.domain;try{o?(i||(2==e._h&&D(e),e._h=1),!0===o?n=r:(u&&u.enter(),n=o(r),u&&u.exit()),n===t.promise?l(k("Promise-chain cycle")):(a=C(n))?a.call(n,s,l):s(n)):l(r)}catch(e){l(e)}}(n[a++]);e._c=[],e._n=!1,t&&!e._h&&R(e)})}},R=function(e){g.call(l,function(){var t,n,r,i=e._v,a=I(e);if(a&&(t=_(function(){w?T.emit("unhandledRejection",i,e):(n=l.onunhandledrejection)?n({promise:e,reason:i}):(r=l.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=w||I(e)?2:1),e._a=void 0,a&&t.e)throw t.v})},I=function(e){if(1==e._h)return!1;for(var t,n=e._a||e._c,r=0;n.length>r;)if(t=n[r++],t.fail||!I(t.promise))return!1;return!0},D=function(e){g.call(l,function(){var t;w?T.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})})},M=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),x(t,!0))},L=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw k("Promise can't be resolved itself");(t=C(e))?m(function(){var r={_w:n,_d:!1};try{t.call(e,u(L,r,1),u(M,r,1))}catch(e){M.call(r,e)}}):(n._v=e,n._s=1,x(n,!1))}catch(e){M.call({_w:n,_d:!1},e)}}};O||(A=function(e){h(this,A,"Promise","_h"),d(e),r.call(this);try{e(u(L,this,1),u(M,this,1))}catch(e){M.call(this,e)}},r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(43)(A.prototype,{then:function(e,t){var n=P(v(this,A));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=w?T.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&x(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new r;this.promise=e,this.resolve=u(L,e,1),this.reject=u(M,e,1)},b.f=P=function(e){return e===A||e===o?new a(e):i(e)}),p(p.G+p.W+p.F*!O,{Promise:A}),n(45)(A,"Promise"),n(40)("Promise"),o=n(23).Promise,p(p.S+p.F*!O,"Promise",{reject:function(e){var t=P(this);return(0,t.reject)(e),t.promise}}),p(p.S+p.F*(s||!O),"Promise",{resolve:function(e){return E(s&&this===o?A:this,e)}}),p(p.S+p.F*!(O&&n(59)(function(e){A.all(e).catch(S)})),"Promise",{all:function(e){var t=this,n=P(t),r=n.resolve,i=n.reject,a=_(function(){var n=[],a=0,o=1;y(e,!1,function(e){var s=a++,l=!1;n.push(void 0),o++,t.resolve(e).then(function(e){l||(l=!0,n[s]=e,--o||r(n))},i)}),--o||r(n)});return a.e&&i(a.v),n.promise},race:function(e){var t=this,n=P(t),r=n.reject,i=_(function(){y(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(e,t,n){"use strict";var r=n(128),i=n(48);n(63)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(i(this,"WeakSet"),e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(0),i=n(64),a=n(97),o=n(1),s=n(37),l=n(8),u=n(4),c=n(2).ArrayBuffer,p=n(62),f=a.ArrayBuffer,d=a.DataView,h=i.ABV&&c.isView,y=f.prototype.slice,v=i.VIEW;r(r.G+r.W+r.F*(c!==f),{ArrayBuffer:f}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(e){return h&&h(e)||u(e)&&v in e}}),r(r.P+r.U+r.F*n(3)(function(){return!new f(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(e,t){if(void 0!==y&&void 0===t)return y.call(o(this),e);for(var n=o(this).byteLength,r=s(e,n),i=s(void 0===t?n:t,n),a=new(p(this,f))(l(i-r)),u=new d(this),c=new d(a),h=0;r<i;)c.setUint8(h++,u.getUint8(r++));return a}}),n(40)("ArrayBuffer")},function(e,t,n){var r=n(0);r(r.G+r.W+r.F*!n(64).ABV,{DataView:n(97).DataView})},function(e,t,n){n(29)("Int8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(29)("Uint8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(29)("Uint8",1,function(e){return function(t,n,r){return e(this,t,n,r)}},!0)},function(e,t,n){n(29)("Int16",2,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(29)("Uint16",2,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(29)("Int32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(29)("Uint32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(29)("Float32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(29)("Float64",8,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){var r=n(0),i=n(11),a=n(1),o=(n(2).Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!n(3)(function(){o(function(){})}),"Reflect",{apply:function(e,t,n){var r=i(e),l=a(n);return o?o(r,t,l):s.call(r,t,l)}})},function(e,t,n){var r=n(0),i=n(38),a=n(11),o=n(1),s=n(4),l=n(3),u=n(109),c=(n(2).Reflect||{}).construct,p=l(function(){function e(){}return!(c(function(){},[],e)instanceof e)}),f=!l(function(){c(function(){})});r(r.S+r.F*(p||f),"Reflect",{construct:function(e,t){a(e),o(t);var n=arguments.length<3?e:a(arguments[2]);if(f&&!p)return c(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(u.apply(e,r))}var l=n.prototype,d=i(s(l)?l:Object.prototype),h=Function.apply.call(e,d,t);return s(h)?h:d}})},function(e,t,n){var r=n(7),i=n(0),a=n(1),o=n(24);i(i.S+i.F*n(3)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(e,t,n){a(e),t=o(t,!0),a(n);try{return r.f(e,t,n),!0}catch(e){return!1}}})},function(e,t,n){var r=n(0),i=n(17).f,a=n(1);r(r.S,"Reflect",{deleteProperty:function(e,t){var n=i(a(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){"use strict";var r=n(0),i=n(1),a=function(e){this._t=i(e),this._i=0;var t,n=this._k=[];for(t in e)n.push(t)};n(85)(a,"Object",function(){var e,t=this,n=t._k;do{if(t._i>=n.length)return{value:void 0,done:!0}}while(!((e=n[t._i++])in t._t));return{value:e,done:!1}}),r(r.S,"Reflect",{enumerate:function(e){return new a(e)}})},function(e,t,n){function r(e,t){var n,s,c=arguments.length<3?e:arguments[2];return u(e)===c?e[t]:(n=i.f(e,t))?o(n,"value")?n.value:void 0!==n.get?n.get.call(c):void 0:l(s=a(e))?r(s,t,c):void 0}var i=n(17),a=n(18),o=n(12),s=n(0),l=n(4),u=n(1);s(s.S,"Reflect",{get:r})},function(e,t,n){var r=n(17),i=n(0),a=n(1);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(a(e),t)}})},function(e,t,n){var r=n(0),i=n(18),a=n(1);r(r.S,"Reflect",{getPrototypeOf:function(e){return i(a(e))}})},function(e,t,n){var r=n(0);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(0),i=n(1),a=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return i(e),!a||a(e)}})},function(e,t,n){var r=n(0);r(r.S,"Reflect",{ownKeys:n(130)})},function(e,t,n){var r=n(0),i=n(1),a=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){i(e);try{return a&&a(e),!0}catch(e){return!1}}})},function(e,t,n){function r(e,t,n){var l,f,d=arguments.length<4?e:arguments[3],h=a.f(c(e),t);if(!h){if(p(f=o(e)))return r(f,t,n,d);h=u(0)}return s(h,"value")?!(!1===h.writable||!p(d))&&(l=a.f(d,t)||u(0),l.value=n,i.f(d,t,l),!0):void 0!==h.set&&(h.set.call(d,n),!0)}var i=n(7),a=n(17),o=n(18),s=n(12),l=n(0),u=n(33),c=n(1),p=n(4);l(l.S,"Reflect",{set:r})},function(e,t,n){var r=n(0),i=n(77);i&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){"use strict";var r=n(0),i=n(55)(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(32)("includes")},function(e,t,n){"use strict";var r=n(0),i=n(131),a=n(10),o=n(8),s=n(11),l=n(91);r(r.P,"Array",{flatMap:function(e){var t,n,r=a(this);return s(e),t=o(r.length),n=l(r,0),i(n,r,r,t,0,1,e,arguments[1]),n}}),n(32)("flatMap")},function(e,t,n){"use strict";var r=n(0),i=n(131),a=n(10),o=n(8),s=n(26),l=n(91);r(r.P,"Array",{flatten:function(){var e=arguments[0],t=a(this),n=o(t.length),r=l(t,0);return i(r,t,t,n,0,void 0===e?1:s(e)),r}}),n(32)("flatten")},function(e,t,n){"use strict";var r=n(0),i=n(83)(!0);r(r.P,"String",{at:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(0),i=n(132);r(r.P,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){"use strict";var r=n(0),i=n(132);r(r.P,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){"use strict";n(46)("trimLeft",function(e){return function(){return e(this,1)}},"trimStart")},function(e,t,n){"use strict";n(46)("trimRight",function(e){return function(){return e(this,2)}},"trimEnd")},function(e,t,n){"use strict";var r=n(0),i=n(25),a=n(8),o=n(58),s=n(60),l=RegExp.prototype,u=function(e,t){this._r=e,this._s=t};n(85)(u,"RegExp String",function(){var e=this._r.exec(this._s);return{value:e,done:null===e}}),r(r.P,"String",{matchAll:function(e){if(i(this),!o(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in l?String(e.flags):s.call(e),r=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=a(e.lastIndex),new u(r,t)}})},function(e,t,n){n(73)("asyncIterator")},function(e,t,n){n(73)("observable")},function(e,t,n){var r=n(0),i=n(130),a=n(16),o=n(17),s=n(89);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),l=o.f,u=i(r),c={},p=0;u.length>p;)void 0!==(n=l(r,t=u[p++]))&&s(c,t,n);return c}})},function(e,t,n){var r=n(0),i=n(133)(!1);r(r.S,"Object",{values:function(e){return i(e)}})},function(e,t,n){var r=n(0),i=n(133)(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},function(e,t,n){"use strict";var r=n(0),i=n(10),a=n(11),o=n(7);n(6)&&r(r.P+n(65),"Object",{__defineGetter__:function(e,t){o.f(i(this),e,{get:a(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(0),i=n(10),a=n(11),o=n(7);n(6)&&r(r.P+n(65),"Object",{__defineSetter__:function(e,t){o.f(i(this),e,{set:a(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(0),i=n(10),a=n(24),o=n(18),s=n(17).f;n(6)&&r(r.P+n(65),"Object",{__lookupGetter__:function(e){var t,n=i(this),r=a(e,!0);do{if(t=s(n,r))return t.get}while(n=o(n))}})},function(e,t,n){"use strict";var r=n(0),i=n(10),a=n(24),o=n(18),s=n(17).f;n(6)&&r(r.P+n(65),"Object",{__lookupSetter__:function(e){var t,n=i(this),r=a(e,!0);do{if(t=s(n,r))return t.set}while(n=o(n))}})},function(e,t,n){var r=n(0);r(r.P+r.R,"Map",{toJSON:n(134)("Map")})},function(e,t,n){var r=n(0);r(r.P+r.R,"Set",{toJSON:n(134)("Set")})},function(e,t,n){n(66)("Map")},function(e,t,n){n(66)("Set")},function(e,t,n){n(66)("WeakMap")},function(e,t,n){n(66)("WeakSet")},function(e,t,n){n(67)("Map")},function(e,t,n){n(67)("Set")},function(e,t,n){n(67)("WeakMap")},function(e,t,n){n(67)("WeakSet")},function(e,t,n){var r=n(0);r(r.G,{global:n(2)})},function(e,t,n){var r=n(0);r(r.S,"System",{global:n(2)})},function(e,t,n){var r=n(0),i=n(21);r(r.S,"Error",{isError:function(e){return"Error"===i(e)}})},function(e,t,n){var r=n(0);r(r.S,"Math",{clamp:function(e,t,n){return Math.min(n,Math.max(t,e))}})},function(e,t,n){var r=n(0);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(e,t,n){var r=n(0),i=180/Math.PI;r(r.S,"Math",{degrees:function(e){return e*i}})},function(e,t,n){var r=n(0),i=n(136),a=n(116);r(r.S,"Math",{fscale:function(e,t,n,r,o){return a(i(e,t,n,r,o))}})},function(e,t,n){var r=n(0);r(r.S,"Math",{iaddh:function(e,t,n,r){var i=e>>>0,a=t>>>0,o=n>>>0;return a+(r>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)|0}})},function(e,t,n){var r=n(0);r(r.S,"Math",{isubh:function(e,t,n,r){var i=e>>>0,a=t>>>0,o=n>>>0;return a-(r>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)|0}})},function(e,t,n){var r=n(0);r(r.S,"Math",{imulh:function(e,t){var n=+e,r=+t,i=65535&n,a=65535&r,o=n>>16,s=r>>16,l=(o*a>>>0)+(i*a>>>16);return o*s+(l>>16)+((i*s>>>0)+(65535&l)>>16)}})},function(e,t,n){var r=n(0);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(e,t,n){var r=n(0),i=Math.PI/180;r(r.S,"Math",{radians:function(e){return e*i}})},function(e,t,n){var r=n(0);r(r.S,"Math",{scale:n(136)})},function(e,t,n){var r=n(0);r(r.S,"Math",{umulh:function(e,t){var n=+e,r=+t,i=65535&n,a=65535&r,o=n>>>16,s=r>>>16,l=(o*a>>>0)+(i*a>>>16);return o*s+(l>>>16)+((i*s>>>0)+(65535&l)>>>16)}})},function(e,t,n){var r=n(0);r(r.S,"Math",{signbit:function(e){return(e=+e)!=e?e:0==e?1/e==1/0:e>0}})},function(e,t,n){"use strict";var r=n(0),i=n(23),a=n(2),o=n(62),s=n(123);r(r.P+r.R,"Promise",{finally:function(e){var t=o(this,i.Promise||a.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then(function(){return n})}:e,n?function(n){return s(t,e()).then(function(){throw n})}:e)}})},function(e,t,n){"use strict";var r=n(0),i=n(96),a=n(122);r(r.S,"Promise",{try:function(e){var t=i.f(this),n=a(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){var r=n(30),i=n(1),a=r.key,o=r.set;r.exp({defineMetadata:function(e,t,n,r){o(e,t,i(n),a(r))}})},function(e,t,n){var r=n(30),i=n(1),a=r.key,o=r.map,s=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:a(arguments[2]),r=o(i(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var l=s.get(t);return l.delete(n),!!l.size||s.delete(t)}})},function(e,t,n){var r=n(30),i=n(1),a=n(18),o=r.has,s=r.get,l=r.key,u=function(e,t,n){if(o(e,t,n))return s(e,t,n);var r=a(t);return null!==r?u(e,r,n):void 0};r.exp({getMetadata:function(e,t){return u(e,i(t),arguments.length<3?void 0:l(arguments[2]))}})},function(e,t,n){var r=n(126),i=n(135),a=n(30),o=n(1),s=n(18),l=a.keys,u=a.key,c=function(e,t){var n=l(e,t),a=s(e);if(null===a)return n;var o=c(a,t);return o.length?n.length?i(new r(n.concat(o))):o:n};a.exp({getMetadataKeys:function(e){return c(o(e),arguments.length<2?void 0:u(arguments[1]))}})},function(e,t,n){var r=n(30),i=n(1),a=r.get,o=r.key;r.exp({getOwnMetadata:function(e,t){return a(e,i(t),arguments.length<3?void 0:o(arguments[2]))}})},function(e,t,n){var r=n(30),i=n(1),a=r.keys,o=r.key;r.exp({getOwnMetadataKeys:function(e){return a(i(e),arguments.length<2?void 0:o(arguments[1]))}})},function(e,t,n){var r=n(30),i=n(1),a=n(18),o=r.has,s=r.key,l=function(e,t,n){if(o(e,t,n))return!0;var r=a(t);return null!==r&&l(e,r,n)};r.exp({hasMetadata:function(e,t){return l(e,i(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(30),i=n(1),a=r.has,o=r.key;r.exp({hasOwnMetadata:function(e,t){return a(e,i(t),arguments.length<3?void 0:o(arguments[2]))}})},function(e,t,n){var r=n(30),i=n(1),a=n(11),o=r.key,s=r.set;r.exp({metadata:function(e,t){return function(n,r){s(e,t,(void 0!==r?i:a)(n),o(r))}}})},function(e,t,n){var r=n(0),i=n(95)(),a=n(2).process,o="process"==n(21)(a);r(r.G,{asap:function(e){var t=o&&a.domain;i(t?t.bind(e):e)}})},function(e,t,n){"use strict";var r=n(0),i=n(2),a=n(23),o=n(95)(),s=n(5)("observable"),l=n(11),u=n(1),c=n(41),p=n(43),f=n(13),d=n(42),h=d.RETURN,y=function(e){return null==e?void 0:l(e)},v=function(e){var t=e._c;t&&(e._c=void 0,t())},g=function(e){return void 0===e._o},m=function(e){g(e)||(e._o=void 0,v(e))},b=function(e,t){u(e),this._c=void 0,this._o=e,e=new _(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:l(n),this._c=n)}catch(t){return void e.error(t)}g(this)&&v(this)};b.prototype=p({},{unsubscribe:function(){m(this)}});var _=function(e){this._s=e};_.prototype=p({},{next:function(e){var t=this._s;if(!g(t)){var n=t._o;try{var r=y(n.next);if(r)return r.call(n,e)}catch(e){try{m(t)}finally{throw e}}}},error:function(e){var t=this._s;if(g(t))throw e;var n=t._o;t._o=void 0;try{var r=y(n.error);if(!r)throw e;e=r.call(n,e)}catch(e){try{v(t)}finally{throw e}}return v(t),e},complete:function(e){var t=this._s;if(!g(t)){var n=t._o;t._o=void 0;try{var r=y(n.complete);e=r?r.call(n,e):void 0}catch(e){try{v(t)}finally{throw e}}return v(t),e}}});var E=function(e){c(this,E,"Observable","_f")._f=l(e)};p(E.prototype,{subscribe:function(e){return new b(e,this._f)},forEach:function(e){var t=this;return new(a.Promise||i.Promise)(function(n,r){l(e);var i=t.subscribe({next:function(t){try{return e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:n})})}}),p(E,{from:function(e){var t="function"==typeof this?this:E,n=y(u(e)[s]);if(n){var r=u(n.call(e));return r.constructor===t?r:new t(function(e){return r.subscribe(e)})}return new t(function(t){var n=!1;return o(function(){if(!n){try{if(d(e,!1,function(e){if(t.next(e),n)return h})===h)return}catch(e){if(n)throw e;return void t.error(e)}t.complete()}}),function(){n=!0}})},of:function(){for(var e=0,t=arguments.length,n=Array(t);e<t;)n[e]=arguments[e++];return new("function"==typeof this?this:E)(function(e){var t=!1;return o(function(){if(!t){for(var r=0;r<n.length;++r)if(e.next(n[r]),t)return;e.complete()}}),function(){t=!0}})}}),f(E.prototype,s,function(){return this}),r(r.G,{Observable:E}),n(40)("Observable")},function(e,t,n){var r=n(2),i=n(0),a=r.navigator,o=[].slice,s=!!a&&/MSIE .\./.test(a.userAgent),l=function(e){return function(t,n){var r=arguments.length>2,i=!!r&&o.call(arguments,2);return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,i)}:t,n)}};i(i.G+i.B+i.F*s,{setTimeout:l(r.setTimeout),setInterval:l(r.setInterval)})},function(e,t,n){var r=n(0),i=n(94);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){for(var r=n(93),i=n(36),a=n(14),o=n(2),s=n(13),l=n(47),u=n(5),c=u("iterator"),p=u("toStringTag"),f=l.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=i(d),y=0;y<h.length;y++){var v,g=h[y],m=d[g],b=o[g],_=b&&b.prototype;if(_&&(_[c]||s(_,c,f),_[p]||s(_,p,g),l[g]=f,m))for(v in r)_[v]||a(_,v,r[v],!0)}},function(e,t,n){(function(t){!function(t){"use strict";function n(e,t,n,r){var a=t&&t.prototype instanceof i?t:i,o=Object.create(a.prototype),s=new d(r||[]);return o._invoke=u(e,n,s),o}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function i(){}function a(){}function o(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function l(e){function n(t,i,a,o){var s=r(e[t],e,i);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==typeof u&&m.call(u,"__await")?Promise.resolve(u.__await).then(function(e){n("next",e,a,o)},function(e){n("throw",e,a,o)}):Promise.resolve(u).then(function(e){l.value=e,a(l)},o)}o(s.arg)}function i(e,t){function r(){return new Promise(function(r,i){n(e,t,r,i)})}return a=a?a.then(r,r):r()}"object"==typeof t.process&&t.process.domain&&(n=t.process.domain.bind(n));var a;this._invoke=i}function u(e,t,n){var i=w;return function(a,o){if(i===P)throw new Error("Generator is already running");if(i===O){if("throw"===a)throw o;return y()}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var l=c(s,n);if(l){if(l===C)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===w)throw i=O,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=P;var u=r(e,t,n);if("normal"===u.type){if(i=n.done?O:S,u.arg===C)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=O,n.method="throw",n.arg=u.arg)}}}function c(e,t){var n=e.iterator[t.method];if(n===v){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=v,c(e,t),"throw"===t.method))return C;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return C}var i=r(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,C;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=v),t.delegate=null,C):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,C)}function p(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 f(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function d(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function h(e){if(e){var t=e[_];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(m.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=v,t.done=!0,t};return r.next=r}}return{next:y}}function y(){return{value:v,done:!0}}var v,g=Object.prototype,m=g.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},_=b.iterator||"@@iterator",E=b.asyncIterator||"@@asyncIterator",k=b.toStringTag||"@@toStringTag",T="object"==typeof e,A=t.regeneratorRuntime;if(A)return void(T&&(e.exports=A));A=t.regeneratorRuntime=T?e.exports:{},A.wrap=n;var w="suspendedStart",S="suspendedYield",P="executing",O="completed",C={},x={};x[_]=function(){return this};var R=Object.getPrototypeOf,I=R&&R(R(h([])));I&&I!==g&&m.call(I,_)&&(x=I);var D=o.prototype=i.prototype=Object.create(x);a.prototype=D.constructor=o,o.constructor=a,o[k]=a.displayName="GeneratorFunction",A.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},A.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,o):(e.__proto__=o,k in e||(e[k]="GeneratorFunction")),e.prototype=Object.create(D),e},A.awrap=function(e){return{__await:e}},s(l.prototype),l.prototype[E]=function(){return this},A.AsyncIterator=l,A.async=function(e,t,r,i){var a=new l(n(e,t,r,i));return A.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},s(D),D[k]="Generator",D[_]=function(){return this},D.toString=function(){return"[object Generator]"},A.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},A.values=h,d.prototype={constructor:d,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=v,this.done=!1,this.delegate=null,this.method="next",this.arg=v,this.tryEntries.forEach(f),!e)for(var t in this)"t"===t.charAt(0)&&m.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=v)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=v),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=m.call(i,"catchLoc"),s=m.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&m.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,C):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),C},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),f(n),C}},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 i=r.arg;f(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:h(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=v),C}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)}).call(t,n(49))},function(e,t,n){n(350),e.exports=n(23).RegExp.escape},function(e,t,n){var r=n(0),i=n(351)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(e){return i(e)}})},function(e,t){e.exports=function(e,t){var n=t===Object(t)?function(e){return t[e]}:t;return function(t){return String(t).replace(e,n)}}},function(e,t,n){"use strict";n(353),n(354),n(355)},function(e,t,n){"use strict";(function(e){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(71),s=r(o),l=n(19),u=r(l),c=function(){function t(){i(this,t)}return a(t,null,[{key:"install",value:function(){if(e.performance&&e.performance.now)return void t._logger.debug("No need to install polyfill");t._logger.debug("Installing polyfill");var n=Date.now();e.performance||(e.performance={}),e.performance.now=function(){return Date.now()-n}}}]),t}();c.id="performance.now",c._logger=(0,u.default)("PerformanceNowPolyfill"),t.default=c,s.default.register(c)}).call(t,n(49))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(71),s=r(o),l=n(19),u=r(l),c=function(){function e(){i(this,e)}return a(e,null,[{key:"install",value:function(){[Element.prototype,Document.prototype,DocumentFragment.prototype].forEach(function(t){if(t.hasOwnProperty("prepend"))return void e._logger.debug("No need to install polyfill on item",t);e._logger.debug("Installing polyfill on item",t),Object.defineProperty(t,"prepend",{configurable:!0,enumerable:!0,writable:!0,value:function(){var e=Array.prototype.slice.call(arguments),t=document.createDocumentFragment();e.forEach(function(e){var n=e instanceof Node;t.appendChild(n?e:document.createTextNode(String(e)))}),this.insertBefore(t,this.firstChild)}})})}}]),e}();c.id="prepend",c._logger=(0,u.default)("PrependPolyfill"),t.default=c,s.default.register(c)},function(e,t,n){(function(e,t){!function(){var n=void 0!==e&&"[object process]"==={}.toString.call(e)||"undefined"!=typeof navigator&&"ReactNative"===navigator.product?t:self;n.Proxy||(n.Proxy=function(){function e(e){return!!e&&("object"==typeof e||"function"==typeof e)}var t=null,n=function(n,r){function i(){}if(!e(n)||!e(r))throw new TypeError("Cannot create proxy with a non-object as target or handler");t=function(){i=function(e){throw new TypeError("Cannot perform '"+e+"' on a proxy that has been revoked")}};var a=r;r={get:null,set:null,apply:null,construct:null};for(var o in a){if(!(o in r))throw new TypeError("Proxy polyfill does not support trap '"+o+"'");r[o]=a[o]}"function"==typeof a&&(r.apply=a.apply.bind(a));var s=this,l=!1,u=!1;"function"==typeof n?(s=function(){var e=this&&this.constructor===s,t=Array.prototype.slice.call(arguments);return i(e?"construct":"apply"),e&&r.construct?r.construct.call(this,n,t):!e&&r.apply?r.apply(n,this,t):e?(t.unshift(n),new(n.bind.apply(n,t))):n.apply(this,t)},l=!0):n instanceof Array&&(s=[],u=!0);var c=r.get?function(e){return i("get"),r.get(this,e,s)}:function(e){return i("get"),this[e]},p=r.set?function(e,t){i("set"),r.set(this,e,t,s)}:function(e,t){i("set"),this[e]=t},f={};if(Object.getOwnPropertyNames(n).forEach(function(e){if(!((l||u)&&e in s)){var t={enumerable:!!Object.getOwnPropertyDescriptor(n,e).enumerable,get:c.bind(n,e),set:p.bind(n,e)};Object.defineProperty(s,e,t),f[e]=!0}}),a=!0,Object.setPrototypeOf?Object.setPrototypeOf(s,Object.getPrototypeOf(n)):s.__proto__?s.__proto__=n.__proto__:a=!1,r.get||!a)for(var d in n)f[d]||Object.defineProperty(s,d,{get:c.bind(n,d)});return Object.seal(n),Object.seal(s),s};return n.revocable=function(e,r){return{proxy:new n(e,r),revoke:t}},n}(),n.Proxy.revocable=n.Proxy.revocable)}()}).call(t,n(356),n(49))},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function a(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function o(){y&&d&&(y=!1,d.length?h=d.concat(h):v=-1,h.length&&s())}function s(){if(!y){var e=i(o);y=!0;for(var t=h.length;t;){for(d=h,h=[];++v<t;)d&&d[v].run();v=-1,t=h.length}d=null,y=!1,a(e)}}function l(e,t){this.fun=e,this.array=t}function u(){}var c,p,f=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(e){c=n}try{p="function"==typeof clearTimeout?clearTimeout:r}catch(e){p=r}}();var d,h=[],y=!1,v=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new l(e,t)),1!==h.length||y||i(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.prependListener=u,f.prependOnceListener=u,f.listeners=function(e){return[]},f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,t,n){!function(t,r){e.exports=r(n(9),n(358))}(0,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),o(t,[{key:"loadInternal",value:function(){var e=void 0,t=this.context;e=this.loader=new XMLHttpRequest;var n=this.stats;n.tfirst=0,n.loaded=0;var r=this.xhrSetup;try{if(r)try{r(e,t.url,t)}catch(n){e.open("GET",t.url,!0),r(e,t.url,t)}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()}}]),t}(l.default.DefaultConfig.loader);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NAME=t.VERSION=void 0;var r=n(0),i=n(4),a=function(e){return e&&e.__esModule?e:{default:e}}(i);t.default=a.default,t.VERSION="1.17.0",t.NAME="@playkit-js/playkit-js-hls",a.default.isSupported()&&(0,r.registerMediaSourceAdapter)(a.default)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in i)return i.value;var o=i.get;return void 0!==o?o.call(r):void 0},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(5),d=r(f),h=n(6),y=n(0),v=n(7),g=r(v),m=n(2),b=r(m),_=function(e){function t(e,n,r){a(this,t),t._logger.debug("Creating adapter. Hls version: "+p.default.version);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r));return i._triedReloadWithRedirect=!1,i._startTime=0,i._lastTimeDetach=0,i._requestFilterError=!1,i._config=y.Utils.Object.mergeDeep({},d.default,i._config),i._init(),i}return s(t,e),u(t,null,[{key:"createAdapter",value:function(e,t,n){var r=y.Utils.Object.copyDeep(d.default);if(y.Utils.Object.hasPropertyPath(n,"sources.options")){var i=n.sources.options;r.forceRedirectExternalStreams=i.forceRedirectExternalStreams,r.redirectExternalStreamsHandler=i.redirectExternalStreamsHandler,r.redirectExternalStreamsTimeout=i.redirectExternalStreamsTimeout,g.default.redirectExternalStreamsHandler=r.redirectExternalStreamsHandler,g.default.redirectExternalStreamsTimeout=r.redirectExternalStreamsTimeout}if(y.Utils.Object.hasPropertyPath(n,"playback.startTime")&&y.Utils.Object.getPropertyPath(n,"playback.startTime")>-1&&(r.hlsConfig.startPosition=n.playback.startTime),y.Utils.Object.hasPropertyPath(n,"playback.useNativeTextTrack")&&(r.subtitleDisplay=y.Utils.Object.getPropertyPath(n,"playback.useNativeTextTrack")),y.Utils.Object.hasPropertyPath(n,"abr.fpsDroppedFramesInterval")&&(r.hlsConfig.fpsDroppedFramesInterval=n.abr.fpsDroppedFramesInterval),y.Utils.Object.hasPropertyPath(n,"abr.fpsDroppedMonitoringThreshold")&&(r.hlsConfig.fpsDroppedMonitoringThreshold=n.abr.fpsDroppedMonitoringThreshold),y.Utils.Object.hasPropertyPath(n,"abr.capLevelOnFPSDrop")&&(r.hlsConfig.capLevelOnFPSDrop=n.abr.capLevelOnFPSDrop),r.hlsConfig.enableCEA708Captions=n.playback.enableCEA708Captions,r.hlsConfig.captionsTextTrack1Label=n.playback.captionsTextTrack1Label,r.hlsConfig.captionsTextTrack1LanguageCode=n.playback.captionsTextTrack1LanguageCode,r.hlsConfig.captionsTextTrack2Label=n.playback.captionsTextTrack2Label,r.hlsConfig.captionsTextTrack2LanguageCode=n.playback.captionsTextTrack2LanguageCode,y.Utils.Object.hasPropertyPath(n,"abr")){var a=n.abr;"boolean"==typeof a.enabled&&(r.abr.enabled=a.enabled),"boolean"==typeof a.capLevelToPlayerSize&&(r.hlsConfig.capLevelToPlayerSize=a.capLevelToPlayerSize),a.defaultBandwidthEstimate&&(r.hlsConfig.abrEwmaDefaultEstimate=a.defaultBandwidthEstimate),a.restrictions&&(a.restrictions.minBitrate>0&&(r.hlsConfig.minAutoBitrate=a.restrictions.minBitrate),a.restrictions.maxBitrate<1/0&&(r.hlsConfig.capLevelToPlayerSize=!1,r.abr.restrictions=a.restrictions))}return y.Utils.Object.hasPropertyPath(n,"playback.options.html5.hls")&&y.Utils.Object.mergeDeep(r.hlsConfig,n.playback.options.html5.hls),r.network=n.network,new this(e,t,r)}},{key:"canPlayType",value:function(e){var n="string"==typeof e&&t._hlsMimeTypes.includes(e.toLowerCase());return t._logger.debug("canPlayType result for mimeType:"+e+" is "+n.toString()),n}},{key:"canPlayDrm",value:function(){return t._logger.warn("canPlayDrm result is false"),!1}},{key:"isSupported",value:function(){var e=p.default.isSupported();return t._logger.debug("isSupported:"+e),e}}]),u(t,[{key:"_init",value:function(){this._config.forceRedirectExternalStreams&&(this._config.hlsConfig.pLoader=g.default),this._maybeSetFilters(),this._hls=new p.default(this._config.hlsConfig),this._capabilities.fpsControl=!0,this._hls.subtitleDisplay=this._config.subtitleDisplay,this._addBindings()}},{key:"_maybeSetFilters",value:function(){var e=this;"function"==typeof y.Utils.Object.getPropertyPath(this._config,"network.requestFilter")&&(t._logger.debug("Register request filter"),y.Utils.Object.mergeDeep(this._config.hlsConfig,{loader:b.default,xhrSetup:function(t,n,r){try{var a={url:n,body:null,headers:{}};"manifest"===r.type&&e._config.network.requestFilter(y.RequestType.MANIFEST,a),r.frag&&"subtitle"!==r.frag.type&&e._config.network.requestFilter(y.RequestType.SEGMENT,a),r.url=a.url,t.open("GET",a.url,!0),Object.entries(a.headers).forEach(function(e){t.setRequestHeader.apply(t,i(e))})}catch(t){throw e._requestFilterError=!0,t}}}))}},{key:"_addBindings",value:function(){var e=this;this._hls.on(p.default.Events.ERROR,function(t,n){return e._onError(n)}),this._hls.on(p.default.Events.MANIFEST_LOADED,function(t,n){return e._onManifestLoaded(n)}),this._hls.on(p.default.Events.LEVEL_SWITCHED,this._onLevelSwitched.bind(this)),this._hls.on(p.default.Events.AUDIO_TRACK_SWITCHED,this._onAudioTrackSwitched.bind(this)),this._hls.on(p.default.Events.FPS_DROP,function(t,n){return e._onFpsDrop(n)}),this._hls.on(p.default.Events.FRAG_PARSING_METADATA,function(t,n){return e._onFragParsingMetadata(n)}),this._hls.on(p.default.Events.FRAG_LOADED,function(t,n){return e._onFragLoaded(n)}),this._mediaAttachedPromise=new Promise(function(t){return e._onMediaAttached=t}),this._hls.on(p.default.Events.MEDIA_ATTACHED,function(){return e._onMediaAttached()}),this._onRecoveredCallback=function(){return e._onRecovered()},this._onAddTrack=this._onAddTrack.bind(this),this._eventManager.listen(this._videoElement,"addtrack",this._onAddTrack),this._videoElement.textTracks.onaddtrack=this._onAddTrack}},{key:"_onFpsDrop",value:function(e){this._trigger(y.EventType.FPS_DROP,e)}},{key:"_onFragParsingMetadata",value:function(e){this._trigger("hlsFragParsingMetadata",e)}},{key:"_onAddTrack",value:function(e){if(!this._hls.subtitleTracks.length){var n=this._parseCEATextTrack(e.track);n&&(t._logger.debug("A CEA 608/708 caption has found",n),this._playerTracks.push(n),this._trigger(y.EventType.TRACKS_CHANGED,{tracks:this._playerTracks}))}}},{key:"attachMediaSource",value:function(){var e=this;if(!this._hls){this._videoElement&&this._videoElement.src&&(y.Utils.Dom.setAttribute(this._videoElement,"src",""),y.Utils.Dom.removeAttribute(this._videoElement,"src")),this._init();var t=function(){parseInt(e._lastTimeDetach)===parseInt(e.duration)?e.currentTime=0:e.currentTime=e._lastTimeDetach,e._lastTimeDetach=NaN};isNaN(this._lastTimeDetach)||this._eventManager.listenOnce(this._videoElement,y.EventType.LOADED_DATA,function(){return t()})}}},{key:"detachMediaSource",value:function(){this._hls&&(this._lastTimeDetach=this.currentTime,this._reset(),this._loadPromise=null,this._hls=null)}},{key:"handleMediaError",value:function(e){return e.code===e.MEDIA_ERR_DECODE&&(t._logger.debug("The video playback was aborted due to a corruption problem or because the video used features your browser did not support.",e.message),this._handleMediaError())}},{key:"load",value:function(e){var t=this;return this._loadPromise||(this._startTime=e,this._loadPromise=new Promise(function(e){t._resolveLoad=e,t._loadInternal()})),this._loadPromise}},{key:"_loadInternal",value:function(){this._hls&&this._sourceObj&&this._sourceObj.url&&(this._hls.loadSource(this._sourceObj.url),this._hls.attachMedia(this._videoElement),this._trigger(y.EventType.ABR_MODE_CHANGED,{mode:this.isAdaptiveBitrateEnabled()?"auto":"manual"}))}},{key:"_reloadWithDirectManifest",value:function(){this._triedReloadWithRedirect=!0,this._reset(),this._config.hlsConfig.pLoader=g.default,this._hls=new p.default(this._config.hlsConfig),this._addBindings(),this._loadInternal()}},{key:"destroy",value:function(){var e=this;return l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this).then(function(){t._logger.debug("destroy"),e._loadPromise=null,e._playerTracks=[],e._reset()})}},{key:"_reset",value:function(){this._removeBindings(),this._requestFilterError=!1,this._hls.detachMedia(),this._hls.destroy()}},{key:"_parseTracks",value:function(){var e=this._parseAudioTracks(this._hls.audioTracks||[]),t=this._parseVideoTracks(this._hls.levels||[]),n=this._parseTextTracks(this._hls.subtitleTracks||[]);return e.concat(t).concat(n)}},{key:"_parseAudioTracks",value:function(e){for(var t=[],n=0;n<e.length;n++){var r={id:e[n].id,active:this._hls.audioTrack===e[n].id,label:e[n].name,language:e[n].lang,index:n};t.push(new y.AudioTrack(r))}return t}},{key:"_parseVideoTracks",value:function(e){for(var t=[],n=0;n<e.length;n++){var r={active:this._hls.startLevel===n,bandwidth:e[n].bitrate,width:e[n].width,height:e[n].height,language:"",index:n};t.push(new y.VideoTrack(r))}return t}},{key:"_parseTextTracks",value:function(e){for(var t=[],n=0;n<e.length;n++){var r={id:e[n].id,active:e[n].default,label:e[n].name,kind:e[n].type.toLowerCase(),language:e[n].lang,index:n};t.push(new y.TextTrack(r))}return t}},{key:"_parseCEATextTrack",value:function(e){var t=null;if("captions"===e.kind){var n={id:e.id,active:"showing"===e.mode,label:e.label,kind:e.kind,language:e.language,index:this._playerTracks.filter(function(e){return e instanceof y.TextTrack}).length};t=new y.TextTrack(n)}return t}},{key:"selectAudioTrack",value:function(e){e instanceof y.AudioTrack&&!e.active&&this._hls.audioTracks&&(this._hls.audioTrack=e.id)}},{key:"selectVideoTrack",value:function(e){e instanceof y.VideoTrack&&(!e.active||this.isAdaptiveBitrateEnabled())&&this._hls.levels&&(this.isAdaptiveBitrateEnabled()&&this._trigger(y.EventType.ABR_MODE_CHANGED,{mode:"manual"}),this._hls.currentLevel=e.index)}},{key:"selectTextTrack",value:function(e){e instanceof y.TextTrack&&!e.active&&this._hls&&(this._hls.subtitleTracks.length?(this._hls.subtitleTrack=e.id,this._notifyTrackChanged(e)):this._selectNativeTextTrack(e))}},{key:"_selectNativeTextTrack",value:function(e){var t=Array.from(this._videoElement.textTracks).find(function(t){return t.language===e.language});t&&(this._disableNativeTextTracks(),t.mode=this._config.subtitleDisplay?"showing":"hidden",this._notifyTrackChanged(e))}},{key:"_notifyTrackChanged",value:function(e){t._logger.debug("Text track changed",e),this._onTrackChanged(e)}},{key:"_disableNativeTextTracks",value:function(){Array.from(this._videoElement.textTracks).forEach(function(e){e.mode="disabled"})}},{key:"hideTextTrack",value:function(){this._hls&&(this._hls.subtitleTracks.length?this._hls.subtitleTrack=-1:this._disableNativeTextTracks())}},{key:"enableAdaptiveBitrate",value:function(){this.isAdaptiveBitrateEnabled()||(this._trigger(y.EventType.ABR_MODE_CHANGED,{mode:"auto"}),this._hls.nextLevel=-1)}},{key:"isAdaptiveBitrateEnabled",value:function(){return!!this._hls&&this._hls.autoLevelEnabled}},{key:"_getLevelDetails",value:function(){var e=this._hls.levels[this._hls.currentLevel]||this._hls.levels[this._hls.nextLevel]||this._hls.levels[this._hls.nextAutoLevel]||this._hls.levels[this._hls.nextLoadLevel];return e&&e.details?e.details:{}}},{key:"_getLiveEdge",value:function(){try{var e=void 0;return e=this._hls.liveSyncPosition?this._hls.liveSyncPosition:this._hls.config.liveSyncDuration?this._videoElement.duration-this._hls.config.liveSyncDuration:this._videoElement.duration-this._hls.config.liveSyncDurationCount*this._getLevelDetails().targetduration,e>0?e:this._videoElement.duration}catch(e){return t._logger.debug("Live edge calculation failed, fall back to duration"),this._videoElement.duration}}},{key:"seekToLiveEdge",value:function(){try{this._videoElement.currentTime=this._getLiveEdge()}catch(e){return}}},{key:"isLive",value:function(){try{return!!this._getLevelDetails().live}catch(e){return!1}}},{key:"_onManifestLoaded",value:function(e){var n=this;t._logger.debug("The source has been loaded successfully"),this._hls.config.autoStartLoad||this._hls.startLoad(this._startTime),this._playerTracks=this._parseTracks(),this._maybeApplyAbrRestrictions(),this._mediaAttachedPromise.then(function(){n._resolveLoad({tracks:n._playerTracks})});var r=e.stats.tload-e.stats.trequest;this._trigger(y.EventType.MANIFEST_LOADED,{miliSeconds:r})}},{key:"_maybeApplyAbrRestrictions",value:function(){if(this._config.abr.enabled){if(this._config.abr.restrictions){var e=this._config.abr.restrictions;if(e.maxBitrate){var n=e.minBitrate?e.minBitrate:0;if(e.maxBitrate>n){var r=this._hls.levels.findIndex(function(t){return t.bitrate>e.maxBitrate});r>0&&(r-=1),this._hls.autoLevelCapping=r}else t._logger.warn("Invalid maxBitrate restriction, maxBitrate must be greater than minBitrate",n,e.maxBitrate)}}}else this._hls.currentLevel=0}},{key:"_onLevelSwitched",value:function(e,n){var r=this._playerTracks.find(function(e){return e instanceof y.VideoTrack&&e.index===n.level});t._logger.debug("Video track changed",r),this._onTrackChanged(r)}},{key:"_onAudioTrackSwitched",value:function(e,n){var r=this._playerTracks.find(function(e){return e instanceof y.AudioTrack&&e.id===n.id});t._logger.debug("Audio track changed",r),this._onTrackChanged(r),this._handleWaitingUponAudioTrackSwitch()}},{key:"_handleWaitingUponAudioTrackSwitch",value:function(){var e=this;if(["IE","Edge"].includes(y.Env.browser.name)){var t=function(){e._trigger(y.EventType.PLAYING)};this._eventManager.listenOnce(this._videoElement,y.EventType.TIME_UPDATE,t)}}},{key:"_getErrorDataObject",value:function(e){var t={};switch(t.name=e.details,t.name){case p.default.ErrorDetails.MANIFEST_LOAD_ERROR:case p.default.ErrorDetails.LEVEL_LOAD_ERROR:case p.default.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:t.url=e.url,t.responseCode=e.response?e.response.code:null;break;case p.default.ErrorDetails.MANIFEST_LOAD_TIMEOUT:case p.default.ErrorDetails.LEVEL_LOAD_TIMEOUT:case p.default.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:t.url=e.url;break;case p.default.ErrorDetails.MANIFEST_PARSING_ERROR:t.url=e.url,t.reason=e.reason;break;case p.default.ErrorDetails.LEVEL_SWITCH_ERROR:t.level=e.level,t.reason=e.reason;break;case p.default.ErrorDetails.FRAG_LOAD_ERROR:t.fragUrl=e.frag?e.frag.url:null,t.responseCode=e.response?e.response.code:null;break;case p.default.ErrorDetails.FRAG_LOAD_TIMEOUT:t.fragUrl=e.frag?e.frag.url:null;break;case p.default.ErrorDetails.FRAG_DECRYPT_ERROR:case p.default.ErrorDetails.FRAG_PARSING_ERROR:t.reason=e.reason;break;case p.default.ErrorDetails.KEY_LOAD_ERROR:t.fragDecryptedDataUri=e.frag&&e.frag.decryptdata?e.frag.decryptdata.uri:null,t.responseCode=e.response?e.response.code:null;break;case p.default.ErrorDetails.KEY_LOAD_TIMEOUT:t.fragDecryptedDataUri=e.frag&&e.frag.decryptdata?e.frag.decryptdata.uri:null;break;case p.default.ErrorDetails.BUFFER_ADD_CODEC_ERROR:t.mimeType=e.mimeType,t.errorMsg=e.err?e.err.message:null;break;case p.default.ErrorDetails.BUFFER_STALLED_ERROR:t.buffer=e.buffer}return this._requestFilterError&&(t.reason=e.response.text),t}},{key:"_onError",value:function(e){var n=e.type,r=e.details,i=e.fatal,a=this._getErrorDataObject(e);if(i){var o=void 0;switch(n){case p.default.ErrorTypes.NETWORK_ERROR:if(![p.default.ErrorDetails.MANIFEST_LOAD_ERROR,p.default.ErrorDetails.MANIFEST_LOAD_TIMEOUT].includes(r)||this._triedReloadWithRedirect||this._config.forceRedirectExternalStreams){var s=this._requestFilterError?y.Error.Code.REQUEST_FILTER_ERROR:y.Error.Code.HTTP_ERROR;o=new y.Error(y.Error.Severity.CRITICAL,y.Error.Category.NETWORK,s,a)}else this._reloadWithDirectManifest();break;case p.default.ErrorTypes.MEDIA_ERROR:o=this._handleMediaError()?new y.Error(y.Error.Severity.RECOVERABLE,y.Error.Category.MEDIA,y.Error.Code.HLS_FATAL_MEDIA_ERROR,a):new y.Error(y.Error.Severity.CRITICAL,y.Error.Category.MEDIA,y.Error.Code.HLS_FATAL_MEDIA_ERROR,a);break;default:o=new y.Error(y.Error.Severity.CRITICAL,y.Error.Category.PLAYER,y.Error.Code.HLS_FATAL_MEDIA_ERROR,a)}this._trigger(y.EventType.ERROR,o),o&&o.severity===y.Error.Severity.CRITICAL&&this.destroy()}else{var l=this._requestFilterError?{category:y.Error.Category.NETWORK,code:y.Error.Code.REQUEST_FILTER_ERROR}:h.HlsJsErrorMap[r]||{category:0,code:0},u=l.category,c=l.code;t._logger.warn(new y.Error(y.Error.Severity.RECOVERABLE,u,c,a))}this._requestFilterError=!1}},{key:"_handleMediaError",value:function(){var e=performance.now(),n=!0;return this._checkTimeDeltaHasPassed(e,this._recoverDecodingErrorDate,this._config.recoverDecodingErrorDelay)?(this._eventManager.listen(this._videoElement,y.EventType.LOADED_METADATA,this._onRecoveredCallback),this._recoverDecodingError()):this._checkTimeDeltaHasPassed(e,this._recoverSwapAudioCodecDate,this._config.recoverSwapAudioCodecDelay)?(this._eventManager.listen(this._videoElement,y.EventType.LOADED_METADATA,this._onRecoveredCallback),this._recoverSwapAudioCodec()):(n=!1,t._logger.error("cannot recover, last media error recovery failed")),n}},{key:"_onRecovered",value:function(){this._trigger(y.EventType.MEDIA_RECOVERED),this._videoElement.removeEventListener(y.EventType.LOADED_METADATA,this._onRecoveredCallback)}},{key:"_checkTimeDeltaHasPassed",value:function(e,t,n){return!t||e-t>n}},{key:"_recoverDecodingError",value:function(){this._recoverDecodingErrorDate=performance.now(),t._logger.warn("try to recover media Error"),this._hls.recoverMediaError()}},{key:"_recoverSwapAudioCodec",value:function(){this._recoverSwapAudioCodecDate=performance.now(),t._logger.warn("try to swap Audio Codec and recover media Error"),this._hls.swapAudioCodec(),this._hls.recoverMediaError()}},{key:"_removeBindings",value:function(){this._hls.off(p.default.Events.ERROR,this._onError),this._hls.off(p.default.Events.LEVEL_SWITCHED,this._onLevelSwitched),this._hls.off(p.default.Events.AUDIO_TRACK_SWITCHED,this._onAudioTrackSwitched),this._hls.off(p.default.Events.MANIFEST_LOADED,this._onManifestLoaded),this._hls.off(p.default.Events.FPS_DROP,this._onFpsDrop),this._videoElement.textTracks.onaddtrack=null,this._onRecoveredCallback=null,this._eventManager&&this._eventManager.removeAll()}},{key:"getStartTimeOfDvrWindow",value:function(){if(!this.isLive())return 0;try{var e=this._hls.levels[this._hls.nextLoadLevel],n=e.details,r=n.fragments,i=r.length,a=r[0].start+r[0].duration,o=r[i-1].start+r[i-1].duration,s=void 0!==this._hls.config.liveMaxLatencyDuration?this._hls.config.liveMaxLatencyDuration:this._hls.config.liveMaxLatencyDurationCount*n.targetduration;return Math.max(a-this._hls.config.maxFragLookUpTolerance,o-s)}catch(e){return t._logger.debug("Unable obtain the start of DVR window"),0}}},{key:"_onFragLoaded",value:function(e){var t=e.stats.tload-e.stats.trequest;this._trigger(y.EventType.FRAG_LOADED,{miliSeconds:t,bytes:e.stats.loaded,url:e.frag.url})}},{key:"_getLiveTargetBuffer",value:function(){return this._hls.config.liveSyncDuration?this._hls.config.liveSyncDuration:this._hls.config.liveSyncDurationCount*this._getLevelDetails().targetduration}},{key:"targetBuffer",get:function(){var e=NaN;return this._hls?(e=this.isLive()?this._getLiveTargetBuffer()-(this._videoElement.currentTime-this._getLiveEdge()):this._videoElement.duration-this._videoElement.currentTime,e=Math.min(e,this._hls.config.maxMaxBufferLength+this._getLevelDetails().targetduration)):NaN}}]),t}(y.BaseMediaSourceAdapter);_.id="HlsAdapter",_._logger=y.BaseMediaSourceAdapter.getLogger(_.id),_._hlsMimeTypes=["application/x-mpegurl","application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"],t.default=_},function(e,t){e.exports={recoverDecodingErrorDelay:3e3,recoverSwapAudioCodecDelay:3e3,abr:{enabled:!0,restrictions:{}},hlsConfig:{fragLoadingMaxRetry:4,maxMaxBufferLength:60}}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.HlsJsErrorMap=void 0;var i,a=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s=n(0),l=(i={},r(i,o.default.ErrorDetails.MANIFEST_LOAD_ERROR,{category:s.Error.Category.MANIFEST,code:s.Error.Code.HTTP_ERROR}),r(i,o.default.ErrorDetails.MANIFEST_LOAD_TIMEOUT,{category:s.Error.Category.MANIFEST,code:s.Error.Code.TIMEOUT}),r(i,o.default.ErrorDetails.MANIFEST_PARSING_ERROR,{category:s.Error.Category.MANIFEST,code:s.Error.Code.HLSJS_CANNOT_PARSE}),r(i,o.default.ErrorDetails.LEVEL_LOAD_ERROR,{category:s.Error.Category.NETWORK,code:s.Error.Code.HTTP_ERROR}),r(i,o.default.ErrorDetails.LEVEL_LOAD_TIMEOUT,{category:s.Error.Category.NETWORK,code:s.Error.Code.TIMEOUT}),r(i,o.default.ErrorDetails.LEVEL_SWITCH_ERROR,{category:s.Error.Category.PLAYER,code:s.Error.Code.BITRATE_SWITCH_ISSUE}),r(i,o.default.ErrorDetails.FRAG_LOAD_ERROR,{category:s.Error.Category.NETWORK,code:s.Error.Code.HTTP_ERROR}),r(i,o.default.ErrorDetails.FRAG_LOOP_LOADING_ERROR,{category:s.Error.Category.NETWORK,code:s.Error.Code.HTTP_ERROR}),r(i,o.default.ErrorDetails.FRAG_LOAD_TIMEOUT,{category:s.Error.Category.NETWORK,code:s.Error.Code.TIMEOUT}),r(i,o.default.ErrorDetails.FRAG_PARSING_ERROR,{category:s.Error.Category.MEDIA,code:s.Error.Code.HLS_FRAG_PARSING_ERROR}),r(i,o.default.ErrorDetails.BUFFER_APPEND_ERROR,{category:s.Error.Category.MEDIA,code:s.Error.Code.HLS_BUFFER_APPEND_ISSUE}),r(i,o.default.ErrorDetails.BUFFER_APPENDING_ERROR,{category:s.Error.Category.MEDIA,code:s.Error.Code.HLS_BUFFER_APPENDING_ISSUE}),r(i,o.default.ErrorDetails.BUFFER_STALLED_ERROR,{category:s.Error.Category.MEDIA,code:s.Error.Code.HLS_BUFFER_STALLED_ERROR}),i);t.HlsJsErrorMap=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),s=n(2),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),a=n.load.bind(n),s=t.redirectExternalStreamsHandler;return n.load=function(e,n,r){var i=e.url;"manifest"===e.type?o.Utils.Http.jsonp(i,s,{timeout:t.redirectExternalStreamsTimeout}).then(function(t){e.url=t,a(e,n,r)}).catch(function(){return a(e,n,r)}):a(e,n,r)},n}return a(t,e),t}(l.default);u.redirectExternalStreamsHandler=function(e){return e},t.default=u}])})},function(e,t,n){"undefined"!=typeof window&&function(t,n){e.exports=n()}(0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(r,i,function(t){return e[t]}.bind(null,i));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s="./src/hls.js")}({"./node_modules/eventemitter3/index.js":/*!*********************************************!*\
  !*** ./node_modules/eventemitter3/index.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,n,r,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var o=new i(n,r||e,a),s=u?u+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],o]:e._events[s].push(o):(e._events[s]=o,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}var l=Object.prototype.hasOwnProperty,u="~";Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(u=!1)),s.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)l.call(e,t)&&n.push(u?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},s.prototype.listeners=function(e){var t=u?u+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,a=new Array(i);r<i;r++)a[r]=n[r].fn;return a},s.prototype.listenerCount=function(e){var t=u?u+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,r,i,a){var o=u?u+e:e;if(!this._events[o])return!1;var s,l,c=this._events[o],p=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),p){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,r),!0;case 5:return c.fn.call(c.context,t,n,r,i),!0;case 6:return c.fn.call(c.context,t,n,r,i,a),!0}for(l=1,s=new Array(p-1);l<p;l++)s[l-1]=arguments[l];c.fn.apply(c.context,s)}else{var f,d=c.length;for(l=0;l<d;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),p){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,n);break;case 4:c[l].fn.call(c[l].context,t,n,r);break;default:if(!s)for(f=1,s=new Array(p-1);f<p;f++)s[f-1]=arguments[f];c[l].fn.apply(c[l].context,s)}}return!0},s.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,n,r){var i=u?u+e:e;if(!this._events[i])return this;if(!t)return o(this,i),this;var a=this._events[i];if(a.fn)a.fn!==t||r&&!a.once||n&&a.context!==n||o(this,i);else{for(var s=0,l=[],c=a.length;s<c;s++)(a[s].fn!==t||r&&!a[s].once||n&&a[s].context!==n)&&l.push(a[s]);l.length?this._events[i]=1===l.length?l[0]:l:o(this,i)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=u?u+e:e,this._events[t]&&o(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=u,s.EventEmitter=s,e.exports=s},"./node_modules/node-libs-browser/node_modules/events/events.js":/*!**********************************************************************!*\
  !*** ./node_modules/node-libs-browser/node_modules/events/events.js ***!
  \**********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function a(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(n=this._events[e],o(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),u=n.slice(),i=u.length,l=0;l<i;l++)u[l].apply(this,s);return!0},n.prototype.addListener=function(e,t){var i;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(i=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[e].length>i&&(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){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,o,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.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(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;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(n=this._events[e],r(n))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":/*!*****************************************************!*\
  !*** ./node_modules/url-toolkit/src/url-toolkit.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){!function(t){var n=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,r=/^([^\/?#]*)(.*)$/,i=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,o={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var i=o.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=o.normalizePath(i.path),o.buildURLFromParts(i)}var a=o.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=o.normalizePath(a.path),o.buildURLFromParts(a)):t;var s=o.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var l=r.exec(s.path);s.netLoc=l[1],s.path=l[2]}s.netLoc&&!s.path&&(s.path="/");var u={scheme:s.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(u.netLoc=s.netLoc,"/"!==a.path[0]))if(a.path){var c=s.path,p=c.substring(0,c.lastIndexOf("/")+1)+a.path;u.path=o.normalizePath(p)}else u.path=s.path,a.params||(u.params=s.params,a.query||(u.query=s.query));return null===u.path&&(u.path=n.alwaysNormalize?o.normalizePath(a.path):a.path),o.buildURLFromParts(u)},parseURL:function(e){var t=n.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(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};e.exports=o}()},"./node_modules/webworkify-webpack/index.js":/*!**************************************************!*\
  !*** ./node_modules/webworkify-webpack/index.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){function r(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t.oe=function(e){throw console.error(e),e};var r=t(t.s=ENTRY_MODULE);return r.default||r}function i(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function a(e){return!isNaN(1*e)}function o(e,t,r){var o={};o[r]=[];var s=t.toString(),l=s.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);if(!l)return o;for(var p,f=l[1],d=new RegExp("(\\\\n|\\W)"+i(f)+c,"g");p=d.exec(s);)"dll-reference"!==p[3]&&o[r].push(p[3]);for(d=new RegExp("\\("+i(f)+'\\("(dll-reference\\s('+u+'))"\\)\\)'+c,"g");p=d.exec(s);)e[p[2]]||(o[r].push(p[1]),e[p[2]]=n(p[1]).m),o[p[2]]=o[p[2]]||[],o[p[2]].push(p[4]);for(var h=Object.keys(o),y=0;y<h.length;y++)for(var v=0;v<o[h[y]].length;v++)a(o[h[y]][v])&&(o[h[y]][v]=1*o[h[y]][v]);return o}function s(e){return Object.keys(e).reduce(function(t,n){return t||e[n].length>0},!1)}function l(e,t){for(var n={main:[t]},r={main:[]},i={main:{}};s(n);)for(var a=Object.keys(n),l=0;l<a.length;l++){var u=a[l],c=n[u],p=c.pop();if(i[u]=i[u]||{},!i[u][p]&&e[u][p]){i[u][p]=!0,r[u]=r[u]||[],r[u].push(p);for(var f=o(e,e[u][p],u),d=Object.keys(f),h=0;h<d.length;h++)n[d[h]]=n[d[h]]||[],n[d[h]]=n[d[h]].concat(f[d[h]])}}return r}var u="[\\.|\\-|\\+|\\w|/|@]+",c="\\((/\\*.*?\\*/)?s?.*?("+u+").*?\\)";e.exports=function(e,t){t=t||{};var i={main:n.m},a=t.all?{main:Object.keys(i.main)}:l(i,e),o="";Object.keys(a).filter(function(e){return"main"!==e}).forEach(function(e){for(var t=0;a[e][t];)t++;a[e].push(t),i[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",o=o+"var "+e+" = ("+r.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+a[e].map(function(t){return JSON.stringify(t)+": "+i[e][t].toString()}).join(",")+"});\n"}),o=o+"new (("+r.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+a.main.map(function(e){return JSON.stringify(e)+": "+i.main[e].toString()}).join(",")+"}))(self);";var s=new window.Blob([o],{type:"text/javascript"});if(t.bare)return s;var u=window.URL||window.webkitURL||window.mozURL||window.msURL,c=u.createObjectURL(s),p=new window.Worker(c);return p.objectURL=c,p}},"./src/config.js":/*!***********************!*\
  !*** ./src/config.js ***!
  \***********************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ./controller/abr-controller */"./src/controller/abr-controller.js"),i=n(/*! ./controller/buffer-controller */"./src/controller/buffer-controller.js"),a=n(/*! ./controller/cap-level-controller */"./src/controller/cap-level-controller.js"),o=n(/*! ./controller/fps-controller */"./src/controller/fps-controller.js"),s=n(/*! ./utils/xhr-loader */"./src/utils/xhr-loader.js"),l=n(/*! ./controller/audio-track-controller */"./src/controller/audio-track-controller.js"),u=n(/*! ./controller/audio-stream-controller */"./src/controller/audio-stream-controller.js"),c=n(/*! ./utils/cues */"./src/utils/cues.js"),p=n(/*! ./controller/timeline-controller */"./src/controller/timeline-controller.js"),f=n(/*! ./controller/subtitle-track-controller */"./src/controller/subtitle-track-controller.js"),d=n(/*! ./controller/subtitle-stream-controller */"./src/controller/subtitle-stream-controller.js"),h=n(/*! ./controller/eme-controller */"./src/controller/eme-controller.js"),y=n(/*! ./utils/mediakeys-helper */"./src/utils/mediakeys-helper.js");t.hlsDefaultConfig={autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,liveDurationInfinity:!1,liveBackBufferLength:1/0,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:s.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,abrController:r.default,bufferController:i.default,capLevelController:a.default,fpsController:o.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,requestMediaKeySystemAccessFunc:y.requestMediaKeySystemAccess},t.hlsDefaultConfig.subtitleStreamController=d.SubtitleStreamController,t.hlsDefaultConfig.subtitleTrackController=f.default,t.hlsDefaultConfig.timelineController=p.default,t.hlsDefaultConfig.cueHandler=c,t.hlsDefaultConfig.enableCEA708Captions=!0,t.hlsDefaultConfig.enableWebVTT=!0,t.hlsDefaultConfig.captionsTextTrack1Label="English",t.hlsDefaultConfig.captionsTextTrack1LanguageCode="en",t.hlsDefaultConfig.captionsTextTrack2Label="Spanish",t.hlsDefaultConfig.captionsTextTrack2LanguageCode="es",t.hlsDefaultConfig.audioStreamController=u.default,t.hlsDefaultConfig.audioTrackController=l.default,t.hlsDefaultConfig.emeController=h.default},"./src/controller/abr-controller.js":/*!******************************************!*\
  !*** ./src/controller/abr-controller.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! ../events */"./src/events.js"),a=n(/*! ../event-handler */"./src/event-handler.js"),o=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.js"),s=n(/*! ../errors */"./src/errors.js"),l=n(/*! ../utils/logger */"./src/utils/logger.js"),u=n(/*! ../utils/ewma-bandwidth-estimator */"./src/utils/ewma-bandwidth-estimator.js"),c=window.performance,p=function(t){function n(e){var n=t.call(this,e,i.default.FRAG_LOADING,i.default.FRAG_LOADED,i.default.FRAG_BUFFERED,i.default.ERROR)||this;return n.lastLoadedFragLevel=0,n._nextAutoLevel=-1,n.hls=e,n.timer=null,n._bwEstimator=null,n.onCheck=n._abandonRulesCheck.bind(n),n}return r(n,t),n.prototype.destroy=function(){this.clearTimer(),a.default.prototype.destroy.call(this)},n.prototype.onFragLoading=function(e){var t=e.frag;if("main"===t.type&&(this.timer||(this.fragCurrent=t,this.timer=setInterval(this.onCheck,100)),!this._bwEstimator)){var n=this.hls,r=n.config,i=t.level,a=n.levels[i].details.live,o=void 0,s=void 0;a?(o=r.abrEwmaFastLive,s=r.abrEwmaSlowLive):(o=r.abrEwmaFastVoD,s=r.abrEwmaSlowVoD),this._bwEstimator=new u.default(n,s,o,r.abrEwmaDefaultEstimate)}},n.prototype._abandonRulesCheck=function(){var e=this.hls,t=e.media,n=this.fragCurrent;if(n){var r=n.loader,a=e.minAutoLevel;if(!r||r.stats&&r.stats.aborted)return l.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);var s=r.stats;if(t&&s&&(!t.paused&&0!==t.playbackRate||!t.readyState)&&n.autoLevel&&n.level){var u=c.now()-s.trequest,p=Math.abs(t.playbackRate);if(u>500*n.duration/p){var f=e.levels,d=Math.max(1,s.bw?s.bw/8:1e3*s.loaded/u),h=f[n.level],y=h.realBitrate?Math.max(h.realBitrate,h.bitrate):h.bitrate,v=s.total?s.total:Math.max(s.loaded,Math.round(n.duration*y/8)),g=t.currentTime,m=(v-s.loaded)/d,b=(o.BufferHelper.bufferInfo(t,g,e.config.maxBufferHole).end-g)/p;if(b<2*n.duration/p&&m>b){var _=void 0,E=void 0;for(E=n.level-1;E>a;E--){var k=f[E].realBitrate?Math.max(f[E].realBitrate,f[E].bitrate):f[E].bitrate;if((_=n.duration*k/(6.4*d))<b)break}_<m&&(l.logger.warn("loading too slow, abort fragment loading and switch to level "+E+":fragLoadedDelay["+E+"]<fragLoadedDelay["+(n.level-1)+"];bufferStarvationDelay:"+_.toFixed(1)+"<"+m.toFixed(1)+":"+b.toFixed(1)),e.nextLoadLevel=E,this._bwEstimator.sample(u,s.loaded),r.abort(),this.clearTimer(),e.trigger(i.default.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,stats:s}))}}}}},n.prototype.onFragLoaded=function(t){var n=t.frag;if("main"===n.type&&e.isFinite(n.sn)){if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var r=this.hls.levels[n.level],i=(r.loaded?r.loaded.bytes:0)+t.stats.loaded,a=(r.loaded?r.loaded.duration:0)+t.frag.duration;r.loaded={bytes:i,duration:a},r.realBitrate=Math.round(8*i/a)}if(t.frag.bitrateTest){var o=t.stats;o.tparsed=o.tbuffered=o.tload,this.onFragBuffered(t)}}},n.prototype.onFragBuffered=function(t){var n=t.stats,r=t.frag;if(!0!==n.aborted&&"main"===r.type&&e.isFinite(r.sn)&&(!r.bitrateTest||n.tload===n.tbuffered)){var i=n.tparsed-n.trequest;l.logger.log("latency/loading/parsing/append/kbps:"+Math.round(n.tfirst-n.trequest)+"/"+Math.round(n.tload-n.tfirst)+"/"+Math.round(n.tparsed-n.tload)+"/"+Math.round(n.tbuffered-n.tparsed)+"/"+Math.round(8*n.loaded/(n.tbuffered-n.trequest))),this._bwEstimator.sample(i,n.loaded),n.bwEstimate=this._bwEstimator.getEstimate(),r.bitrateTest?this.bitrateTestDelay=i/1e3:this.bitrateTestDelay=0}},n.prototype.onError=function(e){switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},n.prototype.clearTimer=function(){clearInterval(this.timer),this.timer=null},Object.defineProperty(n.prototype,"nextAutoLevel",{get:function(){var e=this._nextAutoLevel,t=this._bwEstimator;if(!(-1===e||t&&t.canEstimate()))return e;var n=this._nextABRAutoLevel;return-1!==e&&(n=Math.min(e,n)),n},set:function(e){this._nextAutoLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_nextABRAutoLevel",{get:function(){var e=this.hls,t=e.maxAutoLevel,n=e.levels,r=e.config,i=e.minAutoLevel,a=e.media,s=this.lastLoadedFragLevel,u=this.fragCurrent?this.fragCurrent.duration:0,c=a?a.currentTime:0,p=a&&0!==a.playbackRate?Math.abs(a.playbackRate):1,f=this._bwEstimator?this._bwEstimator.getEstimate():r.abrEwmaDefaultEstimate,d=(o.BufferHelper.bufferInfo(a,c,r.maxBufferHole).end-c)/p,h=this._findBestLevel(s,u,f,i,t,d,r.abrBandWidthFactor,r.abrBandWidthUpFactor,n);if(h>=0)return h;l.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var y=u?Math.min(u,r.maxStarvationDelay):r.maxStarvationDelay,v=r.abrBandWidthFactor,g=r.abrBandWidthUpFactor;if(0===d){var m=this.bitrateTestDelay;if(m){y=(u?Math.min(u,r.maxLoadingDelay):r.maxLoadingDelay)-m,l.logger.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*y)+" ms"),v=g=1}}return h=this._findBestLevel(s,u,f,i,t,d+y,v,g,n),Math.max(h,0)},enumerable:!0,configurable:!0}),n.prototype._findBestLevel=function(e,t,n,r,i,a,o,s,u){for(var c=i;c>=r;c--){var p=u[c];if(p){var f=p.details,d=f?f.totalduration/f.fragments.length:t,h=!!f&&f.live,y=void 0;y=c<=e?o*n:s*n;var v=u[c].realBitrate?Math.max(u[c].realBitrate,u[c].bitrate):u[c].bitrate,g=v*d/y;if(l.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+c+"/"+Math.round(y)+"/"+v+"/"+d+"/"+a+"/"+g),y>v&&(!g||h&&!this.bitrateTestDelay||g<a))return c}}return-1},n}(a.default);t.default=p}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/audio-stream-controller.js":/*!***************************************************!*\
  !*** ./src/controller/audio-stream-controller.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! ../utils/binary-search */"./src/utils/binary-search.js"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.js"),o=n(/*! ../demux/demuxer */"./src/demux/demuxer.js"),s=n(/*! ../events */"./src/events.js"),l=n(/*! ./level-helper */"./src/controller/level-helper.js"),u=n(/*! ../utils/time-ranges */"./src/utils/time-ranges.js"),c=n(/*! ../errors */"./src/errors.js"),p=n(/*! ../utils/logger */"./src/utils/logger.js"),f=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.js"),d=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.js"),h=n(/*! ../loader/fragment */"./src/loader/fragment.js"),y=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.js"),v=window.performance,g=function(t){function n(e,n){var r=t.call(this,e,s.default.MEDIA_ATTACHED,s.default.MEDIA_DETACHING,s.default.AUDIO_TRACKS_UPDATED,s.default.AUDIO_TRACK_SWITCHING,s.default.AUDIO_TRACK_LOADED,s.default.KEY_LOADED,s.default.FRAG_LOADED,s.default.FRAG_PARSING_INIT_SEGMENT,s.default.FRAG_PARSING_DATA,s.default.FRAG_PARSED,s.default.ERROR,s.default.BUFFER_RESET,s.default.BUFFER_CREATED,s.default.BUFFER_APPENDED,s.default.BUFFER_FLUSHED,s.default.INIT_PTS_FOUND)||this;return r.fragmentTracker=n,r.config=e.config,r.audioCodecSwap=!1,r._state=y.State.STOPPED,r.initPTS=[],r.waitingFragment=null,r.videoTrackCC=null,r}return r(n,t),n.prototype.onHandlerDestroying=function(){this.stopLoad(),t.prototype.onHandlerDestroying.call(this)},n.prototype.onHandlerDestroyed=function(){this.state=y.State.STOPPED,this.fragmentTracker=null,t.prototype.onHandlerDestroyed.call(this)},n.prototype.onInitPtsFound=function(e){var t=e.id,n=e.frag.cc,r=e.initPTS;"main"===t&&(this.initPTS[n]=r,this.videoTrackCC=n,p.logger.log("InitPTS for cc: "+n+" found from video track: "+r),this.state===y.State.WAITING_INIT_PTS&&this.tick())},n.prototype.startLoad=function(e){if(this.tracks){var t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,t>0&&-1===e?(p.logger.log("audio:override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=y.State.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:e,this.state=y.State.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=e,this.state=y.State.STOPPED},n.prototype.stopLoad=function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragmentTracker.removeFragment(e),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=y.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,l=o.config;switch(this.state){case y.State.ERROR:case y.State.PAUSED:case y.State.BUFFER_FLUSHING:break;case y.State.STARTING:this.state=y.State.WAITING_TRACK,this.loadedmetadata=!1;break;case y.State.IDLE:var u=this.tracks;if(!u)break;if(!this.media&&(this.startFragRequested||!l.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,h=this.videoBuffer?this.videoBuffer:this.media,g=a.BufferHelper.bufferInfo(c,t,l.maxBufferHole),m=a.BufferHelper.bufferInfo(h,t,l.maxBufferHole),b=g.len,_=g.end,E=this.fragPrevious,k=Math.min(l.maxBufferLength,l.maxMaxBufferLength),T=Math.max(k,m.len),A=this.audioSwitch,w=this.trackId;if((b<T||A)&&w<u.length){if(void 0===(r=u[w].details)){this.state=y.State.WAITING_TRACK;break}if(!A&&this._streamEnded(g,r))return this.hls.trigger(s.default.BUFFER_EOS,{type:"audio"}),void(this.state=y.State.ENDED);var S=r.fragments,P=S.length,O=S[0].start,C=S[P-1].start+S[P-1].duration,x=void 0;if(A)if(r.live&&!r.PTSKnown)p.logger.log("switching audiotrack, live stream, unknown PTS,load first fragment"),_=0;else if(_=t,r.PTSKnown&&t<O){if(!(g.end>O||g.nextStart))return;p.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=O+.05}if(r.initSegment&&!r.initSegment.data)x=r.initSegment;else if(_<=O){if(x=S[0],null!==this.videoTrackCC&&x.cc!==this.videoTrackCC&&(x=f.findFragWithCC(S,this.videoTrackCC)),r.live&&x.loadIdx&&x.loadIdx===this.fragLoadIdx){var R=g.nextStart?g.nextStart:O;return p.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(R+.05)),void(this.media.currentTime=R+.05)}}else{var I=void 0,D=l.maxFragLookUpTolerance,M=E?S[E.sn-S[0].sn+1]:void 0,L=function(e){var t=Math.min(D,e.duration);return e.start+e.duration-t<=_?1:e.start-t>_&&e.start?-1:0};_<C?(_>C-D&&(D=0),I=M&&!L(M)?M:i.default.search(S,L)):I=S[P-1],I&&(x=I,O=I.start,E&&x.level===E.level&&x.sn===E.sn&&(x.sn<r.endSN?(x=S[x.sn+1-r.startSN],p.logger.log("SN just loaded, load next one: "+x.sn)):x=null))}x&&(x.encrypted?(p.logger.log("Loading key for "+x.sn+" of ["+r.startSN+" ,"+r.endSN+"],track "+w),this.state=y.State.KEY_LOADING,o.trigger(s.default.KEY_LOADING,{frag:x})):(p.logger.log("Loading "+x.sn+", cc: "+x.cc+" of ["+r.startSN+" ,"+r.endSN+"],track "+w+", currentTime:"+t+",bufferEnd:"+_.toFixed(3)),this.fragCurrent=x,(A||this.fragmentTracker.getState(x)===d.FragmentState.NOT_LOADED)&&(this.startFragRequested=!0,e.isFinite(x.sn)&&(this.nextLoadPosition=x.start+x.duration),o.trigger(s.default.FRAG_LOADING,{frag:x}),this.state=y.State.FRAG_LOADING)))}break;case y.State.WAITING_TRACK:n=this.tracks[this.trackId],n&&n.details&&(this.state=y.State.IDLE);break;case y.State.FRAG_LOADING_WAITING_RETRY:var N=v.now(),j=this.retryDate;c=this.media;var U=c&&c.seeking;(!j||N>=j||U)&&(p.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=y.State.IDLE);break;case y.State.WAITING_INIT_PTS:var F=this.videoTrackCC;if(void 0===this.initPTS[F])break;var B=this.waitingFragment;if(B){var V=B.frag.cc;F!==V?(n=this.tracks[this.trackId],n.details&&n.details.live&&(p.logger.warn("Waiting fragment CC ("+V+") does not match video track CC ("+F+")"),this.waitingFragment=null,this.state=y.State.IDLE)):(this.state=y.State.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=y.State.IDLE;break;case y.State.STOPPED:case y.State.FRAG_LOADING:case y.State.PARSING:case y.State.PARSED:case y.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=y.State.PAUSED,this.waitingFragment=null,t?this.setInterval(100):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),t&&(this.audioSwitch=!0,this.state=y.State.IDLE),this.tick()},n.prototype.onAudioTrackLoaded=function(t){var n=t.details,r=t.id,i=this.tracks[r],a=n.totalduration,o=0;if(p.logger.log("track "+r+" loaded ["+n.startSN+","+n.endSN+"],duration:"+a),n.live){var s=i.details;s&&n.fragments.length>0?(l.mergeDetails(s,n),o=n.fragments[0].start,n.PTSKnown?p.logger.log("live audio playlist sliding:"+o.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(i.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===y.State.WAITING_TRACK&&(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=e.frag;if(this.state===y.State.FRAG_LOADING&&t&&"audio"===n.type&&n.level===t.level&&n.sn===t.sn){var r=this.tracks[this.trackId],i=r.details,a=i.totalduration,l=t.level,u=t.sn,c=t.cc,f=this.config.defaultAudioCodec||r.audioCodec||"mp4a.40.2",d=this.stats=e.stats;if("initSegment"===u)this.state=y.State.IDLE,d.tparsed=d.tbuffered=v.now(),i.initSegment.data=e.payload,this.hls.trigger(s.default.FRAG_BUFFERED,{stats:d,frag:t,id:"audio"}),this.tick();else{this.state=y.State.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new o.default(this.hls,"audio"));var h=this.initPTS[c],g=i.initSegment?i.initSegment.data:[];if(i.initSegment||void 0!==h){this.pendingBuffering=!0,p.logger.log("Demuxing "+u+" of ["+i.startSN+" ,"+i.endSN+"],track "+l);this.demuxer.push(e.payload,g,f,null,t,a,!1,h)}else p.logger.log("unknown video PTS for continuity counter "+c+", waiting for video PTS before demuxing audio frag "+u+" of ["+i.startSN+" ,"+i.endSN+"],track "+l),this.waitingFragment=e,this.state=y.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===y.State.PARSING){var r=e.tracks,i=void 0;if(r.video&&delete r.video,i=r.audio){i.levelCodec=i.codec,i.id=e.id,this.hls.trigger(s.default.BUFFER_CODECS,r),p.logger.log("audio track:audio,container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var a=i.initSegment;if(a){var o={type:"audio",data:a,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[o]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(s.default.BUFFER_APPENDING,o))}this.tick()}}},n.prototype.onFragParsingData=function(t){var n=this,r=this.fragCurrent,i=t.frag;if(r&&"audio"===t.id&&"audio"===t.type&&i.sn===r.sn&&i.level===r.level&&this.state===y.State.PARSING){var a=this.trackId,o=this.tracks[a],u=this.hls;e.isFinite(t.endPTS)||(t.endPTS=t.startPTS+r.duration,t.endDTS=t.startDTS+r.duration),r.addElementaryStream(h.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(o.details,r,t.startPTS,t.endPTS);var f=this.audioSwitch,d=this.media,v=!1;if(f&&d)if(d.readyState){var g=d.currentTime;p.logger.log("switching audio track : currentTime:"+g),g>=t.startPTS&&(p.logger.log("switching audio track : flushing all audio"),this.state=y.State.BUFFER_FLUSHING,u.trigger(s.default.BUFFER_FLUSHING,{startOffset:0,endOffset:e.POSITIVE_INFINITY,type:"audio"}),v=!0,this.audioSwitch=!1,u.trigger(s.default.AUDIO_TRACK_SWITCHED,{id:a}))}else this.audioSwitch=!1,u.trigger(s.default.AUDIO_TRACK_SWITCHED,{id:a});var m=this.pendingData;if(!m)return p.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void u.trigger(s.default.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([t.data1,t.data2].forEach(function(e){e&&e.length&&m.push({type:t.type,data:e,parent:"audio",content:"data"})}),!v&&m.length&&(m.forEach(function(e){n.state===y.State.PARSING&&(n.pendingBuffering=!0,n.hls.trigger(s.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===y.State.PARSING&&(this.stats.tparsed=v.now(),this.state=y.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!==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,t=this.stats,n=this.hls;if(e){this.fragPrevious=e,t.tbuffered=v.now(),n.trigger(s.default.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var r=this.mediaBuffer?this.mediaBuffer:this.media;p.logger.log("audio buffered : "+u.default.toString(r.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,n.trigger(s.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=y.State.IDLE}this.tick()}},n.prototype.onError=function(t){var n=t.frag;if(!n||"audio"===n.type)switch(t.details){case c.ErrorDetails.FRAG_LOAD_ERROR:case c.ErrorDetails.FRAG_LOAD_TIMEOUT:var r=t.frag;if(r&&"audio"!==r.type)break;if(!t.fatal){var i=this.fragLoadError;i?i++:i=1;var o=this.config;if(i<=o.fragLoadingMaxRetry){this.fragLoadError=i;var l=Math.min(Math.pow(2,i-1)*o.fragLoadingRetryDelay,o.fragLoadingMaxRetryTimeout);p.logger.warn("AudioStreamController: frag loading failed, retry in "+l+" ms"),this.retryDate=v.now()+l,this.state=y.State.FRAG_LOADING_WAITING_RETRY}else p.logger.error("AudioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=y.State.ERROR}break;case c.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case c.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case c.ErrorDetails.KEY_LOAD_ERROR:case c.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==y.State.ERROR&&(this.state=t.fatal?y.State.ERROR:y.State.IDLE,p.logger.warn("AudioStreamController: "+t.details+" while loading frag, now switching to "+this.state+" state ..."));break;case c.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===t.parent&&(this.state===y.State.PARSING||this.state===y.State.PARSED)){var u=this.mediaBuffer,f=this.media.currentTime;if(u&&a.BufferHelper.isBuffered(u,f)&&a.BufferHelper.isBuffered(u,f+.5)){var o=this.config;o.maxMaxBufferLength>=o.maxBufferLength&&(o.maxMaxBufferLength/=2,p.logger.warn("AudioStreamController: reduce max buffer length to "+o.maxMaxBufferLength+"s")),this.state=y.State.IDLE}else p.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=y.State.BUFFER_FLUSHING,this.hls.trigger(s.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(s.default.BUFFER_APPENDING,t)}),this.appended=!0,this.pendingData=[],this.state=y.State.PARSED):(this.state=y.State.IDLE,this.fragPrevious=null,this.tick())},n}(y.default);t.default=g}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/audio-track-controller.js":/*!**************************************************!*\
  !*** ./src/controller/audio-track-controller.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! ../events */"./src/events.js"),a=n(/*! ../task-loop */"./src/task-loop.js"),o=n(/*! ../utils/logger */"./src/utils/logger.js"),s=n(/*! ../errors */"./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 r(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)return void o.logger.warn("Invalid audio track id:",e.id);if(o.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===s.ErrorTypes.NETWORK_ERROR&&(e.fatal&&this.clearInterval(),e.details===s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR&&(o.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)return void o.logger.debug("Same id as current audio-track passed, and track details available -> no-op");if(e<0||e>=this.tracks.length)return void o.logger.warn("Invalid id passed to audio-track controller");var t=this.tracks[e];o.logger.log("Now switching to audio-track index "+e),this.clearInterval(),this._trackId=e;var n=t.url,r=t.type,a=t.id;this.hls.trigger(i.default.AUDIO_TRACK_SWITCHING,{id:a,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 a=t.filter(function(e){return e.default});a.length?t=a:o.logger.warn("No default audio tracks defined")}var l=!1,u=function(){t.forEach(function(t){l||e.audioGroupId&&t.groupId!==e.audioGroupId||r&&r!==t.name||(e._setAudioTrack(t.id),l=!0)})};u(),l||(r=null,u()),l||(o.logger.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(i.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.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;o.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,o.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,i=t.groupId;o.logger.warn("Loading failed on audio track id: "+e+", group-id: "+i+', name/language: "'+n+'" / "'+r+'"');for(var a=e,s=0;s<this.tracks.length;s++)if(!this.trackIdBlacklist[s]){var l=this.tracks[s];if(l.name===n){a=s;break}}if(a===e)return void o.logger.warn('No fallback audio-track found for name/language: "'+n+'" / "'+r+'"');o.logger.log("Attempting audio-track fallback id:",a,"group-id:",this.tracks[a].groupId),this._setAudioTrack(a)},t}(a.default);t.default=l},"./src/controller/base-stream-controller.js":/*!**************************************************!*\
  !*** ./src/controller/base-stream-controller.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! ../task-loop */"./src/task-loop.js"),a=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.js"),o=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.js"),s=n(/*! ../utils/logger */"./src/utils/logger.js");t.State={STOPPED:"STOPPED",STARTING:"STARTING",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"};var l=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return r(i,n),i.prototype.doTick=function(){},i.prototype._streamEnded=function(e,t){var n=this,r=n.fragCurrent,i=n.fragmentTracker;if(!t.live&&r&&!r.backtracked&&r.sn===t.endSN&&!e.nextStart){var o=i.getState(r);return o===a.FragmentState.PARTIAL||o===a.FragmentState.OK}return!1},i.prototype.onMediaSeeking=function(){var n=this,r=n.config,i=n.media,a=n.mediaBuffer,l=n.state,u=i?i.currentTime:null,c=o.BufferHelper.bufferInfo(a||i,u,this.config.maxBufferHole);if(e.isFinite(u)&&s.logger.log("media seeking to "+u.toFixed(3)),l===t.State.FRAG_LOADING){var p=this.fragCurrent;if(0===c.len&&p){var f=r.maxFragLookUpTolerance,d=p.start-f,h=p.start+p.duration+f;u<d||u>h?(p.loader&&(s.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),p.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=t.State.IDLE):s.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else l===t.State.ENDED&&(0===c.len&&(this.fragPrevious=null,this.fragCurrent=null),this.state=t.State.IDLE);i&&(this.lastCurrentTime=u),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=u),this.tick()},i.prototype.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},i}(i.default);t.default=l}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/buffer-controller.js":/*!*********************************************!*\
  !*** ./src/controller/buffer-controller.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! ../events */"./src/events.js"),a=n(/*! ../event-handler */"./src/event-handler.js"),o=n(/*! ../utils/logger */"./src/utils/logger.js"),s=n(/*! ../errors */"./src/errors.js"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.js"),u=l.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 r(n,t),n.prototype.destroy=function(){a.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 i=r.updating;try{r.abort()}catch(e){o.logger.warn("can not abort audio buffer: "+e)}i?this.audioTimestampOffset=e.start:(o.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,o.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 u;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(){o.logger.log("media source detaching");var e=this.mediaSource;if(e){if("open"===e.readyState)try{e.endOfStream()}catch(e){o.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()):o.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(){o.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,t=e.bufferCodecEventsExpected,n=e.pendingTracks,r=Object.keys(n).length;(r&&!t||2===r)&&(this.createSourceBuffers(n),this.pendingTracks={},this.doAppending())},n.prototype.onMediaSourceClose=function(){o.logger.log("media source closed")},n.prototype.onMediaSourceEnded=function(){o.logger.log("media source ended")},n.prototype.onSBUpdateEnd=function(){if(this.audioTimestampOffset){var e=this.sourceBuffer.audio;o.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={},a=this.sourceBuffer;for(var s in a)r[s]=a[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){o.logger.error("sourceBuffer error:",e),this.hls.trigger(i.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.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 a=e[r],l=a.levelCodec||a.codec,u=a.container+";codecs="+l;o.logger.log("creating sourceBuffer("+u+")");try{var c=t[r]=n.addSourceBuffer(u);c.addEventListener("updateend",this.onsbue),c.addEventListener("error",this.onsbe),this.tracks[r]={codec:l,container:a.container},a.buffer=c}catch(e){o.logger.error("error while trying to add sourceBuffer:"+e.message),this.hls.trigger(i.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:e,mimeType:u})}}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){o.logger.error("sourceBuffer error:",e.event),this.hls.trigger(i.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.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,o.logger.log(r+" sourceBuffer now EOS"));this.checkEos()},n.prototype.checkEos=function(){var e=this.sourceBuffer,t=this.mediaSource;if(!t||"open"!==t.readyState)return void(this._needsEos=!1);for(var n in e){var r=e[n];if(!r.ended)return;if(r.updating)return void(this._needsEos=!0)}o.logger.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{t.endOfStream()}catch(e){o.logger.warn("exception while calling mediaSource.endOfStream()")}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),i=t-Math.max(e,this._levelTargetDuration),a=r.length-1;a>=0;a--){var o=r[a],s=n[o].buffered;s.length>0&&i>s.start(0)&&this.removeBufferRange(o,n[o],0,i)}}},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?(o.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))&&(o.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){o.logger.error("error while accessing sourceBuffer.buffered")}this.appended=t,this.hls.trigger(i.default.BUFFER_FLUSHED)}},n.prototype.doAppending=function(){var e=this,t=e.hls,n=e.segments,r=e.sourceBuffer;if(Object.keys(r).length){if(this.media.error)return this.segments=[],void o.logger.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(n&&n.length){var a=n.shift();try{var l=a.type,u=r[l];u?u.updating?n.unshift(a):(u.ended=!1,this.parent=a.parent,u.appendBuffer(a.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(e){o.logger.error("error while trying to append buffer:"+e.message),n.unshift(a);var c={type:s.ErrorTypes.MEDIA_ERROR,parent:a.parent};22!==e.code?(this.appendError?this.appendError++:this.appendError=1,c.details=s.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>t.config.appendErrorMaxRetry?(o.logger.log("fail "+t.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],c.fatal=!0,t.trigger(i.default.ERROR,c)):(c.fatal=!1,t.trigger(i.default.ERROR,c))):(this.segments=[],c.details=s.ErrorDetails.BUFFER_FULL_ERROR,c.fatal=!1,t.trigger(i.default.ERROR,c))}}}},n.prototype.flushBuffer=function(e,t,n){var r,i=this.sourceBuffer;if(Object.keys(i).length){if(o.logger.log("flushBuffer,pos/start/end: "+this.media.currentTime.toFixed(3)+"/"+e+"/"+t),this.flushBufferCounter<this.appended){for(var a in i)if(!n||a===n){if(r=i[a],r.ended=!1,r.updating)return o.logger.warn("cannot flush, sb updating in progress"),!1;if(this.removeBufferRange(a,r,e,t))return this.flushBufferCounter++,!1}}else o.logger.warn("abort flushing too many retries");o.logger.log("buffer flushed")}return!0},n.prototype.removeBufferRange=function(e,t,n,r){try{for(var i=0;i<t.buffered.length;i++){var a=t.buffered.start(i),s=t.buffered.end(i),l=Math.max(a,n),u=Math.min(s,r);if(Math.min(u,s)-l>.5)return o.logger.log("sb remove "+e+" ["+l+","+u+"], of ["+a+","+s+"], pos:"+this.media.currentTime),t.remove(l,u),!0}}catch(e){o.logger.warn("removeBufferRange failed",e)}return!1},n}(a.default);t.default=c}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/cap-level-controller.js":/*!************************************************!*\
  !*** ./src/controller/cap-level-controller.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! ../events */"./src/events.js"),a=n(/*! ../event-handler */"./src/event-handler.js"),o=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 r(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,i){return n.isLevelAllowed(i,t.restrictedLevels)&&i<=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=e.length-1,i=0;i<e.length;i+=1){var a=e[i];if((a.width>=t||a.height>=n)&&function(e,t){return!t||(e.width!==t.width||e.height!==t.height)}(a,e[i+1])){r=i;break}}return r},n}(a.default);t.default=o}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/eme-controller.js":/*!******************************************!*\
  !*** ./src/controller/eme-controller.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! ../event-handler */"./src/event-handler.js"),a=n(/*! ../events */"./src/events.js"),o=n(/*! ../errors */"./src/errors.js"),s=n(/*! ../utils/logger */"./src/utils/logger.js"),l=window.XMLHttpRequest,u={WIDEVINE:"com.widevine.alpha",PLAYREADY:"com.microsoft.playready"},c=function(e,t,n){var r={videoCapabilities:[]};return t.forEach(function(e){r.videoCapabilities.push({contentType:'video/mp4; codecs="'+e+'"'})}),[r]},p=function(e,t,n){switch(e){case u.WIDEVINE:return c(0,n);default:throw Error("Unknown key-system: "+e)}},f=function(e){function t(t){var n=e.call(this,t,a.default.MEDIA_ATTACHED,a.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 r(t,e),t.prototype.getLicenseServerUrl=function(e){var t;switch(e){case u.WIDEVINE:t=this._widevineLicenseUrl;break;default:t=null}return t||(s.logger.error('No license server URL configured for key-system "'+e+'"'),this.hls.trigger(a.default.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})),t},t.prototype._attemptKeySystemAccess=function(e,t,n){var r=this,i=p(e,0,n);if(!i)return void s.logger.warn("Can not create config for key-system (maybe because platform is not supported):",e);s.logger.log("Requesting encrypted media key-system access"),this.requestMediaKeySystemAccess(e,i).then(function(t){r._onMediaKeySystemAccessObtained(e,t)}).catch(function(t){s.logger.error('Failed to obtain key-system "'+e+'" access:',t)})},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;s.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,s.logger.log('Media-keys created for key-system "'+e+'"'),n._onMediaKeysCreated()}).catch(function(e){s.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;s.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){s.logger.log("Got EME message event, creating license request"),this._requestLicense(t,function(t){s.logger.log("Received license data, updating key-session"),e.update(t)})},t.prototype._onMediaEncrypted=function(e,t){s.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 s.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(a.default.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});s.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 s.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(a.default.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(t.mediaKeysSessionInitialized)return void s.logger.warn("Key-Session already initialized but requested again");var n=t.mediaKeysSession;n||(s.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(a.default.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0}));var r=this._mediaEncryptionInitDataType,i=this._mediaEncryptionInitData;s.logger.log('Generating key-session request for "'+r+'" init data type'),t.mediaKeysSessionInitialized=!0,n.generateRequest(r,i).then(function(){s.logger.debug("Key-session generation succeeded")}).catch(function(t){s.logger.error("Error generating key-session request:",t),e.hls.trigger(a.default.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},t.prototype._createLicenseXhr=function(e,t,n){var r=new l,i=this._licenseXhrSetup;try{if(i)try{i(r,e)}catch(t){r.open("POST",e,!0),i(r,e)}r.readyState||r.open("POST",e,!0)}catch(e){return s.logger.error("Error setting up key-system license XHR",e),void this.hls.trigger(a.default.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.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,s.logger.log("License request succeeded"),r(e.response);else{if(s.logger.error("License Request XHR failed ("+t+"). Status: "+e.status+" ("+e.statusText+")"),++this._requestLicenseFailureCount<=3){var i=3-this._requestLicenseFailureCount+1;return s.logger.warn("Retrying license request, "+i+" attempts left"),void this._requestLicense(n,r)}this.hls.trigger(a.default.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}}},t.prototype._generateLicenseRequestChallenge=function(e,t){var n;return e.mediaKeySystemDomain===u.PLAYREADY?s.logger.error("PlayReady is not supported (yet)"):e.mediaKeySystemDomain===u.WIDEVINE?n=t:s.logger.error("Unsupported key-system:",e.mediaKeySystemDomain),n},t.prototype._requestLicense=function(e,t){s.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n)return s.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(a.default.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});var r=this.getLicenseServerUrl(n.mediaKeySystemDomain),i=this._createLicenseXhr(r,e,t);s.logger.log("Sending license request to URL: "+r),i.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(u.WIDEVINE,t,n)}},t}(i.default);t.default=f},"./src/controller/fps-controller.js":/*!******************************************!*\
  !*** ./src/controller/fps-controller.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! ../events */"./src/events.js"),a=n(/*! ../event-handler */"./src/event-handler.js"),o=n(/*! ../utils/logger */"./src/utils/logger.js"),s=window.performance,l=function(e){function t(t){return e.call(this,t,i.default.MEDIA_ATTACHING)||this}return r(t,e),t.prototype.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},t.prototype.onMediaAttaching=function(e){var t=this.hls.config;if(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=s.now();if(t){if(this.lastTime){var a=r-this.lastTime,l=n-this.lastDroppedFrames,u=t-this.lastDecodedFrames,c=1e3*l/a,p=this.hls;if(p.trigger(i.default.FPS_DROP,{currentDropped:l,currentDecoded:u,totalDroppedFrames:n}),c>0&&l>p.config.fpsDroppedMonitoringThreshold*u){var f=p.currentLevel;o.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+f),f>0&&(-1===p.autoLevelCapping||p.autoLevelCapping>=f)&&(f-=1,p.trigger(i.default.FPS_DROP_LEVEL_CAPPING,{level:f,droppedLevel:p.currentLevel}),p.autoLevelCapping=f,p.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}(a.default);t.default=l},"./src/controller/fragment-finders.js":/*!********************************************!*\
  !*** ./src/controller/fragment-finders.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){function r(t,n,r){if(!Array.isArray(t)||!t.length||!e.isFinite(n))return null;if(n<t[0].programDateTime)return null;if(n>=t[t.length-1].endProgramDateTime)return null;r=r||0;for(var i=0;i<t.length;++i){var a=t[i];if(o(n,r,a))return a}return null}function i(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var i=e?t[e.sn-t[0].sn+1]:null;return i&&!a(n,r,i)?i:s.default.search(t,a.bind(null,n,r))}function a(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 o(e,t,n){var r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.endProgramDateTime-r>e}Object.defineProperty(t,"__esModule",{value:!0});var s=n(/*! ../utils/binary-search */"./src/utils/binary-search.js");t.findFragmentByPDT=r,t.findFragmentByPTS=i,t.fragmentWithinToleranceTest=a,t.pdtWithinToleranceTest=o}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/fragment-tracker.js":/*!********************************************!*\
  !*** ./src/controller/fragment-tracker.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! ../event-handler */"./src/event-handler.js"),a=n(/*! ../events */"./src/events.js");t.FragmentState={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};var o=function(n){function o(e){var t=n.call(this,e,a.default.BUFFER_APPENDED,a.default.FRAG_BUFFERED,a.default.FRAG_LOADED)||this;return t.bufferPadding=.2,t.fragments=Object.create(null),t.timeRanges=Object.create(null),t.config=e.config,t}return r(o,n),o.prototype.destroy=function(){this.fragments=null,this.timeRanges=null,this.config=null,i.default.prototype.destroy.call(this),n.prototype.destroy.call(this)},o.prototype.getBufferedFrag=function(e,t){var n=this.fragments,r=Object.keys(n).filter(function(r){var i=n[r];if(i.body.type!==t)return!1;if(!i.buffered)return!1;var a=i.body;return a.startPTS<=e&&e<=a.endPTS});if(0===r.length)return null;var i=r.pop();return n[i].body},o.prototype.detectEvictedFragments=function(e,t){var n,r,i=this;Object.keys(this.fragments).forEach(function(a){var o=i.fragments[a];if(!0===o.buffered){var s=o.range[e];if(s){n=s.time;for(var l=0;l<n.length;l++)if(r=n[l],!1===i.isTimeBuffered(r.startPTS,r.endPTS,t)){i.removeFragment(o.body);break}}}})},o.prototype.detectPartialFragments=function(e){var t=this,n=this.getFragmentKey(e),r=this.fragments[n];r&&(r.buffered=!0,Object.keys(this.timeRanges).forEach(function(n){if(e.hasElementaryStream(n)){var i=t.timeRanges[n];r.range[n]=t.getBufferedTimes(e.startPTS,e.endPTS,i)}}))},o.prototype.getBufferedTimes=function(e,t,n){for(var r,i,a=[],o=!1,s=0;s<n.length;s++){if(r=n.start(s)-this.bufferPadding,i=n.end(s)+this.bufferPadding,e>=r&&t<=i){a.push({startPTS:Math.max(e,n.start(s)),endPTS:Math.min(t,n.end(s))});break}if(e<i&&t>r)a.push({startPTS:Math.max(e,n.start(s)),endPTS:Math.min(t,n.end(s))}),o=!0;else if(t<=r)break}return{time:a,partial:o}},o.prototype.getFragmentKey=function(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn},o.prototype.getPartialFragment=function(e){var t,n,r,i=this,a=null,o=0;return Object.keys(this.fragments).forEach(function(s){var l=i.fragments[s];i.isPartial(l)&&(n=l.body.startPTS-i.bufferPadding,r=l.body.endPTS+i.bufferPadding,e>=n&&e<=r&&(t=Math.min(e-n,r-e),o<=t&&(a=l.body,o=t)))}),a},o.prototype.getState=function(e){var n=this.getFragmentKey(e),r=this.fragments[n],i=t.FragmentState.NOT_LOADED;return void 0!==r&&(i=r.buffered?!0===this.isPartial(r)?t.FragmentState.PARTIAL:t.FragmentState.OK:t.FragmentState.APPENDING),i},o.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)},o.prototype.isTimeBuffered=function(e,t,n){for(var r,i,a=0;a<n.length;a++){if(r=n.start(a)-this.bufferPadding,i=n.end(a)+this.bufferPadding,e>=r&&t<=i)return!0;if(t<=r)return!1}return!1},o.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})},o.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)})},o.prototype.onFragBuffered=function(e){this.detectPartialFragments(e.frag)},o.prototype.hasFragment=function(e){var t=this.getFragmentKey(e);return void 0!==this.fragments[t]},o.prototype.removeFragment=function(e){var t=this.getFragmentKey(e);delete this.fragments[t]},o.prototype.removeAllFragments=function(){this.fragments=Object.create(null)},o}(i.default);t.FragmentTracker=o}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/gap-controller.js":/*!******************************************!*\
  !*** ./src/controller/gap-controller.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.js"),i=n(/*! ../errors */"./src/errors.js"),a=n(/*! ../events */"./src/events.js"),o=n(/*! ../utils/logger */"./src/utils/logger.js"),s=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,i=n.config,a=n.media,s=a.currentTime,l=window.performance.now();if(s!==e)return this.stallReported&&(o.logger.warn("playback not stuck anymore @"+s+", after "+Math.round(l-this.stalled)+"ms"),this.stallReported=!1),this.stalled=null,void(this.nudgeRetry=0);if(!(a.ended||!a.buffered.length||a.readyState>2||a.seeking&&r.BufferHelper.isBuffered(a,s))){var u=l-this.stalled,c=r.BufferHelper.bufferInfo(a,s,i.maxBufferHole);if(!this.stalled)return void(this.stalled=l);u>=1e3&&this._reportStall(c.len),this._tryFixBufferStall(c,u)}},e.prototype._tryFixBufferStall=function(e,t){var n=this,r=n.config,i=n.fragmentTracker,a=n.media,o=a.currentTime,s=i.getPartialFragment(o);s&&this._trySkipBufferHole(s),e.len>.5&&t>1e3*r.highBufferWatchdogPeriod&&(this.stalled=null,this._tryNudgeBuffer())},e.prototype._reportStall=function(e){var t=this,n=t.hls,r=t.media;t.stallReported||(this.stallReported=!0,o.logger.warn("Playback stalling at @"+r.currentTime+" due to low buffer"),n.trigger(a.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e}))},e.prototype._trySkipBufferHole=function(e){for(var t=this,n=t.hls,r=t.media,s=r.currentTime,l=0,u=0;u<r.buffered.length;u++){var c=r.buffered.start(u);if(s>=l&&s<c)return r.currentTime=Math.max(c,r.currentTime+.1),o.logger.warn("skipping hole, adjusting currentTime from "+s+" to "+r.currentTime),this.stalled=null,void n.trigger(a.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+s+" to "+r.currentTime,frag:e});l=r.buffered.end(u)}},e.prototype._tryNudgeBuffer=function(){var e=this,t=e.config,n=e.hls,r=e.media,s=r.currentTime,l=(this.nudgeRetry||0)+1;if(this.nudgeRetry=l,l<t.nudgeMaxRetry){var u=s+l*t.nudgeOffset;o.logger.log("adjust currentTime from "+s+" to "+u),r.currentTime=u,n.trigger(a.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else o.logger.error("still stuck in high buffer @"+s+" after "+t.nudgeMaxRetry+", raise fatal error"),n.trigger(a.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},e}();t.default=s},"./src/controller/id3-track-controller.js":/*!************************************************!*\
  !*** ./src/controller/id3-track-controller.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! ../events */"./src/events.js"),a=n(/*! ../event-handler */"./src/event-handler.js"),o=n(/*! ../demux/id3 */"./src/demux/id3.js"),s=n(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.js"),l=function(e){function t(t){var n=e.call(this,t,i.default.MEDIA_ATTACHED,i.default.MEDIA_DETACHING,i.default.FRAG_PARSING_METADATA)||this;return n.id3Track=void 0,n.media=void 0,n}return r(t,e),t.prototype.destroy=function(){a.default.prototype.destroy.call(this)},t.prototype.onMediaAttached=function(e){this.media=e.media,this.media},t.prototype.onMediaDetaching=function(){s.clearCurrentCues(this.id3Track),this.id3Track=void 0,this.media=void 0},t.prototype.getID3Track=function(e){for(var t=0;t<e.length;t++){var n=e[t];if("metadata"===n.kind&&"id3"===n.label)return s.sendAddTrackEvent(n,this.media),n}return this.media.addTextTrack("metadata","id3")},t.prototype.onFragParsingMetadata=function(e){var t=e.frag,n=e.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var r=window.WebKitDataCue||window.VTTCue||window.TextTrackCue,i=0;i<n.length;i++){var a=o.default.getID3Frames(n[i].data);if(a){var s=n[i].pts,l=i<n.length-1?n[i+1].pts:t.endPTS;s===l&&(l+=1e-4);for(var u=0;u<a.length;u++){var c=a[u];if(!o.default.isTimeStampFrame(c)){var p=new r(s,l,"");p.value=c,this.id3Track.addCue(p)}}}}},t}(a.default);t.default=l},"./src/controller/level-controller.js":/*!********************************************!*\
  !*** ./src/controller/level-controller.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i,a=n(/*! ../events */"./src/events.js"),o=n(/*! ../event-handler */"./src/event-handler.js"),s=n(/*! ../utils/logger */"./src/utils/logger.js"),l=n(/*! ../errors */"./src/errors.js"),u=n(/*! ../utils/codecs */"./src/utils/codecs.js"),c=n(/*! ./level-helper */"./src/controller/level-helper.js"),p=window.performance,f=function(e){function t(t){var n=e.call(this,t,a.default.MANIFEST_LOADED,a.default.LEVEL_LOADED,a.default.AUDIO_TRACK_SWITCHED,a.default.FRAG_LOADED,a.default.ERROR)||this;return n.canload=!1,n.currentLevelIndex=null,n.manualLevelIndex=-1,n.timer=null,i=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),n}return r(t,e),t.prototype.onHandlerDestroying=function(){this.clearTimer(),this.manualLevelIndex=-1},t.prototype.clearTimer=function(){null!==this.timer&&(clearTimeout(this.timer),this.timer=null)},t.prototype.startLoad=function(){var e=this._levels;this.canload=!0,this.levelRetryCount=0,e&&e.forEach(function(e){e.loadError=0;var t=e.details;t&&t.live&&(e.details=void 0)}),null!==this.timer&&this.loadLevel()},t.prototype.stopLoad=function(){this.canload=!1},t.prototype.onManifestLoaded=function(e){var t,n=[],r=[],o={},p=null,f=!1,d=!1;if(e.levels.forEach(function(e){var t=e.attrs;e.loadError=0,e.fragmentError=!1,f=f||!!e.videoCodec,d=d||!!e.audioCodec,i&&e.audioCodec&&-1!==e.audioCodec.indexOf("mp4a.40.34")&&(e.audioCodec=void 0),p=o[e.bitrate],p?p.url.push(e.url):(e.url=[e.url],e.urlId=0,o[e.bitrate]=e,n.push(e)),t&&(t.AUDIO&&(d=!0,c.addGroupId(p||e,"audio",t.AUDIO)),t.SUBTITLES&&c.addGroupId(p||e,"text",t.SUBTITLES))}),f&&d&&(n=n.filter(function(e){return!!e.videoCodec})),n=n.filter(function(e){var t=e.audioCodec,n=e.videoCodec;return(!t||u.isCodecSupportedInMp4(t,"audio"))&&(!n||u.isCodecSupportedInMp4(n,"video"))}),e.audioTracks&&(r=e.audioTracks.filter(function(e){return!e.audioCodec||u.isCodecSupportedInMp4(e.audioCodec,"audio")}),r.forEach(function(e,t){e.id=t})),n.length>0){t=n[0].bitrate,n.sort(function(e,t){return e.bitrate-t.bitrate}),this._levels=n;for(var h=0;h<n.length;h++)if(n[h].bitrate===t){this._firstLevel=h,s.logger.log("manifest loaded,"+n.length+" level(s) found, first bitrate:"+t);break}this.hls.trigger(a.default.MANIFEST_PARSED,{levels:n,audioTracks:r,firstLevel:this._firstLevel,stats:e.stats,audio:d,video:f,altAudio:r.some(function(e){return!!e.url})})}else this.hls.trigger(a.default.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},Object.defineProperty(t.prototype,"levels",{get:function(){return this._levels},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"level",{get:function(){return this.currentLevelIndex},set:function(e){var t=this._levels;t&&(e=Math.min(e,t.length-1),this.currentLevelIndex===e&&t[e].details||this.setLevelInternal(e))},enumerable:!0,configurable:!0}),t.prototype.setLevelInternal=function(e){var t=this._levels,n=this.hls;if(e>=0&&e<t.length){if(this.clearTimer(),this.currentLevelIndex!==e){s.logger.log("switching to level "+e),this.currentLevelIndex=e;var r=t[e];r.level=e,n.trigger(a.default.LEVEL_SWITCHING,r)}var i=t[e],o=i.details;if(!o||o.live){var u=i.urlId;n.trigger(a.default.LEVEL_LOADING,{url:i.url[u],level:e,id:u})}}else n.trigger(a.default.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:!1,reason:"invalid level idx"})},Object.defineProperty(t.prototype,"manualLevel",{get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstLevel",{get:function(){return this._firstLevel},set:function(e){this._firstLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"startLevel",{get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e},enumerable:!0,configurable:!0}),t.prototype.onError=function(e){if(e.fatal)return void(e.type===l.ErrorTypes.NETWORK_ERROR&&this.clearTimer());var t,n=!1,r=!1;switch(e.details){case l.ErrorDetails.FRAG_LOAD_ERROR:case l.ErrorDetails.FRAG_LOAD_TIMEOUT:case l.ErrorDetails.KEY_LOAD_ERROR:case l.ErrorDetails.KEY_LOAD_TIMEOUT:t=e.frag.level,r=!0;break;case l.ErrorDetails.LEVEL_LOAD_ERROR:case l.ErrorDetails.LEVEL_LOAD_TIMEOUT:t=e.context.level,n=!0;break;case l.ErrorDetails.REMUX_ALLOC_ERROR:t=e.level,n=!0}void 0!==t&&this.recoverLevel(e,t,n,r)},t.prototype.recoverLevel=function(e,t,n,r){var i,a,o,l=this,u=this.hls.config,c=e.details,p=this._levels[t];if(p.loadError++,p.fragmentError=r,n){if(!(this.levelRetryCount+1<=u.levelLoadingMaxRetry))return s.logger.error("level controller, cannot recover from "+c+" error"),this.currentLevelIndex=null,this.clearTimer(),void(e.fatal=!0);a=Math.min(Math.pow(2,this.levelRetryCount)*u.levelLoadingRetryDelay,u.levelLoadingMaxRetryTimeout),this.timer=setTimeout(function(){return l.loadLevel()},a),e.levelRetry=!0,this.levelRetryCount++,s.logger.warn("level controller, "+c+", retry in "+a+" ms, current retry count is "+this.levelRetryCount)}(n||r)&&(i=p.url.length,i>1&&p.loadError<i?(p.urlId=(p.urlId+1)%i,p.details=void 0,s.logger.warn("level controller, "+c+" for level "+t+": switching to redundant URL-id "+p.urlId)):-1===this.manualLevelIndex?(o=0===t?this._levels.length-1:t-1,s.logger.warn("level controller, "+c+": switch to "+o),this.hls.nextAutoLevel=this.currentLevelIndex=o):r&&(s.logger.warn("level controller, "+c+": reload a fragment"),this.currentLevelIndex=null))},t.prototype.onFragLoaded=function(e){var t=e.frag;if(void 0!==t&&"main"===t.type){var n=this._levels[t.level];void 0!==n&&(n.fragmentError=!1,n.loadError=0,this.levelRetryCount=0)}},t.prototype.onLevelLoaded=function(e){var t=this,n=e.level;if(n===this.currentLevelIndex){var r=this._levels[n];r.fragmentError||(r.loadError=0,this.levelRetryCount=0);var i=e.details;if(i.live){var a=1e3*(i.averagetargetduration?i.averagetargetduration:i.targetduration),o=a,l=r.details;l&&i.endSN===l.endSN&&(o/=2,s.logger.log("same live playlist, reload twice faster")),o-=p.now()-e.stats.trequest,o=Math.max(a/2,Math.round(o)),s.logger.log("live playlist, reload in "+Math.round(o)+" ms"),this.timer=setTimeout(function(){return t.loadLevel()},o)}else this.clearTimer()}},t.prototype.onAudioTrackSwitched=function(e){var t=this.hls.audioTracks[e.id].groupId,n=this.hls.levels[this.currentLevelIndex];if(n&&n.audioGroupIds){var r=n.audioGroupIds.findIndex(function(e){return e===t});r!==n.urlId&&(n.urlId=r,this.startLoad())}},t.prototype.loadLevel=function(){if(s.logger.debug("call to loadLevel"),null!==this.currentLevelIndex&&this.canload){var e=this._levels[this.currentLevelIndex];if("object"==typeof e&&e.url.length>0){var t=this.currentLevelIndex,n=e.urlId,r=e.url[n];s.logger.log("Attempt loading level index "+t+" with URL-id "+n),this.hls.trigger(a.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}(o.default);t.default=f},"./src/controller/level-helper.js":/*!****************************************!*\
  !*** ./src/controller/level-helper.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){function r(e,t,n){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(n);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(n)}}function i(t,n,r){var i=t[n],a=t[r],o=a.startPTS;e.isFinite(o)?r>n?(i.duration=o-i.start,i.duration<0&&s.logger.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):(a.duration=i.start-o,a.duration<0&&s.logger.warn("negative duration computed for frag "+a.sn+",level "+a.level+", there should be some duration drift between playlist and fragment!")):a.start=r>n?i.start+i.duration:Math.max(i.start-a.duration,0)}function a(t,n,r,a,o,s){var l=r;if(e.isFinite(n.startPTS)){var u=Math.abs(n.startPTS-r);e.isFinite(n.deltaPTS)?n.deltaPTS=Math.max(u,n.deltaPTS):n.deltaPTS=u,l=Math.max(r,n.startPTS),r=Math.min(r,n.startPTS),a=Math.max(a,n.endPTS),o=Math.min(o,n.startDTS),s=Math.max(s,n.endDTS)}var c=r-n.start;n.start=n.startPTS=r,n.maxStartPTS=l,n.endPTS=a,n.startDTS=o,n.endDTS=s,n.duration=a-r;var p=n.sn;if(!t||p<t.startSN||p>t.endSN)return 0;var f,d,h;for(f=p-t.startSN,d=t.fragments,d[f]=n,h=f;h>0;h--)i(d,h,h-1);for(h=f;h<d.length-1;h++)i(d,h,h+1);return t.PTSKnown=!0,c}function o(t,n){var r,i=Math.max(t.startSN,n.startSN)-n.startSN,o=Math.min(t.endSN,n.endSN)-n.startSN,l=n.startSN-t.startSN,u=t.fragments,c=n.fragments,p=0;if(n.initSegment&&t.initSegment&&(n.initSegment=t.initSegment),o<i)return void(n.PTSKnown=!1);for(var f=i;f<=o;f++){var d=u[l+f],h=c[f];h&&d&&(p=d.cc-h.cc,e.isFinite(d.startPTS)&&(h.start=h.startPTS=d.startPTS,h.endPTS=d.endPTS,h.duration=d.duration,h.backtracked=d.backtracked,h.dropped=d.dropped,r=h))}if(p)for(s.logger.log("discontinuity sliding from playlist, take drift into account"),f=0;f<c.length;f++)c[f].cc+=p;if(r)a(n,r,r.startPTS,r.endPTS,r.startDTS,r.endDTS);else if(l>=0&&l<u.length){var y=u[l].start;for(f=0;f<c.length;f++)c[f].start+=y}n.PTSKnown=t.PTSKnown}Object.defineProperty(t,"__esModule",{value:!0});var s=n(/*! ../utils/logger */"./src/utils/logger.js");t.addGroupId=r,t.updatePTS=i,t.updateFragPTSDTS=a,t.mergeDetails=o}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/stream-controller.js":/*!*********************************************!*\
  !*** ./src/controller/stream-controller.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! ../utils/binary-search */"./src/utils/binary-search.js"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.js"),o=n(/*! ../demux/demuxer */"./src/demux/demuxer.js"),s=n(/*! ../events */"./src/events.js"),l=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.js"),u=n(/*! ../loader/fragment */"./src/loader/fragment.js"),c=n(/*! ../loader/playlist-loader */"./src/loader/playlist-loader.js"),p=n(/*! ./level-helper */"./src/controller/level-helper.js"),f=n(/*! ../utils/time-ranges */"./src/utils/time-ranges.js"),d=n(/*! ../errors */"./src/errors.js"),h=n(/*! ../utils/logger */"./src/utils/logger.js"),y=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.js"),v=n(/*! ./fragment-finders */"./src/controller/fragment-finders.js"),g=n(/*! ./gap-controller */"./src/controller/gap-controller.js"),m=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.js"),b=function(t){function n(e,n){var r=t.call(this,e,s.default.MEDIA_ATTACHED,s.default.MEDIA_DETACHING,s.default.MANIFEST_LOADING,s.default.MANIFEST_PARSED,s.default.LEVEL_LOADED,s.default.KEY_LOADED,s.default.FRAG_LOADED,s.default.FRAG_LOAD_EMERGENCY_ABORTED,s.default.FRAG_PARSING_INIT_SEGMENT,s.default.FRAG_PARSING_DATA,s.default.FRAG_PARSED,s.default.ERROR,s.default.AUDIO_TRACK_SWITCHING,s.default.AUDIO_TRACK_SWITCHED,s.default.BUFFER_CREATED,s.default.BUFFER_APPENDED,s.default.BUFFER_FLUSHED)||this;return r.fragmentTracker=n,r.config=e.config,r.audioCodecSwap=!1,r._state=m.State.STOPPED,r.stallReported=!1,r.gapController=null,r}return r(n,t),n.prototype.onHandlerDestroying=function(){this.stopLoad(),t.prototype.onHandlerDestroying.call(this)},n.prototype.onHandlerDestroyed=function(){this.state=m.State.STOPPED,this.fragmentTracker=null,t.prototype.onHandlerDestroyed.call(this)},n.prototype.startLoad=function(e){if(this.levels){var t=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var r=n.startLevel;-1===r&&(r=0,this.bitrateTest=!0),this.level=n.nextLoadLevel=r,this.loadedmetadata=!1}t>0&&-1===e&&(h.logger.log("override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=m.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this.forceStartLoad=!0,this.state=m.State.STOPPED},n.prototype.stopLoad=function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragmentTracker.removeFragment(e),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.clearInterval(),this.state=m.State.STOPPED,this.forceStartLoad=!1},n.prototype.doTick=function(){switch(this.state){case m.State.BUFFER_FLUSHING:this.fragLoadError=0;break;case m.State.IDLE:this._doTickIdle();break;case m.State.WAITING_LEVEL:var e=this.levels[this.level];e&&e.details&&(this.state=m.State.IDLE);break;case m.State.FRAG_LOADING_WAITING_RETRY:var t=window.performance.now(),n=this.retryDate;(!n||t>=n||this.media&&this.media.seeking)&&(h.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=m.State.IDLE);break;case m.State.ERROR:case m.State.STOPPED:case m.State.FRAG_LOADING:case m.State.PARSING:case m.State.PARSED:case m.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 i=e.nextLoadLevel,o=this.levels[i];if(o){var l,u=o.bitrate;l=u?Math.max(8*t.maxBufferSize/u,t.maxBufferLength):t.maxBufferLength,l=Math.min(l,t.maxMaxBufferLength);var c=a.BufferHelper.bufferInfo(this.mediaBuffer?this.mediaBuffer:n,r,t.maxBufferHole),p=c.len;if(!(p>=l)){h.logger.trace("buffer length of "+p.toFixed(3)+" is below max of "+l.toFixed(3)+". checking for more payload ..."),this.level=e.nextLoadLevel=i;var f=o.details;if(!f||f.live&&this.levelLastLoaded!==i)return void(this.state=m.State.WAITING_LEVEL);if(this._streamEnded(c,f)){var d={};return this.altAudio&&(d.type="video"),this.hls.trigger(s.default.BUFFER_EOS,d),void(this.state=m.State.ENDED)}this._fetchPayloadOrEos(r,c,f)}}}},n.prototype._fetchPayloadOrEos=function(e,t,n){var r=this.fragPrevious,i=this.level,a=n.fragments,o=a.length;if(0!==o){var s,l=a[0].start,u=a[o-1].start+a[o-1].duration,c=t.end;if(n.initSegment&&!n.initSegment.data)s=n.initSegment;else if(n.live){var p=this.config.initialLiveManifestSize;if(o<p)return void h.logger.warn("Can not start playback of a level, reason: not enough fragments "+o+" < "+p);if(null===(s=this._ensureFragmentAtLivePoint(n,c,l,u,r,a,o)))return}else c<l&&(s=a[0]);s||(s=this._findFragment(l,r,o,a,c,u,n)),s&&(s.encrypted?(h.logger.log("Loading key for "+s.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+i),this._loadKey(s)):(h.logger.log("Loading "+s.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+i+", currentTime:"+e.toFixed(3)+",bufferEnd:"+c.toFixed(3)),this._loadFragment(s)))}},n.prototype._ensureFragmentAtLivePoint=function(e,t,n,r,a,o,s){var l,u=this.hls.config,c=this.media,p=void 0!==u.liveMaxLatencyDuration?u.liveMaxLatencyDuration:u.liveMaxLatencyDurationCount*e.targetduration;if(t<Math.max(n-u.maxFragLookUpTolerance,r-p)){var f=this.liveSyncPosition=this.computeLivePosition(n,e);h.logger.log("buffer end: "+t.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+f.toFixed(3)),t=f,c&&c.readyState&&c.duration>f&&(c.currentTime=f),this.nextLoadPosition=f}if(e.PTSKnown&&t>r&&c&&c.readyState)return null;if(this.startFragRequested&&!e.PTSKnown){if(a)if(e.hasProgramDateTime)h.logger.log("live playlist, switching playlist, load frag with same PDT: "+a.programDateTime),l=v.findFragmentByPDT(o,a.endProgramDateTime,u.maxFragLookUpTolerance);else{var d=a.sn+1;if(d>=e.startSN&&d<=e.endSN){var y=o[d-e.startSN];a.cc===y.cc&&(l=y,h.logger.log("live playlist, switching playlist, load frag with next SN: "+l.sn))}l||(l=i.default.search(o,function(e){return a.cc-e.cc}))&&h.logger.log("live playlist, switching playlist, load frag with same CC: "+l.sn)}l||(l=o[Math.min(s-1,Math.round(s/2))],h.logger.log("live playlist, switching playlist, unknown, load middle frag : "+l.sn))}return l},n.prototype._findFragment=function(e,t,n,r,i,a,o){var s,l=this.hls.config;if(i<a){var u=i>a-l.maxFragLookUpTolerance?0:l.maxFragLookUpTolerance;s=v.findFragmentByPTS(t,r,i,u)}else s=r[n-1];if(s){var c=s.sn-o.startSN,p=t&&s.level===t.level,f=r[c-1],d=r[c+1];if(t&&s.sn===t.sn)if(p&&!s.backtracked)if(s.sn<o.endSN){var y=t.deltaPTS;y&&y>l.maxBufferHole&&t.dropped&&c?(s=f,h.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")):(s=d,h.logger.log("SN just loaded, load next one: "+s.sn,s))}else s=null;else s.backtracked&&(d&&d.backtracked?(h.logger.warn("Already backtracked from fragment "+d.sn+", will not backtrack to fragment "+s.sn+". Loading fragment "+d.sn),s=d):(h.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),s.dropped=0,f?(s=f,s.backtracked=!0):c&&(s=null)))}return s},n.prototype._loadKey=function(e){this.state=m.State.KEY_LOADING,this.hls.trigger(s.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(s.default.FRAG_LOADING,{frag:t}),this.demuxer||(this.demuxer=new o.default(this.hls,"main")),this.state=m.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,h.logger.log("main stream:"+t+"->"+e),this.hls.trigger(s.default.STREAM_STATE_TRANSITION,{previousState:t,nextState:e})}},enumerable:!0,configurable:!0}),n.prototype.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,c.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,t>this.lastCurrentTime&&(this.lastCurrentTime=t),a.BufferHelper.isBuffered(n,t)?e=this.getBufferedFrag(t):a.BufferHelper.isBuffered(n,t+.1)&&(e=this.getBufferedFrag(t+.1)),e)){var r=e;if(r!==this.fragPlaying){this.hls.trigger(s.default.FRAG_CHANGED,{frag:r});var i=r.level;this.fragPlaying&&this.fragPlaying.level===i||this.hls.trigger(s.default.LEVEL_SWITCHED,{level:i}),this.fragPlaying=r}}},n.prototype.immediateLevelSwitch=function(){if(h.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,a.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=void 0,r=void 0,i=void 0;if(r=this.getBufferedFrag(t.currentTime),r&&r.startPTS>1&&this.flushMainBuffer(0,r.startPTS-1),t.paused)n=0;else{var a=this.hls.nextLoadLevel,o=this.levels[a],s=this.fragLastKbps;n=s&&this.fragCurrent?this.fragCurrent.duration*o.bitrate/(1e3*s)+1:0}if((i=this.getBufferedFrag(t.currentTime+n))&&(i=this.followingBufferedFrag(i))){var l=this.fragCurrent;l&&l.loader&&l.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(i.maxStartPTS,e.POSITIVE_INFINITY)}}},n.prototype.flushMainBuffer=function(e,t){this.state=m.State.BUFFER_FLUSHING;var n={startOffset:e,endOffset:t};this.altAudio&&(n.type="video"),this.hls.trigger(s.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 g.default(n,t,this.fragmentTracker,this.hls)},n.prototype.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(h.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)&&h.logger.log("media seeked to "+n.toFixed(3)),this.tick()},n.prototype.onManifestLoading=function(){h.logger.log("trigger BUFFER_RESET"),this.hls.trigger(s.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&&h.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startFragRequested=!1;var i=this.config;(i.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(i.startPosition)},n.prototype.onLevelLoaded=function(t){var n=t.details,r=t.level,i=this.levels[this.levelLastLoaded],a=this.levels[r],o=n.totalduration,l=0;if(h.logger.log("level "+r+" loaded ["+n.startSN+","+n.endSN+"],duration:"+o),n.live){var u=a.details;u&&n.fragments.length>0?(p.mergeDetails(u,n),l=n.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(l,u),n.PTSKnown&&e.isFinite(l)?h.logger.log("live playlist sliding:"+l.toFixed(3)):(h.logger.log("live playlist - outdated PTS, unknown sliding"),y.alignStream(this.fragPrevious,i,n))):(h.logger.log("live playlist - first load, unknown sliding"),n.PTSKnown=!1,y.alignStream(this.fragPrevious,i,n))}else n.PTSKnown=!1;if(a.details=n,this.levelLastLoaded=r,this.hls.trigger(s.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&&(h.logger.log("negative start time offset "+c+", count from end of last fragment"),c=l+o+c),h.logger.log("start time offset found in playlist, adjust startPosition to "+c),this.startPosition=c):n.live?(this.startPosition=this.computeLivePosition(l,n),h.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===m.State.WAITING_LEVEL&&(this.state=m.State.IDLE),this.tick()},n.prototype.onKeyLoaded=function(){this.state===m.State.KEY_LOADING&&(this.state=m.State.IDLE,this.tick())},n.prototype.onFragLoaded=function(e){var t=this,n=t.fragCurrent,r=t.hls,i=t.levels,a=t.media,l=e.frag;if(this.state===m.State.FRAG_LOADING&&n&&"main"===l.type&&l.level===n.level&&l.sn===n.sn){var u=e.stats,c=i[n.level],p=c.details;if(this.bitrateTest=!1,this.stats=u,h.logger.log("Loaded "+n.sn+" of ["+p.startSN+" ,"+p.endSN+"],level "+n.level),l.bitrateTest&&r.nextLoadLevel)this.state=m.State.IDLE,this.startFragRequested=!1,u.tparsed=u.tbuffered=window.performance.now(),r.trigger(s.default.FRAG_BUFFERED,{stats:u,frag:n,id:"main"}),this.tick();else if("initSegment"===l.sn)this.state=m.State.IDLE,u.tparsed=u.tbuffered=window.performance.now(),p.initSegment.data=e.payload,r.trigger(s.default.FRAG_BUFFERED,{stats:u,frag:n,id:"main"}),this.tick();else{h.logger.log("Parsing "+n.sn+" of ["+p.startSN+" ,"+p.endSN+"],level "+n.level+", cc "+n.cc),this.state=m.State.PARSING,this.pendingBuffering=!0,this.appended=!1,l.bitrateTest&&(l.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:l}));var f=!(a&&a.seeking)&&(p.PTSKnown||!p.live),d=p.initSegment?p.initSegment.data:[],y=this._getAudioCodec(c),v=this.demuxer=this.demuxer||new o.default(this.hls,"main");v.push(e.payload,d,y,c.videoCodec,n,p.totalduration,f)}}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===m.State.PARSING){var r=e.tracks,i=void 0,a=void 0;if(r.audio&&this.altAudio&&delete r.audio,a=r.audio){var o=this.levels[this.level].audioCodec,l=navigator.userAgent.toLowerCase();o&&this.audioCodecSwap&&(h.logger.log("swapping playlist audio codec"),o=-1!==o.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==a.metadata.channelCount&&-1===l.indexOf("firefox")&&(o="mp4a.40.5"),-1!==l.indexOf("android")&&"audio/mpeg"!==a.container&&(o="mp4a.40.2",h.logger.log("Android: force audio codec to "+o)),a.levelCodec=o,a.id=e.id}a=r.video,a&&(a.levelCodec=this.levels[this.level].videoCodec,a.id=e.id),this.hls.trigger(s.default.BUFFER_CODECS,r);for(i in r){a=r[i],h.logger.log("main track:"+i+",container:"+a.container+",codecs[level/parsed]=["+a.levelCodec+"/"+a.codec+"]");var u=a.initSegment;u&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(s.default.BUFFER_APPENDING,{type:i,data:u,parent:"main",content:"initSegment"}))}this.tick()}},n.prototype.onFragParsingData=function(t){var n=this,r=this.fragCurrent,i=t.frag;if(r&&"main"===t.id&&i.sn===r.sn&&i.level===r.level&&("audio"!==t.type||!this.altAudio)&&this.state===m.State.PARSING){var a=this.levels[this.level],o=r;if(e.isFinite(t.endPTS)||(t.endPTS=t.startPTS+r.duration,t.endDTS=t.startDTS+r.duration),!0===t.hasAudio&&o.addElementaryStream(u.default.ElementaryStreamTypes.AUDIO),!0===t.hasVideo&&o.addElementaryStream(u.default.ElementaryStreamTypes.VIDEO),h.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(o.dropped=t.dropped,o.dropped)if(o.backtracked)h.logger.warn("Already backtracked on this fragment, appending with the gap",o.sn);else{var l=a.details;if(!l||o.sn!==l.startSN)return h.logger.warn("missing video frame(s), backtracking fragment",o.sn),this.fragmentTracker.removeFragment(o),o.backtracked=!0,this.nextLoadPosition=t.startPTS,this.state=m.State.IDLE,this.fragPrevious=o,void this.tick();h.logger.warn("missing video frame(s) on first frag, appending with gap",o.sn)}else o.backtracked=!1;var c=p.updateFragPTSDTS(a.details,o,t.startPTS,t.endPTS,t.startDTS,t.endDTS),f=this.hls;f.trigger(s.default.LEVEL_PTS_UPDATED,{details:a.details,level:this.level,drift:c,type:t.type,start:t.startPTS,end:t.endPTS}),[t.data1,t.data2].forEach(function(e){e&&e.length&&n.state===m.State.PARSING&&(n.appended=!0,n.pendingBuffering=!0,f.trigger(s.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===m.State.PARSING&&(this.stats.tparsed=window.performance.now(),this.state=m.State.PARSED,this._checkAppendedParsed())},n.prototype.onAudioTrackSwitching=function(t){var n=!!t.url,r=t.id;if(!n){if(this.mediaBuffer!==this.media){h.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var i=this.fragCurrent;i.loader&&(h.logger.log("switching to main audio track, cancel main fragment load"),i.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=m.State.IDLE}var a=this.hls;a.trigger(s.default.BUFFER_FLUSHING,{startOffset:0,endOffset:e.POSITIVE_INFINITY,type:"audio"}),a.trigger(s.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&&(h.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,i=!1;for(var a in r){var o=r[a];"main"===o.id?(n=a,t=o,"video"===a&&(this.videoBuffer=r[a].buffer)):i=!0}i&&t?(h.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!==m.State.PARSING&&t!==m.State.PARSED||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},n.prototype._checkAppendedParsed=function(){if(!(this.state!==m.State.PARSED||this.appended&&this.pendingBuffering)){var e=this.fragCurrent;if(e){var t=this.mediaBuffer?this.mediaBuffer:this.media;h.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(s.default.FRAG_BUFFERED,{stats:n,frag:e,id:"main"}),this.state=m.State.IDLE}this.tick()}},n.prototype.onError=function(t){var n=t.frag||this.fragCurrent;if(!n||"main"===n.type){var r=!!this.media&&a.BufferHelper.isBuffered(this.media,this.media.currentTime)&&a.BufferHelper.isBuffered(this.media,this.media.currentTime+.5);switch(t.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:case d.ErrorDetails.KEY_LOAD_ERROR:case d.ErrorDetails.KEY_LOAD_TIMEOUT:if(!t.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var i=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);h.logger.warn("mediaController: frag loading failed, retry in "+i+" ms"),this.retryDate=window.performance.now()+i,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=m.State.FRAG_LOADING_WAITING_RETRY}else h.logger.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=m.State.ERROR;break;case d.ErrorDetails.LEVEL_LOAD_ERROR:case d.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==m.State.ERROR&&(t.fatal?(this.state=m.State.ERROR,h.logger.warn("streamController: "+t.details+",switch to "+this.state+" state ...")):t.levelRetry||this.state!==m.State.WAITING_LEVEL||(this.state=m.State.IDLE));break;case d.ErrorDetails.BUFFER_FULL_ERROR:"main"!==t.parent||this.state!==m.State.PARSING&&this.state!==m.State.PARSED||(r?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=m.State.IDLE):(h.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,h.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,n=t.buffered;!this.loadedmetadata&&n.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,n)}},n.prototype.onFragLoadEmergencyAborted=function(){this.state=m.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(u.default.ElementaryStreamTypes.VIDEO,e.buffered),this.state=m.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&&(h.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&&(h.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}(m.default);t.default=b}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/controller/subtitle-stream-controller.js":/*!******************************************************!*\
  !*** ./src/controller/subtitle-stream-controller.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! ../events */"./src/events.js"),a=n(/*! ../utils/logger */"./src/utils/logger.js"),o=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.js"),s=n(/*! ../task-loop */"./src/task-loop.js"),l=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.js"),u=n(/*! ./fragment-finders */"./src/controller/fragment-finders.js"),c=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.js"),p=window.performance;t.SubtitleStreamControllerState={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING"};var f=t.SubtitleStreamControllerState,d=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)||this;return r.fragmentTracker=n,r.config=t.config,r.state=f.STOPPED,r.tracks=[],r.tracksBuffered=[],r.currentTrackId=-1,r.decrypter=new o.default(t,t.config),r}return r(t,e),t.prototype.onHandlerDestroyed=function(){this.fragmentTracker=null,this.state=f.STOPPED,e.prototype.onHandlerDestroyed.call(this)},t.prototype.onSubtitleFragProcessed=function(e){if(this.state=f.IDLE,e.success){var t=this.tracksBuffered[this.currentTrackId],n=e.frag;if(this.fragPrevious=n,t){for(var r,i=0;i<t.length;i++)if(n.start>=t[i].start&&n.start<=t[i].end){r=t[i];break}r?r.end=n.start+n.duration:t.push({start:n.start,end:n.start+n.duration})}}},t.prototype.onMediaAttached=function(e){this.media=e.media,this.state=f.IDLE},t.prototype.onMediaDetaching=function(){this.media=null,this.state=f.STOPPED},t.prototype.onError=function(e){var t=e.frag;t&&"subtitle"===t.type&&(this.state=f.IDLE)},t.prototype.onSubtitleTracksUpdated=function(e){var t=this;a.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)return void this.clearInterval();var t=this.tracks[this.currentTrackId];t&&t.details&&this.setInterval(500)},t.prototype.onSubtitleTrackLoaded=function(e){var t=e.id,n=e.details;if(!this.tracks)return void a.logger.warn("Can not update subtitle details, no tracks found");this.tracks[t]&&(a.logger.log("Updating subtitle track details"),this.tracks[t].details=n),this.setInterval(500)},t.prototype.onKeyLoaded=function(){this.state===f.KEY_LOADING&&(this.state=f.IDLE)},t.prototype.onFragLoaded=function(e){var t=this.fragCurrent,n=e.frag.decryptdata,r=e.frag,a=this.hls;if(this.state===f.FRAG_LOADING&&t&&"subtitle"===e.frag.type&&t.sn===e.frag.sn&&e.payload.byteLength>0&&n&&n.key&&"AES-128"===n.method){var o=p.now();this.decrypter.decrypt(e.payload,n.key.buffer,n.iv.buffer,function(e){var t=p.now();a.trigger(i.default.FRAG_DECRYPTED,{frag:r,payload:e,stats:{tstart:o,tdecrypt:t}})})}},t.prototype.doTick=function(){if(!this.media)return void(this.state=f.IDLE);switch(this.state){case f.IDLE:var e=this.tracks,t=this.currentTrackId;if(!e||!e[t]||!e[t].details)break;var n=e[t].details,r=this.config,o=r.maxBufferHole,s=Math.min(r.maxBufferLength,r.maxMaxBufferLength),p=r.maxFragLookUpTolerance,d=l.BufferHelper.bufferedInfo(this._getBuffered(),this.media.currentTime,o),h=d.end,y=d.len,v=n.fragments,g=v.length,m=v[g-1].start+v[g-1].duration,b=void 0;y<s&&h<m?b=u.findFragmentByPTS(this.fragPrevious,v,h,p):n.hasProgramDateTime&&this.fragPrevious&&(b=u.findFragmentByPDT(v,this.fragPrevious.endProgramDateTime,p)),b&&b.encrypted?(a.logger.log("Loading key for "+b.sn),this.state=f.KEY_LOADING,this.hls.trigger(i.default.KEY_LOADING,{frag:b})):b&&this.fragmentTracker.getState(b)===c.FragmentState.NOT_LOADED&&(b.trackId=t,this.fragCurrent=b,this.state=f.FRAG_LOADING,this.hls.trigger(i.default.FRAG_LOADING,{frag:b}))}},t.prototype._getBuffered=function(){return this.tracksBuffered[this.currentTrackId]||[]},t}(s.default);t.SubtitleStreamController=d},"./src/controller/subtitle-track-controller.js":/*!*****************************************************!*\
  !*** ./src/controller/subtitle-track-controller.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";function r(e){for(var t=[],n=0;n<e.length;n++)"subtitles"===e[n].kind&&t.push(e[n]);return t}var i=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=n(/*! ../events */"./src/events.js"),o=n(/*! ../event-handler */"./src/event-handler.js"),s=n(/*! ../utils/logger */"./src/utils/logger.js"),l=function(e){function t(t){var n=e.call(this,t,a.default.MEDIA_ATTACHED,a.default.MEDIA_DETACHING,a.default.MANIFEST_LOADING,a.default.MANIFEST_LOADED,a.default.SUBTITLE_TRACK_LOADED)||this;return n.tracks=[],n.trackId=-1,n.media=null,n.subtitleDisplay=!0,n}return i(t,e),t.prototype._onTextTracksChanged=function(){if(this.media){for(var e=-1,t=r(this.media.textTracks),n=0;n<t.length;n++)if("hidden"===t[n].mode)e=n;else if("showing"===t[n].mode){e=n;break}this.subtitleTrack=e}},t.prototype.destroy=function(){o.default.prototype.destroy.call(this)},t.prototype.onMediaAttached=function(e){var t=this;this.media=e.media,this.media&&(this.queuedDefaultTrack&&(this.subtitleTrack=this.queuedDefaultTrack,delete this.queuedDefaultTrack),this.trackChangeListener=this._onTextTracksChanged.bind(this),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.subtitlePollingInterval=setInterval(function(){t.trackChangeListener()},500):this.media.textTracks.addEventListener("change",this.trackChangeListener))},t.prototype.onMediaDetaching=function(){this.media&&(this.useTextTrackPolling?clearInterval(this.subtitlePollingInterval):this.media.textTracks.removeEventListener("change",this.trackChangeListener),this.media=null)},t.prototype.onManifestLoading=function(){this.tracks=[],this.trackId=-1},t.prototype.onManifestLoaded=function(e){var t=this,n=e.subtitles||[];this.tracks=n,this.trackId=-1,this.hls.trigger(a.default.SUBTITLE_TRACKS_UPDATED,{subtitleTracks:n}),n.forEach(function(e){e.default&&(t.media?t.subtitleTrack=e.id:t.queuedDefaultTrack=e.id)})},t.prototype.onTick=function(){var e=this.trackId,t=this.tracks[e];if(t){var n=t.details;n&&!n.live||(s.logger.log("(re)loading playlist for subtitle track "+e),this.hls.trigger(a.default.SUBTITLE_TRACK_LOADING,{url:t.url,id:e}))}},t.prototype.onSubtitleTrackLoaded=function(e){var t=this;e.id<this.tracks.length&&(s.logger.log("subtitle track "+e.id+" loaded"),this.tracks[e.id].details=e.details,e.details.live&&!this.timer&&(this.timer=setInterval(function(){t.onTick()},1e3*e.details.targetduration,this)),!e.details.live&&this.timer&&this._stopTimer())},Object.defineProperty(t.prototype,"subtitleTracks",{get:function(){return this.tracks},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subtitleTrack",{get:function(){return this.trackId},set:function(e){this.trackId!==e&&(this._toggleTrackModes(e),this.setSubtitleTrackInternal(e))},enumerable:!0,configurable:!0}),t.prototype.setSubtitleTrackInternal=function(e){var t=this,n=t.hls,r=t.tracks;if(!("number"!=typeof e||e<-1||e>=r.length)&&(this._stopTimer(),this.trackId=e,s.logger.log("switching to subtitle track "+e),n.trigger(a.default.SUBTITLE_TRACK_SWITCH,{id:e}),-1!==e)){var i=r[e],o=i.details;o&&!o.live||(s.logger.log("(re)loading playlist for subtitle track "+e),n.trigger(a.default.SUBTITLE_TRACK_LOADING,{url:i.url,id:e}))}},t.prototype._stopTimer=function(){this.timer&&(clearInterval(this.timer),this.timer=null)},t.prototype._toggleTrackModes=function(e){var t=this,n=t.media,i=t.subtitleDisplay,a=t.trackId;if(n){var o=r(n.textTracks);if(-1===e)[].slice.call(o).forEach(function(e){e.mode="disabled"});else{var s=o[a];s&&(s.mode="disabled")}var l=o[e];l&&(l.mode=i?"showing":"hidden")}},t}(o.default);t.default=l},"./src/controller/timeline-controller.js":/*!***********************************************!*\
  !*** ./src/controller/timeline-controller.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){function r(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}function i(e,t,n,r){return Math.min(t,r)-Math.max(e,n)}var a=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(/*! ../events */"./src/events.js"),s=n(/*! ../event-handler */"./src/event-handler.js"),l=n(/*! ../utils/cea-608-parser */"./src/utils/cea-608-parser.js"),u=n(/*! ../utils/output-filter */"./src/utils/output-filter.js"),c=n(/*! ../utils/webvtt-parser */"./src/utils/webvtt-parser.js"),p=n(/*! ../utils/logger */"./src/utils/logger.js"),f=n(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.js"),d=function(t){function n(e){var n=t.call(this,e,o.default.MEDIA_ATTACHING,o.default.MEDIA_DETACHING,o.default.FRAG_PARSING_USERDATA,o.default.FRAG_DECRYPTED,o.default.MANIFEST_LOADING,o.default.MANIFEST_LOADED,o.default.FRAG_LOADED,o.default.LEVEL_SWITCHING,o.default.INIT_PTS_FOUND)||this;if(n.hls=e,n.config=e.config,n.enabled=!0,n.Cues=e.config.cueHandler,n.textTracks=[],n.tracks=[],n.unparsedVttFrags=[],n.initPTS=[],n.cueRanges=[],n.captionsTracks={},n.captionsProperties={textTrack1:{label:n.config.captionsTextTrack1Label,languageCode:n.config.captionsTextTrack1LanguageCode},textTrack2:{label:n.config.captionsTextTrack2Label,languageCode:n.config.captionsTextTrack2LanguageCode}},n.config.enableCEA708Captions){var r=new u.default(n,"textTrack1"),i=new u.default(n,"textTrack2");n.cea608Parser=new l.default(0,r,i)}return n}return a(n,t),n.prototype.addCues=function(e,t,n,r){for(var a=this.cueRanges,o=!1,s=a.length;s--;){var l=a[s],u=i(l[0],l[1],t,n);if(u>=0&&(l[0]=Math.min(l[0],t),l[1]=Math.max(l[1],n),o=!0,u/(n-t)>.5))return}o||a.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<t.textTracks.length;n++){var r=t.textTracks[n];if(r[e])return r}return null},n.prototype.createCaptionsTrack=function(e){var t=this.captionsProperties[e],n=t.label,r=t.languageCode,i=this.captionsTracks;if(!i[e]){var a=this.getExistingTrack(e);if(a)i[e]=a,f.clearCurrentCues(i[e]),f.sendAddTrackEvent(i[e],this.media);else{var o=this.createTextTrack("captions",n,r);o&&(o[e]=!0,i[e]=o)}}},n.prototype.createTextTrack=function(e,t,n){var r=this.media;if(r)return r.addTextTrack(e,t,n)},n.prototype.destroy=function(){s.default.prototype.destroy.call(this)},n.prototype.onMediaAttaching=function(e){this.media=e.media,this._cleanTracks()},n.prototype.onMediaDetaching=function(){var e=this.captionsTracks;Object.keys(e).forEach(function(t){f.clearCurrentCues(e[t]),delete e[t]})},n.prototype.onManifestLoading=function(){this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this._cleanTracks()},n.prototype._cleanTracks=function(){var e=this.media;if(e){var t=e.textTracks;if(t)for(var n=0;n<t.length;n++)f.clearCurrentCues(t[n])}},n.prototype.onManifestLoaded=function(e){var t=this;if(this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.cueRanges=[],this.config.enableWebVTT){this.tracks=e.subtitles||[];var n=this.media?this.media.textTracks:[];this.tracks.forEach(function(e,i){var a;if(i<n.length){var o=[].slice.call(n).find(function(t){return r(t,e)});o&&(a=o)}a||(a=t.createTextTrack("subtitles",e.name,e.lang)),e.default?a.mode=t.hls.subtitleDisplay?"showing":"hidden":a.mode="disabled",t.textTracks.push(a)})}},n.prototype.onLevelSwitching=function(){this.enabled="NONE"!==this.hls.currentLevel.closedCaptions},n.prototype.onFragLoaded=function(t){var n=t.frag,r=t.payload;if("main"===n.type){var i=n.sn;if(i!==this.lastSn+1){var a=this.cea608Parser;a&&a.reset()}this.lastSn=i}else if("subtitle"===n.type)if(r.byteLength){if(!e.isFinite(this.initPTS[n.cc]))return this.unparsedVttFrags.push(t),void(this.initPTS.length&&this.hls.trigger(o.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n}));var s=n.decryptdata;null!=s&&null!=s.key&&"AES-128"===s.method||this._parseVTTs(n,r)}else this.hls.trigger(o.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n})},n.prototype._parseVTTs=function(e,t){var n=this.vttCCs;n[e.cc]||(n[e.cc]={start:e.start,prevCC:this.prevCC,new:!0},this.prevCC=e.cc);var r=this.textTracks,i=this.hls;c.default.parse(t,this.initPTS[e.cc],n,e.cc,function(t){var n=r[e.trackId];if("disabled"===n.mode)return void i.trigger(o.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e});t.forEach(function(e){if(!n.cues.getCueById(e.id))try{n.addCue(e)}catch(r){var t=new window.TextTrackCue(e.startTime,e.endTime,e.text);t.id=e.id,n.addCue(t)}}),i.trigger(o.default.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},function(t){p.logger.log("Failed to parse VTT cue: "+t),i.trigger(o.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})})},n.prototype.onFragDecrypted=function(t){var n=t.payload,r=t.frag;if("subtitle"===r.type){if(!e.isFinite(this.initPTS[r.cc]))return void this.unparsedVttFrags.push(t);this._parseVTTs(r,n)}},n.prototype.onFragParsingUserdata=function(e){if(this.enabled&&this.config.enableCEA708Captions)for(var t=0;t<e.samples.length;t++){var n=this.extractCea608Data(e.samples[t].bytes);this.cea608Parser.addData(e.samples[t].pts,n)}},n.prototype.extractCea608Data=function(e){for(var t,n,r,i,a,o=31&e[0],s=2,l=[],u=0;u<o;u++)t=e[s++],n=127&e[s++],r=127&e[s++],i=0!=(4&t),a=3&t,0===n&&0===r||i&&0===a&&(l.push(n),l.push(r));return l},n}(s.default);t.default=d}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/crypt/aes-crypto.js":/*!*********************************!*\
  !*** ./src/crypt/aes-crypto.js ***!
  \*********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.subtle=e,this.aesIV=t}return e.prototype.decrypt=function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)},e}();t.default=r},"./src/crypt/aes-decryptor.js":/*!************************************!*\
  !*** ./src/crypt/aes-decryptor.js ***!
  \************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";function r(e){var t=e.byteLength,n=t&&new DataView(e).getUint8(t-1);return n?e.slice(0,t-n):e}Object.defineProperty(t,"__esModule",{value:!0}),t.removePadding=r;var i=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}return e.prototype.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),n=new Uint32Array(4),r=0;r<4;r++)n[r]=t.getUint32(4*r);return n},e.prototype.initTable=function(){var e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],a=n[2],o=n[3],s=this.invSubMix,l=s[0],u=s[1],c=s[2],p=s[3],f=new Uint32Array(256),d=0,h=0,y=0;for(y=0;y<256;y++)f[y]=y<128?y<<1:y<<1^283;for(y=0;y<256;y++){var v=h^h<<1^h<<2^h<<3^h<<4;v=v>>>8^255&v^99,e[d]=v,t[v]=d;var g=f[d],m=f[g],b=f[m],_=257*f[v]^16843008*v;r[d]=_<<24|_>>>8,i[d]=_<<16|_>>>16,a[d]=_<<8|_>>>24,o[d]=_,_=16843009*b^65537*m^257*g^16843008*d,l[v]=_<<24|_>>>8,u[v]=_<<16|_>>>16,c[v]=_<<8|_>>>24,p[v]=_,d?(d=g^f[f[f[b^g]]],h^=f[f[h]]):d=h=1}},e.prototype.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,r=0;r<t.length&&n;)n=t[r]===this.key[r],r++;if(!n){this.key=t;var i=this.keySize=t.length;if(4!==i&&6!==i&&8!==i)throw new Error("Invalid aes key size="+i);var a,o,s,l,u=this.ksRows=4*(i+6+1),c=this.keySchedule=new Uint32Array(u),p=this.invKeySchedule=new Uint32Array(u),f=this.sBox,d=this.rcon,h=this.invSubMix,y=h[0],v=h[1],g=h[2],m=h[3];for(a=0;a<u;a++)a<i?s=c[a]=t[a]:(l=s,a%i==0?(l=l<<8|l>>>24,l=f[l>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[255&l],l^=d[a/i|0]<<24):i>6&&a%i==4&&(l=f[l>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[255&l]),c[a]=s=(c[a-i]^l)>>>0);for(o=0;o<u;o++)a=u-o,l=3&o?c[a]:c[a-4],p[o]=o<4||a<=4?l:y[f[l>>>24]]^v[f[l>>>16&255]]^g[f[l>>>8&255]]^m[f[255&l]],p[o]=p[o]>>>0}},e.prototype.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},e.prototype.decrypt=function(e,t,n,i){for(var a,o,s,l,u,c,p,f,d,h,y,v,g,m,b=this.keySize+6,_=this.invKeySchedule,E=this.invSBox,k=this.invSubMix,T=k[0],A=k[1],w=k[2],S=k[3],P=this.uint8ArrayToUint32Array_(n),O=P[0],C=P[1],x=P[2],R=P[3],I=new Int32Array(e),D=new Int32Array(I.length),M=this.networkToHostOrderSwap;t<I.length;){for(d=M(I[t]),h=M(I[t+1]),y=M(I[t+2]),v=M(I[t+3]),u=d^_[0],c=v^_[1],p=y^_[2],f=h^_[3],g=4,m=1;m<b;m++)a=T[u>>>24]^A[c>>16&255]^w[p>>8&255]^S[255&f]^_[g],o=T[c>>>24]^A[p>>16&255]^w[f>>8&255]^S[255&u]^_[g+1],s=T[p>>>24]^A[f>>16&255]^w[u>>8&255]^S[255&c]^_[g+2],l=T[f>>>24]^A[u>>16&255]^w[c>>8&255]^S[255&p]^_[g+3],u=a,c=o,p=s,f=l,g+=4;a=E[u>>>24]<<24^E[c>>16&255]<<16^E[p>>8&255]<<8^E[255&f]^_[g],o=E[c>>>24]<<24^E[p>>16&255]<<16^E[f>>8&255]<<8^E[255&u]^_[g+1],s=E[p>>>24]<<24^E[f>>16&255]<<16^E[u>>8&255]<<8^E[255&c]^_[g+2],l=E[f>>>24]<<24^E[u>>16&255]<<16^E[c>>8&255]<<8^E[255&p]^_[g+3],g+=3,D[t]=M(a^O),D[t+1]=M(l^C),D[t+2]=M(s^x),D[t+3]=M(o^R),O=d,C=h,x=y,R=v,t+=4}return i?r(D.buffer):D.buffer},e.prototype.destroy=function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0},e}();t.default=i},"./src/crypt/decrypter.js":/*!********************************!*\
  !*** ./src/crypt/decrypter.js ***!
  \********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ./aes-crypto */"./src/crypt/aes-crypto.js"),i=n(/*! ./fast-aes-key */"./src/crypt/fast-aes-key.js"),a=n(/*! ./aes-decryptor */"./src/crypt/aes-decryptor.js"),o=n(/*! ../errors */"./src/errors.js"),s=n(/*! ../utils/logger */"./src/utils/logger.js"),l=n(/*! ../events */"./src/events.js"),u=n(/*! ../utils/get-self-scope */"./src/utils/get-self-scope.js"),c=u.getSelfScope(),p=function(){function e(e,t,n){var r=(void 0===n?{}:n).removePKCS7Padding,i=void 0===r||r;if(this.logEnabled=!0,this.observer=e,this.config=t,this.removePKCS7Padding=i,i)try{var a=c.crypto;a&&(this.subtle=a.subtle||a.webkitSubtle)}catch(e){}this.disableWebCrypto=!this.subtle}return e.prototype.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},e.prototype.decrypt=function(e,t,n,o){var l=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(s.logger.log("JS AES decrypt"),this.logEnabled=!1);var u=this.decryptor;u||(this.decryptor=u=new a.default),u.expandKey(t),o(u.decrypt(e,0,n,this.removePKCS7Padding))}else{this.logEnabled&&(s.logger.log("WebCrypto AES decrypt"),this.logEnabled=!1);var c=this.subtle;this.key!==t&&(this.key=t,this.fastAesKey=new i.default(c,t)),this.fastAesKey.expandKey().then(function(i){new r.default(c,n).decrypt(e,i).catch(function(r){l.onWebCryptoError(r,e,t,n,o)}).then(function(e){o(e)})}).catch(function(r){l.onWebCryptoError(r,e,t,n,o)})}},e.prototype.onWebCryptoError=function(e,t,n,r,i){this.config.enableSoftwareAES?(s.logger.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(t,n,r,i)):(s.logger.error("decrypting error : "+e.message),this.observer.trigger(l.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_DECRYPT_ERROR,fatal:!0,reason:e.message}))},e.prototype.destroy=function(){var e=this.decryptor;e&&(e.destroy(),this.decryptor=void 0)},e}();t.default=p},"./src/crypt/fast-aes-key.js":/*!***********************************!*\
  !*** ./src/crypt/fast-aes-key.js ***!
  \***********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.subtle=e,this.key=t}return e.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}();t.default=r},"./src/demux/aacdemuxer.js":/*!*********************************!*\
  !*** ./src/demux/aacdemuxer.js ***!
  \*********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ./adts */"./src/demux/adts.js"),i=n(/*! ../utils/logger */"./src/utils/logger.js"),a=n(/*! ../demux/id3 */"./src/demux/id3.js"),o=function(){function t(e,t,n){this.observer=e,this.config=n,this.remuxer=t}return t.prototype.resetInitSegment=function(e,t,n,r){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:t,duration:r,inputTimeScale:9e4}},t.prototype.resetTimeStamp=function(){},t.probe=function(e){if(!e)return!1;for(var t=a.default.getID3Data(e,0)||[],n=t.length,o=e.length;n<o;n++)if(r.probe(e,n))return i.logger.log("ADTS sync word found !"),!0;return!1},t.prototype.append=function(t,n,o,s){for(var l=this._audioTrack,u=a.default.getID3Data(t,0)||[],c=a.default.getTimeStamp(u),p=e.isFinite(c)?90*c:9e4*n,f=0,d=p,h=t.length,y=u.length,v=[{pts:d,dts:d,data:u}];y<h-1;)if(r.isHeader(t,y)&&y+5<h){r.initTrackConfig(l,this.observer,t,y,l.manifestCodec);var g=r.appendFrame(l,t,y,p,f);if(!g){i.logger.log("Unable to parse AAC frame");break}y+=g.length,d=g.sample.pts,f++}else a.default.isHeader(t,y)?(u=a.default.getID3Data(t,y),v.push({pts:d,dts:d,data:u}),y+=u.length):y++;this.remuxer.remux(l,{samples:[]},{samples:v,inputTimeScale:9e4},{samples:[]},n,o,s)},t.prototype.destroy=function(){},t}();t.default=o}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/demux/adts.js":/*!***************************!*\
  !*** ./src/demux/adts.js ***!
  \***************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";function r(e,t,n,r){var i,a,o,s,l,u=navigator.userAgent.toLowerCase(),c=r,p=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];return i=1+((192&t[n+2])>>>6),(a=(60&t[n+2])>>>2)>p.length-1?void e.trigger(y.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+a}):(s=(1&t[n+2])<<2,s|=(192&t[n+3])>>>6,d.logger.log("manifest codec:"+r+",ADTS data:type:"+i+",sampleingIndex:"+a+"["+p[a]+"Hz],channelConfig:"+s),/firefox/i.test(u)?a>=6?(i=5,l=new Array(4),o=a-3):(i=2,l=new Array(2),o=a):-1!==u.indexOf("android")?(i=2,l=new Array(2),o=a):(i=5,l=new Array(4),r&&(-1!==r.indexOf("mp4a.40.29")||-1!==r.indexOf("mp4a.40.5"))||!r&&a>=6?o=a-3:((r&&-1!==r.indexOf("mp4a.40.2")&&(a>=6&&1===s||/vivaldi/i.test(u))||!r&&1===s)&&(i=2,l=new Array(2)),o=a)),l[0]=i<<3,l[0]|=(14&a)>>1,l[1]|=(1&a)<<7,l[1]|=s<<3,5===i&&(l[1]|=(14&o)>>1,l[2]=(1&o)<<7,l[2]|=8,l[3]=0),{config:l,samplerate:p[a],channelCount:s,codec:"mp4a.40."+i,manifestCodec:c})}function i(e,t){return 255===e[t]&&240==(246&e[t+1])}function a(e,t){return 1&e[t+1]?7:9}function o(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function s(e,t){return!!(t+1<e.length&&i(e,t))}function l(e,t){if(t+1<e.length&&i(e,t)){var n=a(e,t),r=n;t+5<e.length&&(r=o(e,t));var s=t+r;if(s===e.length||s+1<e.length&&i(e,s))return!0}return!1}function u(e,t,n,i,a){if(!e.samplerate){var o=r(t,n,i,a);e.config=o.config,e.samplerate=o.samplerate,e.channelCount=o.channelCount,e.codec=o.codec,e.manifestCodec=o.manifestCodec,d.logger.log("parsed codec:"+e.codec+",rate:"+o.samplerate+",nb channel:"+o.channelCount)}}function c(e){return 9216e4/e}function p(e,t,n,r,i){var s,l,u,c=e.length;if(s=a(e,t),l=o(e,t),(l-=s)>0&&t+s+l<=c)return u=n+r*i,{headerLength:s,frameLength:l,stamp:u}}function f(e,t,n,r,i){var a=c(e.samplerate),o=p(t,n,r,i,a);if(o){var s=o.stamp,l=o.headerLength,u=o.frameLength,f={unit:t.subarray(n+l,n+l+u),pts:s,dts:s};return e.samples.push(f),e.len+=u,{sample:f,length:u+l}}}Object.defineProperty(t,"__esModule",{value:!0});var d=n(/*! ../utils/logger */"./src/utils/logger.js"),h=n(/*! ../errors */"./src/errors.js"),y=n(/*! ../events */"./src/events.js");t.getAudioConfig=r,t.isHeaderPattern=i,t.getHeaderLength=a,t.getFullFrameLength=o,t.isHeader=s,t.probe=l,t.initTrackConfig=u,t.getFrameDuration=c,t.parseFrameHeader=p,t.appendFrame=f},"./src/demux/demuxer-inline.js":/*!*************************************!*\
  !*** ./src/demux/demuxer-inline.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ../events */"./src/events.js"),a=n(/*! ../errors */"./src/errors.js"),o=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.js"),s=n(/*! ../demux/aacdemuxer */"./src/demux/aacdemuxer.js"),l=n(/*! ../demux/mp4demuxer */"./src/demux/mp4demuxer.js"),u=n(/*! ../demux/tsdemuxer */"./src/demux/tsdemuxer.js"),c=n(/*! ../demux/mp3demuxer */"./src/demux/mp3demuxer.js"),p=n(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.js"),f=n(/*! ../remux/passthrough-remuxer */"./src/remux/passthrough-remuxer.js"),d=n(/*! ../utils/get-self-scope */"./src/utils/get-self-scope.js"),h=n(/*! ../utils/logger */"./src/utils/logger.js"),y=d.getSelfScope();try{r=y.performance.now.bind(y.performance)}catch(e){h.logger.debug("Unable to use Performance API on this environment"),r=y.Date.now}var v=function(){function e(e,t,n,r){this.observer=e,this.typeSupported=t,this.config=n,this.vendor=r}return e.prototype.destroy=function(){var e=this.demuxer;e&&e.destroy()},e.prototype.push=function(e,t,n,a,s,l,u,c,p,f,d,h){var y=this;if(e.byteLength>0&&null!=t&&null!=t.key&&"AES-128"===t.method){var v=this.decrypter;null==v&&(v=this.decrypter=new o.default(this.observer,this.config));var g=r();v.decrypt(e,t.key.buffer,t.iv.buffer,function(e){var o=r();y.observer.trigger(i.default.FRAG_DECRYPTED,{stats:{tstart:g,tdecrypt:o}}),y.pushDecrypted(new Uint8Array(e),t,new Uint8Array(n),a,s,l,u,c,p,f,d,h)})}else this.pushDecrypted(new Uint8Array(e),t,new Uint8Array(n),a,s,l,u,c,p,f,d,h)},e.prototype.pushDecrypted=function(e,t,n,r,o,d,h,y,v,g,m,b){var _=this.demuxer;if(!_||(h||y)&&!this.probe(e)){for(var E=this.observer,k=this.typeSupported,T=this.config,A=[{demux:u.default,remux:p.default},{demux:l.default,remux:f.default},{demux:s.default,remux:p.default},{demux:c.default,remux:p.default}],w=0,S=A.length;w<S;w++){var P=A[w],O=P.demux.probe;if(O(e)){var C=this.remuxer=new P.remux(E,T,k,this.vendor);_=new P.demux(E,C,T,k),this.probe=O;break}}if(!_)return void E.trigger(i.default.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});this.demuxer=_}var x=this.remuxer;(h||y)&&(_.resetInitSegment(n,r,o,g),x.resetInitSegment()),h&&(_.resetTimeStamp(b),x.resetTimeStamp(b)),"function"==typeof _.setDecryptData&&_.setDecryptData(t),_.append(e,d,v,m)},e}();t.default=v},"./src/demux/demuxer-worker.js":/*!*************************************!*\
  !*** ./src/demux/demuxer-worker.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../demux/demuxer-inline */"./src/demux/demuxer-inline.js"),i=n(/*! ../events */"./src/events.js"),a=n(/*! ../utils/logger */"./src/utils/logger.js"),o=n(/*! events */"./node_modules/node-libs-browser/node_modules/events/events.js"),s=function(e){var t=new o.EventEmitter;t.trigger=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];t.emit.apply(t,[e,e].concat(n))},t.off=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];t.removeListener.apply(t,[e].concat(n))};var n=function(t,n){e.postMessage({event:t,data:n})};e.addEventListener("message",function(i){var o=i.data;switch(o.cmd){case"init":var s=JSON.parse(o.config);e.demuxer=new r.default(t,o.typeSupported,s,o.vendor),a.enableLogs(s.debug),n("init",null);break;case"demux":e.demuxer.push(o.data,o.decryptdata,o.initSegment,o.audioCodec,o.videoCodec,o.timeOffset,o.discontinuity,o.trackSwitch,o.contiguous,o.duration,o.accurateTimeOffset,o.defaultInitPTS)}}),t.on(i.default.FRAG_DECRYPTED,n),t.on(i.default.FRAG_PARSING_INIT_SEGMENT,n),t.on(i.default.FRAG_PARSED,n),t.on(i.default.ERROR,n),t.on(i.default.FRAG_PARSING_METADATA,n),t.on(i.default.FRAG_PARSING_USERDATA,n),t.on(i.default.INIT_PTS_FOUND,n),t.on(i.default.FRAG_PARSING_DATA,function(t,n){var r=[],i={event:t,data:n};n.data1&&(i.data1=n.data1.buffer,r.push(n.data1.buffer),delete n.data1),n.data2&&(i.data2=n.data2.buffer,r.push(n.data2.buffer),delete n.data2),e.postMessage(i,r)})};t.default=s},"./src/demux/demuxer.js":/*!******************************!*\
  !*** ./src/demux/demuxer.js ***!
  \******************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),i=n(/*! ../events */"./src/events.js"),a=n(/*! ../demux/demuxer-inline */"./src/demux/demuxer-inline.js"),o=n(/*! ../utils/logger */"./src/utils/logger.js"),s=n(/*! ../errors */"./src/errors.js"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.js"),u=n(/*! ../utils/get-self-scope */"./src/utils/get-self-scope.js"),c=n(/*! ../observer */"./src/observer.js"),p=u.getSelfScope(),f=l.getMediaSource(),d=function(){function t(e,t){var n=this;this.hls=e,this.id=t;var l=this.observer=new c.Observer,u=e.config,d=function(t,r){r=r||{},r.frag=n.frag,r.id=n.id,e.trigger(t,r)};l.on(i.default.FRAG_DECRYPTED,d),l.on(i.default.FRAG_PARSING_INIT_SEGMENT,d),l.on(i.default.FRAG_PARSING_DATA,d),l.on(i.default.FRAG_PARSED,d),l.on(i.default.ERROR,d),l.on(i.default.FRAG_PARSING_METADATA,d),l.on(i.default.FRAG_PARSING_USERDATA,d),l.on(i.default.INIT_PTS_FOUND,d);var h={mp4:f.isTypeSupported("video/mp4"),mpeg:f.isTypeSupported("audio/mpeg"),mp3:f.isTypeSupported('audio/mp4; codecs="mp3"')},y=navigator.vendor;if(u.enableWorker&&"undefined"!=typeof Worker){o.logger.log("demuxing in webworker");var v=void 0;try{v=this.w=r("./src/demux/demuxer-worker.js"),this.onwmsg=this.onWorkerMessage.bind(this),v.addEventListener("message",this.onwmsg),v.onerror=function(t){e.trigger(i.default.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:t.message+" ("+t.filename+":"+t.lineno+")"}})},v.postMessage({cmd:"init",typeSupported:h,vendor:y,id:t,config:JSON.stringify(u)})}catch(e){o.logger.warn("Error in worker:",e),o.logger.error("Error while initializing DemuxerWorker, fallback on DemuxerInline"),v&&p.URL.revokeObjectURL(v.objectURL),this.demuxer=new a.default(l,h,u,y),this.w=void 0}}else this.demuxer=new a.default(l,h,u,y)}return t.prototype.destroy=function(){var e=this.w;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.w=null;else{var t=this.demuxer;t&&(t.destroy(),this.demuxer=null)}var n=this.observer;n&&(n.removeAllListeners(),this.observer=null)},t.prototype.push=function(t,n,r,i,a,s,l,u){var c=this.w,p=e.isFinite(a.startPTS)?a.startPTS:a.start,f=a.decryptdata,d=this.frag,h=!(d&&a.cc===d.cc),y=!(d&&a.level===d.level),v=d&&a.sn===d.sn+1,g=!y&&v;if(h&&o.logger.log(this.id+":discontinuity detected"),y&&o.logger.log(this.id+":switch detected"),this.frag=a,c)c.postMessage({cmd:"demux",data:t,decryptdata:f,initSegment:n,audioCodec:r,videoCodec:i,timeOffset:p,discontinuity:h,trackSwitch:y,contiguous:g,duration:s,accurateTimeOffset:l,defaultInitPTS:u},t instanceof ArrayBuffer?[t]:[]);else{var m=this.demuxer;m&&m.push(t,f,n,r,i,p,h,y,g,s,l,u)}},t.prototype.onWorkerMessage=function(e){var t=e.data,n=this.hls;switch(t.event){case"init":p.URL.revokeObjectURL(this.w.objectURL);break;case i.default.FRAG_PARSING_DATA:t.data.data1=new Uint8Array(t.data1),t.data2&&(t.data.data2=new Uint8Array(t.data2));default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data)}},t}();t.default=d}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/demux/exp-golomb.js":/*!*********************************!*\
  !*** ./src/demux/exp-golomb.js ***!
  \*********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../utils/logger */"./src/utils/logger.js"),i=function(){function e(e){this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}return e.prototype.loadWord=function(){var e=this.data,t=this.bytesAvailable,n=e.byteLength-t,r=new Uint8Array(4),i=Math.min(4,t);if(0===i)throw new Error("no bytes available");r.set(e.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=8*i,this.bytesAvailable-=i},e.prototype.skipBits=function(e){var t;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t>>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,t>0&&this.bitsAvailable?n<<t|this.readBits(t):n},e.prototype.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>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,r=8,i=8;for(t=0;t<e;t++)0!==i&&(n=this.readEG(),i=(r+n+256)%256),r=0===i?r:i},e.prototype.readSPS=function(){var e,t,n,r,i,a,o,s=0,l=0,u=0,c=0,p=this.readUByte.bind(this),f=this.readBits.bind(this),d=this.readUEG.bind(this),h=this.readBoolean.bind(this),y=this.skipBits.bind(this),v=this.skipEG.bind(this),g=this.skipUEG.bind(this),m=this.skipScalingList.bind(this);if(p(),e=p(),f(5),y(3),p(),g(),100===e||110===e||122===e||244===e||44===e||83===e||86===e||118===e||128===e){var b=d();if(3===b&&y(1),g(),g(),y(1),h())for(a=3!==b?8:12,o=0;o<a;o++)h()&&m(o<6?16:64)}g();var _=d();if(0===_)d();else if(1===_)for(y(1),v(),v(),t=d(),o=0;o<t;o++)v();g(),y(1),n=d(),r=d(),i=f(1),0===i&&y(1),y(1),h()&&(s=d(),l=d(),u=d(),c=d());var E=[1,1];if(h()&&h()){switch(p()){case 1:E=[1,1];break;case 2:E=[12,11];break;case 3:E=[10,11];break;case 4:E=[16,11];break;case 5:E=[40,33];break;case 6:E=[24,11];break;case 7:E=[20,11];break;case 8:E=[32,11];break;case 9:E=[80,33];break;case 10:E=[18,11];break;case 11:E=[15,11];break;case 12:E=[64,33];break;case 13:E=[160,99];break;case 14:E=[4,3];break;case 15:E=[3,2];break;case 16:E=[2,1];break;case 255:E=[p()<<8|p(),p()<<8|p()]}}return{width:Math.ceil(16*(n+1)-2*s-2*l),height:(2-i)*(r+1)*16-(i?2:4)*(u+c),pixelRatio:E}},e.prototype.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}();t.default=i},"./src/demux/id3.js":/*!**************************!*\
  !*** ./src/demux/id3.js ***!
  \**************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.isHeader=function(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},e.isFooter=function(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},e.getID3Data=function(t,n){for(var r=n,i=0;e.isHeader(t,n);){i+=10;i+=e._readSize(t,n+6),e.isFooter(t,n+10)&&(i+=10),n+=i}if(i>0)return t.subarray(r,r+i)},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,n|=127&e[t+3]},e.getTimeStamp=function(t){for(var n=e.getID3Frames(t),r=0;r<n.length;r++){var i=n[r];if(e.isTimeStampFrame(i))return e._readTimeStamp(i)}},e.isTimeStampFrame=function(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info},e._getFrameData=function(t){var n=String.fromCharCode(t[0],t[1],t[2],t[3]),r=e._readSize(t,4);return{type:n,size:r,data:t.subarray(10,10+r)}},e.getID3Frames=function(t){for(var n=0,r=[];e.isHeader(t,n);){var i=e._readSize(t,n+6);n+=10;for(var a=n+i;n+8<a;){var o=e._getFrameData(t.subarray(n)),s=e._decodeFrame(o);s&&r.push(s),n+=o.size+10}e.isFooter(t,n)&&(n+=10)}return r},e._decodeFrame=function(t){return"PRIV"===t.type?e._decodePrivFrame(t):"T"===t.type[0]?e._decodeTextFrame(t):"W"===t.type[0]?e._decodeURLFrame(t):void 0},e._readTimeStamp=function(e){if(8===e.data.byteLength){var t=new Uint8Array(e.data),n=1&t[3],r=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return r/=45,n&&(r+=47721858.84),Math.round(r)}},e._decodePrivFrame=function(t){if(!(t.size<2)){var n=e._utf8ArrayToStr(t.data,!0),r=new Uint8Array(t.data.subarray(n.length+1));return{key:t.type,info:n,data:r.buffer}}},e._decodeTextFrame=function(t){if(!(t.size<2)){if("TXXX"===t.type){var n=1,r=e._utf8ArrayToStr(t.data.subarray(n));n+=r.length+1;var i=e._utf8ArrayToStr(t.data.subarray(n));return{key:t.type,info:r,data:i}}var a=e._utf8ArrayToStr(t.data.subarray(1));return{key:t.type,data:a}}},e._decodeURLFrame=function(t){if("WXXX"===t.type){if(t.size<2)return;var n=1,r=e._utf8ArrayToStr(t.data.subarray(n));n+=r.length+1;var i=e._utf8ArrayToStr(t.data.subarray(n));return{key:t.type,info:r,data:i}}var a=e._utf8ArrayToStr(t.data);return{key:t.type,data:a}},e._utf8ArrayToStr=function(e,t){void 0===t&&(t=!1);for(var n,r,i,a=e.length,o="",s=0;s<a;){if(0===(n=e[s++])&&t)return o;if(0!==n&&3!==n)switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o+=String.fromCharCode(n);break;case 12:case 13:r=e[s++],o+=String.fromCharCode((31&n)<<6|63&r);break;case 14:r=e[s++],i=e[s++],o+=String.fromCharCode((15&n)<<12|(63&r)<<6|(63&i)<<0)}}return o},e}(),i=r._utf8ArrayToStr;t.utf8ArrayToStr=i,t.default=r},"./src/demux/mp3demuxer.js":/*!*********************************!*\
  !*** ./src/demux/mp3demuxer.js ***!
  \*********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../demux/id3 */"./src/demux/id3.js"),i=n(/*! ../utils/logger */"./src/utils/logger.js"),a=n(/*! ./mpegaudio */"./src/demux/mpegaudio.js"),o=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,o=r.default.getID3Data(e,0);if(o&&void 0!==r.default.getTimeStamp(o))for(t=o.length,n=Math.min(e.length-1,t+100);t<n;t++)if(a.default.probe(e,t))return i.logger.log("MPEG Audio sync word found !"),!0;return!1},e.prototype.append=function(e,t,n,i){for(var o=r.default.getID3Data(e,0),s=r.default.getTimeStamp(o),l=s?90*s:9e4*t,u=o.length,c=e.length,p=0,f=0,d=this._audioTrack,h=[{pts:l,dts:l,data:o}];u<c;)if(a.default.isHeader(e,u)){var y=a.default.appendFrame(d,e,u,l,p);if(!y)break;u+=y.length,f=y.sample.pts,p++}else r.default.isHeader(e,u)?(o=r.default.getID3Data(e,u),h.push({pts:f,dts:f,data:o}),u+=o.length):u++;this.remuxer.remux(d,{samples:[]},{samples:h,inputTimeScale:9e4},{samples:[]},t,n,i)},e.prototype.destroy=function(){},e}();t.default=o},"./src/demux/mp4demuxer.js":/*!*********************************!*\
  !*** ./src/demux/mp4demuxer.js ***!
  \*********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../utils/logger */"./src/utils/logger.js"),i=n(/*! ../events */"./src/events.js"),a=Math.pow(2,32)-1,o=function(){function e(e,t){this.observer=e,this.remuxer=t}return e.prototype.resetTimeStamp=function(e){this.initPTS=e},e.prototype.resetInitSegment=function(t,n,r,a){if(t&&t.byteLength){var o=this.initData=e.parseInitSegment(t);null==n&&(n="mp4a.40.5"),null==r&&(r="avc1.42e01e");var s={};o.audio&&o.video?s.audiovideo={container:"video/mp4",codec:n+","+r,initSegment:a?t:null}:(o.audio&&(s.audio={container:"audio/mp4",codec:n,initSegment:a?t:null}),o.video&&(s.video={container:"video/mp4",codec:r,initSegment:a?t:null})),this.observer.trigger(i.default.FRAG_PARSING_INIT_SEGMENT,{tracks:s})}else n&&(this.audioCodec=n),r&&(this.videoCodec=r)},e.probe=function(t){return e.findBox({data:t,start:0,end:Math.min(t.length,16384)},["moof"]).length>0},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,i,a,o,s,l,u,c=[];if(t.data?(l=t.start,o=t.end,t=t.data):(l=0,o=t.byteLength),!n.length)return null;for(r=l;r<o;)i=e.readUint32(t,r),a=e.bin2str(t.subarray(r+4,r+8)),u=i>1?r+i:o,a===n[0]&&(1===n.length?c.push({data:t,start:r+8,end:u}):(s=e.findBox({data:t,start:r+8,end:u},n.slice(1)),s.length&&(c=c.concat(s)))),r=u;return c},e.parseSegmentIndex=function(t){var n,r=e.findBox(t,["moov"])[0],i=r?r.end:null,a=0,o=e.findBox(t,["sidx"]);if(!o||!o[0])return null;n=[],o=o[0];var s=o.data[0];a=0===s?8:16;var l=e.readUint32(o,a);a+=4;a+=0===s?8:16,a+=2;var u=o.end+0,c=e.readUint16(o,a);a+=2;for(var p=0;p<c;p++){var f=a,d=e.readUint32(o,f);f+=4;var h=2147483647&d;if(1===(2147483648&d)>>>31)return void console.warn("SIDX has hierarchical references (not supported)");var y=e.readUint32(o,f);f+=4,n.push({referenceSize:h,subsegmentDuration:y,info:{duration:y/l,start:u,end:u+h-1}}),u+=h,f+=4,a=f}return{earliestPresentationTime:0,timescale:l,version:s,referencesCount:c,references:n,moovEndOffset:i}},e.parseInitSegment=function(t){var n=[];return e.findBox(t,["moov","trak"]).forEach(function(t){var i=e.findBox(t,["tkhd"])[0];if(i){var a=i.data[i.start],o=0===a?12:20,s=e.readUint32(i,o),l=e.findBox(t,["mdia","mdhd"])[0];if(l){a=l.data[l.start],o=0===a?12:20;var u=e.readUint32(l,o),c=e.findBox(t,["mdia","hdlr"])[0];if(c){var p=e.bin2str(c.data.subarray(c.start+8,c.start+12)),f={soun:"audio",vide:"video"}[p];if(f){var d=e.findBox(t,["mdia","minf","stbl","stsd"]);if(d.length){d=d[0];var h=e.bin2str(d.data.subarray(d.start+12,d.start+16));r.logger.log("MP4Demuxer:"+f+":"+h+" found")}n[s]={timescale:u,type:f},n[f]={timescale:u,id:s}}}}}}),n},e.getStartDTS=function(t,n){var r,i,a;return r=e.findBox(n,["moof","traf"]),i=[].concat.apply([],r.map(function(n){return e.findBox(n,["tfhd"]).map(function(r){var i,a;return i=e.readUint32(r,4),a=t[i].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]/a})})),a=Math.min.apply(null,i),isFinite(a)?a:0},e.offsetStartDTS=function(t,n,r){e.findBox(n,["moof","traf"]).map(function(n){return e.findBox(n,["tfhd"]).map(function(i){var o=e.readUint32(i,4),s=t[o].timescale||9e4;e.findBox(n,["tfdt"]).map(function(t){var n=t.data[t.start],i=e.readUint32(t,4);if(0===n)e.writeUint32(t,4,i-r*s);else{i*=Math.pow(2,32),i+=e.readUint32(t,8),i-=r*s,i=Math.max(i,0);var o=Math.floor(i/(a+1)),l=Math.floor(i%(a+1));e.writeUint32(t,4,o),e.writeUint32(t,8,l)}})})})},e.prototype.append=function(t,n,r,a){var o=this.initData;o||(this.resetInitSegment(t,this.audioCodec,this.videoCodec,!1),o=this.initData);var s,l=this.initPTS;if(void 0===l){var u=e.getStartDTS(o,t);this.initPTS=l=u-n,this.observer.trigger(i.default.INIT_PTS_FOUND,{initPTS:l})}e.offsetStartDTS(o,t,l),s=e.getStartDTS(o,t),this.remuxer.remux(o.audio,o.video,null,null,s,r,a,t)},e.prototype.destroy=function(){},e}();t.default=o},"./src/demux/mpegaudio.js":/*!********************************!*\
  !*** ./src/demux/mpegaudio.js ***!
  \********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
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,i){if(!(n+24>t.length)){var a=this.parseHeader(t,n);if(a&&n+a.frameLength<=t.length){var o=9e4*a.samplesPerFrame/a.sampleRate,s=r+i*o,l={unit:t.subarray(n,n+a.frameLength),pts:s,dts:s};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(l),e.len+=a.frameLength,{sample:l,length:a.frameLength}}}},parseHeader:function(e,t){var n=e[t+1]>>3&3,i=e[t+1]>>1&3,a=e[t+2]>>4&15,o=e[t+2]>>2&3,s=e[t+2]>>1&1;if(1!==n&&0!==a&&15!==a&&3!==o){var l=3===n?3-i:3===i?3:4,u=1e3*r.BitratesMap[14*l+a-1],c=3===n?0:2===n?1:2,p=r.SamplingRateMap[3*c+o],f=e[t+3]>>6==3?1:2,d=r.SamplesCoefficients[n][i],h=r.BytesInSlot[i],y=8*d*h;return{sampleRate:p,channelCount:f,frameLength:parseInt(d*u/p+s,10)*h,samplesPerFrame:y}}},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&&this.isHeaderPattern(e,t))},probe:function(e,t){if(t+1<e.length&&this.isHeaderPattern(e,t)){var n=this.parseHeader(e,t),r=4;n&&n.frameLength&&(r=n.frameLength);var i=t+r;if(i===e.length||i+1<e.length&&this.isHeaderPattern(e,i))return!0}return!1}};t.default=r},"./src/demux/sample-aes.js":/*!*********************************!*\
  !*** ./src/demux/sample-aes.js ***!
  \*********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.js"),i=function(){function e(e,t,n,i){this.decryptdata=n,this.discardEPB=i,this.decrypter=new r.default(e,t,{removePKCS7Padding:!1})}return e.prototype.decryptBuffer=function(e,t){this.decrypter.decrypt(e,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,t)},e.prototype.decryptAacSample=function(e,t,n,r){var i=e[t].unit,a=i.subarray(16,i.length-i.length%16),o=a.buffer.slice(a.byteOffset,a.byteOffset+a.length),s=this;this.decryptBuffer(o,function(a){a=new Uint8Array(a),i.set(a,16),r||s.decryptAacSamples(e,t+1,n)})},e.prototype.decryptAacSamples=function(e,t,n){for(;;t++){if(t>=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,i=32;i<=e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+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,i,a){var o=this.discardEPB(i.data),s=this.getAvcEncryptedData(o),l=this;this.decryptBuffer(s.buffer,function(s){i.data=l.getAvcDecryptedUnit(o,s),a||l.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 i=e[t].units;!(n>=i.length);n++){var a=i[n];if(!(a.length<=48||1!==a.type&&5!==a.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(e,t,n,r,a,o),!o)return}}}},e}();t.default=i},"./src/demux/tsdemuxer.js":/*!********************************!*\
  !*** ./src/demux/tsdemuxer.js ***!
  \********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ./adts */"./src/demux/adts.js"),i=n(/*! ./mpegaudio */"./src/demux/mpegaudio.js"),a=n(/*! ../events */"./src/events.js"),o=n(/*! ./exp-golomb */"./src/demux/exp-golomb.js"),s=n(/*! ./sample-aes */"./src/demux/sample-aes.js"),l=n(/*! ../utils/logger */"./src/utils/logger.js"),u=n(/*! ../errors */"./src/errors.js"),c={video:1,audio:2,id3:3,text:4},p=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 s.default(this.observer,this.config,e,this.discardEPB):this.sampleAes=null},e.probe=function(t){var n=e._syncOffset(t);return!(n<0)&&(n&&l.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<t;){if(71===e[n]&&71===e[n+188]&&71===e[n+376])return n;n++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:c[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0,dropped:"video"===e?0:void 0,isAAC:"audio"===e||void 0,duration:"audio"===e?t:void 0}},e.prototype.resetInitSegment=function(t,n,r,i){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=e.createTrack("video",i),this._audioTrack=e.createTrack("audio",i),this._id3Track=e.createTrack("id3",i),this._txtTrack=e.createTrack("text",i),this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=n,this.videoCodec=r,this._duration=i},e.prototype.resetTimeStamp=function(){},e.prototype.append=function(t,n,r,i){var o,s,c,p,f,d=t.length,h=!1;this.contiguous=r;var y=this.pmtParsed,v=this._avcTrack,g=this._audioTrack,m=this._id3Track,b=v.pid,_=g.pid,E=m.pid,k=this._pmtId,T=v.pesData,A=g.pesData,w=m.pesData,S=this._parsePAT,P=this._parsePMT,O=this._parsePES,C=this._parseAVCPES.bind(this),x=this._parseAACPES.bind(this),R=this._parseMPEGPES.bind(this),I=this._parseID3PES.bind(this),D=e._syncOffset(t);for(d-=(d+D)%188,o=D;o<d;o+=188)if(71===t[o]){if(s=!!(64&t[o+1]),c=((31&t[o+1])<<8)+t[o+2],(48&t[o+3])>>4>1){if((p=o+5+t[o+4])===o+188)continue}else p=o+4;switch(c){case b:s&&(T&&(f=O(T))&&void 0!==f.pts&&C(f,!1),T={data:[],size:0}),T&&(T.data.push(t.subarray(p,o+188)),T.size+=o+188-p);break;case _:s&&(A&&(f=O(A))&&void 0!==f.pts&&(g.isAAC?x(f):R(f)),A={data:[],size:0}),A&&(A.data.push(t.subarray(p,o+188)),A.size+=o+188-p);break;case E:s&&(w&&(f=O(w))&&void 0!==f.pts&&I(f),w={data:[],size:0}),w&&(w.data.push(t.subarray(p,o+188)),w.size+=o+188-p);break;case 0:s&&(p+=t[p]+1),k=this._pmtId=S(t,p);break;case k:s&&(p+=t[p]+1);var M=P(t,p,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);b=M.avc,b>0&&(v.pid=b),_=M.audio,_>0&&(g.pid=_,g.isAAC=M.isAAC),E=M.id3,E>0&&(m.pid=E),h&&!y&&(l.logger.log("reparse from beginning"),h=!1,o=D-188),y=this.pmtParsed=!0;break;case 17:case 8191:break;default:h=!0}}else this.observer.trigger(a.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});T&&(f=O(T))&&void 0!==f.pts?(C(f,!0),v.pesData=null):v.pesData=T,A&&(f=O(A))&&void 0!==f.pts?(g.isAAC?x(f):R(f),g.pesData=null):(A&&A.size&&l.logger.log("last AAC PES packet truncated,might overlap between fragments"),g.pesData=A),w&&(f=O(w))&&void 0!==f.pts?(I(f),m.pesData=null):m.pesData=w,null==this.sampleAes?this.remuxer.remux(g,v,m,this._txtTrack,n,r,i):this.decryptAndRemux(g,v,m,this._txtTrack,n,r,i)},e.prototype.decryptAndRemux=function(e,t,n,r,i,a,o){if(e.samples&&e.isAAC){var s=this;this.sampleAes.decryptAacSamples(e.samples,0,function(){s.decryptAndRemuxAvc(e,t,n,r,i,a,o)})}else this.decryptAndRemuxAvc(e,t,n,r,i,a,o)},e.prototype.decryptAndRemuxAvc=function(e,t,n,r,i,a,o){if(t.samples){var s=this;this.sampleAes.decryptAvcSamples(t.samples,0,0,function(){s.remuxer.remux(e,t,n,r,i,a,o)})}else this.remuxer.remux(e,t,n,r,i,a,o)},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 i,a,o,s,u={audio:-1,avc:-1,id3:-1,isAAC:!0};for(i=(15&e[t+1])<<8|e[t+2],a=t+3+i-4,o=(15&e[t+10])<<8|e[t+11],t+=12+o;t<a;){switch(s=(31&e[t+1])<<8|e[t+2],e[t]){case 207:if(!r){l.logger.log("unkown stream type:"+e[t]);break}case 15:-1===u.audio&&(u.audio=s);break;case 21:-1===u.id3&&(u.id3=s);break;case 219:if(!r){l.logger.log("unkown stream type:"+e[t]);break}case 27:-1===u.avc&&(u.avc=s);break;case 3:case 4:n?-1===u.audio&&(u.audio=s,u.isAAC=!1):l.logger.log("MPEG audio found, not supported in this browser for now");break;case 36:l.logger.warn("HEVC stream type found, not supported for now");break;default:l.logger.log("unkown stream type:"+e[t])}t+=5+((15&e[t+3])<<8|e[t+4])}return u},e.prototype._parsePES=function(e){var t,n,r,i,a,o,s,u,c=0,p=e.data;if(!e||0===e.size)return null;for(;p[0].length<19&&p.length>1;){var f=new Uint8Array(p[0].length+p[1].length);f.set(p[0]),f.set(p[1],p[0].length),p[0]=f,p.splice(1,1)}if(t=p[0],1===(t[0]<<16)+(t[1]<<8)+t[2]){if((r=(t[4]<<8)+t[5])&&r>e.size-6)return null;n=t[7],192&n&&(o=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,o>4294967295&&(o-=8589934592),64&n?(s=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,s>4294967295&&(s-=8589934592),o-s>54e5&&(l.logger.warn(Math.round((o-s)/9e4)+"s delta between PTS and DTS, align them"),o=s)):s=o),i=t[8],u=i+9,e.size-=u,a=new Uint8Array(e.size);for(var d=0,h=p.length;d<h;d++){t=p[d];var y=t.byteLength;if(u){if(u>y){u-=y;continue}t=t.subarray(u),y-=u,u=0}a.set(t,c),c+=y}return r&&(r-=i+3),{data:a,pts:o,dts:s,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&&l.logger.log(e.pts+"/"+e.dts+":"+e.debug)},e.prototype._parseAVCPES=function(e,t){var n,r,i,a=this,s=this._avcTrack,l=this._parseAVCNALu(e.data),u=this.avcSample,c=!1,p=this.pushAccesUnit.bind(this),f=function(e,t,n,r){return{key:e,pts:t,dts:n,units:[],debug:r}};e.data=null,u&&l.length&&!s.audFound&&(p(u,s),u=this.avcSample=f(!1,e.pts,e.dts,"")),l.forEach(function(t){switch(t.type){case 1:r=!0,u||(u=a.avcSample=f(!0,e.pts,e.dts,"")),u.frame=!0;var l=t.data;if(c&&l.length>4){var d=new o.default(l).readSliceType();2!==d&&4!==d&&7!==d&&9!==d||(u.key=!0)}break;case 5:r=!0,u||(u=a.avcSample=f(!0,e.pts,e.dts,"")),u.key=!0,u.frame=!0;break;case 6:r=!0,n=new o.default(a.discardEPB(t.data)),n.readUByte();for(var h=0,y=0,v=!1,g=0;!v&&n.bytesAvailable>1;){h=0;do{g=n.readUByte(),h+=g}while(255===g);y=0;do{g=n.readUByte(),y+=g}while(255===g);if(4===h&&0!==n.bytesAvailable){v=!0;if(181===n.readUByte()){if(49===n.readUShort()){if(1195456820===n.readUInt()){if(3===n.readUByte()){var m=n.readUByte(),b=n.readUByte(),_=31&m,E=[m,b];for(i=0;i<_;i++)E.push(n.readUByte()),E.push(n.readUByte()),E.push(n.readUByte());a._insertSampleInOrder(a._txtTrack.samples,{type:3,pts:e.pts,bytes:E})}}}}}else if(y<n.bytesAvailable)for(i=0;i<y;i++)n.readUByte()}break;case 7:if(r=!0,c=!0,!s.sps){n=new o.default(t.data);var k=n.readSPS();s.width=k.width,s.height=k.height,s.pixelRatio=k.pixelRatio,s.sps=[t.data],s.duration=a._duration;var T=t.data.subarray(1,4),A="avc1.";for(i=0;i<3;i++){var w=T[i].toString(16);w.length<2&&(w="0"+w),A+=w}s.codec=A}break;case 8:r=!0,s.pps||(s.pps=[t.data]);break;case 9:r=!1,s.audFound=!0,u&&p(u,s),u=a.avcSample=f(!1,e.pts,e.dts,"");break;case 12:r=!1;break;default:r=!1,u&&(u.debug+="unknown NAL "+t.type+" ")}if(u&&r){u.units.push(t)}}),t&&u&&(p(u,s),this.avcSample=null)},e.prototype._insertSampleInOrder=function(e,t){var n=e.length;if(n>0){if(t.pts>=e[n-1].pts)e.push(t);else for(var r=n-1;r>=0;r--)if(t.pts<e[r].pts){e.splice(r,0,t);break}}else e.push(t)},e.prototype._getLastNalUnit=function(){var e,t=this.avcSample;if(!t||0===t.units.length){var n=this._avcTrack,r=n.samples;t=r[r.length-1]}if(t){var i=t.units;e=i[i.length-1]}return e},e.prototype._parseAVCNALu=function(e){var t,n,r,i,a,o=0,s=e.byteLength,l=this._avcTrack,u=l.naluState||0,c=u,p=[],f=-1;for(-1===u&&(f=0,a=31&e[0],u=0,o=1);o<s;)if(t=e[o++],u)if(1!==u)if(t)if(1===t){if(f>=0)r={data:e.subarray(f,o-u-1),type:a},p.push(r);else{var d=this._getLastNalUnit();if(d&&(c&&o<=4-c&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-c)),(n=o-u-1)>0)){var h=new Uint8Array(d.data.byteLength+n);h.set(d.data,0),h.set(e.subarray(0,n),d.data.byteLength),d.data=h}}o<s?(i=31&e[o],f=o,a=i,u=0):u=-1}else u=0;else u=3;else u=t?0:2;else u=t?0:1;if(f>=0&&u>=0&&(r={data:e.subarray(f,s),type:a,state:u},p.push(r)),0===p.length){var d=this._getLastNalUnit();if(d){var h=new Uint8Array(d.data.byteLength+e.byteLength);h.set(d.data,0),h.set(e,d.data.byteLength),d.data=h}}return l.naluState=u,p},e.prototype.discardEPB=function(e){for(var t,n,r=e.byteLength,i=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(i.push(a+2),a+=2):a++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var o=0;for(a=0;a<t;o++,a++)o===i[0]&&(o++,i.shift()),n[a]=e[o];return n},e.prototype._parseAACPES=function(e){var t,n,i,o,s,c=this._audioTrack,p=e.data,f=e.pts,d=this.aacOverFlow,h=this.aacLastPTS;if(d){var y=new Uint8Array(d.byteLength+p.byteLength);y.set(d,0),y.set(p,d.byteLength),p=y}for(i=0,s=p.length;i<s-1&&!r.isHeader(p,i);i++);if(i){var v=void 0,g=void 0;if(i<s-1?(v="AAC PES did not start with ADTS header,offset:"+i,g=!1):(v="no ADTS header found in AAC PES",g=!0),l.logger.warn("parsing error:"+v),this.observer.trigger(a.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:g,reason:v}),g)return}if(r.initTrackConfig(c,this.observer,p,i,this.audioCodec),n=0,t=r.getFrameDuration(c.samplerate),d&&h){var m=h+t;Math.abs(m-f)>1&&(l.logger.log("AAC: align PTS for overlapping frames by "+Math.round((m-f)/90)),f=m)}for(;i<s;)if(r.isHeader(p,i)&&i+5<s){var b=r.appendFrame(c,p,i,f,n);if(!b)break;i+=b.length,o=b.sample.pts,n++}else i++;d=i<s?p.subarray(i,s):null,this.aacOverFlow=d,this.aacLastPTS=o},e.prototype._parseMPEGPES=function(e){for(var t=e.data,n=t.length,r=0,a=0,o=e.pts;a<n;)if(i.default.isHeader(t,a)){var s=i.default.appendFrame(this._audioTrack,t,a,o,r);if(!s)break;a+=s.length,r++}else a++},e.prototype._parseID3PES=function(e){this._id3Track.samples.push(e)},e}();t.default=p},"./src/errors.js":/*!***********************!*\
  !*** ./src/errors.js ***!
  \***********************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorTypes={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",KEY_SYSTEM_ERROR:"keySystemError",MUX_ERROR:"muxError",OTHER_ERROR:"otherError"},t.ErrorDetails={KEY_SYSTEM_NO_KEYS:"keySystemNoKeys",KEY_SYSTEM_NO_ACCESS:"keySystemNoAccess",KEY_SYSTEM_NO_SESSION:"keySystemNoSession",KEY_SYSTEM_LICENSE_REQUEST_FAILED:"keySystemLicenseRequestFailed",MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",REMUX_ALLOC_ERROR:"remuxAllocError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",BUFFER_NUDGE_ON_STALL:"bufferNudgeOnStall",INTERNAL_EXCEPTION:"internalException"}},"./src/event-handler.js":/*!******************************!*\
  !*** ./src/event-handler.js ***!
  \******************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ./utils/logger */"./src/utils/logger.js"),i=n(/*! ./errors */"./src/errors.js"),a=n(/*! ./events */"./src/events.js"),o={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},s=function(){function e(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.hls=e,this.onEvent=this.onEvent.bind(this),this.handledEvents=t,this.useGenericHandler=!0,this.registerListeners()}return e.prototype.destroy=function(){this.onHandlerDestroying(),this.unregisterListeners(),this.onHandlerDestroyed()},e.prototype.onHandlerDestroying=function(){},e.prototype.onHandlerDestroyed=function(){},e.prototype.isEventHandler=function(){return"object"==typeof this.handledEvents&&this.handledEvents.length&&"function"==typeof this.onEvent},e.prototype.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(e){if(o[e])throw new Error("Forbidden event-name: "+e);this.hls.on(e,this.onEvent)},this)},e.prototype.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(e){this.hls.off(e,this.onEvent)},this)},e.prototype.onEvent=function(e,t){this.onEventGeneric(e,t)},e.prototype.onEventGeneric=function(e,t){var n=function(e,t){var n="on"+e.replace("hls","");if("function"!=typeof this[n])throw new Error("Event "+e+" has no generic handler in this "+this.constructor.name+" class (tried "+n+")");return this[n].bind(this,t)};try{n.call(this,e,t).call()}catch(t){r.logger.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.hls.trigger(a.default.ERROR,{type:i.ErrorTypes.OTHER_ERROR,details:i.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:e,err:t})}},e}();t.default=s},"./src/events.js":/*!***********************!*\
  !*** ./src/events.js ***!
  \***********************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition"};t.default=r},"./src/hls.js":/*!********************!*\
  !*** ./src/hls.js ***!
  \********************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),a=n(/*! ./errors */"./src/errors.js"),o=n(/*! ./loader/playlist-loader */"./src/loader/playlist-loader.js"),s=n(/*! ./loader/fragment-loader */"./src/loader/fragment-loader.js"),l=n(/*! ./loader/key-loader */"./src/loader/key-loader.js"),u=n(/*! ./controller/fragment-tracker */"./src/controller/fragment-tracker.js"),c=n(/*! ./controller/stream-controller */"./src/controller/stream-controller.js"),p=n(/*! ./controller/level-controller */"./src/controller/level-controller.js"),f=n(/*! ./controller/id3-track-controller */"./src/controller/id3-track-controller.js"),d=n(/*! ./is-supported */"./src/is-supported.js"),h=n(/*! ./utils/logger */"./src/utils/logger.js"),y=n(/*! ./config */"./src/config.js"),v=n(/*! ./events */"./src/events.js"),g=n(/*! ./observer */"./src/observer.js"),m=function(e){function t(n){void 0===n&&(n={});var r=e.call(this)||this,i=t.DefaultConfig;if((n.liveSyncDurationCount||n.liveMaxLatencyDurationCount)&&(n.liveSyncDuration||n.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");for(var a in i)a in n||(n[a]=i[a]);if(void 0!==n.liveMaxLatencyDurationCount&&n.liveMaxLatencyDurationCount<=n.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==n.liveMaxLatencyDuration&&(n.liveMaxLatencyDuration<=n.liveSyncDuration||void 0===n.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');h.enableLogs(n.debug),r.config=n,r._autoLevelCapping=-1;var d=r.abrController=new n.abrController(r),y=new n.bufferController(r),v=new n.capLevelController(r),g=new n.fpsController(r),m=new o.default(r),b=new s.default(r),_=new l.default(r),E=new f.default(r),k=r.levelController=new p.default(r),T=new u.FragmentTracker(r),A=r.streamController=new c.default(r,T),w=[k,A],S=n.audioStreamController;S&&w.push(new S(r,T)),r.networkControllers=w;var P=[m,b,_,d,y,v,g,E,T];if(S=n.audioTrackController){var O=new S(r);r.audioTrackController=O,P.push(O)}if(S=n.subtitleTrackController){var C=new S(r);r.subtitleTrackController=C,P.push(C)}if(S=n.emeController){var x=new S(r);r.emeController=x,P.push(x)}return S=n.subtitleStreamController,S&&P.push(new S(r,T)),S=n.timelineController,S&&P.push(new S(r)),r.coreComponents=P,r}return r(t,e),Object.defineProperty(t,"version",{get:function(){return"0.12.2"},enumerable:!0,configurable:!0}),t.isSupported=function(){return d.isSupported()},Object.defineProperty(t,"Events",{get:function(){return v.default},enumerable:!0,configurable:!0}),Object.defineProperty(t,"ErrorTypes",{get:function(){return a.ErrorTypes},enumerable:!0,configurable:!0}),Object.defineProperty(t,"ErrorDetails",{get:function(){return a.ErrorDetails},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DefaultConfig",{get:function(){return t.defaultConfig?t.defaultConfig:y.hlsDefaultConfig},set:function(e){t.defaultConfig=e},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){h.logger.log("destroy"),this.trigger(v.default.DESTROYING),this.detachMedia(),this.coreComponents.concat(this.networkControllers).forEach(function(e){e.destroy()}),this.url=null,this.removeAllListeners(),this._autoLevelCapping=-1},t.prototype.attachMedia=function(e){h.logger.log("attachMedia"),this.media=e,this.trigger(v.default.MEDIA_ATTACHING,{media:e})},t.prototype.detachMedia=function(){h.logger.log("detachMedia"),this.trigger(v.default.MEDIA_DETACHING),this.media=null},t.prototype.loadSource=function(e){e=i.buildAbsoluteURL(window.location.href,e,{alwaysNormalize:!0}),h.logger.log("loadSource:"+e),this.url=e,this.trigger(v.default.MANIFEST_LOADING,{url:e})},t.prototype.startLoad=function(e){void 0===e&&(e=-1),h.logger.log("startLoad("+e+")"),this.networkControllers.forEach(function(t){t.startLoad(e)})},t.prototype.stopLoad=function(){h.logger.log("stopLoad"),this.networkControllers.forEach(function(e){e.stopLoad()})},t.prototype.swapAudioCodec=function(){h.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},t.prototype.recoverMediaError=function(){h.logger.log("recoverMediaError");var e=this.media;this.detachMedia(),this.attachMedia(e)},Object.defineProperty(t.prototype,"levels",{get:function(){return this.levelController.levels},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentLevel",{get:function(){return this.streamController.currentLevel},set:function(e){h.logger.log("set currentLevel:"+e),this.loadLevel=e,this.streamController.immediateLevelSwitch()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextLevel",{get:function(){return this.streamController.nextLevel},set:function(e){h.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"loadLevel",{get:function(){return this.levelController.level},set:function(e){h.logger.log("set loadLevel:"+e),this.levelController.manualLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextLoadLevel",{get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstLevel",{get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){h.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"startLevel",{get:function(){return this.levelController.startLevel},set:function(e){h.logger.log("set startLevel:"+e);var t=this;-1!==e&&(e=Math.max(e,t.minAutoLevel)),t.levelController.startLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"autoLevelCapping",{get:function(){return this._autoLevelCapping},set:function(e){h.logger.log("set autoLevelCapping:"+e),this._autoLevelCapping=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"autoLevelEnabled",{get:function(){return-1===this.levelController.manualLevel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"manualLevel",{get:function(){return this.levelController.manualLevel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minAutoLevel",{get:function(){for(var e=this,t=e.levels,n=e.config.minAutoBitrate,r=t?t.length:0,i=0;i<r;i++){if((t[i].realBitrate?Math.max(t[i].realBitrate,t[i].bitrate):t[i].bitrate)>n)return i}return 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxAutoLevel",{get:function(){var e=this,t=e.levels,n=e.autoLevelCapping;return-1===n&&t&&t.length?t.length-1:n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextAutoLevel",{get:function(){var e=this;return Math.min(Math.max(e.abrController.nextAutoLevel,e.minAutoLevel),e.maxAutoLevel)},set:function(e){var t=this;t.abrController.nextAutoLevel=Math.max(t.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}(g.Observer);t.default=m},"./src/is-supported.js":/*!*****************************!*\
  !*** ./src/is-supported.js ***!
  \*****************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";function r(){var e=i.getMediaSource(),t=window.SourceBuffer||window.WebKitSourceBuffer,n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!n&&!!r}Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! ./utils/mediasource-helper */"./src/utils/mediasource-helper.js");t.isSupported=r},"./src/loader/fragment-loader.js":/*!***************************************!*\
  !*** ./src/loader/fragment-loader.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! ../events */"./src/events.js"),a=n(/*! ../event-handler */"./src/event-handler.js"),o=n(/*! ../errors */"./src/errors.js"),s=n(/*! ../utils/logger */"./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 r(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,i=this.loaders,a=this.hls.config,o=a.fLoader,l=a.loader;n.loaded=0;var u=i[r];u&&(s.logger.warn("abort previous fragment loader for type: "+r),u.abort()),u=i[r]=n.loader=a.fLoader?new o(a):new l(a);var c,p,f;c={url:n.url,frag:n,responseType:"arraybuffer",progressData:!1};var d=n.byteRangeStartOffset,h=n.byteRangeEndOffset;e.isFinite(d)&&e.isFinite(h)&&(c.rangeStart=d,c.rangeEnd=h),p={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout},f={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},u.load(c,p,f)},n.prototype.loadsuccess=function(e,t,n,r){void 0===r&&(r=null);var a=e.data,o=n.frag;o.loader=void 0,this.loaders[o.type]=void 0,this.hls.trigger(i.default.FRAG_LOADED,{payload:a,frag:o,stats:t,networkDetails:r})},n.prototype.loaderror=function(e,t,n){void 0===n&&(n=null);var r=t.frag,a=r.loader;a&&a.abort(),this.loaders[r.type]=void 0,this.hls.trigger(i.default.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.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,a=r.loader;a&&a.abort(),this.loaders[r.type]=void 0,this.hls.trigger(i.default.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.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 a=t.frag;a.loaded=e.loaded,this.hls.trigger(i.default.FRAG_LOAD_PROGRESS,{frag:a,stats:e,networkDetails:r})},n}(a.default);t.default=l}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/loader/fragment.js":/*!********************************!*\
  !*** ./src/loader/fragment.js ***!
  \********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),i=n(/*! ./level-key */"./src/loader/level-key.js"),a=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={},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 i.default,n.method=e.method,n.baseuri=e.baseuri,n.reluri=e.reluri,n.iv=this.createInitializationVector(t)),n},t}();t.default=a}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/loader/key-loader.js":/*!**********************************!*\
  !*** ./src/loader/key-loader.js ***!
  \**********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! ../events */"./src/events.js"),a=n(/*! ../event-handler */"./src/event-handler.js"),o=n(/*! ../errors */"./src/errors.js"),s=n(/*! ../utils/logger */"./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 r(t,e),t.prototype.destroy=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={},a.default.prototype.destroy.call(this)},t.prototype.onKeyLoading=function(e){var t=e.frag,n=t.type,r=this.loaders[n],a=t.decryptdata,o=a.uri;if(o!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;r&&(s.logger.warn("abort previous key loader for type:"+n),r.abort()),t.loader=this.loaders[n]=new l.loader(l),this.decrypturl=o,this.decryptkey=null;var u=void 0,c=void 0,p=void 0;u={url:o,frag:t,responseType:"arraybuffer"},c={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout},p={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},t.loader.load(u,c,p)}else this.decryptkey&&(a.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:o.ErrorTypes.NETWORK_ERROR,details:o.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:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},t}(a.default);t.default=l},"./src/loader/level-key.js":/*!*********************************!*\
  !*** ./src/loader/level-key.js ***!
  \*********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),i=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=i},"./src/loader/level.js":/*!*****************************!*\
  !*** ./src/loader/level.js ***!
  \*****************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
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 */"./src/polyfills/number.js").Number)},"./src/loader/m3u8-parser.js":/*!***********************************!*\
  !*** ./src/loader/m3u8-parser.js ***!
  \***********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){function r(e,t){for(var n=e[t],r=t-1;r>=0;r--){var i=e[r];i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}function i(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),o=n(/*! ./fragment */"./src/loader/fragment.js"),s=n(/*! ./level */"./src/loader/level.js"),l=n(/*! ./level-key */"./src/loader/level-key.js"),u=n(/*! ../utils/attr-list */"./src/utils/attr-list.js"),c=n(/*! ../utils/logger */"./src/utils/logger.js"),p=n(/*! ../utils/codecs */"./src/utils/codecs.js"),f=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,d=/#EXT-X-MEDIA:(.*)/g,h=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),y=/(?:(?:#(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?/,v=/\.(mp4|m4s|m4v|m4a)$/i,g=function(){function t(){}return t.findGroup=function(e,t){if(!e)return null;for(var n=null,r=0;r<e.length;r++){var i=e[r];i.id===t&&(n=i)}return n},t.convertAVC1ToAVCOTI=function(e){var t,n=e.split(".");return n.length>2?(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 a.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,n){var r,i=[];for(f.lastIndex=0;null!=(r=f.exec(e));){var a={},o=a.attrs=new u.default(r[1]);a.url=t.resolve(r[2],n);var s=o.decimalResolution("RESOLUTION");s&&(a.width=s.width,a.height=s.height),a.bitrate=o.decimalInteger("AVERAGE-BANDWIDTH")||o.decimalInteger("BANDWIDTH"),a.name=o.NAME,function(e,t){["video","audio"].forEach(function(n){var r=e.filter(function(e){return p.isCodecType(e,n)});if(r.length){var i=r.filter(function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)});t[n+"Codec"]=i.length>0?i[0]:r[0],e=e.filter(function(e){return-1===r.indexOf(e)})}}),t.unknownCodecs=e}([].concat((o.CODECS||"").split(/[ ,]+/)),a),a.videoCodec&&-1!==a.videoCodec.indexOf("avc1")&&(a.videoCodec=t.convertAVC1ToAVCOTI(a.videoCodec)),i.push(a)}return i},t.parseMasterPlaylistMedia=function(e,n,r,i){void 0===i&&(i=[]);var a,o=[],s=0;for(d.lastIndex=0;null!==(a=d.exec(e));){var l={},c=new u.default(a[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),i.length){var p=t.findGroup(i,l.groupId);l.audioCodec=p?p.codec:i[0].codec}l.id=s++,o.push(l)}}return o},t.parseLevelPlaylist=function(t,n,a,p,f){var d,g,m=0,b=0,_=new s.default(n),E=new l.default,k=0,T=null,A=new o.default,w=null;for(h.lastIndex=0;null!==(d=h.exec(t));){var S=d[1];if(S){A.duration=parseFloat(S);var P=(" "+d[2]).slice(1);A.title=P||null,A.tagList.push(P?["INF",S,P]:["INF",S])}else if(d[3]){if(e.isFinite(A.duration)){var O=m++;A.type=p,A.start=b,A.levelkey=E,A.sn=O,A.level=a,A.cc=k,A.urlId=f,A.baseurl=n,A.relurl=(" "+d[3]).slice(1),i(A,T),_.fragments.push(A),T=A,b+=A.duration,A=new o.default}}else if(d[4]){if(A.rawByteRange=(" "+d[4]).slice(1),T){var C=T.byteRangeEndOffset;C&&(A.lastByteRangeEndOffset=C)}}else if(d[5])A.rawProgramDateTime=(" "+d[5]).slice(1),A.tagList.push(["PROGRAM-DATE-TIME",A.rawProgramDateTime]),null===w&&(w=_.fragments.length);else{for(d=d[0].match(y),g=1;g<d.length&&void 0===d[g];g++);var x=(" "+d[g+1]).slice(1),R=(" "+d[g+2]).slice(1);switch(d[g]){case"#":A.tagList.push(R?[x,R]:[x]);break;case"PLAYLIST-TYPE":_.type=x.toUpperCase();break;case"MEDIA-SEQUENCE":m=_.startSN=parseInt(x);break;case"TARGETDURATION":_.targetduration=parseFloat(x);break;case"VERSION":_.version=parseInt(x);break;case"EXTM3U":break;case"ENDLIST":_.live=!1;break;case"DIS":k++,A.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":k=parseInt(x);break;case"KEY":var I=x,D=new u.default(I),M=D.enumeratedString("METHOD"),L=D.URI,N=D.hexadecimalInteger("IV");M&&(E=new l.default,L&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(M)>=0&&(E.method=M,E.baseuri=n,E.reluri=L,E.key=null,E.iv=N));break;case"START":var j=x,U=new u.default(j),F=U.decimalFloatingPoint("TIME-OFFSET");e.isFinite(F)&&(_.startTimeOffset=F);break;case"MAP":var B=new u.default(x);A.relurl=B.URI,A.rawByteRange=B.BYTERANGE,A.baseurl=n,A.level=a,A.type=p,A.sn="initSegment",_.initSegment=A,A=new o.default,A.rawProgramDateTime=_.initSegment.rawProgramDateTime;break;default:c.logger.warn("line parsed but not handled: "+d)}}}return A=T,A&&!A.relurl&&(_.fragments.pop(),b-=A.duration),_.totalduration=b,_.averagetargetduration=b/_.fragments.length,_.endSN=m-1,_.startCC=_.fragments[0]?_.fragments[0].cc:0,_.endCC=k,!_.initSegment&&_.fragments.length&&_.fragments.every(function(e){return v.test(e.relurl)})&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),A=new o.default,A.relurl=_.fragments[0].relurl,A.baseurl=n,A.level=a,A.type=p,A.sn="initSegment",_.initSegment=A,_.needSidxRanges=!0),w&&r(_.fragments,w),_},t}();t.default=g}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/loader/playlist-loader.js":/*!***************************************!*\
  !*** ./src/loader/playlist-loader.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! ../events */"./src/events.js"),a=n(/*! ../event-handler */"./src/event-handler.js"),o=n(/*! ../errors */"./src/errors.js"),s=n(/*! ../utils/logger */"./src/utils/logger.js"),l=n(/*! ../demux/mp4demuxer */"./src/demux/mp4demuxer.js"),u=n(/*! ./m3u8-parser */"./src/loader/m3u8-parser.js"),c=window.performance,p={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},f={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"},d=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 r(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,i=n||r,a=new i(t);return e.loader=a,this.loaders[e.type]=a,a},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;s.logger.debug("Loading playlist of type "+t.type+", level: "+t.level+", id: "+t.id);var r=this.getInternalLoader(t);if(r){var i=r.context;if(i&&i.url===e)return s.logger.trace("playlist request ongoing"),!1;s.logger.warn("aborting previous loader for type: "+t.type),r.abort()}var a,o,l,u;switch(t.type){case p.MANIFEST:a=n.manifestLoadingMaxRetry,o=n.manifestLoadingTimeOut,l=n.manifestLoadingRetryDelay,u=n.manifestLoadingMaxRetryTimeout;break;case p.LEVEL:a=0,o=n.levelLoadingTimeOut;break;default:a=n.levelLoadingMaxRetry,o=n.levelLoadingTimeOut,l=n.levelLoadingRetryDelay,u=n.levelLoadingMaxRetryTimeout}r=this.createInternalLoader(t),t.url=e,t.responseType=t.responseType||"";var c={timeout:o,maxRetry:a,retryDelay:l,maxRetryDelay:u},f={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return s.logger.debug("Calling internal loader delegate for URL: "+e),r.load(t,c,f),!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 i=e.data;if(t.tload=c.now(),0!==i.indexOf("#EXTM3U"))return void this._handleManifestParsingError(e,n,"no EXTM3U delimiter",r);i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(e,t,n,r):this._handleMasterPlaylist(e,t,n,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,a){var o=this.hls,l=e.data,c=n.getResponseUrl(e,r),p=u.default.parseMasterPlaylist(l,c);if(!p.length)return void this._handleManifestParsingError(e,r,"no level found in manifest",a);var f=p.map(function(e){return{id:e.attrs.AUDIO,codec:e.audioCodec}}),d=u.default.parseMasterPlaylistMedia(l,c,"AUDIO",f),h=u.default.parseMasterPlaylistMedia(l,c,"SUBTITLES");if(d.length){var y=!1;d.forEach(function(e){e.url||(y=!0)}),!1===y&&p[0].audioCodec&&!p[0].attrs.AUDIO&&(s.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),d.unshift({type:"main",name:"main"}))}o.trigger(i.default.MANIFEST_LOADED,{levels:p,audioTracks:d,subtitles:h,url:c,stats:t,networkDetails:a})},n.prototype._handleTrackOrLevelPlaylist=function(t,r,a,o){var s=this.hls,l=a.id,f=a.level,d=a.type,h=n.getResponseUrl(t,a),y=e.isFinite(l)?l:0,v=e.isFinite(f)?f:y,g=n.mapContextToLevelType(a),m=u.default.parseLevelPlaylist(t.data,h,v,g,y);if(m.tload=r.tload,d===p.MANIFEST){var b={url:h,details:m};s.trigger(i.default.MANIFEST_LOADED,{levels:[b],audioTracks:[],url:h,stats:r,networkDetails:o})}if(r.tparsed=c.now(),m.needSidxRanges){var _=m.initSegment.url;return void this.load(_,{isSidxRequest:!0,type:d,level:f,levelDetails:m,id:l,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}a.levelDetails=m,this._handlePlaylistLoaded(t,r,a,o)},n.prototype._handleSidxRequest=function(e,t){var n=l.default.parseSegmentIndex(new Uint8Array(e.data));if(n){var r=n.references,i=t.levelDetails;r.forEach(function(e,t){var n=e.info,r=i.fragments[t];0===r.byteRange.length&&(r.rawByteRange=String(1+n.end-n.start)+"@"+String(n.start))}),i.initSegment.rawByteRange=String(n.moovEndOffset)+"@0"}},n.prototype._handleManifestParsingError=function(e,t,n,r){this.hls.trigger(i.default.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:e.url,reason:n,networkDetails:r})},n.prototype._handleNetworkError=function(e,t,n,r){void 0===n&&(n=!1),void 0===r&&(r=null),s.logger.info("A network error occured while loading a "+e.type+"-type playlist");var a,l,u=this.getInternalLoader(e);switch(e.type){case p.MANIFEST:a=n?o.ErrorDetails.MANIFEST_LOAD_TIMEOUT:o.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case p.LEVEL:a=n?o.ErrorDetails.LEVEL_LOAD_TIMEOUT:o.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case p.AUDIO_TRACK:a=n?o.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;default:l=!1}u&&(u.abort(),this.resetInternalLoader(e.type));var c={type:o.ErrorTypes.NETWORK_ERROR,details:a,fatal:l,url:u.url,loader:u,context:e,networkDetails:t};r&&(c.response=r),this.hls.trigger(i.default.ERROR,c)},n.prototype._handlePlaylistLoaded=function(e,t,r,a){var o=r.type,s=r.level,l=r.id,u=r.levelDetails;if(!u.targetduration)return void this._handleManifestParsingError(e,r,"invalid target duration",a);if(n.canHaveQualityLevels(r.type))this.hls.trigger(i.default.LEVEL_LOADED,{details:u,level:s||0,id:l||0,stats:t,networkDetails:a});else switch(o){case p.AUDIO_TRACK:this.hls.trigger(i.default.AUDIO_TRACK_LOADED,{details:u,id:l,stats:t,networkDetails:a});break;case p.SUBTITLE_TRACK:this.hls.trigger(i.default.SUBTITLE_TRACK_LOADED,{details:u,id:l,stats:t,networkDetails:a})}},n}(a.default);t.default=d}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/observer.js":/*!*************************!*\
  !*** ./src/observer.js ***!
  \*************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.emit.apply(this,[e,e].concat(t))},t}(i.EventEmitter);t.Observer=a},"./src/polyfills/number.js":/*!*********************************!*\
  !*** ./src/polyfills/number.js ***!
  \*********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../utils/get-self-scope */"./src/utils/get-self-scope.js"),i=r.getSelfScope(),a=i.Number;t.Number=a,a.isFinite=a.isFinite||function(e){return"number"==typeof e&&isFinite(e)}},"./src/remux/aac-helper.js":/*!*********************************!*\
  !*** ./src/remux/aac-helper.js ***!
  \*********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.getSilentFrame=function(e,t){switch(e){case"mp4a.40.2":if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},e}();t.default=r},"./src/remux/mp4-generator.js":/*!************************************!*\
  !*** ./src/remux/mp4-generator.js ***!
  \************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Math.pow(2,32)-1,i=function(){function e(){}return e.init=function(){e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var t;for(t in e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=a,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,o,l,o,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,i))},e.box=function(e){for(var t,n=Array.prototype.slice.call(arguments,1),r=8,i=n.length,a=i;i--;)r+=n[i].byteLength;for(t=new Uint8Array(r),t[0]=r>>24&255,t[1]=r>>16&255,t[2]=r>>8&255,t[3]=255&r,t.set(e,4),i=0,r=8;i<a;i++)t.set(n[i],r),r+=n[i].byteLength;return t},e.hdlr=function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])},e.mdat=function(t){return e.box(e.types.mdat,t)},e.mdhd=function(t,n){n*=t;var i=Math.floor(n/(r+1)),a=Math.floor(n%(r+1));return e.box(e.types.mdhd,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,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,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 i=Math.floor(n/(r+1)),a=Math.floor(n%(r+1)),o=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,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,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,o)},e.sdtp=function(t){var n,r,i=t.samples||[],a=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,a[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return e.box(e.types.sdtp,a)},e.stbl=function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))},e.avc1=function(t){var n,r,i,a=[],o=[];for(n=0;n<t.sps.length;n++)r=t.sps[n],i=r.byteLength,a.push(i>>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));for(n=0;n<t.pps.length;n++)r=t.pps[n],i=r.byteLength,o.push(i>>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));var s=e.box(e.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|t.sps.length].concat(a).concat([t.pps.length]).concat(o))),l=t.width,u=t.height,c=t.pixelRatio[0],p=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,l>>8&255,255&l,u>>8&255,255&u,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]),s,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,p>>24,p>>16&255,p>>8&255,255&p])))},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,i=t.duration*t.timescale,a=t.width,o=t.height,s=Math.floor(i/(r+1)),l=Math.floor(i%(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,s>>24,s>>16&255,s>>8&255,255&s,l>>24,l>>16&255,l>>8&255,255&l,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,a>>8&255,255&a,0,0,o>>8&255,255&o,0,0]))},e.traf=function(t,n){var i=e.sdtp(t),a=t.id,o=Math.floor(n/(r+1)),s=Math.floor(n%(r+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s])),e.trun(t,i.length+16+20+8+16+8+8),i)},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,i,a,o,s,l,u=t.samples||[],c=u.length,p=12+16*c,f=new Uint8Array(p);for(n+=8+p,f.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<c;r++)i=u[r],a=i.duration,o=i.size,s=i.flags,l=i.cts,f.set([a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return e.box(e.types.trun,f)},e.initSegment=function(t){e.types||e.init();var n,r=e.moov(t);return n=new Uint8Array(e.FTYP.byteLength+r.byteLength),n.set(e.FTYP),n.set(r,e.FTYP.byteLength),n},e}();t.default=i},"./src/remux/mp4-remuxer.js":/*!**********************************!*\
  !*** ./src/remux/mp4-remuxer.js ***!
  \**********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ./aac-helper */"./src/remux/aac-helper.js"),i=n(/*! ./mp4-generator */"./src/remux/mp4-generator.js"),a=n(/*! ../events */"./src/events.js"),o=n(/*! ../errors */"./src/errors.js"),s=n(/*! ../utils/logger */"./src/utils/logger.js"),l=function(){function e(e,t,n,r){this.observer=e,this.config=t,this.typeSupported=n;var i=navigator.userAgent;this.isSafari=r&&r.indexOf("Apple")>-1&&i&&!i.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,i,o,l){if(this.ISGenerated||this.generateIS(e,t,i),this.ISGenerated){var u=e.samples.length,c=t.samples.length,p=i,f=i;if(u&&c){var d=(e.samples[0].pts-t.samples[0].pts)/t.inputTimeScale;p+=Math.max(0,d),f+=Math.max(0,-d)}if(u){e.timescale||(s.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(e,t,i));var h=this.remuxAudio(e,p,o,l);if(c){var y=void 0;h&&(y=h.endPTS-h.startPTS),t.timescale||(s.logger.warn("regenerate InitSegment as video detected"),this.generateIS(e,t,i)),this.remuxVideo(t,f,o,y,l)}}else if(c){var v=this.remuxVideo(t,f,o,0,l);v&&e.codec&&this.remuxEmptyAudio(e,p,o,v)}}n.samples.length&&this.remuxID3(n,i),r.samples.length&&this.remuxText(r,i),this.observer.trigger(a.default.FRAG_PARSED)},e.prototype.generateIS=function(e,t,n){var r,l,u=this.observer,c=e.samples,p=t.samples,f=this.typeSupported,d="audio/mp4",h={},y={tracks:h},v=void 0===this._initPTS;if(v&&(r=l=1/0),e.config&&c.length&&(e.timescale=e.samplerate,s.logger.log("audio sampling rate : "+e.samplerate),e.isAAC||(f.mpeg?(d="audio/mpeg",e.codec=""):f.mp3&&(e.codec="mp3")),h.audio={container:d,codec:e.codec,initSegment:!e.isAAC&&f.mpeg?new Uint8Array:i.default.initSegment([e]),metadata:{channelCount:e.channelCount}},v&&(r=l=c[0].pts-e.inputTimeScale*n)),t.sps&&t.pps&&p.length){var g=t.inputTimeScale;t.timescale=g,h.video={container:"video/mp4",codec:t.codec,initSegment:i.default.initSegment([t]),metadata:{width:t.width,height:t.height}},v&&(r=Math.min(r,p[0].pts-g*n),l=Math.min(l,p[0].dts-g*n),this.observer.trigger(a.default.INIT_PTS_FOUND,{initPTS:r}))}Object.keys(h).length?(u.trigger(a.default.FRAG_PARSING_INIT_SEGMENT,y),this.ISGenerated=!0,v&&(this._initPTS=r,this._initDTS=l)):u.trigger(a.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},e.prototype.remuxVideo=function(e,t,n,r,l){var u,c,p,f,d,h,y,v=8,g=e.timescale,m=e.samples,b=[],_=m.length,E=this._PTSNormalize,k=this._initPTS,T=this.nextAvcDts,A=this.isSafari;if(0!==_){A&&(n|=m.length&&T&&(l&&Math.abs(t-T/g)<.1||Math.abs(m[0].pts-T-k)<g/5)),n||(T=t*g),m.forEach(function(e){e.pts=E(e.pts-k,T),e.dts=E(e.dts-k,T)}),m.sort(function(e,t){var n=e.dts-t.dts,r=e.pts-t.pts;return n||r||e.id-t.id});var w=m.reduce(function(e,t){return Math.max(Math.min(e,t.pts-t.dts),-18e3)},0);if(w<0){s.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Math.round(w/90)+" ms to overcome this issue");for(var S=0;S<m.length;S++)m[S].dts+=w}var P=m[0];d=Math.max(P.dts,0),f=Math.max(P.pts,0);var O=Math.round((d-T)/90);n&&O&&(O>1?s.logger.log("AVC:"+O+" ms hole between fragments detected,filling it"):O<-1&&s.logger.log("AVC:"+-O+" ms overlapping between fragments detected"),d=T,m[0].dts=d,f=Math.max(f-O,T),m[0].pts=f,s.logger.log("Video/PTS/DTS adjusted: "+Math.round(f/90)+"/"+Math.round(d/90)+",delta:"+O+" ms")),P=m[m.length-1],y=Math.max(P.dts,0),h=Math.max(P.pts,0,y),A&&(u=Math.round((y-d)/(m.length-1)));for(var C=0,x=0,S=0;S<_;S++){for(var R=m[S],I=R.units,D=I.length,M=0,L=0;L<D;L++)M+=I[L].data.length;x+=M,C+=D,R.length=M,R.dts=A?d+S*u:Math.max(R.dts,d),R.pts=Math.max(R.pts,R.dts)}var N=x+4*C+8;try{c=new Uint8Array(N)}catch(e){return void this.observer.trigger(a.default.ERROR,{type:o.ErrorTypes.MUX_ERROR,details:o.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:N,reason:"fail allocating video mdat "+N})}var j=new DataView(c.buffer);j.setUint32(0,N),c.set(i.default.types.mdat,4);for(var S=0;S<_;S++){for(var U=m[S],F=U.units,B=0,V=void 0,L=0,D=F.length;L<D;L++){var G=F[L],H=G.data,K=G.data.byteLength;j.setUint32(v,K),v+=4,c.set(H,v),v+=K,B+=4+K}if(A)V=Math.max(0,u*Math.round((U.pts-U.dts)/u));else{if(S<_-1)u=m[S+1].dts-U.dts;else{var z=this.config,Y=U.dts-m[S>0?S-1:S].dts;if(z.stretchShortVideoTrack){var W=z.maxBufferHole,q=Math.floor(W*g),X=(r?f+r*g:this.nextAudioPts)-U.pts;X>q?(u=X-Y,u<0&&(u=Y),s.logger.log("It is approximately "+X/90+" ms to the next segment; using duration "+u/90+" ms for the last video frame.")):u=Y}else u=Y}V=Math.round(U.pts-U.dts)}b.push({size:B,duration:u,cts:V,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:U.key?2:1,isNonSync:U.key?0:1}})}this.nextAvcDts=y+u;var J=e.dropped;if(e.len=0,e.nbNalu=0,e.dropped=0,b.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var Q=b[0].flags;Q.dependsOn=2,Q.isNonSync=0}e.samples=b,p=i.default.moof(e.sequenceNumber++,d,e),e.samples=[];var $={data1:p,data2:c,startPTS:f/g,endPTS:(h+u)/g,startDTS:d/g,endDTS:this.nextAvcDts/g,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:J};return this.observer.trigger(a.default.FRAG_PARSING_DATA,$),$}},e.prototype.remuxAudio=function(e,t,n,l){var u,c,p,f,d,h,y,v=e.inputTimeScale,g=e.timescale,m=v/g,b=e.isAAC?1024:1152,_=b*m,E=this._PTSNormalize,k=this._initPTS,T=!e.isAAC&&this.typeSupported.mpeg,A=e.samples,w=[],S=this.nextAudioPts;if(n|=A.length&&S&&(l&&Math.abs(t-S/v)<.1||Math.abs(A[0].pts-S-k)<20*_),A.forEach(function(e){e.pts=e.dts=E(e.pts-k,t*v)}),A=A.filter(function(e){return e.pts>=0}),0!==A.length){if(n||(S=l?t*v:A[0].pts),e.isAAC)for(var P=this.config.maxAudioFramesDrift,O=0,C=S;O<A.length;){var x,R=A[O],I=R.pts;x=I-C;var D=Math.abs(1e3*x/v);if(x<=-P*_)s.logger.warn("Dropping 1 audio frame @ "+(C/v).toFixed(3)+"s due to "+Math.round(D)+" ms overlap."),A.splice(O,1),e.len-=R.unit.length;else if(x>=P*_&&D<1e4&&C){var M=Math.round(x/_);s.logger.warn("Injecting "+M+" audio frame @ "+(C/v).toFixed(3)+"s due to "+Math.round(1e3*x/v)+" ms gap.");for(var L=0;L<M;L++){var N=Math.max(C,0);p=r.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount),p||(s.logger.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),p=R.unit.subarray()),A.splice(O,0,{unit:p,pts:N,dts:N}),e.len+=p.length,C+=_,O++}R.pts=R.dts=C,C+=_,O++}else Math.abs(x),R.pts=R.dts=C,C+=_,O++}for(var L=0,j=A.length;L<j;L++){var U=A[L],F=U.unit,I=U.pts;if(void 0!==y)c.duration=Math.round((I-y)/m);else{var B=Math.round(1e3*(I-S)/v),V=0;if(n&&e.isAAC&&B){if(B>0&&B<1e4)V=Math.round((I-S)/_),s.logger.log(B+" ms hole between AAC samples detected,filling it"),V>0&&(p=r.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount),p||(p=F.subarray()),e.len+=V*p.length);else if(B<-12){s.logger.log("drop overlapping AAC sample, expected/parsed/delta:"+(S/v).toFixed(3)+"s/"+(I/v).toFixed(3)+"s/"+-B+"ms"),e.len-=F.byteLength;continue}I=S}if(h=I,!(e.len>0))return;var G=T?e.len:e.len+8;u=T?0:8;try{f=new Uint8Array(G)}catch(e){return void this.observer.trigger(a.default.ERROR,{type:o.ErrorTypes.MUX_ERROR,details:o.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:G,reason:"fail allocating audio mdat "+G})}if(!T){new DataView(f.buffer).setUint32(0,G),f.set(i.default.types.mdat,4)}for(var O=0;O<V;O++)p=r.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount),p||(s.logger.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),p=F.subarray()),f.set(p,u),u+=p.byteLength,c={size:p.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},w.push(c)}f.set(F,u);var H=F.byteLength;u+=H,c={size:H,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},w.push(c),y=I}var K=0,z=w.length;if(z>=2&&(K=w[z-2].duration,c.duration=K),z){this.nextAudioPts=S=y+m*K,e.len=0,e.samples=w,d=T?new Uint8Array:i.default.moof(e.sequenceNumber++,h/m,e),e.samples=[];var Y=h/v,W=S/v,q={data1:d,data2:f,startPTS:Y,endPTS:W,startDTS:Y,endDTS:W,type:"audio",hasAudio:!0,hasVideo:!1,nb:z};return this.observer.trigger(a.default.FRAG_PARSING_DATA,q),q}return null}},e.prototype.remuxEmptyAudio=function(e,t,n,i){var a=e.inputTimeScale,o=e.samplerate?e.samplerate:a,l=a/o,u=this.nextAudioPts,c=(void 0!==u?u:i.startDTS*a)+this._initDTS,p=i.endDTS*a+this._initDTS,f=1024*l,d=Math.ceil((p-c)/f),h=r.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(s.logger.warn("remux empty Audio"),!h)return void s.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");for(var y=[],v=0;v<d;v++){var g=c+v*f;y.push({unit:h,pts:g,dts:g}),e.len+=h.length}e.samples=y,this.remuxAudio(e,t,n)},e.prototype.remuxID3=function(e){var t,n=e.samples.length,r=e.inputTimeScale,i=this._initPTS,o=this._initDTS;if(n){for(var s=0;s<n;s++)t=e.samples[s],t.pts=(t.pts-i)/r,t.dts=(t.dts-o)/r;this.observer.trigger(a.default.FRAG_PARSING_METADATA,{samples:e.samples})}e.samples=[]},e.prototype.remuxText=function(e){e.samples.sort(function(e,t){return e.pts-t.pts});var t,n=e.samples.length,r=e.inputTimeScale,i=this._initPTS;if(n){for(var o=0;o<n;o++)t=e.samples[o],t.pts=(t.pts-i)/r;this.observer.trigger(a.default.FRAG_PARSING_USERDATA,{samples:e.samples})}e.samples=[]},e.prototype._PTSNormalize=function(e,t){var n;if(void 0===t)return e;for(n=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=n;return e},e}();t.default=l},"./src/remux/passthrough-remuxer.js":/*!******************************************!*\
  !*** ./src/remux/passthrough-remuxer.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../events */"./src/events.js"),i=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,i,a,o,s,l){var u=this.observer,c="";e&&(c+="audio"),t&&(c+="video"),u.trigger(r.default.FRAG_PARSING_DATA,{data1:l,startPTS:a,startDTS:a,type:c,hasAudio:!!e,hasVideo:!!t,nb:1,dropped:0}),u.trigger(r.default.FRAG_PARSED)},e}();t.default=i},"./src/task-loop.js":/*!**************************!*\
  !*** ./src/task-loop.js ***!
  \**************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! ./event-handler */"./src/event-handler.js"),a=function(e){function t(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=e.apply(this,[t].concat(n))||this;return i._tickInterval=null,i._tickTimer=null,i._tickCallCount=0,i._boundTick=i.tick.bind(i),i}return r(t,e),t.prototype.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},t.prototype.hasInterval=function(){return!!this._tickInterval},t.prototype.hasNextTick=function(){return!!this._tickTimer},t.prototype.setInterval=function(e){return!this._tickInterval&&(this._tickInterval=setInterval(this._boundTick,e),!0)},t.prototype.clearInterval=function(){return!!this._tickInterval&&(clearInterval(this._tickInterval),this._tickInterval=null,!0)},t.prototype.clearNextTick=function(){return!!this._tickTimer&&(clearTimeout(this._tickTimer),this._tickTimer=null,!0)},t.prototype.tick=function(){1===++this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&(this.clearNextTick(),this._tickTimer=setTimeout(this._boundTick,0)),this._tickCallCount=0)},t.prototype.doTick=function(){},t}(i.default);t.default=a},"./src/utils/attr-list.js":/*!********************************!*\
  !*** ./src/utils/attr-list.js ***!
  \********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=/^(\d+)x(\d+)$/,r=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,i=function(){function t(e){"string"==typeof e&&(e=t.parseAttrList(e));for(var n in 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;r<t.length/2;r++)n[r]=parseInt(t.slice(2*r,2*r+2),16);return n}return null},t.prototype.hexadecimalIntegerAsNumber=function(t){var n=parseInt(this[t],16);return n>e.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 i=t[2];0===i.indexOf('"')&&i.lastIndexOf('"')===i.length-1&&(i=i.slice(1,-1)),n[t[1]]=i}return n},t}();t.default=i}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/utils/binary-search.js":/*!************************************!*\
  !*** ./src/utils/binary-search.js ***!
  \************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={search:function(e,t){for(var n=0,r=e.length-1,i=null,a=null;n<=r;){i=(n+r)/2|0,a=e[i];var o=t(a);if(o>0)n=i+1;else{if(!(o<0))return a;r=i-1}}return null}};t.default=r},"./src/utils/buffer-helper.js":/*!************************************!*\
  !*** ./src/utils/buffer-helper.js ***!
  \************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
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.length;r++)if(t>=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,i=[],a=void 0;for(a=0;a<r.length;a++)i.push({start:r.start(a),end:r.end(a)});return this.bufferedInfo(i,t,n)}}catch(e){}return{len:0,start:t,end:t,nextStart:void 0}},e.bufferedInfo=function(e,t,n){var r,i,a,o,s,l=[];for(e.sort(function(e,t){var n=e.start-t.start;return n||t.end-e.end}),s=0;s<e.length;s++){var u=l.length;if(u){var c=l[u-1].end;e[s].start-c<n?e[s].end>c&&(l[u-1].end=e[s].end):l.push(e[s])}else l.push(e[s])}for(s=0,r=0,i=a=t;s<l.length;s++){var p=l[s].start,f=l[s].end;if(t+n>=p&&t<f)i=p,a=f,r=a-t;else if(t+n<p){o=p;break}}return{len:r,start:i,end:a,nextStart:o}},e}();t.BufferHelper=r},"./src/utils/cea-608-parser.js":/*!*************************************!*\
  !*** ./src/utils/cea-608-parser.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},i=function(e){var t=e;return r.hasOwnProperty(e)&&(t=r[e]),String.fromCharCode(t)},a=15,o=100,s={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},l={17:2,18:4,21:6,22:8,23:10,19:13,20:15},u={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},c={25:2,26:4,29:6,30:8,31:10,27:13,28:15},p=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],f={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e,t){this.verboseFilter[e];this.verboseLevel}},d=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},h=function(){function e(e,t,n,r,i){this.foreground=e||"white",this.underline=t||!1,this.italics=n||!1,this.background=r||"black",this.flash=i||!1}return e.prototype.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},e.prototype.setStyles=function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}},e.prototype.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},e.prototype.equals=function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},e.prototype.copy=function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},e.prototype.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},e}(),y=function(){function e(e,t,n,r,i,a){this.uchar=e||" ",this.penState=new h(t,n,r,i,a)}return e.prototype.reset=function(){this.uchar=" ",this.penState.reset()},e.prototype.setChar=function(e,t){this.uchar=e,this.penState.copy(t)},e.prototype.setPenState=function(e){this.penState.copy(e)},e.prototype.equals=function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},e.prototype.copy=function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},e.prototype.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},e}(),v=function(){function e(){this.chars=[];for(var e=0;e<o;e++)this.chars.push(new y);this.pos=0,this.currPenState=new h}return e.prototype.equals=function(e){for(var t=!0,n=0;n<o;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},e.prototype.copy=function(e){for(var t=0;t<o;t++)this.chars[t].copy(e.chars[t])},e.prototype.isEmpty=function(){for(var e=!0,t=0;t<o;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},e.prototype.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(f.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>o&&(f.log("ERROR","Too large cursor position "+this.pos),this.pos=o)},e.prototype.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)},e.prototype.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},e.prototype.insertChar=function(e){e>=144&&this.backSpace();var t=i(e);if(this.pos>=o)return void f.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;t<o;t++)this.chars[t].reset()},e.prototype.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},e.prototype.clearToEndOfRow=function(){this.clearFromPos(this.pos)},e.prototype.getTextString=function(){for(var e=[],t=!0,n=0;n<o;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},e.prototype.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),g=function(){function e(){this.rows=[];for(var e=0;e<a;e++)this.rows.push(new v);this.currRow=a-1,this.nrRollUpRows=null,this.reset()}return e.prototype.reset=function(){for(var e=0;e<a;e++)this.rows[e].clear();this.currRow=a-1},e.prototype.equals=function(e){for(var t=!0,n=0;n<a;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},e.prototype.copy=function(e){for(var t=0;t<a;t++)this.rows[t].copy(e.rows[t])},e.prototype.isEmpty=function(){for(var e=!0,t=0;t<a;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},e.prototype.backSpace=function(){this.rows[this.currRow].backSpace()},e.prototype.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},e.prototype.insertChar=function(e){this.rows[this.currRow].insertChar(e)},e.prototype.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},e.prototype.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},e.prototype.setCursor=function(e){f.log("INFO","setCursor: "+e),this.rows[this.currRow].setCursor(e)},e.prototype.setPAC=function(e){f.log("INFO","pacData = "+JSON.stringify(e));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var n=0;n<a;n++)this.rows[n].clear();var r=this.currRow+1-this.nrRollUpRows,i=this.lastOutputScreen;if(i){var o=i.rows[r].cueStartTime;if(o&&o<f.time)for(var n=0;n<this.nrRollUpRows;n++)this.rows[t-this.nrRollUpRows+n+1].copy(i.rows[r+n])}}this.currRow=t;var s=this.rows[this.currRow];if(null!==e.indent){var l=e.indent,u=Math.max(l-1,0);s.setCursor(e.indent),e.color=s.chars[u].penState.foreground}var c={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(c)},e.prototype.setBkgData=function(e){f.log("INFO","bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},e.prototype.setRollUpRows=function(e){this.nrRollUpRows=e},e.prototype.rollUp=function(){if(null===this.nrRollUpRows)return void f.log("DEBUG","roll_up but nrRollUpRows not set yet");f.log("TEXT",this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),f.log("INFO","Rolling up")},e.prototype.getDisplayText=function(e){e=e||!1;for(var t=[],n="",r=-1,i=0;i<a;i++){var o=this.rows[i].getTextString();o&&(r=i+1,e?t.push("Row "+r+": '"+o+"'"):t.push(o.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},e.prototype.getTextAndFormat=function(){return this.rows},e}(),m=function(){function e(e,t){this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new g,this.nonDisplayedMemory=new g,this.lastOutputScreen=new g,this.currRollUpRow=this.displayedMemory.rows[a-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[a-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,f.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<e.length;t++)this.writeScreen.insertChar(e[t]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";f.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(f.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},e.prototype.ccRCL=function(){f.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},e.prototype.ccBS=function(){f.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},e.prototype.ccAOF=function(){},e.prototype.ccAON=function(){},e.prototype.ccDER=function(){f.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},e.prototype.ccRU=function(e){f.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},e.prototype.ccFON=function(){f.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},e.prototype.ccRDC=function(){f.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},e.prototype.ccTR=function(){f.log("INFO","TR"),this.setMode("MODE_TEXT")},e.prototype.ccRTD=function(){f.log("INFO","RTD"),this.setMode("MODE_TEXT")},e.prototype.ccEDM=function(){f.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},e.prototype.ccCR=function(){f.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},e.prototype.ccENM=function(){f.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},e.prototype.ccEOC=function(){if(f.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,f.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},e.prototype.ccTO=function(e){f.log("INFO","TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},e.prototype.ccMIDROW=function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=r[n]}f.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},e.prototype.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=f.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}(),b=function(){function e(e,t,n){this.field=e||1,this.outputs=[t,n],this.channels=[new m(1,t),new m(2,n)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}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,i,a=!1;this.lastTime=e,f.setTime(e);for(var o=0;o<t.length;o+=2)if(r=127&t[o],i=127&t[o+1],0!==r||0!==i){if(f.log("DATA","["+d([t[o],t[o+1]])+"] -> ("+d([r,i])+")"),n=this.parseCmd(r,i),n||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),!n&&(a=this.parseChars(r,i)))if(this.currChNr&&this.currChNr>=0){var s=this.channels[this.currChNr-1];s.insertChars(a)}else f.log("WARNING","No channel found yet. TEXT-MODE?");n?this.dataCounters.cmd+=2:a?this.dataCounters.char+=2:(this.dataCounters.other+=2,f.log("WARNING","Couldn't parse cleaned data "+d([r,i])+" orig: "+d([t[o],t[o+1]])))}else this.dataCounters.padding+=2},e.prototype.parseCmd=function(e,t){var n=null,r=(20===e||28===e)&&t>=32&&t<=47,i=(23===e||31===e)&&t>=33&&t<=35;if(!r&&!i)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,f.log("DEBUG","Repeated command ("+d([e,t])+") is dropped"),!0;n=20===e||23===e?1:2;var a=this.channels[n-1];return 20===e||28===e?32===t?a.ccRCL():33===t?a.ccBS():34===t?a.ccAOF():35===t?a.ccAON():36===t?a.ccDER():37===t?a.ccRU(2):38===t?a.ccRU(3):39===t?a.ccRU(4):40===t?a.ccFON():41===t?a.ccRDC():42===t?a.ccTR():43===t?a.ccRTD():44===t?a.ccEDM():45===t?a.ccCR():46===t?a.ccENM():47===t&&a.ccEOC():a.ccTO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},e.prototype.parseMidrow=function(e,t){var n=null;if((17===e||25===e)&&t>=32&&t<=47){if((n=17===e?1:2)!==this.currChNr)return f.log("ERROR","Mismatch channel in midrow parsing"),!1;return this.channels[n-1].ccMIDROW(t),f.log("DEBUG","MIDROW ("+d([e,t])+")"),!0}return!1},e.prototype.parsePAC=function(e,t){var n=null,r=null,i=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,a=(16===e||24===e)&&t>=64&&t<=95;if(!i&&!a)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?s[e]:u[e]:1===n?l[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=t,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,a=null;if(e>=25?(n=2,a=e-8):(n=1,a=e),a>=17&&a<=19){var o=t;o=17===a?t+80:18===a?t+112:t+144,f.log("INFO","Special char '"+i(o)+"' in channel "+n),r=[o]}else e>=32&&e<=127&&(r=0===t?[e]:[e,t]);if(r){var s=d(r);f.log("DEBUG","Char codes =  "+s.join(",")),this.lastCmdA=null,this.lastCmdB=null}return r},e.prototype.parseBackgroundAttributes=function(e,t){var n,r,i,a,o=(16===e||24===e)&&t>=32&&t<=47,s=(23===e||31===e)&&t>=45&&t<=47;return!(!o&&!s)&&(n={},16===e||24===e?(r=Math.floor((t-32)/2),n.background=p[r],t%2==1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",47===t&&(n.underline=!0)),i=e<24?1:2,a=this.channels[i-1],a.setBkgData(n),this.lastCmdA=null,this.lastCmdB=null,!0)},e.prototype.reset=function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null},e.prototype.cueSplitAtTime=function(e){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e)},e}();t.default=b},"./src/utils/codecs.js":/*!*****************************!*\
  !*** ./src/utils/codecs.js ***!
  \*****************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";function r(e,t){var n=a[t];return!!n&&!0===n[e.slice(0,4)]}function i(e,t){return window.MediaSource.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"')}Object.defineProperty(t,"__esModule",{value:!0});var a={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};t.isCodecType=r,t.isCodecSupportedInMp4=i},"./src/utils/cues.js":/*!***************************!*\
  !*** ./src/utils/cues.js ***!
  \***************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";function r(e,t,n,r){for(var a,o,s,l,u,c=window.VTTCue||window.TextTrackCue,p=0;p<r.rows.length;p++)if(a=r.rows[p],s=!0,l=0,u="",!a.isEmpty()){for(var f=0;f<a.chars.length;f++)a.chars[f].uchar.match(/\s/)&&s?l++:(u+=a.chars[f].uchar,s=!1);a.cueStartTime=t,t===n&&(n+=1e-4),o=new c(t,n,i.fixLineBreaks(u.trim())),l>=16?l--:l++,navigator.userAgent.match(/Firefox\//)?o.line=p+1:o.line=p>7?p-2:p+1,o.align="left",o.position=Math.max(0,Math.min(100,l/32*100+(navigator.userAgent.match(/Firefox\//)?50:0))),e.addCue(o)}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! ./vttparser */"./src/utils/vttparser.js");t.newCue=r},"./src/utils/discontinuities.js":/*!**************************************!*\
  !*** ./src/utils/discontinuities.js ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){function r(e,t){for(var n=null,r=0;r<e.length;r+=1){var i=e[r];if(i&&i.cc===t){n=i;break}}return n}function i(e,t){return p.default.search(e,function(e){return e.cc<t?1:e.cc>t?-1:0})}function a(e,t,n){var r=!1;return t&&t.details&&n&&(n.endCC>n.startCC||e&&e.cc<n.startCC)&&(r=!0),r}function o(e,t){var n=e.fragments,i=t.fragments;if(!i.length||!n.length)return void f.logger.log("No fragments to align");var a=r(n,i[0].cc);return!a||a&&!a.startPTS?void f.logger.log("No frag in previous level to align on"):a}function s(e,t){t.fragments.forEach(function(t){if(t){var n=t.start+e;t.start=t.startPTS=n,t.endPTS=n+t.duration}}),t.PTSKnown=!0}function l(e,t,n){u(e,n,t),!n.PTSKnown&&t&&c(n,t.details)}function u(e,t,n){if(a(e,n,t)){var r=o(n.details,t);r&&(f.logger.log("Adjusting PTS using last level due to CC increase within current level"),s(r.start,t))}}function c(t,n){if(n&&n.fragments.length){if(!t.hasProgramDateTime||!n.hasProgramDateTime)return;var r=n.fragments[0].programDateTime,i=t.fragments[0].programDateTime,a=(i-r)/1e3+n.fragments[0].start;e.isFinite(a)&&(f.logger.log("adjusting PTS using programDateTime delta, sliding:"+a.toFixed(3)),s(a,t))}}Object.defineProperty(t,"__esModule",{value:!0});var p=n(/*! ./binary-search */"./src/utils/binary-search.js"),f=n(/*! ../utils/logger */"./src/utils/logger.js");t.findFirstFragWithCC=r,t.findFragWithCC=i,t.shouldAlignOnDiscontinuities=a,t.findDiscontinuousReferenceFrag=o,t.adjustPts=s,t.alignStream=l,t.alignDiscontinuities=u,t.alignPDT=c}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/utils/ewma-bandwidth-estimator.js":/*!***********************************************!*\
  !*** ./src/utils/ewma-bandwidth-estimator.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../utils/ewma */"./src/utils/ewma.js"),i=function(){function e(e,t,n,i){this.hls=e,this.defaultEstimate_=i,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){e=Math.max(e,this.minDelayMs_);var n=8e3*t/e,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=i},"./src/utils/ewma.js":/*!***************************!*\
  !*** ./src/utils/ewma.js ***!
  \***************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
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":/*!*************************************!*\
  !*** ./src/utils/get-self-scope.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";function r(){return"undefined"==typeof window?self:window}Object.defineProperty(t,"__esModule",{value:!0}),t.getSelfScope=r},"./src/utils/logger.js":/*!*****************************!*\
  !*** ./src/utils/logger.js ***!
  \*****************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";function r(){}function i(e,t){return t="["+e+"] > "+t}function a(e){var t=c.console[e];return t?function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];n[0]&&(n[0]=i(e,n[0])),t.apply(c.console,n)}:r}function o(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];t.forEach(function(t){u[t]=e[t]?e[t].bind(e):a(t)})}Object.defineProperty(t,"__esModule",{value:!0});var s=n(/*! ./get-self-scope */"./src/utils/get-self-scope.js"),l={trace:r,debug:r,log:r,warn:r,info:r,error:r},u=l,c=s.getSelfScope();t.enableLogs=function(e){if(!0===e||"object"==typeof e){o(e,"debug","log","info","warn","error");try{u.log()}catch(e){u=l}}else u=l},t.logger=u},"./src/utils/mediakeys-helper.js":/*!***************************************!*\
  !*** ./src/utils/mediakeys-helper.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return"undefined"!=typeof window&&window.navigator&&window.navigator.requestMediaKeySystemAccess?window.navigator.requestMediaKeySystemAccess.bind(window.navigator):null}();t.requestMediaKeySystemAccess=r},"./src/utils/mediasource-helper.js":/*!*****************************************!*\
  !*** ./src/utils/mediasource-helper.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";function r(){if("undefined"!=typeof window)return window.MediaSource||window.WebKitMediaSource}Object.defineProperty(t,"__esModule",{value:!0}),t.getMediaSource=r},"./src/utils/output-filter.js":/*!************************************!*\
  !*** ./src/utils/output-filter.js ***!
  \************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.timelineController=e,this.trackName=t,this.startTime=null,this.endTime=null,this.screen=null}return e.prototype.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen),this.startTime=null)},e.prototype.newCue=function(e,t,n){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},e}();t.default=r},"./src/utils/texttrack-utils.js":/*!**************************************!*\
  !*** ./src/utils/texttrack-utils.js ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";function r(e,t){var n=null;try{n=new window.Event("addtrack")}catch(e){n=document.createEvent("Event"),n.initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function i(e){if(e&&e.cues)for(;e.cues.length>0;)e.removeCue(e.cues[0])}Object.defineProperty(t,"__esModule",{value:!0}),t.sendAddTrackEvent=r,t.clearCurrentCues=i},"./src/utils/time-ranges.js":/*!**********************************!*\
  !*** ./src/utils/time-ranges.js ***!
  \**********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={toString:function(e){for(var t="",n=e.length,r=0;r<n;r++)t+="["+e.start(r).toFixed(3)+","+e.end(r).toFixed(3)+"]";return t}};t.default=r},"./src/utils/vttcue.js":/*!*****************************!*\
  !*** ./src/utils/vttcue.js ***!
  \*****************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){function e(e){return"string"==typeof e&&(!!a[e.toLowerCase()]&&e.toLowerCase())}function t(e){return"string"==typeof e&&(!!o[e.toLowerCase()]&&e.toLowerCase())}function n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function r(r,a,o){var s=this,l=function(){if("undefined"!=typeof navigator)return/MSIE\s8\.0/.test(navigator.userAgent)}(),u={};l?s=document.createElement("custom"):u.enumerable=!0,s.hasBeenReset=!1;var c="",p=!1,f=r,d=a,h=o,y=null,v="",g=!0,m="auto",b="start",_=50,E="middle",k=50,T="middle";if(Object.defineProperty(s,"id",n({},u,{get:function(){return c},set:function(e){c=""+e}})),Object.defineProperty(s,"pauseOnExit",n({},u,{get:function(){return p},set:function(e){p=!!e}})),Object.defineProperty(s,"startTime",n({},u,{get:function(){return f},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");f=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",n({},u,{get:function(){return d},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",n({},u,{get:function(){return h},set:function(e){h=""+e,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",n({},u,{get:function(){return y},set:function(e){y=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",n({},u,{get:function(){return v},set:function(t){var n=e(t);if(!1===n)throw new SyntaxError("An invalid or illegal string was specified.");v=n,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",n({},u,{get:function(){return g},set:function(e){g=!!e,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",n({},u,{get:function(){return m},set:function(e){if("number"!=typeof e&&e!==i)throw new SyntaxError("An invalid number or illegal string was specified.");m=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",n({},u,{get:function(){return b},set:function(e){var n=t(e);if(!n)throw new SyntaxError("An invalid or illegal string was specified.");b=n,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",n({},u,{get:function(){return _},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");_=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",n({},u,{get:function(){return E},set:function(e){var n=t(e);if(!n)throw new SyntaxError("An invalid or illegal string was specified.");E=n,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",n({},u,{get:function(){return k},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");k=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",n({},u,{get:function(){return T},set:function(e){var n=t(e);if(!n)throw new SyntaxError("An invalid or illegal string was specified.");T=n,this.hasBeenReset=!0}})),s.displayState=void 0,l)return s}if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var i="auto",a={"":!0,lr:!0,rl:!0},o={start:!0,middle:!0,end:!0,left:!0,right:!0};return r.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},r}()},"./src/utils/vttparser.js":/*!********************************!*\
  !*** ./src/utils/vttparser.js ***!
  \********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";function r(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new c,this.regionList=[]}function i(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}function a(){this.values=Object.create(null)}function o(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);if(2===o.length){var s=o[0],l=o[1];t(s,l)}}}function s(e,t,n){function r(){var t=i(e);if(null===t)throw new Error("Malformed timestamp: "+l);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function s(){e=e.replace(/^\s+/,"")}var l=e;if(s(),t.startTime=r(),s(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+l);e=e.substr(3),s(),t.endTime=r(),s(),function(e,t){var r=new a;o(e,function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];r.integer(e,o),r.percent(e,o)&&r.set("snapToLines",!1),r.alt(e,o,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start",f,"end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start",f,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",f,"end","left","right"])}},/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===p.line&&(i=-1),t.line=i,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",f);var s=r.get("position","auto");"auto"===s&&50===p.position&&(s="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=s}(e,t)}function l(e){return e.replace(/<br(?: \/)?>/gi,"\n")}Object.defineProperty(t,"__esModule",{value:!0});var u=n(/*! ./vttcue */"./src/utils/vttcue.js"),c=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}};a.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<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var p=new u.default(0,0,0),f="middle"===p.align?"middle":"center";t.fixLineBreaks=l,r.prototype={parse:function(e){function t(){var e=n.buffer,t=0;for(e=l(e);t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var r=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,n.buffer=e.substr(t),r}var n=this;e&&(n.buffer+=n.decoder.decode(e,{stream:!0}));try{var r=void 0;if("INITIAL"===n.state){if(!/\r\n|\n/.test(n.buffer))return this;r=t();var i=r.match(/^(ï»¿)?WEBVTT([ \t].*)?$/);if(!i||!i[0])throw new Error("Malformed WebVTT signature.");n.state="HEADER"}for(var a=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;switch(a?a=!1:r=t(),n.state){case"HEADER":/:/.test(r)?function(e){o(e,function(e,t){},/:/)}(r):r||(n.state="ID");continue;case"NOTE":r||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){n.state="NOTE";break}if(!r)continue;if(n.cue=new u.default(0,0,""),n.state="CUE",-1===r.indexOf("--\x3e")){n.cue.id=r;continue}case"CUE":try{s(r,n.cue,n.regionList)}catch(e){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":var c=-1!==r.indexOf("--\x3e");if(!r||c&&(a=!0)){n.oncue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}n.cue.text&&(n.cue.text+="\n"),n.cue.text+=r;continue;case"BADCUE":r||(n.state="ID");continue}}}catch(e){"CUETEXT"===n.state&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state="INITIAL"===n.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new Error("Malformed WebVTT signature.")}catch(e){throw e}return e.onflush&&e.onflush(),this}},t.default=r},"./src/utils/webvtt-parser.js":/*!************************************!*\
  !*** ./src/utils/webvtt-parser.js ***!
  \************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ./vttparser */"./src/utils/vttparser.js"),i=n(/*! ../demux/id3 */"./src/demux/id3.js"),a=function(e,t,n){return e.substr(n||0,t.length)===t},o=function(t){var n=parseInt(t.substr(-3)),r=parseInt(t.substr(-6,2)),i=parseInt(t.substr(-9,2)),a=t.length>9?parseInt(t.substr(0,t.indexOf(":"))):0;return e.isFinite(n)&&e.isFinite(r)&&e.isFinite(i)&&e.isFinite(a)?(n+=1e3*r,n+=6e4*i,n+=36e5*a):-1},s=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()},l=function(e,t,n){var r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new)return e.ccOffset=e.presentationOffset=r.start,void(r.new=!1);for(;i&&i.new;)e.ccOffset+=r.start-i.start,r.new=!1,r=i,i=e[r.prevCC];e.presentationOffset=n},u={parse:function(e,t,n,u,c,p){var f,d=/\r\n|\n\r|\n|\r/g,h=i.utf8ArrayToStr(new Uint8Array(e)).trim().replace(d,"\n").split("\n"),y="00:00.000",v=0,g=0,m=0,b=[],_=!0,E=new r.default;E.oncue=function(e){var t=n[u],r=n.ccOffset;t&&t.new&&(void 0!==g?r=n.ccOffset=t.start:l(n,u,m)),m&&(r=m-n.presentationOffset),e.startTime+=r-g,e.endTime+=r-g,e.id=s(e.startTime.toString())+s(e.endTime.toString())+s(e.text),e.text=decodeURIComponent(encodeURIComponent(e.text)),e.endTime>0&&b.push(e)},E.onparsingerror=function(e){f=e},E.onflush=function(){if(f&&p)return void p(f);c(b)},h.forEach(function(e){if(_){if(a(e,"X-TIMESTAMP-MAP=")){_=!1,e.substr(16).split(",").forEach(function(e){a(e,"LOCAL:")?y=e.substr(6):a(e,"MPEGTS:")&&(v=parseInt(e.substr(7)))});try{t+(9e4*n[u].start||0)<0&&(t+=8589934592),v-=t,g=o(y)/1e3,m=v/9e4,-1===g&&(f=new Error("Malformed X-TIMESTAMP-MAP: "+e))}catch(t){f=new Error("Malformed X-TIMESTAMP-MAP: "+e)}return}""===e&&(_=!1)}E.parse(e+"\n")}),E.flush()}};t.default=u}).call(this,n(/*! ./src/polyfills/number */"./src/polyfills/number.js").Number)},"./src/utils/xhr-loader.js":/*!*********************************!*\
  !*** ./src/utils/xhr-loader.js ***!
  \*********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(/*! ../utils/logger */"./src/utils/logger.js"),i=window.performance,a=window.XMLHttpRequest,o=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:i.now(),retry:0},this.retryDelay=t.retryDelay,this.loadInternal()},e.prototype.loadInternal=function(){var e,t=this.context;e=this.loader=new a;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,a=this.stats,o=this.context,s=this.config;if(!a.aborted&&n>=2)if(window.clearTimeout(this.requestTimeout),0===a.tfirst&&(a.tfirst=Math.max(i.now(),a.trequest)),4===n){var l=t.status;if(l>=200&&l<300){a.tload=Math.max(a.tfirst,i.now());var u=void 0,c=void 0;"arraybuffer"===o.responseType?(u=t.response,c=u.byteLength):(u=t.responseText,c=u.length),a.loaded=a.total=c;var p={url:t.responseURL,data:u};this.callbacks.onSuccess(p,a,o,t)}else a.retry>=s.maxRetry||l>=400&&l<499?(r.logger.error(l+" while loading "+o.url),this.callbacks.onError({code:l,text:t.statusText},o,t)):(r.logger.warn(l+" while loading "+o.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay),a.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),s.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=o}}).default})},function(e,t,n){!function(t,r){e.exports=r(n(9),n(138))}(0,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NAME=t.VERSION=void 0;var r=n(0),i=n(3),a=function(e){return e&&e.__esModule?e:{default:e}}(i);t.default=a.default,t.VERSION="1.15.0",t.NAME="@playkit-js/playkit-js-dash",a.default.isSupported()&&(0,r.registerMediaSourceAdapter)(a.default)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in i)return i.value;var o=i.get;return void 0!==o?o.call(r):void 0},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(0),d=n(4),h=r(d),y=n(5),v=r(y),g=n(6),m=r(g),b=n(7),_=r(b),E={ERROR:"error",ADAPTATION:"adaptation",BUFFERING:"buffering"},k=function(e){function t(e,n){var r,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a(this,t),t._logger.debug("Creating adapter. Shaka version: "+p.default.Player.version);var l=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,s));return l._adapterEventsBindings=(r={},i(r,E.ERROR,function(e){return l._onError(e)}),i(r,E.ADAPTATION,function(){return l._onAdaptation()}),i(r,E.BUFFERING,function(e){return l._onBuffering(e)}),i(r,f.EventType.WAITING,function(){return l._onWaiting()}),i(r,f.EventType.PLAYING,function(){return l._onPlaying()}),r),l._buffering=!1,l._waitingSent=!1,l._playingSent=!1,l._videoSizeUpdateTimer=null,l.VIDEO_ERROR_CODE=3016,l._lastTimeDetach=0,l._requestFilterError=!1,l._setShakaConfig(),l._init(),l}return s(t,e),u(t,[{key:"setMaxBitrate",value:function(e){this._hasLowerOrEqualBitrate(e)&&this._shaka.configure({abr:{restrictions:{maxBandwidth:e}}})}},{key:"_getSortedTracks",value:function(){return this._shaka.getVariantTracks().map(function(e){return{id:e.id,bandwidth:e.bandwidth,active:e.active}}).sort(function(e,t){return e.bandwidth-t.bandwidth})}},{key:"_hasLowerOrEqualBitrate",value:function(e){return this._getSortedTracks()[0].bandwidth<=e}}],[{key:"createAdapter",value:function(e,t,n){var r=f.Utils.Object.copyDeep(m.default);if(f.Utils.Object.hasPropertyPath(n,"playback.useNativeTextTrack")&&(r.textTrackVisibile=f.Utils.Object.getPropertyPath(n,"playback.useNativeTextTrack")),f.Utils.Object.hasPropertyPath(n,"sources.options")){var i=n.sources.options;r.forceRedirectExternalStreams=i.forceRedirectExternalStreams,r.redirectExternalStreamsHandler=i.redirectExternalStreamsHandler,r.redirectExternalStreamsTimeout=i.redirectExternalStreamsTimeout}if(f.Utils.Object.hasPropertyPath(n,"abr")){var a=n.abr;"boolean"==typeof a.enabled&&(r.shakaConfig.abr.enabled=a.enabled),"boolean"==typeof a.capLevelToPlayerSize&&(r.capLevelToPlayerSize=a.capLevelToPlayerSize),a.defaultBandwidthEstimate&&(r.shakaConfig.abr.defaultBandwidthEstimate=a.defaultBandwidthEstimate),a.restrictions&&(a.restrictions.minBitrate>0&&(r.shakaConfig.abr.restrictions.minBandwidth=a.restrictions.minBitrate),a.restrictions.maxBitrate<1/0&&(r.capLevelToPlayerSize=!1,r.shakaConfig.abr.restrictions.maxBandwidth=a.restrictions.maxBitrate))}return f.Utils.Object.hasPropertyPath(n,"playback.options.html5.dash")&&f.Utils.Object.mergeDeep(r.shakaConfig,n.playback.options.html5.dash),r.network=n.network,new this(e,t,r)}},{key:"canPlayType",value:function(e){var n="string"==typeof e&&e.toLowerCase()===t._dashMimeType;return t._logger.debug("canPlayType result for mimeType: "+e+" is "+n.toString()),n}},{key:"canPlayDrm",value:function(e,n){var r=!0,i=!1,a=void 0;try{for(var o,s=t._drmProtocols[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var l=o.value;if(l.isConfigured(e,n)){t._availableDrmProtocol.push(l);break}}}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}if(!t._availableDrmProtocol.length){var u=!0,c=!1,p=void 0;try{for(var f,d=t._drmProtocols[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var h=f.value;h.canPlayDrm(e)&&t._availableDrmProtocol.push(h)}}catch(e){c=!0,p=e}finally{try{!u&&d.return&&d.return()}finally{if(c)throw p}}}return!!t._availableDrmProtocol.length}},{key:"isSupported",value:function(){var e=!1;window.VTTCue||(e=!0),p.default.polyfill.installAll();var n=p.default.Player.isBrowserSupported();return e&&(window.VTTCue=void 0),t._logger.debug("isSupported:"+n),n}}]),u(t,[{key:"_setShakaConfig",value:function(){var e={shakaConfig:{textDisplayFactory:function(e){return new _.default(e)}.bind(null,this._videoElement)}};this._config=f.Utils.Object.mergeDeep(e,m.default,this._config)}},{key:"_init",value:function(){p.default.polyfill.installAll(),this._shaka=new p.default.Player,this._maybeSetFilters(),this._maybeSetDrmConfig(),this._shaka.configure(this._config.shakaConfig),this._addBindings()}},{key:"_maybeGetRedirectedUrl",value:function(e){var t=this._config.forceRedirectExternalStreams,n=this._config.redirectExternalStreamsTimeout,r=this._config.redirectExternalStreamsHandler;return new Promise(function(i){if(!t)return i(e);f.Utils.Http.jsonp(e,r,{timeout:n}).then(function(e){i(e)}).catch(function(){return i(e)})})}},{key:"_maybeSetFilters",value:function(){var e=this;"function"==typeof f.Utils.Object.getPropertyPath(this._config,"network.requestFilter")&&(t._logger.debug("Register request filter"),this._shaka.getNetworkingEngine().registerRequestFilter(function(n,r){if(Object.values(f.RequestType).includes(n)){var i={url:r.uris[0],body:r.body,headers:r.headers};try{e._config.network.requestFilter(n,i),r.uris=[i.url],r.headers=i.headers,"POST"===r.method?r.body=i.body:i.body&&t._logger.warn("Request with "+r.method+" method cannot have body")}catch(t){throw e._requestFilterError=!0,t}}}))}},{key:"_maybeSetDrmConfig",value:function(){if(this._sourceObj&&this._sourceObj.drmData){var e={},n=!0,r=!1,i=void 0;try{for(var a,o=t._availableDrmProtocol[Symbol.iterator]();!(n=(a=o.next()).done);n=!0)a.value.setDrmPlayback(e,this._sourceObj.drmData),f.Utils.Object.mergeDeep(this._config.shakaConfig,e)}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}}}},{key:"_maybeApplyAbrRestrictions",value:function(){var e=this;if(this._config.capLevelToPlayerSize){var n=this._getVideoTracks(),r=function(e){return Math.min.apply(null,n.map(function(t){return t[e]}))},i=r("width"),a=r("height"),o=function(){var n=e._videoHeight,r=e._videoWidth;"number"==typeof r&&"number"==typeof n&&(n>=a&&r>=i?(t._logger.debug("applying dimension restriction: width < "+r+", height < "+n),e._shaka.configure({abr:{restrictions:{maxHeight:n,maxWidth:r}}})):(t._logger.debug("applying dimension restriction: width < "+a+", height < "+i),e._shaka.configure({abr:{restrictions:{maxHeight:a,maxWidth:i}}})))};this._clearVideoUpdateTimer(),this._videoSizeUpdateTimer=setInterval(o,1e3),o()}}},{key:"attachMediaSource",value:function(){var e=this;if(!this._shaka){this._videoElement&&this._videoElement.src&&(f.Utils.Dom.setAttribute(this._videoElement,"src",""),f.Utils.Dom.removeAttribute(this._videoElement,"src")),this._init();var t=function(){parseInt(e._lastTimeDetach)===parseInt(e.duration)?e.currentTime=0:e.currentTime=e._lastTimeDetach,e._lastTimeDetach=NaN};isNaN(this._lastTimeDetach)||this._eventManager.listenOnce(this._videoElement,f.EventType.LOADED_DATA,function(){return t()})}}},{key:"detachMediaSource",value:function(){var e=this;this._shaka&&(this._lastTimeDetach=this.currentTime,this._reset().then(function(){e._shaka=null,e._loadPromise=null}))}},{key:"_clearVideoUpdateTimer",value:function(){this._videoSizeUpdateTimer&&(clearInterval(this._videoSizeUpdateTimer),this._videoSizeUpdateTimer=null)}},{key:"_addBindings",value:function(){var e=this;this._eventManager.listen(this._shaka,E.ADAPTATION,this._adapterEventsBindings.adaptation),this._eventManager.listen(this._shaka,E.ERROR,this._adapterEventsBindings.error),this._eventManager.listen(this._shaka,E.BUFFERING,this._adapterEventsBindings.buffering),this._eventManager.listen(this._videoElement,f.EventType.WAITING,this._adapterEventsBindings.waiting),this._eventManager.listen(this._videoElement,f.EventType.PLAYING,this._adapterEventsBindings.playing),this._shaka.getNetworkingEngine().registerResponseFilter(function(t,n){switch(t){case p.default.net.NetworkingEngine.RequestType.SEGMENT:e._trigger(f.EventType.FRAG_LOADED,{miliSeconds:n.timeMs,bytes:n.data.byteLength,url:n.uri});break;case p.default.net.NetworkingEngine.RequestType.MANIFEST:e._trigger(f.EventType.MANIFEST_LOADED,{miliSeconds:n.timeMs})}})}},{key:"load",value:function(e){var n=this;return this._loadPromise||(this._shaka.attach(this._videoElement),this._loadPromise=new Promise(function(r,i){if(n._sourceObj&&n._sourceObj.url){n._trigger(f.EventType.ABR_MODE_CHANGED,{mode:n.isAdaptiveBitrateEnabled()?"auto":"manual"});var a=e&&e>-1?e:void 0;n._maybeGetRedirectedUrl(n._sourceObj.url).then(function(e){return n._shaka.load(e,a)}).then(function(){var e={tracks:n._getParsedTracks()};n._maybeApplyAbrRestrictions(),t._logger.debug("The source has been loaded successfully"),r(e)}).catch(function(e){i(new f.Error(e.severity,e.category,e.code,e.data))})}})),this._loadPromise}},{key:"destroy",value:function(){var e=this;return l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this).then(function(){return t._logger.debug("destroy"),e._loadPromise=null,e._reset()})}},{key:"_reset",value:function(){return this._buffering=!1,this._waitingSent=!1,this._playingSent=!1,this._requestFilterError=!1,this._clearVideoUpdateTimer(),this._eventManager&&this._eventManager.removeAll(),this._shaka?(this._adapterEventsBindings={},this._shaka.destroy()):Promise.resolve()}},{key:"_getVideoTracks",value:function(){var e=this._shaka.getVariantTracks(),t=this._getActiveTrack();return e.filter(function(e){return e.audioId===t.audioId})}},{key:"_getActiveTrack",value:function(){return this._shaka.getVariantTracks().filter(function(e){return e.active})[0]}},{key:"_getAudioTracks",value:function(){var e=this._shaka.getVariantTracks(),t=this._shaka.getAudioLanguagesAndRoles();return t.forEach(function(t){var n=e.filter(function(e){return e.language===t.language}),r=n.map(function(e){return e.id}).join("_"),i=n.some(function(e){return e.active});t.id=r,t.label=n[0].label,t.active=i}),t}},{key:"_getParsedTracks",value:function(){if(this._shaka){var e=this._getParsedVideoTracks(),t=this._getParsedAudioTracks(),n=this._getParsedTextTracks();return e.concat(t).concat(n)}return[]}},{key:"_getParsedVideoTracks",value:function(){var e=this._getVideoTracks(),t=[];if(e)for(var n=0;n<e.length;n++){var r={id:e[n].id,bandwidth:e[n].bandwidth,width:e[n].width,height:e[n].height,active:e[n].active,index:n};t.push(new f.VideoTrack(r))}return t}},{key:"_getParsedAudioTracks",value:function(){var e=this._getAudioTracks(),t=[];if(e)for(var n=0;n<e.length;n++){var r={id:e[n].id,active:e[n].active,label:e[n].label,language:e[n].language,index:n};t.push(new f.AudioTrack(r))}return t}},{key:"_getParsedTextTracks",value:function(){var e=this._shaka.getTextTracks(),t=[];if(e)for(var n=0;n<e.length;n++){var r={kind:e[n].kind?e[n].kind+"s":"",active:!1,label:e[n].label,language:e[n].language,index:n};t.push(new f.TextTrack(r))}return t}},{key:"selectVideoTrack",value:function(e){if(this._shaka){var t=this._getVideoTracks();if(e instanceof f.VideoTrack&&t){var n=t[e.index];n&&(this.isAdaptiveBitrateEnabled()&&(this._shaka.configure({abr:{enabled:!1}}),this._trigger(f.EventType.ABR_MODE_CHANGED,{mode:"manual"})),n.active||(this._shaka.selectVariantTrack(t[e.index],!0),this._onTrackChanged(e)))}}}},{key:"selectAudioTrack",value:function(e){this._shaka&&e instanceof f.AudioTrack&&!e.active&&(this._shaka.selectAudioLanguage(e.language),this._onTrackChanged(e))}},{key:"selectTextTrack",value:function(e){this._shaka&&e instanceof f.TextTrack&&!e.active&&("subtitles"===e.kind||"captions"===e.kind)&&(this._shaka.setTextTrackVisibility(this._config.textTrackVisibile),this._shaka.selectTextLanguage(e.language),this._onTrackChanged(e))}},{key:"hideTextTrack",value:function(){this._shaka&&this._shaka.setTextTrackVisibility(!1)}},{key:"enableAdaptiveBitrate",value:function(){this._shaka&&!this.isAdaptiveBitrateEnabled()&&(this._trigger(f.EventType.ABR_MODE_CHANGED,{mode:"auto"}),this._shaka.configure({abr:{enabled:!0}}))}},{key:"isAdaptiveBitrateEnabled",value:function(){return!!this._shaka&&this._shaka.getConfiguration().abr.enabled}},{key:"_getLiveEdge",value:function(){return this._shaka?this._shaka.seekRange().end:NaN}},{key:"seekToLiveEdge",value:function(){this._shaka&&this._videoElement.readyState>0&&(this._videoElement.currentTime=this._shaka.seekRange().end)}},{key:"isLive",value:function(){return!!this._shaka&&this._shaka.isLive()}},{key:"_onAdaptation",value:function(){var e=this._getParsedVideoTracks().filter(function(e){return e.active})[0];t._logger.debug("Video track changed",e),this._onTrackChanged(e)}},{key:"_onError",value:function(e){if(e&&e.detail){var n=e.detail;if(n.code===this.VIDEO_ERROR_CODE)return;this._requestFilterError&&n.data[0]instanceof p.default.util.Error&&(n=n.data[0],this._requestFilterError=!1),this._trigger(f.EventType.ERROR,new f.Error(n.severity,n.category,n.code,n.data)),t._logger.error(n)}}},{key:"_onBuffering",value:function(e){e.buffering?this._waitingSent||(this._videoElement.dispatchEvent(new window.Event(f.EventType.WAITING)),this._buffering=!0):(this._buffering=!1,this._videoElement.paused||this._playingSent||this._videoElement.dispatchEvent(new window.Event(f.EventType.PLAYING)))}},{key:"_onWaiting",value:function(){this._waitingSent=!0,this._playingSent=!1}},{key:"_onPlaying",value:function(){this._playingSent=!0,this._waitingSent=!1,this._buffering&&this._videoElement.dispatchEvent(new window.Event(f.EventType.WAITING))}},{key:"getStartTimeOfDvrWindow",value:function(){return this.isLive()&&this._shaka?this._shaka.seekRange().start:0}},{key:"_getCurrentSegmentLength",value:function(){var e=this._getActiveTrack(),t=e?e.id:NaN,n=0,r=this._shaka.getManifest().periods;if(!isNaN(t))for(var i=0;i<r.length;i++)for(var a=0;a<r[i].variants.length;a++){var o=r[i].variants[a];if(o.id===t){var s=o.video.findSegmentPosition(this._videoElement.currentTime),l=o.video.getSegmentReference(s);n=l.endTime-l.startTime}}return n}},{key:"_videoWidth",get:function(){var e=void 0,t=this._videoElement;return t&&(e=t.width||t.clientWidth||t.offsetWidth,e*=this._contentScaleFactor),e}},{key:"_videoHeight",get:function(){var e=void 0,t=this._videoElement;return t&&(e=t.height||t.clientHeight||t.offsetHeight,e*=this._contentScaleFactor),e}},{key:"_contentScaleFactor",get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){t._logger.debug("failed reading devicePixelRatio, assume 1")}return e}},{key:"targetBuffer",get:function(){var e=NaN;return this._shaka?(this.isLive()?this._shaka.getManifest()&&(e=this._shaka.getManifest().presentationTimeline.getSegmentAvailabilityEnd()-this._shaka.getManifest().presentationTimeline.getSeekRangeEnd()-(this._videoElement.currentTime-this._getLiveEdge())):e=this._videoElement.duration-this._videoElement.currentTime,e=Math.min(e,this._shaka.getConfiguration().streaming.bufferingGoal+this._getCurrentSegmentLength())):NaN}}]),t}(f.BaseMediaSourceAdapter);k.id="DashAdapter",k._logger=f.BaseMediaSourceAdapter.getLogger(k.id),k._dashMimeType="application/dash+xml",k._drmProtocols=[h.default,v.default],k._availableDrmProtocol=[],t.default=k},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(0),u=l.BaseDrmProtocol.DrmScheme,c=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,null,[{key:"isConfigured",value:function(e,t){return u.WIDEVINE===t.keySystem&&!!e.find(function(e){return e.scheme===t.keySystem})}},{key:"canPlayDrm",value:function(e){return t._logger.debug("Can play DRM scheme of: "+u.WIDEVINE),!!e.find(function(e){return e.scheme===l.BaseDrmProtocol.DrmScheme.WIDEVINE})}},{key:"setDrmPlayback",value:function(e,n){t._logger.debug("Sets drm playback");var i=l.Env.browser.name,a=n.find(function(e){return e.scheme===u.WIDEVINE});a&&(e.drm={servers:r({},u.WIDEVINE,a.licenseUrl),advanced:{}},"Chrome"===i&&(e.drm.advanced=r({},u.WIDEVINE,{videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"})))}}]),t}(l.BaseDrmProtocol);c._logger=l.BaseDrmProtocol.getLogger("Widevine"),t.default=c},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(0),u=l.BaseDrmProtocol.DrmScheme,c=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,null,[{key:"isConfigured",value:function(e,t){return u.PLAYREADY===t.keySystem&&!!e.find(function(e){return e.scheme===t.keySystem})}},{key:"canPlayDrm",value:function(e){return t._logger.debug("Can play DRM scheme of: "+u.PLAYREADY),!!e.find(function(e){return e.scheme===l.BaseDrmProtocol.DrmScheme.PLAYREADY})}},{key:"setDrmPlayback",value:function(e,n){t._logger.debug("Sets drm playback");var i=n.find(function(e){return e.scheme===u.PLAYREADY});i&&(e.drm={servers:r({},u.PLAYREADY,i.licenseUrl)})}}]),t}(l.BaseDrmProtocol);c._logger=l.BaseDrmProtocol.getLogger("PlayReady"),t.default=c},function(e,t){e.exports={shakaConfig:{streaming:{ignoreTextStreamFailures:!0},abr:{enabled:!0,restrictions:{}}},forceRedirectExternalStreams:!1}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),o(t,[{key:"isTextVisible",value:function(){return!0}}]),t}(l.default.text.SimpleTextDisplayer);t.default=u}])})},function(e,t,n){"use strict";n(361)},function(e,t,n){!function(t,r){e.exports=r(n(9))}("undefined"!=typeof self&&self,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t,n){"use strict";function r(e,t){var n={eventType:e.index,partnerId:t.getPartnerId(),entryId:t.getEntryId(),sessionId:t.getSessionId(),eventIndex:t.getEventIndex(),referrer:t.getReferrer(),deliveryType:t.getDeliveryType(),playbackType:t.getPlaybackType(),clientVer:t.getClientVer(),clientTag:t.getClientTag(),position:t.getPosition()};t.getSessionStartTime()&&(n.sessionStartTime=t.getSessionStartTime()),t.getKS()&&(n.ks=t.getKS()),t.getUIConfId()&&(n.uiConfId=t.getUIConfId()),t.getPlaylistId()&&(n.playlistId=t.getPlaylistId()),t.getCustomVar1()&&(n.customVar1=t.getCustomVar1()),t.getCustomVar2()&&(n.customVar2=t.getCustomVar2()),t.getCustomVar3()&&(n.customVar3=t.getCustomVar3()),t.getPlaybackContext()&&(n.playbackContext=t.getPlaybackContext()),t.getApplicationVersion()&&(n.applicationVersion=t.getApplicationVersion()),t.getUserId()&&(n.userId=t.getUserId());var r=e.getEventModel(t);return Object.assign(r,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.KavaEventType=t.KavaEventModel=void 0,t.getEventModel=r;var i=(n(2),t.KavaEventModel={VIEW:{type:"VIEW",index:99,getEventModel:function(e){var t={playTimeSum:e.getPlayTimeSum(),bufferTime:e.getBufferTime(),bufferTimeSum:e.getBufferTimeSum(),actualBitrate:e.getActualBitrate(),averageBitrate:e.getAverageBitrate(),audioLanguage:e.getLanguage(),captionsLanguage:e.getCaption(),soundMode:e.getSoundMode(),tabMode:e.getTabMode()};return isNaN(e.getForwardBufferHealth())||(t.forwardBufferHealth=e.getForwardBufferHealth()),e.getMaxManifestDownloadTime()>0&&(t.manifestDownloadTime=e.getMaxManifestDownloadTime()),e.getSegmentDownloadTime()>0&&(t.segmentDownloadTime=e.getSegmentDownloadTime()),e.getBandwidth()&&(t.bandwidth=e.getBandwidth()),null!=e.getDroppedFramesRatio()&&(t.droppedFramesRatio=e.getDroppedFramesRatio()),isNaN(e.getTargetBuffer())||(t.targetBuffer=e.getTargetBuffer()),""!==e.getNetworkConnectionType()&&(t.networkConnectionType=e.getNetworkConnectionType()),e.getNetworkConnectionOverhead()&&(t.networkConnectionOverhead=e.getNetworkConnectionOverhead()),isNaN(e.getFlavorParamsId())||(t.flavorParamsId=e.getFlavorParamsId()),t}},IMPRESSION:{type:"IMPRESSION",index:1,getEventModel:function(e){var t={};return null!=e.getPlayerJSLoadTime()&&(t.playerJSLoadTime=e.getPlayerJSLoadTime()),t}},PLAY_REQUEST:{type:"PLAY_REQUEST",index:2,getEventModel:function(){return{}}},PLAY:{type:"PLAY",index:3,getEventModel:function(e){var t={bufferTime:e.getBufferTime(),bufferTimeSum:e.getBufferTimeSum(),actualBitrate:e.getActualBitrate(),joinTime:e.getJoinTime(),canPlay:e.getCanPlayTime()};return""!==e.getNetworkConnectionType()&&(t.networkConnectionType=e.getNetworkConnectionType()),t}},RESUME:{type:"RESUME",index:4,getEventModel:function(e){return{bufferTime:e.getBufferTime(),bufferTimeSum:e.getBufferTimeSum(),actualBitrate:e.getActualBitrate()}}},PAUSE:{type:"PAUSE",index:33,getEventModel:function(){return{}}},BUFFER_START:{type:"BUFFER_START",index:45,getEventModel:function(){return{}}},BUFFER_END:{type:"BUFFER_END",index:46,getEventModel:function(){return{}}},REPLAY:{type:"REPLAY",index:34,getEventModel:function(){return{}}},SEEK:{type:"SEEK",index:35,getEventModel:function(e){return{targetPosition:e.getTargetPosition()}}},PLAY_REACHED_25_PERCENT:{type:"PLAY_REACHED_25_PERCENT",index:11,getEventModel:function(){return{}}},PLAY_REACHED_50_PERCENT:{type:"PLAY_REACHED_50_PERCENT",index:12,getEventModel:function(){return{}}},PLAY_REACHED_75_PERCENT:{type:"PLAY_REACHED_75_PERCENT",index:13,getEventModel:function(){return{}}},PLAY_REACHED_100_PERCENT:{type:"PLAY_REACHED_100_PERCENT",index:14,getEventModel:function(){return{}}},SOURCE_SELECTED:{type:"SOURCE_SELECTED",index:39,getEventModel:function(e){return{actualBitrate:e.getActualBitrate()}}},AUDIO_SELECTED:{type:"AUDIO_SELECTED",index:42,getEventModel:function(e){return{language:e.getLanguage()}}},FLAVOR_SWITCH:{type:"FLAVOR_SWITCH",index:43,getEventModel:function(e){return{actualBitrate:e.getActualBitrate()}}},CAPTIONS:{type:"CAPTIONS",index:38,getEventModel:function(e){return{caption:e.getCaption()}}},ERROR:{type:"ERROR",index:98,getEventModel:function(e){return{errorCode:e.getErrorCode(),errorDetails:e.getErrorDetails()}}}});t.KavaEventType=function(e){return Object.keys(i).forEach(function(t){return e[t]=t}),e}({})},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.TabMode=t.SoundMode=t.KavaModel=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=function(){function e(t){r(this,e),this.totalSegmentsDownloadTime=0,this.totalSegmentsDownloadBytes=0,this.maxSegmentDownloadTime=0,this.maxManifestDownloadTime=0,this.droppedFramesRatio=null,this.maxNetworkConnectionOverhead=0,this.flavorParamsId=NaN,this.playerJSLoadTime=null,t&&this.updateModel(t)}return i(e,[{key:"getPlayTimeSum",value:function(){return this.playTimeSum}},{key:"getCanPlayTime",value:function(){return this.canPlayTime}},{key:"getBufferTime",value:function(){return this.bufferTime}},{key:"getBufferTimeSum",value:function(){return this.bufferTimeSum}},{key:"getPlayerJSLoadTime",value:function(){return this.playerJSLoadTime?Math.round(1e3*this.playerJSLoadTime)/1e3:null}},{key:"getJoinTime",value:function(){return this.joinTime}},{key:"getTargetPosition",value:function(){return this.targetPosition}},{key:"getTargetBuffer",value:function(){return this.targetBuffer}},{key:"getLanguage",value:function(){return this.language}},{key:"getCaption",value:function(){return this.caption}},{key:"getBandwidth",value:function(){return this.totalSegmentsDownloadTime>0?Math.round(8*this.totalSegmentsDownloadBytes/this.totalSegmentsDownloadTime)/1e3:0}},{key:"getMaxManifestDownloadTime",value:function(){return this.maxManifestDownloadTime}},{key:"getSegmentDownloadTime",value:function(){return this.maxSegmentDownloadTime}},{key:"getForwardBufferHealth",value:function(){return this.forwardBufferHealth}},{key:"getDroppedFramesRatio",value:function(){return this.droppedFramesRatio}},{key:"getSoundMode",value:function(){return this.soundMode}},{key:"getTabMode",value:function(){return this.tabMode}},{key:"getNetworkConnectionType",value:function(){return this.networkConnectionType}},{key:"getNetworkConnectionOverhead",value:function(){return Math.round(this.maxNetworkConnectionOverhead)/1e3}},{key:"getErrorCode",value:function(){return this.errorCode}},{key:"getFlavorParamsId",value:function(){return this.flavorParamsId}},{key:"getErrorDetails",value:function(){var e="";if(this.errorDetails)try{e=JSON.stringify(this.errorDetails)}catch(e){}return e}},{key:"getEventIndex",value:function(){return this.eventIndex}},{key:"getSessionStartTime",value:function(){return this.sessionStartTime}},{key:"updateModel",value:function(e){Object.assign(this,e)}},{key:"getModel",value:function(e){return(0,a.getEventModel)(e,this)}}]),e}(),s={SOUND_OFF:1,SOUND_ON:2},l={TAB_NOT_FOCUSED:1,TAB_FOCUSED:2};t.KavaModel=o,t.SoundMode=s,t.TabMode=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NAME=t.VERSION=t.EventType=t.Plugin=void 0;var r=n(0);Object.defineProperty(t,"EventType",{enumerable:!0,get:function(){return r.KavaEventType}});var i=n(1),a=n(4);t.Plugin=a.Kava,t.VERSION="0.11.3",t.NAME="@playkit-js/playkit-js-kava",(0,i.registerPlugin)("kava",a.Kava)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Kava=void 0;var o="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},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=n(5),c=n(0),p=n(6),f=n(7),d=n(2),h=function(e){function t(e,n,a){r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,a));if(o._lastDroppedFrames=0,o._lastTotalFrames=0,o._performanceEntries=[],o._pendingFragLoadedUrls=[],o._fragLoadedFiredOnce=!1,o._rateHandler=new p.KavaRateHandler,o._model=new d.KavaModel,o._setModelDelegates(),o._timer=new f.KavaTimer({resetCounter:o.config.resetSessionCountdown,eventCounter:o.config.viewEventCountdown}),o._viewEventEnabled=!0,o._resetFlags(),o._addBindings(),o._model.updateModel({eventIndex:1,bufferTime:0,bufferTimeSum:0,playTimeSum:0}),performance&&o.config.uiConfId){var s=performance.getEntriesByType("resource").find(function(e){return e.name.match("embedPlaykitJs.*"+o.config.uiConfId)});s&&o._model.updateModel({playerJSLoadTime:s.duration})}return o}return a(t,e),s(t,null,[{key:"isValid",value:function(){return!0}}]),s(t,[{key:"_handleNewPerformanceEntries",value:function(e){for(var t=e.getEntries(),n=0;n<t.length;n++)this._performanceEntries.push(t[n]);for(;this._pendingFragLoadedUrls.length;)this._handleFragPerformanceObserver(this._pendingFragLoadedUrls.pop())}},{key:"destroy",value:function(){this.eventManager.destroy(),this._reset()}},{key:"_reset",value:function(){this._timer.destroy(),this._rateHandler.destroy(),this._performanceObserver&&this._performanceObserver.disconnect(),this._performanceEntries=[],this._pendingFragLoadedUrls=[]}},{key:"reset",value:function(){this.eventManager.removeAll(),this._resetFlags(),this._addBindings(),this._model.updateModel({eventIndex:1,bufferTime:0,bufferTimeSum:0,playTimeSum:0,sessionStartTime:null}),this._reset()}},{key:"loadMedia",value:function(){window.PerformanceObserver&&(this._performanceObserver=new window.PerformanceObserver(this._handleNewPerformanceEntries.bind(this)),this._performanceObserver.observe({entryTypes:["resource"]}))}},{key:"getEventModel",value:function(e){if(e)return this._model.getModel(c.KavaEventModel[e])}},{key:"sendAnalytics",value:function(e){var t=this;return new Promise(function(n,r){u.OVPAnalyticsService.trackEvent(l.Utils.Http.protocol+t.config.serviceUrl,e).doHttpRequest().then(function(r){t._handleServerResponseSuccess(r,e),n()},function(n){t._handleServerResponseFailed(n,e),r(n)}),t._model.updateModel({eventIndex:t._model.getEventIndex()+1})})}},{key:"_resetFlags",value:function(){this._previousCurrentTime=0,this._isPlaying=!1,this._isFirstPlay=!0,this._isEnded=!1,this._isPaused=!1,this._isBuffering=!1,this._timePercentEvent={PLAY_REACHED_25_PERCENT:!1,PLAY_REACHED_50_PERCENT:!1,PLAY_REACHED_75_PERCENT:!1,PLAY_REACHED_100_PERCENT:!1}}},{key:"_resetSession",value:function(){this.logger.debug("Reset KAVA session"),this._rateHandler.reset(),this._model.updateModel({eventIndex:1,bufferTimeSum:0,playTimeSum:0})}},{key:"_sendAnalytics",value:function(e){if(this._validate()){this._isBuffering&&(this._updateBufferModel(),this._bufferStartTime=Date.now());var t=this._model.getModel(e);if("function"==typeof this.config.tamperAnalyticsHandler&&!this.config.tamperAnalyticsHandler(t))return void this.logger.debug("Cancel KAVA request",t);this.logger.debug("Sending KAVA event "+t.eventType+":"+e.type),this.sendAnalytics(t)}}},{key:"_handleServerResponseSuccess",value:function(e,t){this.logger.debug("KAVA event sent",t),this._updateSessionStartTimeModel(e)}},{key:"_handleServerResponseFailed",value:function(e,t){this.logger.error("Failed to send KAVA event",t,e)}},{key:"_addBindings",value:function(){var e=this;this.eventManager.listen(this._timer,f.KavaTimer.Event.TICK,function(){return e._rateHandler.countCurrent()}),this.eventManager.listen(this._timer,f.KavaTimer.Event.REPORT,function(){return e._onReport()}),this.eventManager.listen(this._timer,f.KavaTimer.Event.RESET,function(){return e._resetSession()}),this.eventManager.listen(this.player,this.player.Event.SOURCE_SELECTED,function(){return e._onSourceSelected()}),this.eventManager.listen(this.player,this.player.Event.ERROR,function(t){return e._onError(t)}),this.eventManager.listen(this.player,this.player.Event.FIRST_PLAY,function(){return e._onFirstPlay()}),this.eventManager.listen(this.player,this.player.Event.FRAG_LOADED,function(t){return e._onFragLoaded(t)}),this.eventManager.listen(this.player,this.player.Event.MANIFEST_LOADED,function(t){return e._onManifestLoaded(t)}),this.eventManager.listen(this.player,this.player.Event.TIMED_METADATA,function(t){return e._onTimedMetadataLoaded(t)}),this.eventManager.listen(this.player,this.player.Event.TRACKS_CHANGED,function(){return e._setInitialTracks()}),this.eventManager.listen(this.player,this.player.Event.PLAYING,function(){return e._onPlaying()}),this.eventManager.listen(this.player,this.player.Event.FIRST_PLAYING,function(){return e._onFirstPlaying()}),this.eventManager.listen(this.player,this.player.Event.SEEKING,function(){return e._onSeeking()}),this.eventManager.listen(this.player,this.player.Event.PAUSE,function(){return e._onPause()}),this.eventManager.listen(this.player,this.player.Event.ENDED,function(){return e._onEnded()}),this.eventManager.listen(this.player,this.player.Event.TIME_UPDATE,function(){return e._onTimeUpdate()}),this.eventManager.listen(this.player,this.player.Event.VIDEO_TRACK_CHANGED,function(t){return e._onVideoTrackChanged(t)}),this.eventManager.listen(this.player,this.player.Event.AUDIO_TRACK_CHANGED,function(t){return e._onAudioTrackChanged(t)}),this.eventManager.listen(this.player,this.player.Event.TEXT_TRACK_CHANGED,function(t){return e._onTextTrackChanged(t)}),this.eventManager.listen(this.player,this.player.Event.PLAYER_STATE_CHANGED,function(t){return e._onPlayerStateChanged(t)}),this.eventManager.listen(this.player,this.player.Event.CAN_PLAY,function(){return e._onCanPlay()}),this.eventManager.listen(this.player,this.player.Event.LOAD_START,function(){return e._onLoadStart()})}},{key:"_onFirstPlaying",value:function(){this._isPlaying=!0,!this._fragLoadedFiredOnce&&this._performanceObserver&&(this._performanceObserver.disconnect(),this.logger.debug("This adapter / media doesn't fire fragLoaded - disconnect performance observer"))}},{key:"_onLoadStart",value:function(){this._loadStartTime=Date.now()}},{key:"_getRates",value:function(){var e=[];return this.player.getTracks(this.player.Track.VIDEO).forEach(function(t){return e.push(t.bandwidth/1024)}),e}},{key:"_setInitialTracks",value:function(){var e=this._getRates(),t=this.player.getActiveTracks();this._rateHandler.setRates(e),t.video&&this._rateHandler.setCurrent(t.video.bandwidth/1024),t.audio&&this._model.updateModel({language:t.audio.language}),t.text&&this._model.updateModel({caption:t.text.language})}},{key:"_getAvailableBuffer",value:function(){var e=NaN;return this.player.stats&&(e=this.player.stats.availableBuffer),e}},{key:"_getForwardBufferHealth",value:function(){var e=NaN,t=this._getAvailableBuffer(),n=this._getTargetBuffer();return isNaN(n)||(e=Math.round(1e3*t/n)/1e3),e}},{key:"_getTargetBuffer",value:function(){var e=NaN;return this.player.stats&&(e=this.player.stats.targetBuffer),e}},{key:"_getDroppedFramesRatio",value:function(){var e=-1,t=this._getDroppedAndDecodedFrames();if(t){var n=void 0,r=void 0,i=t[0],a=t[1];n=i-this._lastDroppedFrames,r=a-this._lastTotalFrames,e=Math.round(n/r*1e3)/1e3,this._lastTotalFrames=a,this._lastDroppedFrames=i}return e}},{key:"_getDroppedAndDecodedFrames",value:function(){if("function"==typeof this.player.getVideoElement().getVideoPlaybackQuality){var e=this.player.getVideoElement().getVideoPlaybackQuality();return[e.droppedVideoFrames,e.totalVideoFrames]}return"number"==typeof this.player.getVideoElement().webkitDroppedFrameCount&&"number"==typeof this.player.getVideoElement().webkitDecodedFrameCount?[this.player.getVideoElement().webkitDroppedFrameCount,this.player.getVideoElement().webkitDecodedFrameCount]:null}},{key:"_getNetworkConnectionType",value:function(){return window.navigator&&window.navigator.connection&&window.navigator.connection.effectiveType?window.navigator.connection.effectiveType:""}},{key:"_onReport",value:function(){this._viewEventEnabled?(this._updatePlayTimeSumModel(),this._model.updateModel({soundMode:this.player.muted||0===this.player.volume?d.SoundMode.SOUND_OFF:d.SoundMode.SOUND_ON,tabMode:this._isDocumentHidden()?d.TabMode.TAB_NOT_FOCUSED:d.TabMode.TAB_FOCUSED,forwardBufferHealth:this._getForwardBufferHealth(),targetBuffer:this._getTargetBuffer(),droppedFramesRatio:this._getDroppedFramesRatio(),networkConnectionType:this._getNetworkConnectionType()}),this._sendAnalytics(c.KavaEventModel.VIEW)):this.logger.warn("VIEW event blocked because server response of viewEventsEnabled=false"),this._model.updateModel({totalSegmentsDownloadTime:0,totalSegmentsDownloadBytes:0,maxManifestDownloadTime:0,maxSegmentDownloadTime:0,maxNetworkConnectionOverhead:0,bufferTime:0})}},{key:"_onPlaying",value:function(){this._isFirstPlay?(this._timer.start(),this._isFirstPlay=!1,this._model.updateModel({joinTime:t._getTimeDifferenceInSeconds(this._firstPlayRequestTime),networkConnectionType:this._getNetworkConnectionType()}),this._sendAnalytics(c.KavaEventModel.PLAY)):this._isEnded?(this._timer.start(),this._isEnded=!1,this._sendAnalytics(c.KavaEventModel.REPLAY)):this._isPaused&&(this._timer.resume(),this._isPaused=!1,this._sendAnalytics(c.KavaEventModel.RESUME))}},{key:"_onCanPlay",value:function(){this._model.updateModel({canPlayTime:t._getTimeDifferenceInSeconds(this._loadStartTime)})}},{key:"_onFirstPlay",value:function(){this._firstPlayRequestTime=Date.now(),this._sendAnalytics(c.KavaEventModel.PLAY_REQUEST)}},{key:"_onSourceSelected",value:function(){this._sendAnalytics(c.KavaEventModel.IMPRESSION)}},{key:"_onSeeking",value:function(){this._previousCurrentTime=this.player.currentTime,this._model.updateModel({targetPosition:this.player.currentTime}),this._sendAnalytics(c.KavaEventModel.SEEK)}},{key:"_onPause",value:function(){this._isPaused=!0,this._timer.stop(),this._sendAnalytics(c.KavaEventModel.PAUSE)}},{key:"_onEnded",value:function(){this._isEnded=!0,this._onTimeUpdate(),this._model.updateModel({bufferTime:0})}},{key:"_onTimeUpdate",value:function(){if(!this.player.isLive()){this._updatePlayTimeSumModel();var e=parseFloat((this.player.currentTime/this.player.duration).toFixed(2));!this._timePercentEvent.PLAY_REACHED_25&&e>=.25&&(this._timePercentEvent.PLAY_REACHED_25=!0,this._sendAnalytics(c.KavaEventModel.PLAY_REACHED_25_PERCENT)),!this._timePercentEvent.PLAY_REACHED_50&&e>=.5&&(this._timePercentEvent.PLAY_REACHED_50=!0,this._sendAnalytics(c.KavaEventModel.PLAY_REACHED_50_PERCENT)),!this._timePercentEvent.PLAY_REACHED_75&&e>=.75&&(this._timePercentEvent.PLAY_REACHED_75=!0,this._sendAnalytics(c.KavaEventModel.PLAY_REACHED_75_PERCENT)),this._timePercentEvent.PLAY_REACHED_100||1!==e||(this._timePercentEvent.PLAY_REACHED_100=!0,this._sendAnalytics(c.KavaEventModel.PLAY_REACHED_100_PERCENT))}}},{key:"_onFragLoaded",value:function(e){this._fragLoadedFiredOnce||(this._fragLoadedFiredOnce=!0),this._updateFragLoadedStats(e),this._performanceObserver&&(this._handleFragPerformanceObserver(e.payload.url)||this._pendingFragLoadedUrls.push(e.payload.url))}},{key:"_handleFragPerformanceObserver",value:function(e){var t=this._performanceEntries.filter(function(t){return t.name==e}),n=t&&t.length?t[t.length-1]:null;if(n){this._updateMaxNetworkConnectionOverhead(n.connectEnd-n.domainLookupStart);var r=this._performanceEntries.indexOf(n);return r>-1&&r<this._performanceEntries.length&&(this._performanceEntries=this._performanceEntries.splice(r+1,this._performanceEntries.length-(r+1))),!0}return!1}},{key:"_updateMaxNetworkConnectionOverhead",value:function(e){this._model.updateModel({maxNetworkConnectionOverhead:Math.max(this._model.maxNetworkConnectionOverhead,e)})}},{key:"_updateFragLoadedStats",value:function(e){var t=Math.round(e.payload.miliSeconds)/1e3;this._model.updateModel({totalSegmentsDownloadTime:this._model.totalSegmentsDownloadTime+t,totalSegmentsDownloadBytes:this._model.totalSegmentsDownloadBytes+e.payload.bytes,maxSegmentDownloadTime:Math.max(t,this._model.maxSegmentDownloadTime)})}},{key:"_onManifestLoaded",value:function(e){var t=Math.round(e.payload.miliSeconds)/1e3;this._model.updateModel({maxManifestDownloadTime:Math.max(t,this._model.maxManifestDownloadTime)})}},{key:"_onTimedMetadataLoaded",value:function(e){var t=e.payload.cues.filter(function(e){return e.value&&"TEXT"===e.value.key});if(t.length)try{this._model.updateModel({flavorParamsId:Number(JSON.parse(t[t.length-1].value.data).sequenceId)})}catch(e){this.logger.debug("error parsing id3",e)}}},{key:"_onVideoTrackChanged",value:function(e){var t=e.payload.selectedVideoTrack;this._rateHandler.setCurrent(t.bandwidth/1024),this.player.isAdaptiveBitrateEnabled()?this._sendAnalytics(c.KavaEventModel.FLAVOR_SWITCH):this._sendAnalytics(c.KavaEventModel.SOURCE_SELECTED)}},{key:"_onAudioTrackChanged",value:function(e){var t=e.payload.selectedAudioTrack;this._model.updateModel({language:t.language}),this._sendAnalytics(c.KavaEventModel.AUDIO_SELECTED)}},{key:"_onTextTrackChanged",value:function(e){if(this._isPlaying){var t=e.payload.selectedTextTrack;this._model.updateModel({caption:t.language}),this._sendAnalytics(c.KavaEventModel.CAPTIONS)}}},{key:"_onError",value:function(e){e.payload&&e.payload.severity===l.Error.Severity.CRITICAL&&(this._model.updateModel({errorCode:e.payload.code,errorDetails:e.payload.data}),this._sendAnalytics(c.KavaEventModel.ERROR),this.reset())}},{key:"_onPlayerStateChanged",value:function(e){var t=e.payload.oldState,n=e.payload.newState;t.type===this.player.State.BUFFERING&&(this._isBuffering=!1,this._updateBufferModel(),this._sendAnalytics(c.KavaEventModel.BUFFER_END)),n.type===this.player.State.BUFFERING&&(this._isBuffering=!0,this._bufferStartTime=Date.now(),this._sendAnalytics(c.KavaEventModel.BUFFER_START))}},{key:"_updateSessionStartTimeModel",value:function(e){!this._model.getSessionStartTime()&&e&&("object"===(void 0===e?"undefined":o(e))?(this._model.updateModel({sessionStartTime:e.time}),this._viewEventEnabled=e.viewEventsEnabled):this._model.updateModel({sessionStartTime:e})),this._timer.isStopped()&&this._model.updateModel({sessionStartTime:null})}},{key:"_updateBufferModel",value:function(){var e=t._getTimeDifferenceInSeconds(this._bufferStartTime);this._model.updateModel({bufferTime:this._model.getBufferTime()+e,bufferTimeSum:this._model.getBufferTimeSum()+e})}},{key:"_updatePlayTimeSumModel",value:function(){var e=void 0;this.player.isLive()?e=this.config.viewEventCountdown-this._model.getBufferTime():(e=this.player.currentTime-this._previousCurrentTime,this._previousCurrentTime=this.player.currentTime),this._model.updateModel({playTimeSum:this._model.getPlayTimeSum()+e})}},{key:"_setModelDelegates",value:function(){var e=this;this._model.getActualBitrate=function(){return e._rateHandler.getCurrent()},this._model.getAverageBitrate=function(){return e._rateHandler.getAverage()},this._model.getPartnerId=function(){return e.config.partnerId},this._model.getEntryId=function(){return e.config.entryId},this._model.getPlaylistId=function(){return e.config.playlistId},this._model.getSessionId=function(){return e.config.sessionId},this._model.getClientVer=function(){return e.config.playerVersion},this._model.getClientTag=function(){return"html5:v"+e.config.playerVersion},this._model.getKS=function(){return e.config.ks},this._model.getUIConfId=function(){return e.config.uiConfId},this._model.getReferrer=function(){return e.config.referrer},this._model.getCustomVar1=function(){return e.config.customVar1},this._model.getCustomVar2=function(){return e.config.customVar2},this._model.getCustomVar3=function(){return e.config.customVar3},this._model.getPosition=function(){return e._getPosition()},this._model.getDeliveryType=function(){return e._getDeliveryType()},this._model.getPlaybackType=function(){return e._getPlaybackType()},this._model.getPlaybackContext=function(){return e.config.playbackContext},this._model.getApplicationVersion=function(){return e.config.applicationVersion},this._model.getUserId=function(){return e.config.userId}}},{key:"_getPosition",value:function(){return this.player.isLive()?Number.isNaN(this.player.duration)?0:this.player.duration-this.player.currentTime<1?0:-(this.player.duration-this.player.currentTime):this.player.currentTime}},{key:"_getDeliveryType",value:function(){return this.player.streamType===this.player.StreamType.PROGRESSIVE?"url":this.player.streamType}},{key:"_getPlaybackType",value:function(){return this.player.isLive()?this.player.isDvr()&&this.player.duration-this.player.currentTime>=this.config.dvrThreshold?"dvr":"live":"vod"}},{key:"_validate",value:function(){return this.config.partnerId?!!this.config.entryId||(this._logMissingParam("entryId"),!1):(this._logMissingParam("partnerId"),!1)}},{key:"_logMissingParam",value:function(e){this.logger.warn("Kava analytics block report because of missing param "+e)}},{key:"_isDocumentHidden",value:function(){var e="";if(void 0!==document.hidden)e="hidden";else if(void 0!==document.msHidden)e="msHidden";else{if(void 0===document.webkitHidden)return!1;e="webkitHidden"}return document[e]}},{key:"EventType",get:function(){return l.Utils.Object.copyDeep(c.KavaEventType)}}],[{key:"_getTimeDifferenceInSeconds",value:function(e){return(Date.now()-e)/1e3}}]),t}(l.BasePlugin);h.defaultConfig={serviceUrl:"//analytics.kaltura.com/api_v3/index.php",viewEventCountdown:10,resetSessionCountdown:30,dvrThreshold:120,playbackContext:"",applicationVersion:""},t.Kava=h},function(e,t,n){!function(t,n){e.exports=function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=15)}([function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i="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},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map;r(this,e),this.headers=t}return a(e,[{key:"getUrl",value:function(e){return e+"/service/"+this.service+(this.action?"/action/"+this.action:"")}},{key:"doHttpRequest",value:function(){var e=this;if(!this.url)throw new Error("serviceUrl is mandatory for request builder");var t=new XMLHttpRequest;return new Promise(function(n,r){t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status){var e=void 0;try{e=JSON.parse(t.responseText)}catch(e){return r(e.message+", "+t.responseText)}e&&"object"===(void 0===e?"undefined":i(e))&&e.code&&e.message?r(e):n(e)}else r(t.responseText)},t.open(e.method,e.url),e.headers.forEach(function(e,n){t.setRequestHeader(n,e)}),t.send(e.params)})}}]),e}();t.default=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.OVPConfiguration=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(4),o={serviceUrl:"https://cdnapisec.kaltura.com/api_v3",cdnUrl:"//cdnapisec.kaltura.com",serviceParams:{apiVersion:"3.3.0",format:1}},s=function(){function e(){r(this,e)}return i(e,null,[{key:"set",value:function(e){e&&Object.assign(o,e)}},{key:"get",value:function(){return(0,a.clone)(o)}}]),e}();t.default=s,t.OVPConfiguration=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function e(t){r(this,e),this.hasError=!1,"KalturaAPIException"===t.objectType?(this.hasError=!0,this.error=new a(t.code,t.message)):t.error&&"KalturaAPIException"===t.error.objectType?(this.hasError=!0,this.error=new a(t.error.code,t.error.message)):this.data=t};t.default=i;var a=function e(t,n){r(this,e),this.code=t,this.message=n}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.MultiRequestResult=void 0;var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=r(u),p=n(5),f=r(p),d=n(2),h=r(d),y=function(e){function t(){var e,n,r,i;a(this,t);for(var s=arguments.length,l=Array(s),u=0;u<s;u++)l[u]=arguments[u];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),r.requests=[],i=n,o(r,i)}return s(t,e),l(t,[{key:"add",value:function(e){this.requests.push(e);var t={},n={service:e.service,action:e.action};return Object.assign(t,i({},this.requests.length,Object.assign(n,e.params))),Object.assign(t,this.params),this.params=t,this}},{key:"execute",value:function(){var e=this;try{this.params=JSON.stringify(this.params)}catch(e){t._logger.error(""+e.message)}return new Promise(function(t,n){e.doHttpRequest().then(function(e){t(new v(e))},function(e){n("Error on multiRequest execution, error <"+e+">.")})})}}]),t}(c.default);y._logger=(0,f.default)("MultiRequestBuilder"),t.default=y;var v=t.MultiRequestResult=function e(t){var n=this;a(this,e),this.results=[],this.success=!0,(t.result?t.result:t).forEach(function(t){var r=new h.default(t);if(n.results.push(r),r.hasError)return e._logger.error("Service returned an error with error code: "+r.error.code+" and message: "+r.error.message+"."),void(n.success=!1)})};v._logger=(0,f.default)("MultiRequestResult")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var 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},i=function e(t){var n=void 0;return Array.isArray(t)?(n=t.length>0?t.slice(0):[],n.forEach(function(t,i){("object"===(void 0===t?"undefined":r(t))&&t!=={}||Array.isArray(t)&&t.length>0)&&(n[i]=e(t))})):"object"===(void 0===t?"undefined":r(t))?(n=Object.assign({},t),Object.keys(n).forEach(function(t){("object"===r(n[t])&&n[t]!=={}||Array.isArray(n[t])&&n[t].length>0)&&(n[t]=e(n[t]))})):n=t,n};t.clone=i},function(e,t,n){"use strict";function r(e){return e?s.get(e):s}function i(e){return r(e).getLevel()}function a(e,t){r(t).setLevel(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.setLogLevel=t.getLogLevel=t.LogLevel=void 0;var o=n(6),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(o),l={DEBUG:s.DEBUG,INFO:s.INFO,TIME:s.TIME,WARN:s.WARN,ERROR:s.ERROR,OFF:s.OFF};s.useDefaults({defaultLevel:s.ERROR}),t.default=r,t.LogLevel=l,t.getLogLevel=i,t.setLogLevel=a},function(e,t,n){var r,i;/*!
 * js-logger - http://github.com/jonnyreeves/js-logger
 * Jonny Reeves, http://jonnyreeves.co.uk/
 * js-logger may be freely distributed under the MIT license.
 */
!function(a){"use strict";var o={};o.VERSION="1.4.1";var s,l={},u=function(e,t){return function(){return t.apply(e,arguments)}},c=function(){var e,t,n=arguments,r=n[0];for(t=1;t<n.length;t++)for(e in n[t])e in r||!n[t].hasOwnProperty(e)||(r[e]=n[t][e]);return r},p=function(e,t){return{value:e,name:t}};o.DEBUG=p(1,"DEBUG"),o.INFO=p(2,"INFO"),o.TIME=p(3,"TIME"),o.WARN=p(4,"WARN"),o.ERROR=p(8,"ERROR"),o.OFF=p(99,"OFF");var f=function(e){this.context=e,this.setLevel(e.filterLevel),this.log=this.info};f.prototype={setLevel:function(e){e&&"value"in e&&(this.context.filterLevel=e)},getLevel:function(){return this.context.filterLevel},enabledFor:function(e){var t=this.context.filterLevel;return e.value>=t.value},debug:function(){this.invoke(o.DEBUG,arguments)},info:function(){this.invoke(o.INFO,arguments)},warn:function(){this.invoke(o.WARN,arguments)},error:function(){this.invoke(o.ERROR,arguments)},time:function(e){"string"==typeof e&&e.length>0&&this.invoke(o.TIME,[e,"start"])},timeEnd:function(e){"string"==typeof e&&e.length>0&&this.invoke(o.TIME,[e,"end"])},invoke:function(e,t){s&&this.enabledFor(e)&&s(t,c({level:e},this.context))}};var d=new f({filterLevel:o.OFF});!function(){var e=o;e.enabledFor=u(d,d.enabledFor),e.debug=u(d,d.debug),e.time=u(d,d.time),e.timeEnd=u(d,d.timeEnd),e.info=u(d,d.info),e.warn=u(d,d.warn),e.error=u(d,d.error),e.log=e.info}(),o.setHandler=function(e){s=e},o.setLevel=function(e){d.setLevel(e);for(var t in l)l.hasOwnProperty(t)&&l[t].setLevel(e)},o.getLevel=function(){return d.getLevel()},o.get=function(e){return l[e]||(l[e]=new f(c({name:e},d.context)))},o.createDefaultHandler=function(e){e=e||{},e.formatter=e.formatter||function(e,t){t.name&&e.unshift("["+t.name+"]")};var t={},n=function(e,t){Function.prototype.apply.call(e,console,t)};return"undefined"==typeof console?function(){}:function(r,i){r=Array.prototype.slice.call(r);var a,s=console.log;i.level===o.TIME?(a=(i.name?"["+i.name+"] ":"")+r[0],"start"===r[1]?console.time?console.time(a):t[a]=(new Date).getTime():console.timeEnd?console.timeEnd(a):n(s,[a+": "+((new Date).getTime()-t[a])+"ms"])):(i.level===o.WARN&&console.warn?s=console.warn:i.level===o.ERROR&&console.error?s=console.error:i.level===o.INFO&&console.info?s=console.info:i.level===o.DEBUG&&console.debug&&(s=console.debug),e.formatter(r,i),n(s,r))}},o.useDefaults=function(e){o.setLevel(e&&e.defaultLevel||o.DEBUG),o.setHandler(o.createDefaultHandler(e))},r=o,void 0!==(i="function"==typeof r?r.call(t,n,t,e):r)&&(e.exports=i)}()},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(3),s=r(o),l=n(1),u=r(l),c=function(){function e(){i(this,e)}return a(e,null,[{key:"getMultiRequest",value:function(e,t,n){var r=u.default.get(),i=r.serviceParams;Object.assign(i,{ks:t,clientTag:"html5:v"+e}),n&&Object.assign(i,{partnerId:n});var a=new Map;a.set("Content-Type","application/json");var o=new s.default(a);return o.method="POST",o.service="multirequest",o.url=o.getUrl(r.serviceUrl),o.params=i,o}}]),e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var 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},i=function(e){var t=[],n=/\[\]$/,i=function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=function(e,n){n="function"==typeof n?n():null===n?"":void 0===n?"":n,t[t.length]=encodeURIComponent(e)+"="+encodeURIComponent(n)};return function e(o,s){var l=void 0,u=void 0,c=void 0;if(o)if(i(s))for(l=0,u=s.length;l<u;l++)n.test(o)?a(o,s[l]):e(o+":"+("object"===r(s[l])?l:""),s[l]);else if(s&&"[object Object]"===String(s))for(c in s)e(o+":"+c,s[c]);else a(o,s);else if(i(s))for(l=0,u=s.length;l<u;l++)a(s[l].name,s[l].value);else for(c in s)e(c,s[c]);return t}("",e).join("&").replace(/%20/g,"+")};t.param=i},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(8),u=r(l),c=n(0),p=r(c),f=n(1),d=r(f),h=n(9),y=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,null,[{key:"trackEvent",value:function(e,t){var n=d.default.get(),r={};Object.assign(r,n.serviceParams,t);var i=new p.default;return i.service="analytics",i.action="trackEvent",i.method="GET",i.tag="analytics-trackEvent",i.params=r,i.url=e+"?service="+i.service+"&action="+i.action+"&"+(0,h.param)(i.params),i}}]),t}(u.default);t.default=y},,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=t.NAME=t.RequestBuilder=t.OVPConfiguration=t.OVPAnalyticsService=void 0;var i=n(0),a=r(i),o=n(1),s=r(o),l=n(11),u=r(l);t.OVPAnalyticsService=u.default,t.OVPConfiguration=s.default,t.RequestBuilder=a.default,t.NAME="playkit-js-providers-analytics-service",t.VERSION="2.7.0"}])}()}()},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){r(this,e),this._rates=[],this._rates=[]}return i(e,[{key:"setRates",value:function(e){var t=this;this._rates=[],e.forEach(function(e){t._rates.push({rate:e,active:!1,duration:0})})}},{key:"setCurrent",value:function(e){this._rates.forEach(function(e){return e.active=!1});var t=this._rates.find(function(t){return t.rate===e});t&&(t.active=!0)}},{key:"getCurrent",value:function(){var e=this._rates.find(function(e){return e.active});return e?e.rate:-1}},{key:"countCurrent",value:function(){var e=this._rates.find(function(e){return e.active});e&&e.duration++}},{key:"getAverage",value:function(){var e=0,t=0;return this._rates.forEach(function(n){t+=n.rate*n.duration,e+=n.duration}),e?t/e:0}},{key:"reset",value:function(){this._rates.forEach(function(e){return e.duration=0})}},{key:"destroy",value:function(){this._rates=[]}}]),e}();t.KavaRateHandler=a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.KavaTimer=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._config=e,n}return a(t,e),o(t,[{key:"start",value:function(){var e=this;this._clearTimeout(),this._stopped=!1,this._resetCounter=0,this._eventCounter=0,this._intervalId=setInterval(function(){return e._monitor()},1e3)}},{key:"resume",value:function(){this._stopped=!1,this._resetCounter=0}},{key:"stop",value:function(){this._stopped=!0}},{key:"isStopped",value:function(){return this._stopped}},{key:"destroy",value:function(){this._clearTimeout()}},{key:"_clearTimeout",value:function(){this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null)}},{key:"_monitor",value:function(){this._stopped?(this._resetCounter===this._config.resetCounter&&(this.dispatchEvent(new s.FakeEvent(t.Event.RESET)),this._resetCounter=0,this._eventCounter=0),this._resetCounter++):(this.dispatchEvent(new s.FakeEvent(t.Event.TICK)),this._eventCounter===this._config.eventCounter&&(this.dispatchEvent(new s.FakeEvent(t.Event.REPORT)),this._eventCounter=0),this._eventCounter++)}}]),t}(s.FakeEventTarget);l.Event={TICK:"tick",RESET:"reset",REPORT:"report"},t.KavaTimer=l}])})},function(e,t,n){"use strict";function r(e){(0,o.printKalturaPlayerVersionToLog)(e),e=(0,o.supportLegacyOptions)(e),(0,o.validateConfig)(e);var t=(0,o.getDefaultOptions)(e);(0,o.setLogOptions)(t),(0,o.printSetupMessages)(),(0,a.evaluatePluginsConfig)(t.plugins,t),(0,o.setStorageConfig)(t);var n=(0,i.getPlayerProxy)(t);return(0,o.setStorageTextStyle)(n),(0,o.applyStorageSupport)(n),(0,o.applyCastSupport)(t,n),(0,o.attachToFirstClick)(n),n}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0;var i=(n(44),n(147)),a=n(144),o=n(139);t.setup=r},function(e,t,n){"use strict";function r(e){var t=i.Utils.Object.getPropertyPath(e,"plugins.kava");t||(t=i.Utils.Object.mergeDeep(e,{plugins:{kava:{}}}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setDefaultAnalyticsPlugin=r;var i=n(9)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={INITIAL_CONFIG_REQUIRED:"Must provide initial providers config",PARTNER_ID_REQUIRED:"Must provide partner id",TARGET_ID_REQUIRED:"Must provide target id",DOM_ELEMENT_WITH_TARGET_ID_REQUIRED:"Must provide DOM element with id of: ",TARGET_ID_ALREADY_USED:"The target id provided is already in use. Id: "};t.ValidationErrorType=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(366),s=r(o),l=n(19),u=r(l),c=n(9),p=function(){function e(){i(this,e)}return a(e,null,[{key:"isLocalStorageAvailable",value:function(){return s.default.isLocalStorageAvailable()}},{key:"attach",value:function(t){var n=this;e._logger.debug("Attach local storage"),t.addEventListener(t.Event.UI.USER_CLICKED_MUTE,function(){t.isCasting()||s.default.setItem(e.StorageKeys.MUTED,t.muted)}),t.addEventListener(t.Event.UI.USER_CLICKED_UNMUTE,function(){t.isCasting()||s.default.setItem(e.StorageKeys.MUTED,t.muted)}),t.addEventListener(t.Event.UI.USER_CHANGED_VOLUME,function(){t.isCasting()||(t.volume>0?s.default.setItem(e.StorageKeys.MUTED,!1):s.default.setItem(e.StorageKeys.MUTED,!0),s.default.setItem(e.StorageKeys.VOLUME,t.volume))}),t.addEventListener(t.Event.UI.USER_SELECTED_AUDIO_TRACK,function(t){var n=t.payload.audioTrack;s.default.setItem(e.StorageKeys.AUDIO_LANG,n.language)}),t.addEventListener(t.Event.UI.USER_SELECTED_CAPTION_TRACK,function(t){var n=t.payload.captionTrack;s.default.setItem(e.StorageKeys.TEXT_LANG,n.language)}),t.addEventListener(t.Event.UI.USER_SELECTED_CAPTIONS_STYLE,function(t){try{var r=JSON.stringify(t.payload.captionsStyle);s.default.setItem(e.StorageKeys.TEXT_STYLE,r)}catch(e){n._logger.error(e.message)}})}},{key:"getPlayerTextStyle",value:function(){return s.default.getItem(e.StorageKeys.TEXT_STYLE)}},{key:"hasStorage",value:function(){var e=s.default.size,t=0!==e;return t?this._logger.debug("Storage found with size of ",e):this._logger.debug("No storage found"),t}},{key:"getStorageConfig",value:function(){var t=e._getExistingValues(),n=e._buildStorageConfig(t);return this._logger.debug("Gets storage config",n),n}},{key:"_getExistingValues",value:function(){var t={};return Object.keys(e.StorageKeys).forEach(function(n){var r=e.StorageKeys[n],i=s.default.getItem(r);null!=i&&(t[r]=i)}),t}},{key:"_buildStorageConfig",value:function(e){var t=c.Utils.Object.mergeDeep({},e);return delete t.textStyle,{playback:t}}}]),e}();p.StorageKeys={MUTED:"muted",VOLUME:"volume",AUDIO_LANG:"audioLanguage",TEXT_LANG:"textLanguage",TEXT_STYLE:"textStyle"},p._logger=(0,u.default)("StorageManager"),t.default=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(19),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(){function e(){r(this,e)}return i(e,null,[{key:"isLocalStorageAvailable",value:function(){if("undefined"==typeof Storage)return!1;try{return localStorage.setItem("test","test"),localStorage.removeItem("test"),!0}catch(e){return!1}}},{key:"setItem",value:function(t,n){e._validateKey(t);try{e._logger.debug("Sets item for key: "+t,n),localStorage.setItem("kaltura-player-js_"+t,n)}catch(t){e._isQuotaExceeded(t)?e._logger.error("Quota exceeded: "+t.message):e._logger.error(t.message)}}},{key:"getItem",value:function(t){e._validateKey(t);var n=null;try{return n=localStorage.getItem("kaltura-player-js_"+t),"string"==typeof n?JSON.parse(n):null}catch(e){return n}}},{key:"_isQuotaExceeded",value:function(e){var t=!1;if(e)if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else-2147024882===e.number&&(t=!0);return t}},{key:"_validateKey",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Invalid key")}},{key:"size",get:function(){return Object.keys(localStorage).filter(function(e){return e.startsWith("kaltura-player-js_")}).length}}]),e}();s._logger=(0,o.default)("StorageWrapper"),t.default=s},function(e,t,n){"use strict";function r(e,t){var n=function(e){var t=document.createElement("a");return t.href=e,t.hostname},r=n(t),i=!1,a="",o="";return e&&(e.flavors&&Array.isArray(e.flavors)?(i=1===e.flavors.length,a=i&&n(e.flavors[0].url),o=e.flavors[0].url):e.result&&(i=!0,a=n(e.result.url),o=e.result.url)),i&&r!==a?o:t}function i(e){var t=a.Utils.Object.getPropertyPath(e,"sources.options");t||(a.Utils.Object.mergeDeep(e,{sources:{options:{}}}),t=e.sources&&e.sources.options),t&&"function"!=typeof t.redirectExternalStreamsHandler&&(t.redirectExternalStreamsHandler=r)}Object.defineProperty(t,"__esModule",{value:!0}),t.configureExternalStreamRedirect=void 0;var a=n(9);t.configureExternalStreamRedirect=i},function(e,t,n){"use strict";n(9),n(53)},function(e,t,n){"use strict";function r(e,t){var n=e.sources&&e.sources.poster;if("string"==typeof n){if(/.*\/p\/\d+\/(?:[a-zA-Z]+\/\d+\/)*thumbnail\/entry_id\/\w+\/.*\d+/.test(n))try{var r={thumbnailUrl:n,ks:e.session.ks,width:t&&t.thumbsWidth||o,slices:t&&t.thumbsSlices||s};return(0,a.default)(l,r)}catch(e){return""}}return""}Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_THUMBS_SLICES=t.DEFAULT_THUMBS_WIDTH=void 0,t.getThumbSlicesUrl=r;var i=n(143),a=function(e){return e&&e.__esModule?e:{default:e}}(i),o=t.DEFAULT_THUMBS_WIDTH=164,s=t.DEFAULT_THUMBS_SLICES=100,l="{{thumbnailUrl}}/width/{{width}}/vid_slices/{{slices}}/ks/{{ks}}"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.templateRegex=t.pluginConfig=void 0;var r=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=n(9),a={youbora:{playerVersion:"{{pVersion}}",playerName:"{{pName}}",entryId:"{{entryId}}",entryName:"{{entryName}}",entryType:"{{entryType}}",sessionId:"{{sessionId}}",uiConfId:"{{uiConfId}}"},googleAnalytics:{entryId:"{{entryId}}",entryName:"{{entryName}}",uiConfId:"{{uiConfId}}",partnerId:"{{partnerId}}"},ottAnalytics:{entryId:"{{entryId}}",ks:"{{ks}}",isAnonymous:"{{isAnonymous}}",partnerId:"{{partnerId}}",serviceUrl:"{{serviceUrl}}"},ima:{playerVersion:"{{pVersion}}",playerName:"{{pName}}"},kava:{playerVersion:"{{pVersion}}",playerName:"{{pName}}",partnerId:"{{partnerId}}",playlistId:"{{playlistId}}",entryId:"{{entryId}}",entryType:"{{entryType}}",sessionId:"{{sessionId}}",ks:"{{ks}}",uiConfId:"{{uiConfId}}",referrer:"{{referrer}}"},comscore:{playerVersion:"{{pVersion}}"},vr:{rootElement:"{{domRootElementId}}"}},o=i.Utils.Object.copyDeep(a),s=new RegExp("{{.*}}"),l=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(t).reduce(function(t,n){var a=r(n,2),o=a[0],l=a[1];return i.Utils.Object.isObject(l)?t[o]=e(l):"string"==typeof l&&s.test(l)?t[o]=l:t[o]=void 0,t},{})},u=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(t).reduce(function(t,n){var a=r(n,2),o=a[0],s=a[1];return i.Utils.Object.isObject(s)?t[o]=e(s):s&&(t[o]=s),t},{})},c={get:function(){return o},set:function(e){if(e){var t=l(e);o=u(i.Utils.Object.mergeDeep(o,t))}},reset:function(){o=i.Utils.Object.copyDeep(a)}};t.pluginConfig=c,t.templateRegex=s},function(e,t,n){var r=n(372);"string"==typeof r&&(r=[[e.i,r,""]]);var i={};i.transform=void 0;n(374)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(373)(void 0),t.push([e.i,".kaltura-player-container {\n  width: 100%;\n  height: 100%;\n  position: relative;\n  background-color: #000;\n  outline: none;\n  -webkit-touch-callout: none;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  -webkit-tap-highlight-color: transparent;\n}\n",""])},function(e,t){function n(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var a=r(i);return[n].concat(i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"})).concat([a]).join("\n")}return[n].join("\n")}function r(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r=n(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var a=this[i][0];"number"==typeof a&&(r[a]=!0)}for(i=0;i<e.length;i++){var o=e[i];"number"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),t.push(o))}},t}},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=h[r.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](r.parts[a]);for(;a<r.parts.length;a++)i.parts.push(c(r.parts[a],t))}else{for(var o=[],a=0;a<r.parts.length;a++)o.push(c(r.parts[a],t));h[r.id]={id:r.id,refs:1,parts:o}}}}function i(e,t){for(var n=[],r={},i=0;i<e.length;i++){var a=e[i],o=t.base?a[0]+t.base:a[0],s=a[1],l=a[2],u=a[3],c={css:s,media:l,sourceMap:u};r[o]?r[o].parts.push(c):n.push(r[o]={id:o,parts:[c]})}return n}function a(e,t){var n=v(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=b[b.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),b.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function o(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=b.indexOf(e);t>=0&&b.splice(t,1)}function s(e){var t=document.createElement("style");return e.attrs.type="text/css",u(t,e.attrs),a(e,t),t}function l(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",u(t,e.attrs),a(e,t),t}function u(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function c(e,t){var n,r,i,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var u=m++;n=g||(g=s(t)),r=p.bind(null,n,u,!1),i=p.bind(null,n,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(t),r=d.bind(null,n,t),i=function(){o(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=f.bind(null,n),i=function(){o(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function p(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=E(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function f(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t,n){var r=n.css,i=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||a)&&(r=_(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var o=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(o),s&&URL.revokeObjectURL(s)}var h={},y=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),v=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e.call(this,n)),t[n]}}(function(e){return document.querySelector(e)}),g=null,m=0,b=[],_=n(375);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=y()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=i(e,t);return r(n,t),function(e){for(var a=[],o=0;o<n.length;o++){var s=n[o],l=h[s.id];l.refs--,a.push(l)}if(e){r(i(e,t),t)}for(var o=0;o<a.length;o++){var l=a[o];if(0===l.refs){for(var u=0;u<l.parts.length;u++)l.parts[u]();delete h[l.id]}}}};var E=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i))return e;var a;return a=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(a)+")"})}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.PlaylistManager=void 0;var i="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},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=(n(44),n(9)),s=n(102),l=n(19),u=function(e){return e&&e.__esModule?e:{default:e}}(l),c=n(377),p=(n(146),n(145)),f=function(){function e(t,n){r(this,e),this._logger=(0,u.default)("PlaylistManager"),this._player=t,this._eventManager=new o.EventManager,this._playlist=new c.Playlist,this._options={autoContinue:!0,loop:!1},this._countdown={duration:10,showing:!0},this._mediaInfoList=[],this._playerOptions=n}return a(e,[{key:"configure",value:function(e,t){e&&(this._playlist.configure(e),o.Utils.Object.mergeDeep(this._options,e.options),o.Utils.Object.mergeDeep(this._countdown,e.countdown),e.items&&e.items.find(function(e){return!!e.sources})&&(this._mediaInfoList=e.items.map(function(e,n){return t&&t.entries&&"object"===i(t.entries[n])?t.entries[n]:{entryId:e.sources.id}}),this._player.dispatchEvent(new o.FakeEvent(s.PlaylistEventType.PLAYLIST_LOADED,{playlist:this})),this._addBindings(),this.playNext()))}},{key:"load",value:function(e,t,n){var r=this._getMergedPlaylistData(e,t);this.configure(r,n)}},{key:"reset",value:function(){this._eventManager.removeAll(),this._playlist=new c.Playlist,this._mediaInfoList=[]}},{key:"playNext",value:function(){this._logger.debug("playNext");var e=this._playlist.getNext(!0);e.item&&this._setItem(e.item,e.index)}},{key:"playPrev",value:function(){this._logger.debug("playPrev");var e=this._playlist.prev;e.item&&this._setItem(e.item,e.index)}},{key:"playItem",value:function(e){this._logger.debug("playItem("+e+")");var t=this._playlist.items[e];t&&this._setItem(t,e)}},{key:"_getMergedPlaylistData",value:function(e,t){var n=this;return{id:e.id,metadata:e.metadata,poster:e.poster,options:t?t.options:this._options,countdown:t?t.countdown:this.countdown,items:e.items.map(function(e,r){var i=o.Utils.Object.copyDeep(e);return o.Utils.Object.mergeDeep(i.sources,t&&t.items&&t.items[r]&&t.items[r].sources),Array.isArray(i.sources.poster)&&(0,p.addKalturaPoster)(i.sources,e.sources,n._player.dimensions),{sources:i.sources,config:t&&t.items&&t.items[r]&&t.items[r].config}})}}},{key:"_addBindings",value:function(){var e=this;this._eventManager.listen(this._player,this._player.Event.Core.PLAYBACK_ENDED,function(){return e._onPlaybackEnded()})}},{key:"_onPlaybackEnded",value:function(){var e=this._playlist.getNext(!1).item;e||this._player.dispatchEvent(new o.FakeEvent(s.PlaylistEventType.PLAYLIST_ENDED)),!this._playerOptions.ui.disable&&this.countdown.showing||(e&&this._options.autoContinue||this._options.loop)&&this.playNext()}},{key:"_setItem",value:function(e,t){var n=this;this._logger.debug("Playing item number "+t,e);var r={loop:!1};return this._playlist.current.item&&(r.autoplay=!0),this._player.configure({playback:r}),this._playlist.activeItemIndex=t,e.isPlayable()?(this._player.reset(),this._player.setMedia({session:this._player.config.session,plugins:{},sources:e.sources}),this._player.dispatchEvent(new o.FakeEvent(s.PlaylistEventType.PLAYLIST_ITEM_CHANGED,{index:t,activeItem:e})),Promise.resolve()):this._mediaInfoList[t]?(this._player.reset(),this._player.configure({sources:e.sources}),this._player.loadMedia(this._mediaInfoList[t]).then(function(r){n._playlist.updateItemSources(t,r.sources),n._player.dispatchEvent(new o.FakeEvent(s.PlaylistEventType.PLAYLIST_ITEM_CHANGED,{index:t,activeItem:e}))})):Promise.reject()}},{key:"items",get:function(){return this._playlist.items}},{key:"next",get:function(){return this._playlist.getNext(this._options.loop).item}},{key:"prev",get:function(){return this._playlist.prev.item}},{key:"id",get:function(){return this._playlist.id}},{key:"metadata",get:function(){return this._playlist.metadata}},{key:"poster",get:function(){return this._playlist.poster}},{key:"countdown",get:function(){if(this._playlist.current.item&&this._playlist.current.item.config){var e={duration:10,showing:!0};return o.Utils.Object.mergeDeep(e,this._countdown,this._playlist.current.item.config.countdown),e}return this._countdown}},{key:"options",get:function(){return this._options}}]),e}();t.PlaylistManager=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Playlist=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(146),o=function(){function e(){r(this,e),this._id="",this._metadata={name:"",description:""},this._poster="",this._items=[],this._activeItemIndex=-1}return i(e,[{key:"configure",value:function(e){var t=this;this._id=e.id,this._poster=e.poster,this._metadata=e.metadata,e.items&&(this._items=[],e.items.forEach(function(e){t._items.push(new a.PlaylistItem(e.sources,e.config))}))}},{key:"updateItemSources",value:function(e,t){this._items[e].updateSources(t)}},{key:"getNext",value:function(e){var t=e?(this._activeItemIndex+1)%this._items.length:this._activeItemIndex+1;return{item:this._items[t]||null,index:t}}},{key:"id",get:function(){return this._id}},{key:"items",get:function(){return this._items}},{key:"metadata",get:function(){return this._metadata}},{key:"poster",get:function(){return this._poster}},{key:"current",get:function(){return{item:this._items[this._activeItemIndex]||null,index:this._activeItemIndex}}},{key:"prev",get:function(){return{item:this._items[this._activeItemIndex-1]||null,index:this._activeItemIndex-1}}},{key:"activeItemIndex",set:function(e){this._activeItemIndex=e}}]),e}();t.Playlist=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cast=void 0;var r=n(98),i=n(99),a=n(69),o=n(100),s=n(53),l=n(70),u=n(140),c=n(141),p=n(379),f=n(380),d=n(381),h={registerRemotePlayer:r.RemotePlayerManager.register,PlayerSnapshot:i.PlayerSnapshot,RemoteControl:a.RemoteControl,RemoteSession:s.RemoteSession,BaseRemotePlayer:l.BaseRemotePlayer,RemoteConnectedPayload:u.RemoteConnectedPayload,RemoteDisconnectedPayload:u.RemoteDisconnectedPayload,RemoteAvailablePayload:u.RemoteAvailablePayload,RemotePlayerUI:c.RemotePlayerUI,CastEventType:o.CastEventType,RemotePlayerType:p.RemotePlayerType,TextStyleConverter:f.TextStyleConverter,CustomEventMessage:d.CustomEventMessage,CustomActionMessage:d.CustomActionMessage,CustomMessageType:d.CustomMessageType,CustomActionType:d.CustomActionType,CustomMessage:d.CustomMessage};t.cast=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={CHROMECAST:"chromecast"};t.RemotePlayerType=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.TextStyleConverter=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(9),o=function(){function e(){r(this,e)}return i(e,null,[{key:"toCastTextStyle",value:function(t){if(window.chrome&&window.chrome.cast){var n=new window.chrome.cast.media.TextTrackStyle;return n.fontFamily=t.fontFamily,n.backgroundColor=e.rgbToHex(t.backgroundColor),n.foregroundColor=e.rgbToHex(t.fontColor),n.fontScale=Number.parseFloat(t.fontSize)/100,n}return{}}},{key:"toPlayerTextStyle",value:function(t){var n=new a.TextStyle;return n.fontFamily=t.fontFamily,n.fontSize=100*t.fontScale+"%",n.fontColor=e.hexToRGB(t.foregroundColor),n.backgroundColor=e.hexToRGB(t.backgroundColor),n}},{key:"rgbToHex",value:function(e){var t="#"+("0"+parseInt(e[0],10).toString(16)).slice(-2)+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2);if(e[3]){var n=e[3];n=Math.round(100*n)/100;t+=(Math.round(255*n)+65536).toString(16).substr(-2).toUpperCase()}else t+="FF";return t.toUpperCase()}},{key:"hexToRGB",value:function(e){var t=[];e=e.slice(1);for(var n=e.match(/.{1,2}/g),r=0;r<3;r++){var i=n&&n[r];i&&t.push(parseInt(i,16))}return t}}]),e}();t.TextStyleConverter=o},function(e,t,n){"use strict";function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o={ACTION:"action",EVENT:"event"},s={SKIP_AD:"skipAd"},l=function e(t){a(this,e),this.type=t},u=function(e){function t(e,n){a(this,t);var i=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,o.EVENT));return i.event=e,i.payload=n,i}return i(t,e),t}(l),c=function(e){function t(e,n){a(this,t);var i=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,o.ACTION));return i.action=e,i.args=n,i}return i(t,e),t}(l);t.CustomMessageType=o,t.CustomActionType=s,t.CustomMessage=l,t.CustomEventMessage=u,t.CustomActionMessage=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.playlist=void 0;var r=n(102),i={PlaylistEventType:r.PlaylistEventType};t.playlist=i}])});

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@playkit-js/playkit-js")):"function"==typeof define&&define.amd?define("flash",["playkit-js"],t):"object"==typeof exports?exports.flash=t(require("@playkit-js/playkit-js")):(e.playkit=e.playkit||{},e.playkit.flash=t(e.KalturaPlayer.core))}(this,function(e){return function(e){function t(n){if(i[n])return i[n].exports;var a=i[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(t,i){t.exports=e},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NAME=t.VERSION=t.Engine=void 0;var n=i(0),a=i(2);t.Engine=a.Flash,t.VERSION="1.4.4",t.NAME="@playkit-js/playkit-js-flash",a.Flash.isSupported()&&(0,n.registerEngine)(a.Flash.id,a.Flash)},function(e,t,i){"use strict";function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Flash=void 0;var o=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),s=i(0),l=i(3),c=function(e){function t(e,i){a(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._el=null,n._api=null,n._loadPromise=null,n._volume=NaN,n._volumeBeforeMute=NaN,n._eventManager=null,n._muted=n.defaultMuted,n._el=s.Utils.Dom.createElement("div"),n._init(e,i),n}return u(t,e),o(t,null,[{key:"createEngine",value:function(e,t){return new this(e,t)}},{key:"canPlaySource",value:function(e,i){return!(!e||!e.mimetype)&&("string"==typeof e.mimetype&&t._hlsMimeTypes.includes(e.mimetype.toLowerCase()))}},{key:"prepareVideoElement",value:function(){}},{key:"isSupported",value:function(){var e="0,0,0";try{e=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(t){try{window.navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(e=(window.navigator.plugins["Shockwave Flash 2.0"]||window.navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(e){}}return parseInt(e.split(",")[0])>=10}},{key:"runCapabilities",value:function(){}},{key:"getCapabilities",value:function(){return Promise.resolve(n({},t.id,{autoplay:!0,mutedAutoPlay:!0}))}}]),o(t,[{key:"attachMediaSource",value:function(){this._api&&this._api.attachMediaSource()}},{key:"detachMediaSource",value:function(){this._api&&this._api.detachMediaSource()}},{key:"hideTextTrack",value:function(){}},{key:"resetAllCues",value:function(){}},{key:"enterPictureInPicture",value:function(){}},{key:"exitPictureInPicture",value:function(){}},{key:"_init",value:function(e,t){this._eventManager=new s.EventManager,this._config=t,this._el&&(this._api=new l.FlashHLSAdapter(e,t,this._el),this._api.attach(),this._addBindings())}},{key:"reset",value:function(){this._api&&this._api.reset(),this._config=null,this._muted=this.defaultMuted,this._volume=NaN,this._volumeBeforeMute=NaN}},{key:"restore",value:function(e,t){this.destroy(),this._init(e,t)}},{key:"destroy",value:function(){this._api&&(this._api.destroy(),this._eventManager.destroy(),this.reset())}},{key:"_addBindings",value:function(){var e=this;if(this._api){[s.EventType.ABR_MODE_CHANGED,s.EventType.TRACKS_CHANGED,s.EventType.ERROR,s.EventType.PLAYING,s.EventType.TIME_UPDATE,s.EventType.PAUSE,s.EventType.LOADED_METADATA,s.EventType.LOADED_DATA,s.EventType.PLAY,s.EventType.VOLUME_CHANGE,s.EventType.WAITING,s.EventType.SEEKING,s.EventType.SEEKED,s.EventType.ENDED,s.EventType.TEXT_CUE_CHANGED,s.EventType.VIDEO_TRACK_CHANGED,s.EventType.AUDIO_TRACK_CHANGED,s.EventType.ABORT,s.EventType.EMPTIED,s.EventType.DURATION_CHANGE].forEach(function(t){e._eventManager.listen(e._api,t,function(t){return e.dispatchEvent(t)})})}else t._logger.warn("Unable to attach flash - api is missing")}},{key:"getVideoElement",value:function(){return this._el}},{key:"selectAudioTrack",value:function(e){this._api&&this._api.selectAudioTrack(e)}},{key:"selectVideoTrack",value:function(e){this._api&&this._api.selectVideoTrack(e)}},{key:"enableAdaptiveBitrate",value:function(){this._api&&this._api.setABR()}},{key:"isAdaptiveBitrateEnabled",value:function(){var e=!1;return this._api&&(e=this._api.isABR()),e}},{key:"load",value:function(e){return this._api?(this._loadPromise=this._api.load(e),this._loadPromise):(t._logger.warn("Missing API - Flash is not ready"),Promise.reject("Flash is not ready"))}},{key:"play",value:function(){var e=this;this._loadPromise&&this._loadPromise.then(function(){e._api&&e._api.play()})}},{key:"pause",value:function(){this._api&&this._api.pause()}},{key:"isLive",value:function(){return!1}},{key:"getStartTimeOfDvrWindow",value:function(){return 0}},{key:"seekToLiveEdge",value:function(){this.currentTime=this.duration-1}},{key:"playbackRates",get:function(){return[1]}},{key:"playbackRate",set:function(e){1!=e&&t._logger.debug("This engine doesnt support playback rate <> 1")},get:function(){return 1}},{key:"defaultPlaybackRate",get:function(){return 1}},{key:"id",get:function(){return t.id}},{key:"src",set:function(e){this._api&&(this._api.src=e)},get:function(){return this._api?this._api.src:""}},{key:"currentTime",get:function(){return this._api&&this._api.currentTime?this._api.currentTime:0},set:function(e){this._api&&this._api.seek(e)}},{key:"duration",get:function(){var e=0;return this._api&&(e=this._api.duration?this._api.duration:this._api.getDuration()),e}},{key:"volume",set:function(e){this._muted?this._volumeBeforeMute=e:(this._volume=e,this._api&&this._api.volume(e))},get:function(){return this._volume||0}},{key:"paused",get:function(){return!this._api||this._api.paused}},{key:"seeking",get:function(){return!!this._api&&this._api.seeking}},{key:"seekable",get:function(){return this.buffered}},{key:"played",get:function(){var e=this;return{length:1,start:function(){return 0},end:function(){return e._api?e._api.watched:0}}}},{key:"buffered",get:function(){var e=0,t=0,i=0;if(this._api){var n=this._api;t=n.getBackBufferLength(),e=n.getBufferLength(),i=n.currentTime?n.currentTime:0}return{length:1,start:function(){return i-t},end:function(){return i+e}}}},{key:"muted",set:function(e){e?(this.volume=0,this._muted=!0,this._volumeBeforeMute=this.volume):(this._muted=!1,this._volumeBeforeMute?this.volume=this._volumeBeforeMute:this.volume=1)},get:function(){return 0===this.volume}},{key:"defaultMuted",get:function(){return!1}},{key:"ended",get:function(){return!!this._api&&this._api.ended}},{key:"targetBuffer",get:function(){return NaN}},{key:"availableBuffer",get:function(){return NaN}},{key:"poster",set:function(e){},get:function(){return""}},{key:"preload",set:function(e){},get:function(){return"none"}},{key:"autoplay",set:function(e){},get:function(){return!1}},{key:"controls",set:function(e){},get:function(){return!1}},{key:"loop",set:function(e){},get:function(){return!1}},{key:"isInPictureInPicture",get:function(){return!1}},{key:"networkState",get:function(){return 1}},{key:"readyState",get:function(){return this._api?4:0}},{key:"videoHeight",get:function(){return-1}},{key:"videoWidth",get:function(){return-1}},{key:"playsinline",set:function(e){},get:function(){return!!this._config&&this._config.playsinline}},{key:"crossOrigin",set:function(e){},get:function(){return null}}]),t}(s.FakeEventTarget);c._hlsMimeTypes=["application/x-mpegurl","application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"],c._logger=(0,s.getLogger)("Flash"),c.id="flash",t.Flash=c},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.FlashHLSAdapter=void 0;var u=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),o=i(0),s=i(4),l=i(5),c=function(e){return e&&e.__esModule?e:{default:e}}(l),f=function(e){function t(e,i,r){n(this,t);var u=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));u._firstPlay=!0,u._loadReported=!1,u.paused=!0,u.ended=!1,u.seeking=!1,u._lastTimeDetach=NaN,u._startTimeAttach=NaN;var s=o.Utils.Object.getPropertyPath(i,"playback.options.flash");return s=o.Utils.Object.mergeDeep(c.default,s),u._config=s,u._src=e,u._el=r,u._apiLoadPromise=new Promise(function(e){u._apiLoadResolve=e}),u}return r(t,e),u(t,null,[{key:"getFlashCode",value:function(e,t,i,n){var a="",r="",u="";return t&&Object.getOwnPropertyNames(t).forEach(function(e){a+=e+"="+t[e]+"&amp;"}),i=o.Utils.Object.mergeDeep({movie:e,flashvars:a,allowScriptAccess:"always",allowNetworking:"all",wmode:"transparent",bgColor:"#0",quality:"autohigh"},i),Object.getOwnPropertyNames(i).forEach(function(e){r+='<param name="'+e+'" value="'+i[e]+'" />'}),n=o.Utils.Object.mergeDeep({data:e,width:"100%",height:"100%"},n),Object.getOwnPropertyNames(n).forEach(function(e){u+=e+'="'+n[e]+'" '}),'<object type="application/x-shockwave-flash" '+u+">"+r+"</object>"}}]),u(t,[{key:"destroy",value:function(){this._el&&this._el.parentNode&&(this._el.innerHTML=""),this._startTimeAttach=NaN,this._lastTimeDetach=NaN,this._api=null,this._apiLoadPromise=null,this._apiLoadResolve=null,this._trigger(o.EventType.ABORT),this._trigger(o.EventType.EMPTIED),this._trigger(o.EventType.TEXT_CUE_CHANGED,{cues:[]}),this.currentTime=NaN,this._trigger(o.EventType.TIME_UPDATE)}},{key:"attach",value:function(){var e=this;this._config.flashvars||(this._config.flashvars={}),this._config.flashvars.callback="flashlsCallback",this._el.innerHTML=t.getFlashCode(this._config.swfUrl,this._config.flashvars,this._config.params,this._config.attributes);var i={ready:function(){e._api=new s.FlashAPI(e._el.firstElementChild),null!=e._initialVolume&&e.volume(e._initialVolume),e._api&&e._config.debug&&e._api.playerSetLogDebug(!0),e._api&&e._config.debug&&e._api.playerSetLogDebug2(!0),e._apiLoadResolve&&e._apiLoadResolve()},levelLoaded:function(t){e._loadReported||(e._trigger(o.EventType.LOADED_DATA,t),e._trigger(o.EventType.LOADED_METADATA,t),e._loadReported=!0)},complete:function(){e._firstPlay=!0,e.ended=!0,e._trigger(o.EventType.ENDED)},position:function(t){e.paused=!1,e.duration!=t.duration&&(e.duration=t.duration,e._trigger(o.EventType.DURATION_CHANGE)),e.buffer=t.buffer,e.watched=t.watched,(e.currentTime!=t.position||e.ended)&&(e.currentTime=t.position,e._trigger(o.EventType.TIME_UPDATE,t))},error:function(t,i,n){var a=new o.Error(o.Error.Severity.CRITICAL,o.Error.Category.MEDIA,o.Error.Code.VIDEO_ERROR,{code:t,extended:i,message:n});e._trigger(o.EventType.ERROR,a)},manifest:function(t,i){if(e._api){var n=e._api.getAudioTrackList(),a=[];if(n)for(var r=0;r<n.length;r++){var u={id:n[r].id,active:n[r].isDefault,label:n[r].title,language:n[r].title,index:r};a.push(new o.AudioTrack(u))}for(var s=[],l=0;l<i.length;l++){var c={active:0===l,bandwidth:i[l].bitrate,width:i[l].width,height:i[l].height,language:"",index:l};s.push(new o.VideoTrack(c))}e._resolveLoad&&(e._resolveLoad({tracks:s.concat(a)}),e._resolveLoad=null),e._trigger(o.EventType.TRACKS_CHANGED,{tracks:s.concat(a)})}},seekState:function(t){e._firstPlay||("SEEKING"===t&&(e.seeking=!0,e._trigger(o.EventType.SEEKING),e._trigger(o.EventType.WAITING)),"SEEKED"===t&&(e.seeking=!1,e._trigger(o.EventType.SEEKED)))},state:function(t){switch(t){case"IDLE":return;case"PLAYING":e._trigger(o.EventType.PLAYING),e._firstPlay=!1;break;case"PAUSED_BUFFERING":e._trigger(o.EventType.WAITING);break;case"PAUSED":e._trigger(o.EventType.PAUSE),e.paused=!0}}};return window.flashlsCallback=function(e,t){i[e]&&i[e].apply(null,t)},this._el}},{key:"load",value:function(e){var t=this;return this._loadPromise=new Promise(function(i){t._resolveLoad=i,t._startTime=t._startTimeAttach||e||-1,t._startTimeAttach=NaN,t._apiLoadPromise&&t._apiLoadPromise.then(function(){t._api&&t._api.load(t._src.url)})}),this._loadPromise}},{key:"play",value:function(){var e=this;this._apiLoadPromise&&this._apiLoadPromise.then(function(){e._api&&(e._firstPlay?(e.ended=!1,e._api.play(e._startTime)):e._api.resume(),e._trigger(o.EventType.PLAY))})}},{key:"pause",value:function(){this._api&&this._api.pause()}},{key:"seek",value:function(e){this._api&&(this.currentTime=e,this._api.seek(e))}},{key:"volume",value:function(e){this._api?(this._api.volume(100*e),this._trigger(o.EventType.VOLUME_CHANGE)):this._initialVolume=e}},{key:"getDuration",value:function(){return this._api?this._api.getDuration():Number.NaN}},{key:"selectAudioTrack",value:function(e){this._api&&(this._api.setAudioTrack(e.id),this._trigger(o.EventType.AUDIO_TRACK_CHANGED,{selectedAudioTrack:e}))}},{key:"selectVideoTrack",value:function(e){this.isABR()&&this._trigger(o.EventType.ABR_MODE_CHANGED,{mode:"manual"}),this._api&&(this._api.setCurrentLevel(e.index),this._trigger(o.EventType.VIDEO_TRACK_CHANGED,{selectedVideoTrack:e}))}},{key:"setABR",value:function(){this._api&&(this._api.setCurrentLevel(-1),this._trigger(o.EventType.ABR_MODE_CHANGED,{mode:"auto"}))}},{key:"isABR",value:function(){return!!this._api&&this._api.getAutoLevel()}},{key:"getBufferLength",value:function(){return this._api?this._api.getbufferLength():0}},{key:"getBackBufferLength",value:function(){return this._api?this._api.getbackBufferLength():0}},{key:"_trigger",value:function(e,t){this.dispatchEvent(new o.FakeEvent(e,t))}},{key:"reset",value:function(){this.paused=!0,this.ended=!1,this.seeking=!1,this.duration=null,this.buffer=null,this.watched=null,this._startTimeAttach=NaN,this._lastTimeDetach=NaN}},{key:"attachMediaSource",value:function(){var e=this;this._apiLoadPromise=new Promise(function(t){e._apiLoadResolve=t}),this.attach(),this._startTimeAttach=this._lastTimeDetach,this._lastTimeDetach=NaN}},{key:"detachMediaSource",value:function(){var e=this.currentTime;this.destroy(),this._lastTimeDetach=e,this._firstPlay=!0,this._loadPromise=null}},{key:"src",set:function(e){this._src.url=e},get:function(){return this._loadPromise&&this._src.url?this._src.url:""}}]),t}(o.FakeEventTarget);t.FlashHLSAdapter=f},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),r=function(){function e(t){n(this,e),this.flashObject=t}return a(e,[{key:"load",value:function(e){this.flashObject.playerLoad(e)}},{key:"play",value:function(e){this.flashObject.playerPlay(e)}},{key:"pause",value:function(){this.flashObject.playerPause()}},{key:"resume",value:function(){this.flashObject.playerResume()}},{key:"seek",value:function(e){this.flashObject.playerSeek(e)}},{key:"stop",value:function(){this.flashObject.playerStop()}},{key:"volume",value:function(e){this.flashObject.playerVolume(e)}},{key:"setCurrentLevel",value:function(e){this.flashObject.playerSetCurrentLevel(e)}},{key:"setNextLevel",value:function(e){this.flashObject.playerSetNextLevel(e)}},{key:"setLoadLevel",value:function(e){this.flashObject.playerSetLoadLevel(e)}},{key:"setMaxBufferLength",value:function(e){this.flashObject.playerSetmaxBufferLength(e)}},{key:"getPosition",value:function(){return this.flashObject.getPosition()}},{key:"getDuration",value:function(){return this.flashObject.getDuration()}},{key:"getbufferLength",value:function(){return this.flashObject.getbufferLength()}},{key:"getbackBufferLength",value:function(){return this.flashObject.getbackBufferLength()}},{key:"getLowBufferLength",value:function(){return this.flashObject.getlowBufferLength()}},{key:"getMinBufferLength",value:function(){return this.flashObject.getminBufferLength()}},{key:"getMaxBufferLength",value:function(){return this.flashObject.getmaxBufferLength()}},{key:"getLevels",value:function(){return this.flashObject.getLevels()}},{key:"getAutoLevel",value:function(){return this.flashObject.getAutoLevel()}},{key:"getCurrentLevel",value:function(){return this.flashObject.getCurrentLevel()}},{key:"getNextLevel",value:function(){return this.flashObject.getNextLevel()}},{key:"getLoadLevel",value:function(){return this.flashObject.getLoadLevel()}},{key:"getAudioTrackList",value:function(){return this.flashObject.getAudioTrackList()}},{key:"getStats",value:function(){return this.flashObject.getStats()}},{key:"setAudioTrack",value:function(e){this.flashObject.playerSetAudioTrack(e)}},{key:"playerSetLogDebug",value:function(e){this.flashObject.playerSetLogDebug(e)}},{key:"getLogDebug",value:function(){return this.flashObject.getLogDebug()}},{key:"playerSetLogDebug2",value:function(e){this.flashObject.playerSetLogDebug2(e)}},{key:"getLogDebug2",value:function(){return this.flashObject.getLogDebug2()}},{key:"playerSetUseHardwareVideoDecoder",value:function(e){this.flashObject.playerSetUseHardwareVideoDecoder(e)}},{key:"getUseHardwareVideoDecoder",value:function(){return this.flashObject.getUseHardwareVideoDecoder()}},{key:"playerSetflushLiveURLCache",value:function(e){this.flashObject.playerSetflushLiveURLCache(e)}},{key:"getflushLiveURLCache",value:function(){return this.flashObject.getflushLiveURLCache()}},{key:"playerSetJSURLStream",value:function(e){this.flashObject.playerSetJSURLStream(e)}},{key:"getJSURLStream",value:function(){return this.flashObject.getJSURLStream()}},{key:"playerCapLeveltoStage",value:function(e){this.flashObject.playerCapLeveltoStage(e)}},{key:"getCapLeveltoStage",value:function(){return this.flashObject.getCapLeveltoStage()}},{key:"playerSetAutoLevelCapping",value:function(e){this.flashObject.playerSetAutoLevelCapping(e)}},{key:"getAutoLevelCapping",value:function(){return this.flashObject.getAutoLevelCapping()}}]),e}();t.FlashAPI=r},function(e,t){e.exports={swfUrl:"https://cdnapisec.kaltura.com/html5/static/flashhls/v0.4.4.24/flashlsChromeless.swf?inline=1"}}])});

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("playkit-js")):"function"==typeof define&&define.amd?define("vr",["playkit-js"],e):"object"==typeof exports?exports.vr=e(require("playkit-js")):(t.KalturaPlayer=t.KalturaPlayer||{},t.KalturaPlayer.plugins=t.KalturaPlayer.plugins||{},t.KalturaPlayer.plugins.vr=e(t.KalturaPlayer.core))}("undefined"!=typeof self?self:this,function(t){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=2)}([function(t,e,n){"use strict";function r(){}function i(t,e){this.x=t||0,this.y=e||0}function o(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function a(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function s(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function c(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}function u(t,e,n,r,o,a,s,h,l,d){Object.defineProperty(this,"id",{value:Nc++}),this.uuid=Ic.generateUUID(),this.name="",this.image=void 0!==t?t:u.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:u.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:fs,this.wrapT=void 0!==r?r:fs,this.magFilter=void 0!==o?o:xs,this.minFilter=void 0!==a?a:bs,this.anisotropy=void 0!==l?l:1,this.format=void 0!==s?s:Us,this.type=void 0!==h?h:ws,this.offset=new i(0,0),this.repeat=new i(1,1),this.center=new i(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new c,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==d?d:Mc,this.version=0,this.onUpdate=null}function h(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function l(t,e,n){this.width=t,this.height=e,this.scissor=new h(0,0,t,e),this.scissorTest=!1,this.viewport=new h(0,0,t,e),n=n||{},void 0===n.minFilter&&(n.minFilter=xs),this.texture=new u(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.generateMipmaps=void 0===n.generateMipmaps||n.generateMipmaps,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function d(t,e,n){l.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function p(t,e,n,r,i,o,a,s,c,h,l,d){u.call(this,null,o,a,s,c,h,r,i,l,d),this.image={data:t,width:e,height:n},this.magFilter=void 0!==c?c:vs,this.minFilter=void 0!==h?h:vs,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function f(t,e){this.min=void 0!==t?t:new s(1/0,1/0,1/0),this.max=void 0!==e?e:new s(-1/0,-1/0,-1/0)}function m(t,e){this.center=void 0!==t?t:new s,this.radius=void 0!==e?e:0}function v(t,e){this.normal=void 0!==t?t:new s(1,0,0),this.constant=void 0!==e?e:0}function g(t,e,n,r,i,o){this.planes=[void 0!==t?t:new v,void 0!==e?e:new v,void 0!==n?n:new v,void 0!==r?r:new v,void 0!==i?i:new v,void 0!==o?o:new v]}function y(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}function x(){function t(i,o){!1!==n&&(r(i,o),e.requestAnimationFrame(t))}var e=null,n=!1,r=null;return{start:function(){!0!==n&&null!==r&&(e.requestAnimationFrame(t),n=!0)},stop:function(){n=!1},setAnimationLoop:function(t){r=t},setContext:function(t){e=t}}}function _(t){function e(e,n){var r=e.array,i=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,r,i),e.onUploadCallback();var a=t.FLOAT;return r instanceof Float32Array?a=t.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=t.UNSIGNED_SHORT:r instanceof Int16Array?a=t.SHORT:r instanceof Uint32Array?a=t.UNSIGNED_INT:r instanceof Int32Array?a=t.INT:r instanceof Int8Array?a=t.BYTE:r instanceof Uint8Array&&(a=t.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}function n(e,n,r){var i=n.array,o=n.updateRange;t.bindBuffer(r,e),!1===n.dynamic?t.bufferData(r,i,t.STATIC_DRAW):-1===o.count?t.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}function r(t){return t.isInterleavedBufferAttribute&&(t=t.data),a.get(t)}function i(e){e.isInterleavedBufferAttribute&&(e=e.data);var n=a.get(e);n&&(t.deleteBuffer(n.buffer),a.delete(e))}function o(t,r){t.isInterleavedBufferAttribute&&(t=t.data);var i=a.get(t);void 0===i?a.set(t,e(t,r)):i.version<t.version&&(n(i.buffer,t,r),i.version=t.version)}var a=new WeakMap;return{get:r,remove:i,update:o}}function b(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||b.DefaultOrder}function w(){this.mask=1}function M(){function t(){i.setFromEuler(r,!1)}function e(){r.setFromQuaternion(i,void 0,!1)}Object.defineProperty(this,"id",{value:Gc++}),this.uuid=Ic.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=M.DefaultUp.clone();var n=new s,r=new b,i=new a,u=new s(1,1,1);r.onChange(t),i.onChange(e),Object.defineProperties(this,{position:{enumerable:!0,value:n},rotation:{enumerable:!0,value:r},quaternion:{enumerable:!0,value:i},scale:{enumerable:!0,value:u},modelViewMatrix:{value:new o},normalMatrix:{value:new c}}),this.matrix=new o,this.matrixWorld=new o,this.matrixAutoUpdate=M.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new w,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function E(){M.call(this),this.type="Camera",this.matrixWorldInverse=new o,this.projectionMatrix=new o}function T(t,e,n,r,i,o){E.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function S(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new s,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new y,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}function A(){Object.defineProperty(this,"id",{value:Hc+=2}),this.uuid=Ic.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function R(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function L(t,e,n){R.call(this,new Int8Array(t),e,n)}function C(t,e,n){R.call(this,new Uint8Array(t),e,n)}function P(t,e,n){R.call(this,new Uint8ClampedArray(t),e,n)}function O(t,e,n){R.call(this,new Int16Array(t),e,n)}function I(t,e,n){R.call(this,new Uint16Array(t),e,n)}function N(t,e,n){R.call(this,new Int32Array(t),e,n)}function D(t,e,n){R.call(this,new Uint32Array(t),e,n)}function U(t,e,n){R.call(this,new Float32Array(t),e,n)}function B(t,e,n){R.call(this,new Float64Array(t),e,n)}function F(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function z(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}function G(){Object.defineProperty(this,"id",{value:Vc+=2}),this.uuid=Ic.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}function H(t,e,n,r,i,o){A.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new V(t,e,n,r,i,o)),this.mergeVertices()}function V(t,e,n,r,i,o){function a(t,e,n,r,i,o,a,m,v,g,y){var x,_,b=o/v,w=a/g,M=o/2,E=a/2,T=m/2,S=v+1,A=g+1,R=0,L=0,C=new s;for(_=0;_<A;_++){var P=_*w-E;for(x=0;x<S;x++){var O=x*b-M;C[t]=O*r,C[e]=P*i,C[n]=T,h.push(C.x,C.y,C.z),C[t]=0,C[e]=0,C[n]=m>0?1:-1,l.push(C.x,C.y,C.z),d.push(x/v),d.push(1-_/g),R+=1}}for(_=0;_<g;_++)for(x=0;x<v;x++){var I=p+x+S*_,N=p+x+S*(_+1),D=p+(x+1)+S*(_+1),U=p+(x+1)+S*_;u.push(I,N,U),u.push(N,D,U),L+=6}c.addGroup(f,L,y),f+=L,p+=R}G.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var c=this;t=t||1,e=e||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1,o=Math.floor(o)||1;var u=[],h=[],l=[],d=[],p=0,f=0;a("z","y","x",-1,-1,n,e,t,o,i,0),a("z","y","x",1,-1,n,e,-t,o,i,1),a("x","z","y",1,1,t,n,e,r,o,2),a("x","z","y",1,-1,t,n,-e,r,o,3),a("x","y","z",1,-1,t,e,n,r,i,4),a("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(u),this.addAttribute("position",new U(h,3)),this.addAttribute("normal",new U(l,3)),this.addAttribute("uv",new U(d,2))}function k(t,e,n,r){A.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new j(t,e,n,r)),this.mergeVertices()}function j(t,e,n,r){G.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},t=t||1,e=e||1;var i,o,a=t/2,s=e/2,c=Math.floor(n)||1,u=Math.floor(r)||1,h=c+1,l=u+1,d=t/c,p=e/u,f=[],m=[],v=[],g=[];for(o=0;o<l;o++){var y=o*p-s;for(i=0;i<h;i++){var x=i*d-a;m.push(x,-y,0),v.push(0,0,1),g.push(i/c),g.push(1-o/u)}}for(o=0;o<u;o++)for(i=0;i<c;i++){var _=i+h*o,b=i+h*(o+1),w=i+1+h*(o+1),M=i+1+h*o;f.push(_,b,M),f.push(b,w,M)}this.setIndex(f),this.addAttribute("position",new U(m,3)),this.addAttribute("normal",new U(v,3)),this.addAttribute("uv",new U(g,2))}function W(){Object.defineProperty(this,"id",{value:kc++}),this.uuid=Ic.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=wa,this.side=pa,this.flatShading=!1,this.vertexColors=ya,this.opacity=1,this.transparent=!1,this.blendSrc=Ua,this.blendDst=Ba,this.blendEquation=Aa,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Xa,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function X(t){W.call(this),this.type="MeshBasicMaterial",this.color=new y(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Qa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function q(t){W.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function Y(t,e){this.origin=void 0!==t?t:new s,this.direction=void 0!==e?e:new s}function Z(t,e){this.start=void 0!==t?t:new s,this.end=void 0!==e?e:new s}function J(t,e,n){this.a=void 0!==t?t:new s,this.b=void 0!==e?e:new s,this.c=void 0!==n?n:new s}function Q(t,e){M.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new G,this.material=void 0!==e?e:new X({color:16777215*Math.random()}),this.drawMode=_c,this.updateMorphTargets()}function K(t,e,n,r){function i(e,r,i,l){var d=r.background;null===d?o(u,h):d&&d.isColor&&(o(d,1),l=!0),(t.autoClear||l)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),d&&d.isCubeTexture?(void 0===c&&(c=new Q(new V(1,1,1),new q({uniforms:zc.cube.uniforms,vertexShader:zc.cube.vertexShader,fragmentShader:zc.cube.fragmentShader,side:fa,depthTest:!0,depthWrite:!1,fog:!1})),c.geometry.removeAttribute("normal"),c.geometry.removeAttribute("uv"),c.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(c)),c.material.uniforms.tCube.value=d,e.push(c,c.geometry,c.material,0,null)):d&&d.isTexture&&(void 0===a&&(a=new T(-1,1,1,-1,0,1),s=new Q(new j(2,2),new X({depthTest:!1,depthWrite:!1,fog:!1})),n.update(s)),s.material.map=d,t.renderBufferDirect(a,null,s.geometry,s.material,s,null))}function o(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,r)}var a,s,c,u=new y(0),h=0;return{getClearColor:function(){return u},setClearColor:function(t,e){u.set(t),h=void 0!==e?e:1,o(u,h)},getClearAlpha:function(){return h},setClearAlpha:function(t){h=t,o(u,h)},render:i}}function $(t,e,n){function r(t){a=t}function i(e,r){t.drawArrays(a,e,r),n.update(r,a)}function o(t,r,i){var o=e.get("ANGLE_instanced_arrays");if(null===o)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");o.drawArraysInstancedANGLE(a,r,i,t.maxInstancedCount),n.update(i,a,t.maxInstancedCount)}var a;this.setMode=r,this.render=i,this.renderInstances=o}function tt(t,e,n){function r(){if(void 0!==o)return o;var n=e.get("EXT_texture_filter_anisotropic");return o=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o,a=void 0!==n.precision?n.precision:"highp",s=i(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);var c=!0===n.logarithmicDepthBuffer,u=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),d=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),f=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),m=t.getParameter(t.MAX_VARYING_VECTORS),v=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),g=h>0,y=!!e.get("OES_texture_float");return{getMaxAnisotropy:r,getMaxPrecision:i,precision:a,logarithmicDepthBuffer:c,maxTextures:u,maxVertexTextures:h,maxTextureSize:l,maxCubemapSize:d,maxAttributes:p,maxVertexUniforms:f,maxVaryings:m,maxFragmentUniforms:v,vertexTextures:g,floatFragmentTextures:y,floatVertexTextures:g&&y}}function et(){function t(){h.value!==r&&(h.value=r,h.needsUpdate=i>0),n.numPlanes=i,n.numIntersection=0}function e(t,e,r,i){var o=null!==t?t.length:0,a=null;if(0!==o){if(a=h.value,!0!==i||null===a){var c=r+4*o,l=e.matrixWorldInverse;u.getNormalMatrix(l),(null===a||a.length<c)&&(a=new Float32Array(c));for(var d=0,p=r;d!==o;++d,p+=4)s.copy(t[d]).applyMatrix4(l,u),s.normal.toArray(a,p),a[p+3]=s.constant}h.value=a,h.needsUpdate=!0}return n.numPlanes=o,a}var n=this,r=null,i=0,o=!1,a=!1,s=new v,u=new c,h={value:null,needsUpdate:!1};this.uniform=h,this.numPlanes=0,this.numIntersection=0,this.init=function(t,n,a){var s=0!==t.length||n||0!==i||o;return o=n,r=e(t,a,0),i=t.length,s},this.beginShadows=function(){a=!0,e(null)},this.endShadows=function(){a=!1,t()},this.setState=function(n,s,c,u,l,d){if(!o||null===n||0===n.length||a&&!c)a?e(null):t();else{var p=a?0:i,f=4*p,m=l.clippingState||null;h.value=m,m=e(n,u,f,d);for(var v=0;v!==f;++v)m[v]=r[v];l.clippingState=m,this.numIntersection=s?this.numPlanes:0,this.numPlanes+=p}}}function nt(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}function rt(t,e,n){function r(t){var i=t.target,o=s[i.id];null!==o.index&&e.remove(o.index);for(var a in o.attributes)e.remove(o.attributes[a]);i.removeEventListener("dispose",r),delete s[i.id];var u=c[i.id];u&&(e.remove(u),delete c[i.id]),u=c[o.id],u&&(e.remove(u),delete c[o.id]),n.memory.geometries--}function i(t,e){var i=s[e.id];return i||(e.addEventListener("dispose",r),e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new G).setFromObject(t)),i=e._bufferGeometry),s[e.id]=i,n.memory.geometries++,i)}function o(n){var r=n.index,i=n.attributes;null!==r&&e.update(r,t.ELEMENT_ARRAY_BUFFER);for(var o in i)e.update(i[o],t.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],c=0,u=s.length;c<u;c++)e.update(s[c],t.ARRAY_BUFFER)}function a(n){var r=c[n.id];if(r)return r;var i=[],o=n.index,a=n.attributes;if(null!==o)for(var s=o.array,u=0,h=s.length;u<h;u+=3){var l=s[u+0],d=s[u+1],p=s[u+2];i.push(l,d,d,p,p,l)}else for(var s=a.position.array,u=0,h=s.length/3-1;u<h;u+=3){var l=u+0,d=u+1,p=u+2;i.push(l,d,d,p,p,l)}return r=new(z(i)>65535?D:I)(i,1),e.update(r,t.ELEMENT_ARRAY_BUFFER),c[n.id]=r,r}var s={},c={};return{get:i,update:o,getWireframeAttribute:a}}function it(t,e,n){function r(t){s=t}function i(t){c=t.type,u=t.bytesPerElement}function o(e,r){t.drawElements(s,r,c,e*u),n.update(r,s)}function a(t,r,i){var o=e.get("ANGLE_instanced_arrays");if(null===o)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");o.drawElementsInstancedANGLE(s,i,c,r*u,t.maxInstancedCount),n.update(i,s,t.maxInstancedCount)}var s,c,u;this.setMode=r,this.setIndex=i,this.render=o,this.renderInstances=a}function ot(t){function e(e,n,r){switch(r=r||1,i.calls++,n){case t.TRIANGLES:i.triangles+=r*(e/3);break;case t.TRIANGLE_STRIP:case t.TRIANGLE_FAN:i.triangles+=r*(e-2);break;case t.LINES:i.lines+=r*(e/2);break;case t.LINE_STRIP:i.lines+=r*(e-1);break;case t.LINE_LOOP:i.lines+=r*e;break;case t.POINTS:i.points+=r*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}function n(){i.frame++,i.calls=0,i.triangles=0,i.points=0,i.lines=0}var r={geometries:0,textures:0},i={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:r,render:i,programs:null,autoReset:!0,reset:n,update:e}}function at(t,e){return Math.abs(e[1])-Math.abs(t[1])}function st(t){function e(e,i,o,a){var s=e.morphTargetInfluences,c=s.length,u=n[i.id];if(void 0===u){u=[];for(var h=0;h<c;h++)u[h]=[h,0];n[i.id]=u}for(var l=o.morphTargets&&i.morphAttributes.position,d=o.morphNormals&&i.morphAttributes.normal,h=0;h<c;h++){var p=u[h];0!==p[1]&&(l&&i.removeAttribute("morphTarget"+h),d&&i.removeAttribute("morphNormal"+h))}for(var h=0;h<c;h++){var p=u[h];p[0]=h,p[1]=s[h]}u.sort(at);for(var h=0;h<8;h++){var p=u[h];if(p){var f=p[0],m=p[1];if(m){l&&i.addAttribute("morphTarget"+h,l[f]),d&&i.addAttribute("morphNormal"+h,d[f]),r[h]=m;continue}}r[h]=0}a.getUniforms().setValue(t,"morphTargetInfluences",r)}var n={},r=new Float32Array(8);return{update:e}}function ct(t,e){function n(n){var r=e.render.frame,o=n.geometry,a=t.get(n,o);return i[a.id]!==r&&(o.isGeometry&&a.updateFromObject(n),t.update(a),i[a.id]=r),a}function r(){i={}}var i={};return{update:n,dispose:r}}function ut(t,e,n,r,i,o,a,s,c,h){t=void 0!==t?t:[],e=void 0!==e?e:as,u.call(this,t,e,n,r,i,o,a,s,c,h),this.flipY=!1}function ht(){this.seq=[],this.map={}}function lt(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=Xc[i];if(void 0===o&&(o=new Float32Array(i),Xc[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function dt(t,e){if(t.length!==e.length)return!1;for(var n=0,r=t.length;n<r;n++)if(t[n]!==e[n])return!1;return!0}function pt(t,e){for(var n=0,r=e.length;n<r;n++)t[n]=e[n]}function ft(t,e){var n=qc[e];void 0===n&&(n=new Int32Array(e),qc[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function mt(t,e){var n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),n[0]=e)}function vt(t,e){var n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),n[0]=e)}function gt(t,e){var n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y||(t.uniform2f(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(dt(n,e))return;t.uniform2fv(this.addr,e),pt(n,e)}}function yt(t,e){var n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z||(t.uniform3f(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else if(void 0!==e.r)n[0]===e.r&&n[1]===e.g&&n[2]===e.b||(t.uniform3f(this.addr,e.r,e.g,e.b),n[0]=e.r,n[1]=e.g,n[2]=e.b);else{if(dt(n,e))return;t.uniform3fv(this.addr,e),pt(n,e)}}function xt(t,e){var n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z&&n[3]===e.w||(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(dt(n,e))return;t.uniform4fv(this.addr,e),pt(n,e)}}function _t(t,e){var n=this.cache,r=e.elements;if(void 0===r){if(dt(n,e))return;t.uniformMatrix2fv(this.addr,!1,e),pt(n,e)}else{if(dt(n,r))return;Jc.set(r),t.uniformMatrix2fv(this.addr,!1,Jc),pt(n,r)}}function bt(t,e){var n=this.cache,r=e.elements;if(void 0===r){if(dt(n,e))return;t.uniformMatrix3fv(this.addr,!1,e),pt(n,e)}else{if(dt(n,r))return;Zc.set(r),t.uniformMatrix3fv(this.addr,!1,Zc),pt(n,r)}}function wt(t,e){var n=this.cache,r=e.elements;if(void 0===r){if(dt(n,e))return;t.uniformMatrix4fv(this.addr,!1,e),pt(n,e)}else{if(dt(n,r))return;Yc.set(r),t.uniformMatrix4fv(this.addr,!1,Yc),pt(n,r)}}function Mt(t,e,n){var r=this.cache,i=n.allocTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i),n.setTexture2D(e||jc,i)}function Et(t,e,n){var r=this.cache,i=n.allocTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i),n.setTextureCube(e||Wc,i)}function Tt(t,e){var n=this.cache;dt(n,e)||(t.uniform2iv(this.addr,e),pt(n,e))}function St(t,e){var n=this.cache;dt(n,e)||(t.uniform3iv(this.addr,e),pt(n,e))}function At(t,e){var n=this.cache;dt(n,e)||(t.uniform4iv(this.addr,e),pt(n,e))}function Rt(t){switch(t){case 5126:return mt;case 35664:return gt;case 35665:return yt;case 35666:return xt;case 35674:return _t;case 35675:return bt;case 35676:return wt;case 35678:case 36198:return Mt;case 35680:return Et;case 5124:case 35670:return vt;case 35667:case 35671:return Tt;case 35668:case 35672:return St;case 35669:case 35673:return At}}function Lt(t,e){var n=this.cache;dt(n,e)||(t.uniform1fv(this.addr,e),pt(n,e))}function Ct(t,e){var n=this.cache;dt(n,e)||(t.uniform1iv(this.addr,e),pt(n,e))}function Pt(t,e){var n=this.cache,r=lt(e,this.size,2);dt(n,r)||(t.uniform2fv(this.addr,r),this.updateCache(r))}function Ot(t,e){var n=this.cache,r=lt(e,this.size,3);dt(n,r)||(t.uniform3fv(this.addr,r),this.updateCache(r))}function It(t,e){var n=this.cache,r=lt(e,this.size,4);dt(n,r)||(t.uniform4fv(this.addr,r),this.updateCache(r))}function Nt(t,e){var n=this.cache,r=lt(e,this.size,4);dt(n,r)||(t.uniformMatrix2fv(this.addr,!1,r),this.updateCache(r))}function Dt(t,e){var n=this.cache,r=lt(e,this.size,9);dt(n,r)||(t.uniformMatrix3fv(this.addr,!1,r),this.updateCache(r))}function Ut(t,e){var n=this.cache,r=lt(e,this.size,16);dt(n,r)||(t.uniformMatrix4fv(this.addr,!1,r),this.updateCache(r))}function Bt(t,e,n){var r=this.cache,i=e.length,o=ft(n,i);!1===dt(r,o)&&(t.uniform1iv(this.addr,o),pt(r,o));for(var a=0;a!==i;++a)n.setTexture2D(e[a]||jc,o[a])}function Ft(t,e,n){var r=this.cache,i=e.length,o=ft(n,i);!1===dt(r,o)&&(t.uniform1iv(this.addr,o),pt(r,o));for(var a=0;a!==i;++a)n.setTextureCube(e[a]||Wc,o[a])}function zt(t){switch(t){case 5126:return Lt;case 35664:return Pt;case 35665:return Ot;case 35666:return It;case 35674:return Nt;case 35675:return Dt;case 35676:return Ut;case 35678:return Bt;case 35680:return Ft;case 5124:case 35670:return Ct;case 35667:case 35671:return Tt;case 35668:case 35672:return St;case 35669:case 35673:return At}}function Gt(t,e,n){this.id=t,this.addr=n,this.cache=[],this.setValue=Rt(e.type)}function Ht(t,e,n){this.id=t,this.addr=n,this.cache=[],this.size=e.size,this.setValue=zt(e.type)}function Vt(t){this.id=t,ht.call(this)}function kt(t,e){t.seq.push(e),t.map[e.id]=e}function jt(t,e,n){var r=t.name,i=r.length;for(Qc.lastIndex=0;;){var o=Qc.exec(r),a=Qc.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===i){kt(n,void 0===u?new Gt(s,t,e):new Ht(s,t,e));break}var h=n.map,l=h[s];void 0===l&&(l=new Vt(s),kt(n,l)),n=l}}function Wt(t,e,n){ht.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=t.getActiveUniform(e,i);jt(o,t.getUniformLocation(e,o.name),this)}}function Xt(t){for(var e=t.split("\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\n")}function qt(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!1===t.getShaderParameter(r,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn't compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),Xt(n)),r}function Yt(t){switch(t){case Mc:return["Linear","( value )"];case Ec:return["sRGB","( value )"];case Sc:return["RGBE","( value )"];case Rc:return["RGBM","( value, 7.0 )"];case Lc:return["RGBM","( value, 16.0 )"];case Cc:return["RGBD","( value, 256.0 )"];case Tc:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function Zt(t,e){var n=Yt(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function Jt(t,e){var n=Yt(e);return"vec4 "+t+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function Qt(t,e){var n;switch(e){case es:n="Linear";break;case ns:n="Reinhard";break;case rs:n="Uncharted2";break;case is:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Kt(t,e,n){return t=t||{},[t.derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(ee).join("\n")}function $t(t){var e=[];for(var n in t){var r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\n")}function te(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i),a=o.name;n[a]=t.getAttribLocation(e,a)}return n}function ee(t){return""!==t}function ne(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function re(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function ie(t){function e(t,e){var n=Dc[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return ie(n)}var n=/^[ \t]*#include +<([\w\d.]+)>/gm;return t.replace(n,e)}function oe(t){function e(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\[ i \]/g,"[ "+o+" ]");return i}var n=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;return t.replace(n,e)}function ae(t,e,n,r,i,o){var a=t.context,s=r.defines,c=i.vertexShader,u=i.fragmentShader,h="SHADOWMAP_TYPE_BASIC";o.shadowMapType===la?h="SHADOWMAP_TYPE_PCF":o.shadowMapType===da&&(h="SHADOWMAP_TYPE_PCF_SOFT");var l="ENVMAP_TYPE_CUBE",d="ENVMAP_MODE_REFLECTION",p="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case as:case ss:l="ENVMAP_TYPE_CUBE";break;case ls:case ds:l="ENVMAP_TYPE_CUBE_UV";break;case cs:case us:l="ENVMAP_TYPE_EQUIREC";break;case hs:l="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case ss:case us:d="ENVMAP_MODE_REFRACTION"}switch(r.combine){case Qa:p="ENVMAP_BLENDING_MULTIPLY";break;case Ka:p="ENVMAP_BLENDING_MIX";break;case $a:p="ENVMAP_BLENDING_ADD"}}var f,m,v=t.gammaFactor>0?t.gammaFactor:1,g=Kt(r.extensions,o,e),y=$t(s),x=a.createProgram();r.isRawShaderMaterial?(f=[y].filter(ee).join("\n"),f.length>0&&(f+="\n"),m=[g,y].filter(ee).join("\n"),m.length>0&&(m+="\n")):(f=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,y,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+v,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+d:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+h:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(ee).join("\n"),m=[g,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,y,o.alphaTest?"#define ALPHATEST "+o.alphaTest+(o.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+v,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+l:"",o.envMap?"#define "+d:"",o.envMap?"#define "+p:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+h:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&e.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==ts?"#define TONE_MAPPING":"",o.toneMapping!==ts?Dc.tonemapping_pars_fragment:"",o.toneMapping!==ts?Qt("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?Dc.encodings_pars_fragment:"",o.mapEncoding?Zt("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?Zt("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?Zt("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?Jt("linearToOutputTexel",o.outputEncoding):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\n"].filter(ee).join("\n")),c=ie(c),c=ne(c,o),c=re(c,o),u=ie(u),u=ne(u,o),u=re(u,o),c=oe(c),u=oe(u);var _=f+c,b=m+u,w=qt(a,a.VERTEX_SHADER,_),M=qt(a,a.FRAGMENT_SHADER,b);a.attachShader(x,w),a.attachShader(x,M),void 0!==r.index0AttributeName?a.bindAttribLocation(x,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(x,0,"position"),a.linkProgram(x);var E=a.getProgramInfoLog(x).trim(),T=a.getShaderInfoLog(w).trim(),S=a.getShaderInfoLog(M).trim(),A=!0,R=!0;!1===a.getProgramParameter(x,a.LINK_STATUS)?(A=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(x,a.VALIDATE_STATUS),"gl.getProgramInfoLog",E,T,S)):""!==E?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",E):""!==T&&""!==S||(R=!1),R&&(this.diagnostics={runnable:A,material:r,programLog:E,vertexShader:{log:T,prefix:f},fragmentShader:{log:S,prefix:m}}),a.deleteShader(w),a.deleteShader(M);var L;this.getUniforms=function(){return void 0===L&&(L=new Wt(a,x,t)),L};var C;return this.getAttributes=function(){return void 0===C&&(C=te(a,x)),C},this.destroy=function(){a.deleteProgram(x),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=i.name,this.id=Kc++,this.code=n,this.usedTimes=1,this.program=x,this.vertexShader=w,this.fragmentShader=M,this}function se(t,e,n){function r(t){var e=t.skeleton,r=e.bones;if(n.floatVertexTextures)return 1024;var i=n.maxVertexUniforms,o=Math.floor((i-20)/4),a=Math.min(o,r.length);return a<r.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+r.length+" bones. This GPU supports "+a+"."),0):a}function i(t,e){var n;return t?t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=Mc,n===Mc&&e&&(n=Tc),n}var o=[],a={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},s=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];this.getParameters=function(e,o,s,c,u,h,l){var d=a[e.type],p=l.isSkinnedMesh?r(l):0,f=n.precision;null!==e.precision&&(f=n.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",f,"instead.");var m=t.getRenderTarget();return{shaderID:d,precision:f,supportsVertexTextures:n.vertexTextures,outputEncoding:i(m?m.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:i(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:i(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(e.envMap.mapping===ls||e.envMap.mapping===ds),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:i(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!c,useFog:e.fog,fogExp:c&&c.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:e.skinning&&p>0,maxBones:p,useVertexTexture:n.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numRectAreaLights:o.rectArea.length,numHemiLights:o.hemi.length,numClippingPlanes:u,numClipIntersection:h,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&s.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===ma,flipSided:e.side===fa,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(e.fragmentShader),r.push(e.vertexShader)),void 0!==e.defines)for(var i in e.defines)r.push(i),r.push(e.defines[i]);for(var o=0;o<s.length;o++)r.push(n[s[o]]);return r.push(e.onBeforeCompile.toString()),r.push(t.gammaOutput),r.join()},this.acquireProgram=function(n,r,i,a){for(var s,c=0,u=o.length;c<u;c++){var h=o[c];if(h.code===a){s=h,++s.usedTimes;break}}return void 0===s&&(s=new ae(t,e,a,n,r,i),o.push(s)),s},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=o.indexOf(t);o[e]=o[o.length-1],o.pop(),t.destroy()}},this.programs=o}function ce(){function t(t){var e=i.get(t);return void 0===e&&(e={},i.set(t,e)),e}function e(t){i.delete(t)}function n(t,e,n){i.get(t)[e]=n}function r(){i=new WeakMap}var i=new WeakMap;return{get:t,remove:e,update:n,dispose:r}}function ue(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function he(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function le(){function t(){i=0,o.length=0,a.length=0}function e(t,e,n,s,c){var u=r[i];void 0===u?(u={id:t.id,object:t,geometry:e,material:n,program:n.program,renderOrder:t.renderOrder,z:s,group:c},r[i]=u):(u.id=t.id,u.object=t,u.geometry=e,u.material=n,u.program=n.program,u.renderOrder=t.renderOrder,u.z=s,u.group=c),(!0===n.transparent?a:o).push(u),i++}function n(){o.length>1&&o.sort(ue),a.length>1&&a.sort(he)}var r=[],i=0,o=[],a=[];return{opaque:o,transparent:a,init:t,push:e,sort:n}}function de(){function t(t,e){var r=t.id+","+e.id,i=n[r];return void 0===i&&(i=new le,n[r]=i),i}function e(){n={}}var n={};return{get:t,dispose:e}}function pe(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new s,color:new y,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new i};break;case"SpotLight":n={position:new s,direction:new s,color:new y,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new i};break;case"PointLight":n={position:new s,color:new y,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new i,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new s,skyColor:new y,groundColor:new y};break;case"RectAreaLight":n={color:new y,position:new s,halfWidth:new s,halfHeight:new s}}return t[e.id]=n,n}}}function fe(){function t(t,o,s){for(var c=0,u=0,h=0,l=0,d=0,p=0,f=0,m=0,v=s.matrixWorldInverse,g=0,y=t.length;g<y;g++){var x=t[g],_=x.color,b=x.intensity,w=x.distance,M=x.shadow&&x.shadow.map?x.shadow.map.texture:null;if(x.isAmbientLight)c+=_.r*b,u+=_.g*b,h+=_.b*b;else if(x.isDirectionalLight){var E=e.get(x);if(E.color.copy(x.color).multiplyScalar(x.intensity),E.direction.setFromMatrixPosition(x.matrixWorld),r.setFromMatrixPosition(x.target.matrixWorld),E.direction.sub(r),E.direction.transformDirection(v),E.shadow=x.castShadow,x.castShadow){var T=x.shadow;E.shadowBias=T.bias,E.shadowRadius=T.radius,E.shadowMapSize=T.mapSize}n.directionalShadowMap[l]=M,n.directionalShadowMatrix[l]=x.shadow.matrix,n.directional[l]=E,l++}else if(x.isSpotLight){var E=e.get(x);if(E.position.setFromMatrixPosition(x.matrixWorld),E.position.applyMatrix4(v),E.color.copy(_).multiplyScalar(b),E.distance=w,E.direction.setFromMatrixPosition(x.matrixWorld),r.setFromMatrixPosition(x.target.matrixWorld),E.direction.sub(r),E.direction.transformDirection(v),E.coneCos=Math.cos(x.angle),E.penumbraCos=Math.cos(x.angle*(1-x.penumbra)),E.decay=0===x.distance?0:x.decay,E.shadow=x.castShadow,x.castShadow){var T=x.shadow;E.shadowBias=T.bias,E.shadowRadius=T.radius,E.shadowMapSize=T.mapSize}n.spotShadowMap[p]=M,n.spotShadowMatrix[p]=x.shadow.matrix,n.spot[p]=E,p++}else if(x.isRectAreaLight){var E=e.get(x);E.color.copy(_).multiplyScalar(b),E.position.setFromMatrixPosition(x.matrixWorld),E.position.applyMatrix4(v),a.identity(),i.copy(x.matrixWorld),i.premultiply(v),a.extractRotation(i),E.halfWidth.set(.5*x.width,0,0),E.halfHeight.set(0,.5*x.height,0),E.halfWidth.applyMatrix4(a),E.halfHeight.applyMatrix4(a),n.rectArea[f]=E,f++}else if(x.isPointLight){var E=e.get(x);if(E.position.setFromMatrixPosition(x.matrixWorld),E.position.applyMatrix4(v),E.color.copy(x.color).multiplyScalar(x.intensity),E.distance=x.distance,E.decay=0===x.distance?0:x.decay,E.shadow=x.castShadow,x.castShadow){var T=x.shadow;E.shadowBias=T.bias,E.shadowRadius=T.radius,E.shadowMapSize=T.mapSize,E.shadowCameraNear=T.camera.near,E.shadowCameraFar=T.camera.far}n.pointShadowMap[d]=M,n.pointShadowMatrix[d]=x.shadow.matrix,n.point[d]=E,d++}else if(x.isHemisphereLight){var E=e.get(x);E.direction.setFromMatrixPosition(x.matrixWorld),E.direction.transformDirection(v),E.direction.normalize(),E.skyColor.copy(x.color).multiplyScalar(b),E.groundColor.copy(x.groundColor).multiplyScalar(b),n.hemi[m]=E,m++}}n.ambient[0]=c,n.ambient[1]=u,n.ambient[2]=h,n.directional.length=l,n.spot.length=p,n.rectArea.length=f,n.point.length=d,n.hemi.length=m,n.hash=n.id+","+l+","+d+","+p+","+f+","+m+","+o.length}var e=new pe,n={id:$c++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},r=new s,i=new o,a=new o;return{setup:t,state:n}}function me(){function t(){a.length=0,s.length=0,c.length=0}function e(t){a.push(t)}function n(t){s.push(t)}function r(t){c.push(t)}function i(t){o.setup(a,s,t)}var o=new fe,a=[],s=[],c=[];return{init:t,state:{lightsArray:a,shadowsArray:s,spritesArray:c,lights:o},setupLights:i,pushLight:e,pushShadow:n,pushSprite:r}}function ve(){function t(t,e){var r=t.id+","+e.id,i=n[r];return void 0===i&&(i=new me,n[r]=i),i}function e(){n={}}var n={};return{get:t,dispose:e}}function ge(t){W.call(this),this.type="MeshDepthMaterial",this.depthPacking=Pc,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function ye(t){W.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new s,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(t)}function xe(t,e,n){function r(e,n,r,i,o,a){var s=e.geometry,c=null,u=_,h=e.customDepthMaterial;if(r&&(u=b,h=e.customDistanceMaterial),h)c=h;else{var l=!1;n.morphTargets&&(s&&s.isBufferGeometry?l=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(l=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var d=e.isSkinnedMesh&&n.skinning,p=0;l&&(p|=v),d&&(p|=y),c=u[p]}if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var f=c.uuid,m=n.uuid,g=w[f];void 0===g&&(g={},w[f]=g);var x=g[m];void 0===x&&(x=c.clone(),g[m]=x),c=x}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:M[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,r&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(i),c.nearDistance=o,c.farDistance=a),c}function a(n,i,o,s){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||c.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var u=e.update(n),h=n.material;if(Array.isArray(h))for(var l=u.groups,d=0,p=l.length;d<p;d++){var f=l[d],v=h[f.materialIndex];if(v&&v.visible){var g=r(n,v,s,m,o.near,o.far);t.renderBufferDirect(o,null,u,g,n,f)}}else if(h.visible){var g=r(n,h,s,m,o.near,o.far);t.renderBufferDirect(o,null,u,g,n,null)}}for(var y=n.children,x=0,_=y.length;x<_;x++)a(y[x],i,o,s)}}for(var c=new g,u=new o,d=new i,p=new i(n,n),f=new s,m=new s,v=1,y=2,x=1+(v|y),_=new Array(x),b=new Array(x),w={},M={0:fa,1:pa,2:ma},E=[new s(1,0,0),new s(-1,0,0),new s(0,0,1),new s(0,0,-1),new s(0,1,0),new s(0,-1,0)],T=[new s(0,1,0),new s(0,1,0),new s(0,1,0),new s(0,1,0),new s(0,0,1),new s(0,0,-1)],S=[new h,new h,new h,new h,new h,new h],A=0;A!==x;++A){var R=0!=(A&v),L=0!=(A&y),C=new ge({depthPacking:Oc,morphTargets:R,skinning:L});_[A]=C;var P=new ye({morphTargets:R,skinning:L});b[A]=P}var O=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=la,this.render=function(e,n,r){if(!1!==O.enabled&&(!1!==O.autoUpdate||!1!==O.needsUpdate)&&0!==e.length){var i=t.context,o=t.state;o.disable(i.BLEND),o.buffers.color.setClear(1,1,1,1),o.buffers.depth.setTest(!0),o.setScissorTest(!1);for(var s,h=0,v=e.length;h<v;h++){var g=e[h],y=g.shadow,x=g&&g.isPointLight;if(void 0!==y){var _=y.camera;if(d.copy(y.mapSize),d.min(p),x){var b=d.x,w=d.y;S[0].set(2*b,w,b,w),S[1].set(0,w,b,w),S[2].set(3*b,w,b,w),S[3].set(b,w,b,w),S[4].set(3*b,0,b,w),S[5].set(b,0,b,w),d.x*=4,d.y*=2}if(null===y.map){var M={minFilter:vs,magFilter:vs,format:Us};y.map=new l(d.x,d.y,M),y.map.texture.name=g.name+".shadowMap",_.updateProjectionMatrix()}y.isSpotLightShadow&&y.update(g);var A=y.map,R=y.matrix;m.setFromMatrixPosition(g.matrixWorld),_.position.copy(m),x?(s=6,R.makeTranslation(-m.x,-m.y,-m.z)):(s=1,f.setFromMatrixPosition(g.target.matrixWorld),_.lookAt(f),_.updateMatrixWorld(),R.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),R.multiply(_.projectionMatrix),R.multiply(_.matrixWorldInverse)),t.setRenderTarget(A),t.clear();for(var L=0;L<s;L++){if(x){f.copy(_.position),f.add(E[L]),_.up.copy(T[L]),_.lookAt(f),_.updateMatrixWorld();var C=S[L];o.viewport(C)}u.multiplyMatrices(_.projectionMatrix,_.matrixWorldInverse),c.setFromMatrix(u),a(n,r,_,x)}}else console.warn("THREE.WebGLShadowMap:",g,"has no shadow.")}O.needsUpdate=!1}}}function _e(t,e,n,r,i,o,a,s,c){u.call(this,t,e,n,r,i,o,a,s,c),this.needsUpdate=!0}function be(t,e,n,r,i){function o(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);h=e.createBuffer(),l=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,h),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,l),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n,e.STATIC_DRAW),d=c(),p={position:e.getAttribLocation(d,"position"),uv:e.getAttribLocation(d,"uv")},f={uvOffset:e.getUniformLocation(d,"uvOffset"),uvScale:e.getUniformLocation(d,"uvScale"),rotation:e.getUniformLocation(d,"rotation"),center:e.getUniformLocation(d,"center"),scale:e.getUniformLocation(d,"scale"),color:e.getUniformLocation(d,"color"),map:e.getUniformLocation(d,"map"),opacity:e.getUniformLocation(d,"opacity"),modelViewMatrix:e.getUniformLocation(d,"modelViewMatrix"),projectionMatrix:e.getUniformLocation(d,"projectionMatrix"),fogType:e.getUniformLocation(d,"fogType"),fogDensity:e.getUniformLocation(d,"fogDensity"),fogNear:e.getUniformLocation(d,"fogNear"),fogFar:e.getUniformLocation(d,"fogFar"),fogColor:e.getUniformLocation(d,"fogColor"),fogDepth:e.getUniformLocation(d,"fogDepth"),alphaTest:e.getUniformLocation(d,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var i=r.getContext("2d");i.fillStyle="white",i.fillRect(0,0,8,8),m=new _e(r)}function c(){var t=e.createProgram(),n=e.createShader(e.VERTEX_SHADER),r=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\tvUV = uvOffset + uv * uvScale;","\tvec2 alignedPosition = ( position - center ) * scale;","\tvec2 rotatedPosition;","\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\tvec4 mvPosition;","\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\tmvPosition.xy += rotatedPosition;","\tgl_Position = projectionMatrix * mvPosition;","\tfogDepth = - mvPosition.z;","}"].join("\n")),e.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\tvec4 texture = texture2D( map, vUV );","\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\tif ( gl_FragColor.a < alphaTest ) discard;","\tif ( fogType > 0 ) {","\t\tfloat fogFactor = 0.0;","\t\tif ( fogType == 1 ) {","\t\t\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\t\t} else {","\t\t\tconst float LOG2 = 1.442695;","\t\t\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\t\t\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\t\t}","\t\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\t}","}"].join("\n")),e.compileShader(n),e.compileShader(r),e.attachShader(t,n),e.attachShader(t,r),e.linkProgram(t),t}function u(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}var h,l,d,p,f,m,v=new s,g=new a,y=new s;this.render=function(i,a,s){if(0!==i.length){void 0===d&&o(),n.useProgram(d),n.initAttributes(),n.enableAttribute(p.position),n.enableAttribute(p.uv),n.disableUnusedAttributes(),n.disable(e.CULL_FACE),n.enable(e.BLEND),e.bindBuffer(e.ARRAY_BUFFER,h),e.vertexAttribPointer(p.position,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(p.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,l),e.uniformMatrix4fv(f.projectionMatrix,!1,s.projectionMatrix.elements),n.activeTexture(e.TEXTURE0),e.uniform1i(f.map,0);var c=0,x=0,_=a.fog;_?(e.uniform3f(f.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(e.uniform1f(f.fogNear,_.near),e.uniform1f(f.fogFar,_.far),e.uniform1i(f.fogType,1),c=1,x=1):_.isFogExp2&&(e.uniform1f(f.fogDensity,_.density),e.uniform1i(f.fogType,2),c=2,x=2)):(e.uniform1i(f.fogType,0),c=0,x=0);for(var b=0,w=i.length;b<w;b++){var M=i[b];M.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse,M.matrixWorld),M.z=-M.modelViewMatrix.elements[14]}i.sort(u);for(var E=[],T=[],b=0,w=i.length;b<w;b++){var M=i[b],S=M.material;if(!1!==S.visible){M.onBeforeRender(t,a,s,void 0,S,void 0),e.uniform1f(f.alphaTest,S.alphaTest),e.uniformMatrix4fv(f.modelViewMatrix,!1,M.modelViewMatrix.elements),M.matrixWorld.decompose(v,g,y),E[0]=y.x,E[1]=y.y,T[0]=M.center.x-.5,T[1]=M.center.y-.5;var A=0;a.fog&&S.fog&&(A=x),c!==A&&(e.uniform1i(f.fogType,A),c=A),null!==S.map?(e.uniform2f(f.uvOffset,S.map.offset.x,S.map.offset.y),e.uniform2f(f.uvScale,S.map.repeat.x,S.map.repeat.y)):(e.uniform2f(f.uvOffset,0,0),e.uniform2f(f.uvScale,1,1)),e.uniform1f(f.opacity,S.opacity),e.uniform3f(f.color,S.color.r,S.color.g,S.color.b),e.uniform1f(f.rotation,S.rotation),e.uniform2fv(f.center,T),e.uniform2fv(f.scale,E),n.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst,S.blendEquationAlpha,S.blendSrcAlpha,S.blendDstAlpha,S.premultipliedAlpha),n.buffers.depth.setTest(S.depthTest),n.buffers.depth.setMask(S.depthWrite),n.buffers.color.setMask(S.colorWrite),r.setTexture2D(S.map||m,0),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),M.onAfterRender(t,a,s,void 0,S,void 0)}}n.enable(e.CULL_FACE),n.reset()}}}function we(t,e,n){function r(){var e=!1,n=new h,r=null,i=new h(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}}function i(){var e=!1,n=null,r=null,i=null;return{setTest:function(e){e?d(t.DEPTH_TEST):p(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case ka:t.depthFunc(t.NEVER);break;case ja:t.depthFunc(t.ALWAYS);break;case Wa:t.depthFunc(t.LESS);break;case Xa:t.depthFunc(t.LEQUAL);break;case qa:t.depthFunc(t.EQUAL);break;case Ya:t.depthFunc(t.GEQUAL);break;case Za:t.depthFunc(t.GREATER);break;case Ja:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}}function o(){var e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(e){e?d(t.STENCIL_TEST):p(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&c===r||(t.stencilOp(e,n,r),a=e,s=n,c=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}}function a(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}function s(){for(var t=0,e=N.length;t<e;t++)N[t]=0}function c(t){u(t,0)}function u(n,r){if(N[n]=1,0===D[n]&&(t.enableVertexAttribArray(n),D[n]=1),U[n]!==r){e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),U[n]=r}}function l(){for(var e=0,n=D.length;e!==n;++e)D[e]!==N[e]&&(t.disableVertexAttribArray(e),D[e]=0)}function d(e){!0!==B[e]&&(t.enable(e),B[e]=!0)}function p(e){!1!==B[e]&&(t.disable(e),B[e]=!1)}function f(){if(null===F&&(F=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)F.push(n[r]);return F}function m(e){return z!==e&&(t.useProgram(e),z=e,!0)}function v(e,r,i,o,a,s,c,u){if(e!==ba?d(t.BLEND):p(t.BLEND),e!==Sa){if(e!==G||u!==q)switch(e){case Ma:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE));break;case Ea:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR));break;case Ta:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR));break;default:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA))}H=null,V=null,k=null,j=null,W=null,X=null}else a=a||r,s=s||i,c=c||o,r===H&&a===j||(t.blendEquationSeparate(n.convert(r),n.convert(a)),H=r,j=a),i===V&&o===k&&s===W&&c===X||(t.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(c)),V=i,k=o,W=s,X=c);G=e,q=u}function g(e,n){e.side===ma?p(t.CULL_FACE):d(t.CULL_FACE);var r=e.side===fa;n&&(r=!r),y(r),!0===e.transparent?v(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):v(ba),P.setFunc(e.depthFunc),P.setTest(e.depthTest),P.setMask(e.depthWrite),C.setMask(e.colorWrite),b(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)}function y(e){Y!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),Y=e)}function x(e){e!==ia?(d(t.CULL_FACE),e!==Z&&(e===oa?t.cullFace(t.BACK):e===aa?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):p(t.CULL_FACE),Z=e}function _(e){e!==J&&(tt&&t.lineWidth(e),J=e)}function b(e,n,r){e?(d(t.POLYGON_OFFSET_FILL),Q===n&&K===r||(t.polygonOffset(n,r),Q=n,K=r)):p(t.POLYGON_OFFSET_FILL)}function w(e){e?d(t.SCISSOR_TEST):p(t.SCISSOR_TEST)}function M(e){void 0===e&&(e=t.TEXTURE0+$-1),rt!==e&&(t.activeTexture(e),rt=e)}function E(e,n){null===rt&&M();var r=it[rt];void 0===r&&(r={type:void 0,texture:void 0},it[rt]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||st[e]),r.type=e,r.texture=n)}function T(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}}function S(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}}function A(e){!1===ot.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),ot.copy(e))}function R(e){!1===at.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),at.copy(e))}function L(){for(var e=0;e<D.length;e++)1===D[e]&&(t.disableVertexAttribArray(e),D[e]=0);B={},F=null,rt=null,it={},z=null,G=null,Y=null,Z=null,C.reset(),P.reset(),O.reset()}var C=new r,P=new i,O=new o,I=t.getParameter(t.MAX_VERTEX_ATTRIBS),N=new Uint8Array(I),D=new Uint8Array(I),U=new Uint8Array(I),B={},F=null,z=null,G=null,H=null,V=null,k=null,j=null,W=null,X=null,q=!1,Y=null,Z=null,J=null,Q=null,K=null,$=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),tt=!1,et=0,nt=t.getParameter(t.VERSION);-1!==nt.indexOf("WebGL")?(et=parseFloat(/^WebGL\ ([0-9])/.exec(nt)[1]),tt=et>=1):-1!==nt.indexOf("OpenGL ES")&&(et=parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(nt)[1]),tt=et>=2);var rt=null,it={},ot=new h,at=new h,st={};return st[t.TEXTURE_2D]=a(t.TEXTURE_2D,t.TEXTURE_2D,1),st[t.TEXTURE_CUBE_MAP]=a(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),C.setClear(0,0,0,1),P.setClear(1),O.setClear(0),d(t.DEPTH_TEST),P.setFunc(Xa),y(!1),x(oa),d(t.CULL_FACE),d(t.BLEND),v(wa),{buffers:{color:C,depth:P,stencil:O},initAttributes:s,enableAttribute:c,enableAttributeAndDivisor:u,disableUnusedAttributes:l,enable:d,disable:p,getCompressedTextureFormats:f,useProgram:m,setBlending:v,setMaterial:g,setFlipSided:y,setCullFace:x,setLineWidth:_,setPolygonOffset:b,setScissorTest:w,activeTexture:M,bindTexture:E,compressedTexImage2D:T,texImage2D:S,scissor:A,viewport:R,reset:L}}function Me(t,e,n,r,i,o,a){function s(t,e){if(t.width>e||t.height>e){if("data"in t)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+t.width+"x"+t.height+").");var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n);return r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height,t),r}return t}function c(t){return Ic.isPowerOfTwo(t.width)&&Ic.isPowerOfTwo(t.height)}function u(t){if(t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap){void 0===C&&(C=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),C.width=Ic.floorPowerOfTwo(t.width),C.height=Ic.floorPowerOfTwo(t.height);return C.getContext("2d").drawImage(t,0,0,C.width,C.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+C.width+"x"+C.height,t),C}return t}function h(t){return t.wrapS!==fs||t.wrapT!==fs||t.minFilter!==vs&&t.minFilter!==xs}function l(t,e){return t.generateMipmaps&&e&&t.minFilter!==vs&&t.minFilter!==xs}function d(e,n,i,o){t.generateMipmap(e),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function p(e){return e===vs||e===gs||e===ys?t.NEAREST:t.LINEAR}function f(t){var e=t.target;e.removeEventListener("dispose",f),v(e),e.isVideoTexture&&delete O[e.id],a.memory.textures--}function m(t){var e=t.target;e.removeEventListener("dispose",m),g(e),a.memory.textures--}function v(e){var n=r.get(e);if(e.image&&n.__image__webglTextureCube)t.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture)}r.remove(e)}function g(e){var n=r.get(e),i=r.get(e.texture);if(e){if(void 0!==i.__webglTexture&&t.deleteTexture(i.__webglTexture),e.depthTexture&&e.depthTexture.dispose(),e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(e.texture),r.remove(e)}}function y(e,i){var o=r.get(e);if(e.isVideoTexture&&L(e),e.version>0&&o.__version!==e.version){var a=e.image;if(void 0===a)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==a.complete)return void w(o,e,i);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_2D,o.__webglTexture)}function x(e,u){var h=r.get(e);if(6===e.image.length)if(e.version>0&&h.__version!==e.version){h.__image__webglTextureCube||(e.addEventListener("dispose",f),h.__image__webglTextureCube=t.createTexture(),a.memory.textures++),n.activeTexture(t.TEXTURE0+u),n.bindTexture(t.TEXTURE_CUBE_MAP,h.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var p=e&&e.isCompressedTexture,m=e.image[0]&&e.image[0].isDataTexture,v=[],g=0;g<6;g++)v[g]=p||m?m?e.image[g].image:e.image[g]:s(e.image[g],i.maxCubemapSize);var y=v[0],x=c(y),_=o.convert(e.format),w=o.convert(e.type);b(t.TEXTURE_CUBE_MAP,e,x);for(var g=0;g<6;g++)if(p)for(var M,E=v[g].mipmaps,T=0,S=E.length;T<S;T++)M=E[T],e.format!==Us&&e.format!==Ds?n.getCompressedTextureFormats().indexOf(_)>-1?n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,T,_,M.width,M.height,0,M.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,T,_,M.width,M.height,0,_,w,M.data);else m?n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,_,v[g].width,v[g].height,0,_,w,v[g].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,_,_,w,v[g]);h.__maxMipLevel=p?E.length-1:0,l(e,x)&&d(t.TEXTURE_CUBE_MAP,e,y.width,y.height),h.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(t.TEXTURE0+u),n.bindTexture(t.TEXTURE_CUBE_MAP,h.__image__webglTextureCube)}function _(e,i){n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_CUBE_MAP,r.get(e).__webglTexture)}function b(n,a,s){var c;if(s?(t.texParameteri(n,t.TEXTURE_WRAP_S,o.convert(a.wrapS)),t.texParameteri(n,t.TEXTURE_WRAP_T,o.convert(a.wrapT)),t.texParameteri(n,t.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===fs&&a.wrapT===fs||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(n,t.TEXTURE_MAG_FILTER,p(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,p(a.minFilter)),a.minFilter!==vs&&a.minFilter!==xs&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=e.get("EXT_texture_filter_anisotropic")){if(a.type===Rs&&null===e.get("OES_texture_float_linear"))return;if(a.type===Ls&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(t.texParameterf(n,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function w(e,r,p){void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",f),e.__webglTexture=t.createTexture(),a.memory.textures++),n.activeTexture(t.TEXTURE0+p),n.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var m=s(r.image,i.maxTextureSize);h(r)&&!1===c(m)&&(m=u(m));var v=c(m),g=o.convert(r.format),y=o.convert(r.type);b(t.TEXTURE_2D,r,v);var x,_=r.mipmaps;if(r.isDepthTexture){var w=t.DEPTH_COMPONENT;if(r.type===Rs){if(!P)throw new Error("Float Depth Texture only supported in WebGL2.0");w=t.DEPTH_COMPONENT32F}else P&&(w=t.DEPTH_COMPONENT16);r.format===Gs&&w===t.DEPTH_COMPONENT&&r.type!==Ts&&r.type!==As&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Ts,y=o.convert(r.type)),r.format===Hs&&(w=t.DEPTH_STENCIL,r.type!==Is&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Is,y=o.convert(r.type))),n.texImage2D(t.TEXTURE_2D,0,w,m.width,m.height,0,g,y,null)}else if(r.isDataTexture)if(_.length>0&&v){for(var M=0,E=_.length;M<E;M++)x=_[M],n.texImage2D(t.TEXTURE_2D,M,g,x.width,x.height,0,g,y,x.data);r.generateMipmaps=!1,e.__maxMipLevel=_.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,m.width,m.height,0,g,y,m.data),e.__maxMipLevel=0;else if(r.isCompressedTexture){for(var M=0,E=_.length;M<E;M++)x=_[M],r.format!==Us&&r.format!==Ds?n.getCompressedTextureFormats().indexOf(g)>-1?n.compressedTexImage2D(t.TEXTURE_2D,M,g,x.width,x.height,0,x.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(t.TEXTURE_2D,M,g,x.width,x.height,0,g,y,x.data);e.__maxMipLevel=_.length-1}else if(_.length>0&&v){for(var M=0,E=_.length;M<E;M++)x=_[M],n.texImage2D(t.TEXTURE_2D,M,g,g,y,x);r.generateMipmaps=!1,e.__maxMipLevel=_.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,g,y,m),e.__maxMipLevel=0;l(r,v)&&d(t.TEXTURE_2D,r,m.width,m.height),e.__version=r.version,r.onUpdate&&r.onUpdate(r)}function M(e,i,a,s){var c=o.convert(i.texture.format),u=o.convert(i.texture.type);n.texImage2D(s,0,c,i.width,i.height,0,c,u,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function E(e,n){t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):n.depthBuffer&&n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,n.width,n.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function T(e,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),y(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Gs)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==Hs)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,i,0)}}function S(e){var n=r.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");T(n.__webglFramebuffer,e)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),E(n.__webglDepthbuffer[o],e)}else t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),E(n.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}function A(e){var i=r.get(e),o=r.get(e.texture);e.addEventListener("dispose",m),o.__webglTexture=t.createTexture(),a.memory.textures++;var s=!0===e.isWebGLRenderTargetCube,u=c(e);if(s){i.__webglFramebuffer=[];for(var h=0;h<6;h++)i.__webglFramebuffer[h]=t.createFramebuffer()}else i.__webglFramebuffer=t.createFramebuffer();if(s){n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture),b(t.TEXTURE_CUBE_MAP,e.texture,u);for(var h=0;h<6;h++)M(i.__webglFramebuffer[h],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+h);l(e.texture,u)&&d(t.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_CUBE_MAP,null)}else n.bindTexture(t.TEXTURE_2D,o.__webglTexture),b(t.TEXTURE_2D,e.texture,u),M(i.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),l(e.texture,u)&&d(t.TEXTURE_2D,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&S(e)}function R(e){var i=e.texture;if(l(i,c(e))){var o=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),d(o,i,e.width,e.height),n.bindTexture(o,null)}}function L(t){var e=t.id,n=a.render.frame;O[e]!==n&&(O[e]=n,t.update())}var C,P="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,O={};this.setTexture2D=y,this.setTextureCube=x,this.setTextureCubeDynamic=_,this.setupRenderTarget=A,this.updateRenderTargetMipmap=R}function Ee(t,e){function n(n){var r;if(n===ps)return t.REPEAT;if(n===fs)return t.CLAMP_TO_EDGE;if(n===ms)return t.MIRRORED_REPEAT;if(n===vs)return t.NEAREST;if(n===gs)return t.NEAREST_MIPMAP_NEAREST;if(n===ys)return t.NEAREST_MIPMAP_LINEAR;if(n===xs)return t.LINEAR;if(n===_s)return t.LINEAR_MIPMAP_NEAREST;if(n===bs)return t.LINEAR_MIPMAP_LINEAR;if(n===ws)return t.UNSIGNED_BYTE;if(n===Cs)return t.UNSIGNED_SHORT_4_4_4_4;if(n===Ps)return t.UNSIGNED_SHORT_5_5_5_1;if(n===Os)return t.UNSIGNED_SHORT_5_6_5;if(n===Ms)return t.BYTE;if(n===Es)return t.SHORT;if(n===Ts)return t.UNSIGNED_SHORT;if(n===Ss)return t.INT;if(n===As)return t.UNSIGNED_INT;if(n===Rs)return t.FLOAT;if(n===Ls&&null!==(r=e.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(n===Ns)return t.ALPHA;if(n===Ds)return t.RGB;if(n===Us)return t.RGBA;if(n===Bs)return t.LUMINANCE;if(n===Fs)return t.LUMINANCE_ALPHA;if(n===Gs)return t.DEPTH_COMPONENT;if(n===Hs)return t.DEPTH_STENCIL;if(n===Aa)return t.FUNC_ADD;if(n===Ra)return t.FUNC_SUBTRACT;if(n===La)return t.FUNC_REVERSE_SUBTRACT;if(n===Oa)return t.ZERO;if(n===Ia)return t.ONE;if(n===Na)return t.SRC_COLOR;if(n===Da)return t.ONE_MINUS_SRC_COLOR;if(n===Ua)return t.SRC_ALPHA;if(n===Ba)return t.ONE_MINUS_SRC_ALPHA;if(n===Fa)return t.DST_ALPHA;if(n===za)return t.ONE_MINUS_DST_ALPHA;if(n===Ga)return t.DST_COLOR;if(n===Ha)return t.ONE_MINUS_DST_COLOR;if(n===Va)return t.SRC_ALPHA_SATURATE;if((n===Vs||n===ks||n===js||n===Ws)&&null!==(r=e.get("WEBGL_compressed_texture_s3tc"))){if(n===Vs)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===ks)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===js)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Ws)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===Xs||n===qs||n===Ys||n===Zs)&&null!==(r=e.get("WEBGL_compressed_texture_pvrtc"))){if(n===Xs)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===qs)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Ys)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===Zs)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===Js&&null!==(r=e.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===Qs||n===Ks||n===$s||n===tc||n===ec||n===nc||n===rc||n===ic||n===oc||n===ac||n===sc||n===cc||n===uc||n===hc)&&null!==(r=e.get("WEBGL_compressed_texture_astc")))return n;if((n===Ca||n===Pa)&&null!==(r=e.get("EXT_blend_minmax"))){if(n===Ca)return r.MIN_EXT;if(n===Pa)return r.MAX_EXT}return n===Is&&null!==(r=e.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}return{convert:n}}function Te(t,e,n,r){E.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Se(t){Te.call(this),this.cameras=t||[]}function Ae(t){function e(){return null!==i&&!0===i.isPresenting}function n(){if(e()){var n=i.getEyeParameters("left"),o=n.renderWidth,a=n.renderHeight;b=t.getPixelRatio(),_=t.getSize(),t.setDrawingBufferSize(2*o,a,1),w.start()}else r.enabled&&(t.setDrawingBufferSize(_.width,_.height,b),w.stop())}var r=this,i=null,c=null,u=null,l=new o,d=new o;"undefined"!=typeof window&&"VRFrameData"in window&&(c=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",n,!1));var p=new o,f=new a,m=new s,v=new Te;v.bounds=new h(0,0,.5,1),v.layers.enable(1);var g=new Te;g.bounds=new h(.5,0,.5,1),g.layers.enable(2);var y=new Se([v,g]);y.layers.enable(1),y.layers.enable(2);var _,b;this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return i},this.setDevice=function(t){void 0!==t&&(i=t),w.setContext(t)},this.setPoseTarget=function(t){void 0!==t&&(u=t)},this.getCamera=function(t){if(null===i)return t;i.depthNear=t.near,i.depthFar=t.far,i.getFrameData(c);var e=i.stageParameters;e?l.fromArray(e.sittingToStandingTransform):l.makeTranslation(0,r.userHeight,0);var n=c.pose,o=null!==u?u:t;if(o.matrix.copy(l),o.matrix.decompose(o.position,o.quaternion,o.scale),null!==n.orientation&&(f.fromArray(n.orientation),o.quaternion.multiply(f)),null!==n.position&&(f.setFromRotationMatrix(l),m.fromArray(n.position),m.applyQuaternion(f),o.position.add(m)),o.updateMatrixWorld(),!1===i.isPresenting)return t;v.near=t.near,g.near=t.near,v.far=t.far,g.far=t.far,y.matrixWorld.copy(t.matrixWorld),y.matrixWorldInverse.copy(t.matrixWorldInverse),v.matrixWorldInverse.fromArray(c.leftViewMatrix),g.matrixWorldInverse.fromArray(c.rightViewMatrix),d.getInverse(l),v.matrixWorldInverse.multiply(d),g.matrixWorldInverse.multiply(d);var a=o.parent;null!==a&&(p.getInverse(a.matrixWorld),v.matrixWorldInverse.multiply(p),g.matrixWorldInverse.multiply(p)),v.matrixWorld.getInverse(v.matrixWorldInverse),g.matrixWorld.getInverse(g.matrixWorldInverse),v.projectionMatrix.fromArray(c.leftProjectionMatrix),g.projectionMatrix.fromArray(c.rightProjectionMatrix),y.projectionMatrix.copy(v.projectionMatrix);var s=i.getLayers();if(s.length){var h=s[0];null!==h.leftBounds&&4===h.leftBounds.length&&v.bounds.fromArray(h.leftBounds),null!==h.rightBounds&&4===h.rightBounds.length&&g.bounds.fromArray(h.rightBounds)}return y},this.getStandingMatrix=function(){return l},this.isPresenting=e;var w=new x;this.setAnimationLoop=function(t){w.setAnimationLoop(t)},this.submitFrame=function(){e()&&i.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",n)}}function Re(t){function e(){return null!==a&&null!==s}function n(t,e){null===e?t.matrixWorld.copy(t.matrix):t.matrixWorld.multiplyMatrices(e.matrixWorld,t.matrix),t.matrixWorldInverse.getInverse(t.matrixWorld)}function r(t,e){c=e.getDevicePose(s);for(var n=a.baseLayer,r=e.views,i=0;i<r.length;i++){var o=r[i],u=n.getViewport(o),h=c.getViewMatrix(o),l=d.cameras[i];l.matrix.fromArray(h).getInverse(l.matrix),l.projectionMatrix.fromArray(o.projectionMatrix),l.viewport.set(u.x,u.y,u.width,u.height),0===i&&(d.matrix.copy(l.matrix),d.projectionMatrix.copy(l.projectionMatrix))}p&&p()}var i=t.context,o=null,a=null,s=null,c=null,u=new Te;u.layers.enable(1),u.viewport=new h;var l=new Te;l.layers.enable(2),l.viewport=new h;var d=new Se([u,l]);d.layers.enable(1),d.layers.enable(2),this.enabled=!1,this.getDevice=function(){return o},this.setDevice=function(t){void 0!==t&&(o=t),i.setCompatibleXRDevice(t)},this.setSession=function(e,n){null!==(a=e)&&(a.addEventListener("end",function(){t.setFramebuffer(null),f.stop()}),a.baseLayer=new XRWebGLLayer(a,i),a.requestFrameOfReference(n.frameOfReferenceType).then(function(e){s=e,t.setFramebuffer(a.baseLayer.framebuffer),f.setContext(a),f.start()}))},this.getCamera=function(t){if(e()){var r=t.parent,i=d.cameras;n(d,r);for(var o=0;o<i.length;o++)n(i[o],r);t.matrixWorld.copy(d.matrixWorld);for(var a=t.children,o=0,s=a.length;o<s;o++)a[o].updateMatrixWorld(!0);return d}return t},this.isPresenting=e;var p=null,f=new x;f.setAnimationLoop(r),this.setAnimationLoop=function(t){p=t},this.getStandingMatrix=function(){return console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed."),new THREE.Matrix4},this.submitFrame=function(){}}function Le(t){function e(){return null===ut?bt:1}function n(){Ot=new nt(Z),Ot.get("WEBGL_depth_texture"),Ot.get("OES_texture_float"),Ot.get("OES_texture_float_linear"),Ot.get("OES_texture_half_float"),Ot.get("OES_texture_half_float_linear"),Ot.get("OES_standard_derivatives"),Ot.get("OES_element_index_uint"),Ot.get("ANGLE_instanced_arrays"),Jt=new Ee(Z,Ot),It=new tt(Z,Ot,t),Nt=new we(Z,Ot,Jt),Nt.scissor(vt.copy(Mt).multiplyScalar(bt)),Nt.viewport(mt.copy(wt).multiplyScalar(bt)),Dt=new ot(Z),Ut=new ce,Bt=new Me(Z,Ot,Nt,Ut,It,Jt,Dt),Ft=new _(Z),zt=new rt(Z,Ft,Dt),Gt=new ct(zt,Dt),Xt=new st(Z),Ht=new se(J,Ot,It),Vt=new de,kt=new ve,jt=new K(J,Nt,Gt,j),qt=new $(Z,Ot,Dt),Yt=new it(Z,Ot,Dt),Zt=new be(J,Z,Nt,Bt,It),Dt.programs=Ht.programs,J.context=Z,J.capabilities=It,J.extensions=Ot,J.properties=Ut,J.renderLists=Vt,J.state=Nt,J.info=Dt}function r(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),Q=!0}function i(){console.log("THREE.WebGLRenderer: Context Restored."),Q=!1,n()}function a(t){var e=t.target;e.removeEventListener("dispose",a),c(e)}function c(t){u(t),Ut.remove(t)}function u(t){var e=Ut.get(t).program;t.program=void 0,void 0!==e&&Ht.releaseProgram(e)}function l(t,e,n){t.render(function(t){J.renderBufferImmediate(t,e,n)})}function d(t,e,n){if(n&&n.isInstancedBufferGeometry&&null===Ot.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");Nt.initAttributes();var r=n.attributes,i=e.getAttributes(),o=t.defaultAttributeValues;for(var a in i){var s=i[a];if(s>=0){var c=r[a];if(void 0!==c){var u=c.normalized,h=c.itemSize,l=Ft.get(c);if(void 0===l)continue;var d=l.buffer,p=l.type,f=l.bytesPerElement;if(c.isInterleavedBufferAttribute){var m=c.data,v=m.stride,g=c.offset;m&&m.isInstancedInterleavedBuffer?(Nt.enableAttributeAndDivisor(s,m.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=m.meshPerAttribute*m.count)):Nt.enableAttribute(s),Z.bindBuffer(Z.ARRAY_BUFFER,d),Z.vertexAttribPointer(s,h,p,u,v*f,g*f)}else c.isInstancedBufferAttribute?(Nt.enableAttributeAndDivisor(s,c.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=c.meshPerAttribute*c.count)):Nt.enableAttribute(s),Z.bindBuffer(Z.ARRAY_BUFFER,d),Z.vertexAttribPointer(s,h,p,u,0,0)}else if(void 0!==o){var y=o[a];if(void 0!==y)switch(y.length){case 2:Z.vertexAttrib2fv(s,y);break;case 3:Z.vertexAttrib3fv(s,y);break;case 4:Z.vertexAttrib4fv(s,y);break;default:Z.vertexAttrib1fv(s,y)}}}}Nt.disableUnusedAttributes()}function f(){Qt.isPresenting()||$t&&$t()}function m(t,e,n){if(!1!==t.visible){if(t.layers.test(e.layers))if(t.isLight)Y.pushLight(t),t.castShadow&&Y.pushShadow(t);else if(t.isSprite)t.frustumCulled&&!Tt.intersectsSprite(t)||Y.pushSprite(t);else if(t.isImmediateRenderObject)n&&Ct.setFromMatrixPosition(t.matrixWorld).applyMatrix4(Lt),q.push(t,null,t.material,Ct.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.update(),!t.frustumCulled||Tt.intersectsObject(t))){n&&Ct.setFromMatrixPosition(t.matrixWorld).applyMatrix4(Lt);var r=Gt.update(t),i=t.material;if(Array.isArray(i))for(var o=r.groups,a=0,s=o.length;a<s;a++){var c=o[a],u=i[c.materialIndex];u&&u.visible&&q.push(t,r,u,Ct.z,c)}else i.visible&&q.push(t,r,i,Ct.z,null)}for(var h=t.children,a=0,s=h.length;a<s;a++)m(h[a],e,n)}}function v(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,c=a.geometry,u=void 0===r?a.material:r,h=a.group;if(n.isArrayCamera){ft=n;for(var l=n.cameras,d=0,p=l.length;d<p;d++){var f=l[d];if(s.layers.test(f.layers)){if("viewport"in f)Nt.viewport(mt.copy(f.viewport));else{var m=f.bounds,v=m.x*xt,g=m.y*_t,x=m.z*xt,_=m.w*_t;Nt.viewport(mt.set(v,g,x,_).multiplyScalar(bt))}y(s,e,f,c,u,h)}}}else ft=null,y(s,e,n,c,u,h)}}function y(t,e,n,r,i,o){if(t.onBeforeRender(J,e,n,r,i,o),Y=kt.get(e,ft||n),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){var a=t.isMesh&&t.matrixWorld.determinant()<0;Nt.setMaterial(i,a);var s=w(n,e.fog,i,t);dt="",l(t,s,i)}else J.renderBufferDirect(n,e.fog,r,i,t,o);t.onAfterRender(J,e,n,r,i,o),Y=kt.get(e,ft||n)}function b(t,e,n){var r=Ut.get(t),i=Y.state.lights,o=Y.state.shadowsArray,s=Ht.getParameters(t,i.state,o,e,St.numPlanes,St.numIntersection,n),c=Ht.getProgramCode(t,s),h=r.program,l=!0;if(void 0===h)t.addEventListener("dispose",a);else if(h.code!==c)u(t);else if(r.lightsHash!==i.state.hash)Ut.update(t,"lightsHash",i.state.hash),l=!1;else{if(void 0!==s.shaderID)return;l=!1}if(l){if(s.shaderID){var d=zc[s.shaderID];r.shader={name:t.type,uniforms:Uc.clone(d.uniforms),vertexShader:d.vertexShader,fragmentShader:d.fragmentShader}}else r.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(r.shader,J),h=Ht.acquireProgram(t,r.shader,s,c),r.program=h,t.program=h}var p=h.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var f=0;f<J.maxMorphTargets;f++)p["morphTarget"+f]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(var f=0;f<J.maxMorphNormals;f++)p["morphNormal"+f]>=0&&t.numSupportedMorphNormals++}var m=r.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(r.numClippingPlanes=St.numPlanes,r.numIntersection=St.numIntersection,m.clippingPlanes=St.uniform),r.fog=e,r.lightsHash=i.state.hash,t.lights&&(m.ambientLightColor.value=i.state.ambient,m.directionalLights.value=i.state.directional,m.spotLights.value=i.state.spot,m.rectAreaLights.value=i.state.rectArea,m.pointLights.value=i.state.point,m.hemisphereLights.value=i.state.hemi,m.directionalShadowMap.value=i.state.directionalShadowMap,m.directionalShadowMatrix.value=i.state.directionalShadowMatrix,m.spotShadowMap.value=i.state.spotShadowMap,m.spotShadowMatrix.value=i.state.spotShadowMatrix,m.pointShadowMap.value=i.state.pointShadowMap,m.pointShadowMatrix.value=i.state.pointShadowMatrix);var v=r.program.getUniforms(),g=Wt.seqWithValue(v.seq,m);r.uniformsList=g}function w(t,e,n,r){yt=0;var i=Ut.get(n),o=Y.state.lights;if(At&&(Rt||t!==pt)){var a=t===pt&&n.id===lt;St.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,i,a)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:n.lights&&i.lightsHash!==o.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===St.numPlanes&&i.numIntersection===St.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(b(n,e,r),n.needsUpdate=!1);var s=!1,c=!1,u=!1,h=i.program,l=h.getUniforms(),d=i.shader.uniforms;if(Nt.useProgram(h.program)&&(s=!0,c=!0,u=!0),n.id!==lt&&(lt=n.id,c=!0),s||t!==pt){if(l.setValue(Z,"projectionMatrix",t.projectionMatrix),It.logarithmicDepthBuffer&&l.setValue(Z,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),pt!==(ft||t)&&(pt=ft||t,c=!0,u=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var f=l.map.cameraPosition;void 0!==f&&f.setValue(Z,Ct.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&l.setValue(Z,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){l.setOptional(Z,r,"bindMatrix"),l.setOptional(Z,r,"bindMatrixInverse");var m=r.skeleton;if(m){var v=m.bones;if(It.floatVertexTextures){if(void 0===m.boneTexture){var g=Math.sqrt(4*v.length);g=Ic.ceilPowerOfTwo(g),g=Math.max(g,4);var y=new Float32Array(g*g*4);y.set(m.boneMatrices);var x=new p(y,g,g,Us,Rs);x.needsUpdate=!0,m.boneMatrices=y,m.boneTexture=x,m.boneTextureSize=g}l.setValue(Z,"boneTexture",m.boneTexture),l.setValue(Z,"boneTextureSize",m.boneTextureSize)}else l.setOptional(Z,m,"boneMatrices")}}return c&&(l.setValue(Z,"toneMappingExposure",J.toneMappingExposure),l.setValue(Z,"toneMappingWhitePoint",J.toneMappingWhitePoint),n.lights&&U(d,u),e&&n.fog&&A(d,e),n.isMeshBasicMaterial?M(d,n):n.isMeshLambertMaterial?(M(d,n),R(d,n)):n.isMeshPhongMaterial?(M(d,n),n.isMeshToonMaterial?C(d,n):L(d,n)):n.isMeshStandardMaterial?(M(d,n),n.isMeshPhysicalMaterial?O(d,n):P(d,n)):n.isMeshDepthMaterial?(M(d,n),I(d,n)):n.isMeshDistanceMaterial?(M(d,n),N(d,n)):n.isMeshNormalMaterial?(M(d,n),D(d,n)):n.isLineBasicMaterial?(E(d,n),n.isLineDashedMaterial&&T(d,n)):n.isPointsMaterial?S(d,n):n.isShadowMaterial&&(d.color.value=n.color,d.opacity.value=n.opacity),void 0!==d.ltc_1&&(d.ltc_1.value=Fc.LTC_1),void 0!==d.ltc_2&&(d.ltc_2.value=Fc.LTC_2),Wt.upload(Z,i.uniformsList,d,J)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(Wt.upload(Z,i.uniformsList,d,J),n.uniformsNeedUpdate=!1),l.setValue(Z,"modelViewMatrix",r.modelViewMatrix),l.setValue(Z,"normalMatrix",r.normalMatrix),l.setValue(Z,"modelMatrix",r.matrixWorld),h}function M(t,e){t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=Ut.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity);var n;e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}function E(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}function T(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}function S(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*bt,t.scale.value=.5*_t,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}function A(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}function R(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}function L(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===fa&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===fa&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function C(t,e){L(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}function P(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===fa&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===fa&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}function O(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,P(t,e)}function I(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function N(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}function D(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===fa&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===fa&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function U(t,e){t.ambientLightColor.needsUpdate=e,t.directionalLights.needsUpdate=e,t.pointLights.needsUpdate=e,t.spotLights.needsUpdate=e,t.rectAreaLights.needsUpdate=e,t.hemisphereLights.needsUpdate=e}function B(){var t=yt;return t>=It.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+It.maxTextures),yt+=1,t}console.log("THREE.WebGLRenderer",na),t=t||{};var F=void 0!==t.canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),z=void 0!==t.context?t.context:null,G=void 0!==t.alpha&&t.alpha,H=void 0===t.depth||t.depth,V=void 0===t.stencil||t.stencil,k=void 0!==t.antialias&&t.antialias,j=void 0===t.premultipliedAlpha||t.premultipliedAlpha,W=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,X=void 0!==t.powerPreference?t.powerPreference:"default",q=null,Y=null;this.domElement=F,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=es,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var Z,J=this,Q=!1,at=null,ut=null,ht=null,lt=-1,dt="",pt=null,ft=null,mt=new h,vt=new h,gt=null,yt=0,xt=F.width,_t=F.height,bt=1,wt=new h(0,0,xt,_t),Mt=new h(0,0,xt,_t),Et=!1,Tt=new g,St=new et,At=!1,Rt=!1,Lt=new o,Ct=new s;try{var Pt={alpha:G,depth:H,stencil:V,antialias:k,premultipliedAlpha:j,preserveDrawingBuffer:W,powerPreference:X};if(F.addEventListener("webglcontextlost",r,!1),F.addEventListener("webglcontextrestored",i,!1),null===(Z=z||F.getContext("webgl",Pt)||F.getContext("experimental-webgl",Pt)))throw null!==F.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===Z.getShaderPrecisionFormat&&(Z.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){console.error("THREE.WebGLRenderer: "+t.message)}var Ot,It,Nt,Dt,Ut,Bt,Ft,zt,Gt,Ht,Vt,kt,jt,Xt,qt,Yt,Zt,Jt;n();var Qt="xr"in navigator?new Re(J):new Ae(J);this.vr=Qt;var Kt=new xe(J,Gt,It.maxTextureSize);this.shadowMap=Kt,this.getContext=function(){return Z},this.getContextAttributes=function(){return Z.getContextAttributes()},this.forceContextLoss=function(){var t=Ot.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=Ot.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return bt},this.setPixelRatio=function(t){void 0!==t&&(bt=t,this.setSize(xt,_t,!1))},this.getSize=function(){return{width:xt,height:_t}},this.setSize=function(t,e,n){if(Qt.isPresenting())return void console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");xt=t,_t=e,F.width=t*bt,F.height=e*bt,!1!==n&&(F.style.width=t+"px",F.style.height=e+"px"),this.setViewport(0,0,t,e)},this.getDrawingBufferSize=function(){return{width:xt*bt,height:_t*bt}},this.setDrawingBufferSize=function(t,e,n){xt=t,_t=e,bt=n,F.width=t*n,F.height=e*n,this.setViewport(0,0,t,e)},this.getCurrentViewport=function(){return mt},this.setViewport=function(t,e,n,r){wt.set(t,_t-e-r,n,r),Nt.viewport(mt.copy(wt).multiplyScalar(bt))},this.setScissor=function(t,e,n,r){Mt.set(t,_t-e-r,n,r),Nt.scissor(vt.copy(Mt).multiplyScalar(bt))},this.setScissorTest=function(t){Nt.setScissorTest(Et=t)},this.getClearColor=function(){return jt.getClearColor()},this.setClearColor=function(){jt.setClearColor.apply(jt,arguments)},this.getClearAlpha=function(){return jt.getClearAlpha()},this.setClearAlpha=function(){jt.setClearAlpha.apply(jt,arguments)},this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=Z.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=Z.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=Z.STENCIL_BUFFER_BIT),Z.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.dispose=function(){F.removeEventListener("webglcontextlost",r,!1),F.removeEventListener("webglcontextrestored",i,!1),Vt.dispose(),kt.dispose(),Ut.dispose(),Gt.dispose(),Qt.dispose(),te.stop()},this.renderBufferImmediate=function(t,e,n){Nt.initAttributes();var r=Ut.get(t);t.hasPositions&&!r.position&&(r.position=Z.createBuffer()),t.hasNormals&&!r.normal&&(r.normal=Z.createBuffer()),t.hasUvs&&!r.uv&&(r.uv=Z.createBuffer()),t.hasColors&&!r.color&&(r.color=Z.createBuffer());var i=e.getAttributes();if(t.hasPositions&&(Z.bindBuffer(Z.ARRAY_BUFFER,r.position),Z.bufferData(Z.ARRAY_BUFFER,t.positionArray,Z.DYNAMIC_DRAW),Nt.enableAttribute(i.position),Z.vertexAttribPointer(i.position,3,Z.FLOAT,!1,0,0)),t.hasNormals){if(Z.bindBuffer(Z.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*t.count;o<a;o+=9){var s=t.normalArray,c=(s[o+0]+s[o+3]+s[o+6])/3,u=(s[o+1]+s[o+4]+s[o+7])/3,h=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=c,s[o+1]=u,s[o+2]=h,s[o+3]=c,s[o+4]=u,s[o+5]=h,s[o+6]=c,s[o+7]=u,s[o+8]=h}Z.bufferData(Z.ARRAY_BUFFER,t.normalArray,Z.DYNAMIC_DRAW),Nt.enableAttribute(i.normal),Z.vertexAttribPointer(i.normal,3,Z.FLOAT,!1,0,0)}t.hasUvs&&n.map&&(Z.bindBuffer(Z.ARRAY_BUFFER,r.uv),Z.bufferData(Z.ARRAY_BUFFER,t.uvArray,Z.DYNAMIC_DRAW),Nt.enableAttribute(i.uv),Z.vertexAttribPointer(i.uv,2,Z.FLOAT,!1,0,0)),t.hasColors&&n.vertexColors!==ya&&(Z.bindBuffer(Z.ARRAY_BUFFER,r.color),Z.bufferData(Z.ARRAY_BUFFER,t.colorArray,Z.DYNAMIC_DRAW),Nt.enableAttribute(i.color),Z.vertexAttribPointer(i.color,3,Z.FLOAT,!1,0,0)),Nt.disableUnusedAttributes(),Z.drawArrays(Z.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,n,r,i,o,a){var s=o.isMesh&&o.matrixWorld.determinant()<0;Nt.setMaterial(i,s);var c=w(t,n,i,o),u=r.id+"_"+c.id+"_"+(!0===i.wireframe),h=!1;u!==dt&&(dt=u,h=!0),o.morphTargetInfluences&&(Xt.update(o,r,i,c),h=!0);var l=r.index,p=r.attributes.position,f=1;!0===i.wireframe&&(l=zt.getWireframeAttribute(r),f=2);var m,v=qt;null!==l&&(m=Ft.get(l),v=Yt,v.setIndex(m)),h&&(d(i,c,r),null!==l&&Z.bindBuffer(Z.ELEMENT_ARRAY_BUFFER,m.buffer));var g=1/0;null!==l?g=l.count:void 0!==p&&(g=p.count);var y=r.drawRange.start*f,x=r.drawRange.count*f,_=null!==a?a.start*f:0,b=null!==a?a.count*f:1/0,M=Math.max(y,_),E=Math.min(g,y+x,_+b)-1,T=Math.max(0,E-M+1);if(0!==T){if(o.isMesh)if(!0===i.wireframe)Nt.setLineWidth(i.wireframeLinewidth*e()),v.setMode(Z.LINES);else switch(o.drawMode){case _c:v.setMode(Z.TRIANGLES);break;case bc:v.setMode(Z.TRIANGLE_STRIP);break;case wc:v.setMode(Z.TRIANGLE_FAN)}else if(o.isLine){var S=i.linewidth;void 0===S&&(S=1),Nt.setLineWidth(S*e()),o.isLineSegments?v.setMode(Z.LINES):o.isLineLoop?v.setMode(Z.LINE_LOOP):v.setMode(Z.LINE_STRIP)}else o.isPoints&&v.setMode(Z.POINTS);r&&r.isInstancedBufferGeometry?r.maxInstancedCount>0&&v.renderInstances(r,M,T):v.render(M,T)}},this.compile=function(t,e){Y=kt.get(t,e),Y.init(),t.traverse(function(t){t.isLight&&(Y.pushLight(t),t.castShadow&&Y.pushShadow(t))}),Y.setupLights(e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)b(e.material[n],t.fog,e);else b(e.material,t.fog,e)})};var $t=null,te=new x;te.setAnimationLoop(f),te.setContext(window),this.setAnimationLoop=function(t){$t=t,Qt.setAnimationLoop(t),te.start()},this.render=function(t,e,n,r){if(!e||!e.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!Q){dt="",lt=-1,pt=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),Qt.enabled&&(e=Qt.getCamera(e)),Y=kt.get(t,e),Y.init(),t.onBeforeRender(J,t,e,n),Lt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),Tt.setFromMatrix(Lt),Rt=this.localClippingEnabled,At=St.init(this.clippingPlanes,Rt,e),q=Vt.get(t,e),q.init(),m(t,e,J.sortObjects),!0===J.sortObjects&&q.sort(),At&&St.beginShadows();var i=Y.state.shadowsArray;Kt.render(i,t,e),Y.setupLights(e),At&&St.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),jt.render(q,t,e,r);var o=q.opaque,a=q.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;o.length&&v(o,t,e,s),a.length&&v(a,t,e,s)}else o.length&&v(o,t,e),a.length&&v(a,t,e);var c=Y.state.spritesArray;Zt.render(c,t,e),n&&Bt.updateRenderTargetMipmap(n),Nt.buffers.depth.setTest(!0),Nt.buffers.depth.setMask(!0),Nt.buffers.color.setMask(!0),Nt.setPolygonOffset(!1),t.onAfterRender(J,t,e),Qt.enabled&&Qt.submitFrame(),q=null,Y=null}},this.allocTextureUnit=B,this.setTexture2D=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTarget&&(t||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),Bt.setTexture2D(e,n)}}(),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),Bt.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?Bt.setTextureCube(e,n):Bt.setTextureCubeDynamic(e,n)}}(),this.setFramebuffer=function(t){at=t},this.getRenderTarget=function(){return ut},this.setRenderTarget=function(t){ut=t,t&&void 0===Ut.get(t).__webglFramebuffer&&Bt.setupRenderTarget(t);var e=at,n=!1;if(t){var r=Ut.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=r[t.activeCubeFace],n=!0):e=r,mt.copy(t.viewport),vt.copy(t.scissor),gt=t.scissorTest}else mt.copy(wt).multiplyScalar(bt),vt.copy(Mt).multiplyScalar(bt),gt=Et;if(ht!==e&&(Z.bindFramebuffer(Z.FRAMEBUFFER,e),ht=e),Nt.viewport(mt),Nt.scissor(vt),Nt.setScissorTest(gt),n){var i=Ut.get(t.texture);Z.framebufferTexture2D(Z.FRAMEBUFFER,Z.COLOR_ATTACHMENT0,Z.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if(!t||!t.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");var a=Ut.get(t).__webglFramebuffer;if(a){var s=!1;a!==ht&&(Z.bindFramebuffer(Z.FRAMEBUFFER,a),s=!0);try{var c=t.texture,u=c.format,h=c.type;if(u!==Us&&Jt.convert(u)!==Z.getParameter(Z.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(h===ws||Jt.convert(h)===Z.getParameter(Z.IMPLEMENTATION_COLOR_READ_TYPE)||h===Rs&&(Ot.get("OES_texture_float")||Ot.get("WEBGL_color_buffer_float"))||h===Ls&&Ot.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");Z.checkFramebufferStatus(Z.FRAMEBUFFER)===Z.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&Z.readPixels(e,n,r,i,Jt.convert(u),Jt.convert(h),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&Z.bindFramebuffer(Z.FRAMEBUFFER,ht)}}},this.copyFramebufferToTexture=function(t,e,n){var r=e.image.width,i=e.image.height,o=Jt.convert(e.format);this.setTexture2D(e,0),Z.copyTexImage2D(Z.TEXTURE_2D,n||0,o,t.x,t.y,r,i,0)},this.copyTextureToTexture=function(t,e,n,r){var i=e.image.width,o=e.image.height,a=Jt.convert(n.format),s=Jt.convert(n.type);this.setTexture2D(n,0),e.isDataTexture?Z.texSubImage2D(Z.TEXTURE_2D,r||0,t.x,t.y,i,o,a,s,e.image.data):Z.texSubImage2D(Z.TEXTURE_2D,r||0,t.x,t.y,a,s,e.image)}}function Ce(t,e){this.name="",this.color=new y(t),this.density=void 0!==e?e:25e-5}function Pe(t,e,n){this.name="",this.color=new y(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function Oe(){M.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Ie(t){W.call(this),this.type="SpriteMaterial",this.color=new y(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Ne(t){M.call(this),this.type="Sprite",this.material=void 0!==t?t:new Ie,this.center=new i(.5,.5)}function De(){M.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Ue(t,e){if(t=t||[],this.bones=t.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),void 0===e)this.calculateInverses();else if(this.bones.length===e.length)this.boneInverses=e.slice(0);else{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new o)}}function Be(){M.call(this),this.type="Bone"}function Fe(t,e){Q.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new o,this.bindMatrixInverse=new o;var n=this.initBones(),r=new Ue(n);this.bind(r,this.matrixWorld),this.normalizeSkinWeights()}function ze(t){W.call(this),this.type="LineBasicMaterial",this.color=new y(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function Ge(t,e,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new He(t,e);M.call(this),this.type="Line",this.geometry=void 0!==t?t:new G,this.material=void 0!==e?e:new ze({color:16777215*Math.random()})}function He(t,e){Ge.call(this,t,e),this.type="LineSegments"}function Ve(t,e){Ge.call(this,t,e),this.type="LineLoop"}function ke(t){W.call(this),this.type="PointsMaterial",this.color=new y(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function je(t,e){M.call(this),this.type="Points",this.geometry=void 0!==t?t:new G,this.material=void 0!==e?e:new ke({color:16777215*Math.random()})}function We(){M.call(this),this.type="Group"}function Xe(t,e,n,r,i,o,a,s,c){u.call(this,t,e,n,r,i,o,a,s,c),this.generateMipmaps=!1}function qe(t,e,n,r,i,o,a,s,c,h,l,d){u.call(this,null,o,a,s,c,h,r,i,l,d),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function Ye(t,e,n,r,i,o,a,s,c,h){if((h=void 0!==h?h:Gs)!==Gs&&h!==Hs)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&h===Gs&&(n=Ts),void 0===n&&h===Hs&&(n=Is),u.call(this,null,r,i,o,a,s,h,n,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:vs,this.minFilter=void 0!==s?s:vs,this.flipY=!1,this.generateMipmaps=!1}function Ze(t){G.call(this),this.type="WireframeGeometry";var e,n,r,i,o,a,c,u,h,l,d=[],p=[0,0],f={},m=["a","b","c"];if(t&&t.isGeometry){var v=t.faces;for(e=0,r=v.length;e<r;e++){var g=v[e];for(n=0;n<3;n++)c=g[m[n]],u=g[m[(n+1)%3]],p[0]=Math.min(c,u),p[1]=Math.max(c,u),h=p[0]+","+p[1],void 0===f[h]&&(f[h]={index1:p[0],index2:p[1]})}for(h in f)a=f[h],l=t.vertices[a.index1],d.push(l.x,l.y,l.z),l=t.vertices[a.index2],d.push(l.x,l.y,l.z)}else if(t&&t.isBufferGeometry){var y,x,_,b,w,M,E,T;if(l=new s,null!==t.index){for(y=t.attributes.position,x=t.index,_=t.groups,0===_.length&&(_=[{start:0,count:x.count,materialIndex:0}]),i=0,o=_.length;i<o;++i)for(b=_[i],w=b.start,M=b.count,e=w,r=w+M;e<r;e+=3)for(n=0;n<3;n++)c=x.getX(e+n),u=x.getX(e+(n+1)%3),p[0]=Math.min(c,u),p[1]=Math.max(c,u),h=p[0]+","+p[1],void 0===f[h]&&(f[h]={index1:p[0],index2:p[1]});for(h in f)a=f[h],l.fromBufferAttribute(y,a.index1),d.push(l.x,l.y,l.z),l.fromBufferAttribute(y,a.index2),d.push(l.x,l.y,l.z)}else for(y=t.attributes.position,e=0,r=y.count/3;e<r;e++)for(n=0;n<3;n++)E=3*e+n,l.fromBufferAttribute(y,E),d.push(l.x,l.y,l.z),T=3*e+(n+1)%3,l.fromBufferAttribute(y,T),d.push(l.x,l.y,l.z)}this.addAttribute("position",new U(d,3))}function Je(t,e,n){A.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new Qe(t,e,n)),this.mergeVertices()}function Qe(t,e,n){G.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var r,i,o=[],a=[],c=[],u=[],h=new s,l=new s,d=new s,p=new s,f=new s;t.length<3&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var m=e+1;for(r=0;r<=n;r++){var v=r/n;for(i=0;i<=e;i++){var g=i/e;t(g,v,l),a.push(l.x,l.y,l.z),g-1e-5>=0?(t(g-1e-5,v,d),p.subVectors(l,d)):(t(g+1e-5,v,d),p.subVectors(d,l)),v-1e-5>=0?(t(g,v-1e-5,d),f.subVectors(l,d)):(t(g,v+1e-5,d),f.subVectors(d,l)),h.crossVectors(p,f).normalize(),c.push(h.x,h.y,h.z),u.push(g,v)}}for(r=0;r<n;r++)for(i=0;i<e;i++){var y=r*m+i,x=r*m+i+1,_=(r+1)*m+i+1,b=(r+1)*m+i;o.push(y,x,b),o.push(x,_,b)}this.setIndex(o),this.addAttribute("position",new U(a,3)),this.addAttribute("normal",new U(c,3)),this.addAttribute("uv",new U(u,2))}function Ke(t,e,n,r){A.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},this.fromBufferGeometry(new $e(t,e,n,r)),this.mergeVertices()}function $e(t,e,n,r){function o(t,e,n,r){var i,o,a=Math.pow(2,r),s=[];for(i=0;i<=a;i++){s[i]=[];var u=t.clone().lerp(n,i/a),h=e.clone().lerp(n,i/a),l=a-i;for(o=0;o<=l;o++)s[i][o]=0===o&&i===a?u:u.clone().lerp(h,o/l)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var d=Math.floor(o/2);o%2==0?(c(s[i][d+1]),c(s[i+1][d]),c(s[i][d])):(c(s[i][d+1]),c(s[i+1][d+1]),c(s[i+1][d]))}}function a(){for(var t=0;t<m.length;t+=6){var e=m[t+0],n=m[t+2],r=m[t+4],i=Math.max(e,n,r),o=Math.min(e,n,r);i>.9&&o<.1&&(e<.2&&(m[t+0]+=1),n<.2&&(m[t+2]+=1),r<.2&&(m[t+4]+=1))}}function c(t){f.push(t.x,t.y,t.z)}function u(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function h(){for(var t=new s,e=new s,n=new s,r=new s,o=new i,a=new i,c=new i,u=0,h=0;u<f.length;u+=9,h+=6){t.set(f[u+0],f[u+1],f[u+2]),e.set(f[u+3],f[u+4],f[u+5]),n.set(f[u+6],f[u+7],f[u+8]),o.set(m[h+0],m[h+1]),a.set(m[h+2],m[h+3]),c.set(m[h+4],m[h+5]),r.copy(t).add(e).add(n).divideScalar(3);var p=d(r);l(o,h+0,t,p),l(a,h+2,e,p),l(c,h+4,n,p)}}function l(t,e,n,r){r<0&&1===t.x&&(m[e]=t.x-1),0===n.x&&0===n.z&&(m[e]=r/2/Math.PI+.5)}function d(t){return Math.atan2(t.z,-t.x)}function p(t){return Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))}G.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1,r=r||0;var f=[],m=[];!function(t){for(var n=new s,r=new s,i=new s,a=0;a<e.length;a+=3)u(e[a+0],n),u(e[a+1],r),u(e[a+2],i),o(n,r,i,t)}(r),function(t){for(var e=new s,n=0;n<f.length;n+=3)e.x=f[n+0],e.y=f[n+1],e.z=f[n+2],e.normalize().multiplyScalar(t),f[n+0]=e.x,f[n+1]=e.y,f[n+2]=e.z}(n),function(){for(var t=new s,e=0;e<f.length;e+=3){t.x=f[e+0],t.y=f[e+1],t.z=f[e+2];var n=d(t)/2/Math.PI+.5,r=p(t)/Math.PI+.5;m.push(n,1-r)}h(),a()}(),this.addAttribute("position",new U(f,3)),this.addAttribute("normal",new U(f.slice(),3)),this.addAttribute("uv",new U(m,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function tn(t,e){A.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new en(t,e)),this.mergeVertices()}function en(t,e){var n=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],r=[2,1,0,0,3,2,1,3,0,2,3,1];$e.call(this,n,r,t,e),this.type="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function nn(t,e){A.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new rn(t,e)),this.mergeVertices()}function rn(t,e){var n=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],r=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];$e.call(this,n,r,t,e),this.type="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function on(t,e){A.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new an(t,e)),this.mergeVertices()}function an(t,e){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],i=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];$e.call(this,r,i,t,e),this.type="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function sn(t,e){A.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new cn(t,e)),this.mergeVertices()}function cn(t,e){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],o=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];$e.call(this,i,o,t,e),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function un(t,e,n,r,i,o){A.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new hn(t,e,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function hn(t,e,n,r,o){function a(i){v=t.getPointAt(i/e,v);var o=h.normals[i],a=h.binormals[i];for(d=0;d<=r;d++){var s=d/r*Math.PI*2,c=Math.sin(s),u=-Math.cos(s);f.x=u*o.x+c*a.x,f.y=u*o.y+c*a.y,f.z=u*o.z+c*a.z,f.normalize(),y.push(f.x,f.y,f.z),p.x=v.x+n*f.x,p.y=v.y+n*f.y,p.z=v.z+n*f.z,g.push(p.x,p.y,p.z)}}function c(){for(d=1;d<=e;d++)for(l=1;l<=r;l++){var t=(r+1)*(d-1)+(l-1),n=(r+1)*d+(l-1),i=(r+1)*d+l,o=(r+1)*(d-1)+l;_.push(t,n,o),_.push(n,i,o)}}function u(){for(l=0;l<=e;l++)for(d=0;d<=r;d++)m.x=l/e,m.y=d/r,x.push(m.x,m.y)}G.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:o},e=e||64,n=n||1,r=r||8,o=o||!1;var h=t.computeFrenetFrames(e,o);this.tangents=h.tangents,this.normals=h.normals,this.binormals=h.binormals;var l,d,p=new s,f=new s,m=new i,v=new s,g=[],y=[],x=[],_=[];!function(){for(l=0;l<e;l++)a(l);a(!1===o?e:0),u(),c()}(),this.setIndex(_),this.addAttribute("position",new U(g,3)),this.addAttribute("normal",new U(y,3)),this.addAttribute("uv",new U(x,2))}function ln(t,e,n,r,i,o,a){A.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new dn(t,e,n,r,i,o)),this.mergeVertices()}function dn(t,e,n,r,i,o){function a(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}G.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},t=t||1,e=e||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var c,u,h=[],l=[],d=[],p=[],f=new s,m=new s,v=new s,g=new s,y=new s,x=new s,_=new s;for(c=0;c<=n;++c){var b=c/n*i*Math.PI*2;for(a(b,i,o,t,v),a(b+.01,i,o,t,g),x.subVectors(g,v),_.addVectors(g,v),y.crossVectors(x,_),_.crossVectors(y,x),y.normalize(),_.normalize(),u=0;u<=r;++u){var w=u/r*Math.PI*2,M=-e*Math.cos(w),E=e*Math.sin(w);f.x=v.x+(M*_.x+E*y.x),f.y=v.y+(M*_.y+E*y.y),f.z=v.z+(M*_.z+E*y.z),l.push(f.x,f.y,f.z),m.subVectors(f,v).normalize(),d.push(m.x,m.y,m.z),p.push(c/n),p.push(u/r)}}for(u=1;u<=n;u++)for(c=1;c<=r;c++){var T=(r+1)*(u-1)+(c-1),S=(r+1)*u+(c-1),A=(r+1)*u+c,R=(r+1)*(u-1)+c;h.push(T,S,R),h.push(S,A,R)}this.setIndex(h),this.addAttribute("position",new U(l,3)),this.addAttribute("normal",new U(d,3)),this.addAttribute("uv",new U(p,2))}function pn(t,e,n,r,i){A.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new fn(t,e,n,r,i)),this.mergeVertices()}function fn(t,e,n,r,i){G.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||1,e=e||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,c=[],u=[],h=[],l=[],d=new s,p=new s,f=new s;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var m=a/r*i,v=o/n*Math.PI*2;p.x=(t+e*Math.cos(v))*Math.cos(m),p.y=(t+e*Math.cos(v))*Math.sin(m),p.z=e*Math.sin(v),u.push(p.x,p.y,p.z),d.x=t*Math.cos(m),d.y=t*Math.sin(m),f.subVectors(p,d).normalize(),h.push(f.x,f.y,f.z),l.push(a/r),l.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var g=(r+1)*o+a-1,y=(r+1)*(o-1)+a-1,x=(r+1)*(o-1)+a,_=(r+1)*o+a;c.push(g,y,_),c.push(y,x,_)}this.setIndex(c),this.addAttribute("position",new U(u,3)),this.addAttribute("normal",new U(h,3)),this.addAttribute("uv",new U(l,2))}function mn(t,e,n,r,i){var o,a;if(i===Vn(t,e,n,r)>0)for(o=e;o<n;o+=r)a=zn(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=zn(o,t[o],t[o+1],a);return a&&In(a,a.next)&&(Gn(a),a=a.next),a}function vn(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!In(r,r.next)&&0!==On(r.prev,r,r.next))r=r.next;else{if(Gn(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function gn(t,e,n,r,i,o,a){if(t){!a&&o&&Sn(t,r,i,o);for(var s,c,u=t;t.prev!==t.next;)if(s=t.prev,c=t.next,o?xn(t,r,i,o):yn(t))e.push(s.i/n),e.push(t.i/n),e.push(c.i/n),Gn(t),t=c.next,u=c.next;else if((t=c)===u){a?1===a?(t=_n(t,e,n),gn(t,e,n,r,i,o,2)):2===a&&bn(t,e,n,r,i,o):gn(vn(t),e,n,r,i,o,1);break}}}function yn(t){var e=t.prev,n=t,r=t.next;if(On(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Cn(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&On(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function xn(t,e,n,r){var i=t.prev,o=t,a=t.next;if(On(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,h=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,l=Rn(s,c,e,n,r),d=Rn(u,h,e,n,r),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&Cn(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&On(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=l;){if(p!==t.prev&&p!==t.next&&Cn(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&On(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function _n(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!In(i,o)&&Nn(i,r,r.next,o)&&Un(i,o)&&Un(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Gn(r),Gn(r.next),r=t=o),r=r.next}while(r!==t);return r}function bn(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Pn(a,s)){var c=Fn(a,s);return a=vn(a,a.next),c=vn(c,c.next),gn(a,e,n,r,i,o),void gn(c,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function wn(t,e,n,r){var i,o,a,s,c,u=[];for(i=0,o=e.length;i<o;i++)a=e[i]*r,s=i<o-1?e[i+1]*r:t.length,c=mn(t,a,s,r,!1),c===c.next&&(c.steiner=!0),u.push(Ln(c));for(u.sort(Mn),i=0;i<u.length;i++)En(u[i],n),n=vn(n,n.next);return n}function Mn(t,e){return t.x-e.x}function En(t,e){if(e=Tn(t,e)){var n=Fn(e,t);vn(n,n.next)}}function Tn(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var c,u=n,h=n.x,l=n.y,d=1/0;for(r=n.next;r!==u;)i>=r.x&&r.x>=h&&i!==r.x&&Cn(o<l?i:a,o,h,l,o<l?a:i,o,r.x,r.y)&&((c=Math.abs(o-r.y)/(i-r.x))<d||c===d&&r.x>n.x)&&Un(r,t)&&(n=r,d=c),r=r.next;return n}function Sn(t,e,n,r){var i=t;do{null===i.z&&(i.z=Rn(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,An(i)}function An(t){var e,n,r,i,o,a,s,c,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<u&&(s++,r=r.nextZ);e++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1);return t}function Rn(t,e,n,r,i){return t=32767*(t-n)*i,e=32767*(e-r)*i,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function Ln(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function Cn(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Pn(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!Dn(t,e)&&Un(t,e)&&Un(e,t)&&Bn(t,e)}function On(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function In(t,e){return t.x===e.x&&t.y===e.y}function Nn(t,e,n,r){return!!(In(t,e)&&In(n,r)||In(t,r)&&In(n,e))||On(t,e,n)>0!=On(t,e,r)>0&&On(n,r,t)>0!=On(n,r,e)>0}function Dn(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&Nn(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function Un(t,e){return On(t.prev,t,t.next)<0?On(t,e,t.next)>=0&&On(t,t.prev,e)>=0:On(t,e,t.prev)<0||On(t,t.next,e)<0}function Bn(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}function Fn(t,e){var n=new Hn(t.i,t.x,t.y),r=new Hn(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function zn(t,e,n,r){var i=new Hn(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Gn(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Hn(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Vn(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}function kn(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function jn(t,e){for(var n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}function Wn(t,e){A.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new Xn(t,e)),this.mergeVertices()}function Xn(t,e){G.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];for(var n=this,r=[],o=[],a=0,c=t.length;a<c;a++){var u=t[a];!function(t){function a(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}function c(t,e,n){var r,o,a,s=t.x-e.x,c=t.y-e.y,u=n.x-t.x,h=n.y-t.y,l=s*s+c*c,d=s*h-c*u;if(Math.abs(d)>Number.EPSILON){var p=Math.sqrt(l),f=Math.sqrt(u*u+h*h),m=e.x-c/p,v=e.y+s/p,g=n.x-h/f,y=n.y+u/f,x=((g-m)*h-(y-v)*u)/(s*h-c*u);r=m+s*x-t.x,o=v+c*x-t.y;var _=r*r+o*o;if(_<=2)return new i(r,o);a=Math.sqrt(_/2)}else{var b=!1;s>Number.EPSILON?u>Number.EPSILON&&(b=!0):s<-Number.EPSILON?u<-Number.EPSILON&&(b=!0):Math.sign(c)===Math.sign(h)&&(b=!0),b?(r=-c,o=s,a=Math.sqrt(l)):(r=s,o=c,a=Math.sqrt(l/2))}return new i(r/a,o/a)}function u(t,e){var n,r;for(Y=t.length;--Y>=0;){n=Y,(r=Y-1)<0&&(r=t.length-1);var i=0,o=g+2*w;for(i=0;i<o;i++){var a=W*i,s=W*(i+1);d(e+n+a,e+r+a,e+r+s,e+n+s)}}}function h(t,e,n){m.push(t),m.push(e),m.push(n)}function l(t,e,i){p(t),p(e),p(i);var o=r.length/3,a=E.generateTopUV(n,r,o-3,o-2,o-1);f(a[0]),f(a[1]),f(a[2])}function d(t,e,i,o){p(t),p(e),p(o),p(e),p(i),p(o);var a=r.length/3,s=E.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);f(s[0]),f(s[1]),f(s[3]),f(s[1]),f(s[2]),f(s[3])}function p(t){r.push(m[3*t+0]),r.push(m[3*t+1]),r.push(m[3*t+2])}function f(t){o.push(t.x),o.push(t.y)}var m=[],v=void 0!==e.curveSegments?e.curveSegments:12,g=void 0!==e.steps?e.steps:1,y=void 0!==e.depth?e.depth:100,x=void 0===e.bevelEnabled||e.bevelEnabled,_=void 0!==e.bevelThickness?e.bevelThickness:6,b=void 0!==e.bevelSize?e.bevelSize:_-2,w=void 0!==e.bevelSegments?e.bevelSegments:3,M=e.extrudePath,E=void 0!==e.UVGenerator?e.UVGenerator:nu;void 0!==e.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),y=e.amount);var T,S,A,R,L,C=!1;M&&(T=M.getSpacedPoints(g),C=!0,x=!1,S=M.computeFrenetFrames(g,!1),A=new s,R=new s,L=new s),x||(w=0,_=0,b=0);var P,O,I,N=t.extractPoints(v),D=N.shape,U=N.holes;if(!eu.isClockWise(D))for(D=D.reverse(),O=0,I=U.length;O<I;O++)P=U[O],eu.isClockWise(P)&&(U[O]=P.reverse());var B=eu.triangulateShape(D,U),F=D;for(O=0,I=U.length;O<I;O++)P=U[O],D=D.concat(P);for(var z,G,H,V,k,j,W=D.length,X=B.length,q=[],Y=0,Z=F.length,J=Z-1,Q=Y+1;Y<Z;Y++,J++,Q++)J===Z&&(J=0),Q===Z&&(Q=0),q[Y]=c(F[Y],F[J],F[Q]);var K,$=[],tt=q.concat();for(O=0,I=U.length;O<I;O++){for(P=U[O],K=[],Y=0,Z=P.length,J=Z-1,Q=Y+1;Y<Z;Y++,J++,Q++)J===Z&&(J=0),Q===Z&&(Q=0),K[Y]=c(P[Y],P[J],P[Q]);$.push(K),tt=tt.concat(K)}for(z=0;z<w;z++){for(H=z/w,V=_*Math.cos(H*Math.PI/2),G=b*Math.sin(H*Math.PI/2),Y=0,Z=F.length;Y<Z;Y++)k=a(F[Y],q[Y],G),h(k.x,k.y,-V);for(O=0,I=U.length;O<I;O++)for(P=U[O],K=$[O],Y=0,Z=P.length;Y<Z;Y++)k=a(P[Y],K[Y],G),h(k.x,k.y,-V)}for(G=b,Y=0;Y<W;Y++)k=x?a(D[Y],tt[Y],G):D[Y],C?(R.copy(S.normals[0]).multiplyScalar(k.x),A.copy(S.binormals[0]).multiplyScalar(k.y),L.copy(T[0]).add(R).add(A),h(L.x,L.y,L.z)):h(k.x,k.y,0);var et;for(et=1;et<=g;et++)for(Y=0;Y<W;Y++)k=x?a(D[Y],tt[Y],G):D[Y],C?(R.copy(S.normals[et]).multiplyScalar(k.x),A.copy(S.binormals[et]).multiplyScalar(k.y),L.copy(T[et]).add(R).add(A),h(L.x,L.y,L.z)):h(k.x,k.y,y/g*et);for(z=w-1;z>=0;z--){for(H=z/w,V=_*Math.cos(H*Math.PI/2),G=b*Math.sin(H*Math.PI/2),Y=0,Z=F.length;Y<Z;Y++)k=a(F[Y],q[Y],G),h(k.x,k.y,y+V);for(O=0,I=U.length;O<I;O++)for(P=U[O],K=$[O],Y=0,Z=P.length;Y<Z;Y++)k=a(P[Y],K[Y],G),C?h(k.x,k.y+T[g-1].y,T[g-1].x+V):h(k.x,k.y,y+V)}!function(){var t=r.length/3;if(x){var e=0,i=W*e;for(Y=0;Y<X;Y++)j=B[Y],l(j[2]+i,j[1]+i,j[0]+i);for(e=g+2*w,i=W*e,Y=0;Y<X;Y++)j=B[Y],l(j[0]+i,j[1]+i,j[2]+i)}else{for(Y=0;Y<X;Y++)j=B[Y],l(j[2],j[1],j[0]);for(Y=0;Y<X;Y++)j=B[Y],l(j[0]+W*g,j[1]+W*g,j[2]+W*g)}n.addGroup(t,r.length/3-t,0)}(),function(){var t=r.length/3,e=0;for(u(F,e),e+=F.length,O=0,I=U.length;O<I;O++)P=U[O],u(P,e),e+=P.length;n.addGroup(t,r.length/3-t,1)}()}(u)}this.addAttribute("position",new U(r,3)),this.addAttribute("uv",new U(o,2)),this.computeVertexNormals()}function qn(t,e,n){if(n.shapes=[],Array.isArray(t))for(var r=0,i=t.length;r<i;r++){var o=t[r];n.shapes.push(o.uuid)}else n.shapes.push(t.uuid);return void 0!==e.extrudePath&&(n.options.extrudePath=e.extrudePath.toJSON()),n}function Yn(t,e){A.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new Zn(t,e)),this.mergeVertices()}function Zn(t,e){e=e||{};var n=e.font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new A;var r=n.generateShapes(t,e.size,e.curveSegments);e.depth=void 0!==e.height?e.height:50,void 0===e.bevelThickness&&(e.bevelThickness=10),void 0===e.bevelSize&&(e.bevelSize=8),void 0===e.bevelEnabled&&(e.bevelEnabled=!1),Xn.call(this,r,e),this.type="TextBufferGeometry"}function Jn(t,e,n,r,i,o,a){A.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new Qn(t,e,n,r,i,o,a)),this.mergeVertices()}function Qn(t,e,n,r,i,o,a){G.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||1,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI,o=void 0!==o?o:0,a=void 0!==a?a:Math.PI;var c,u,h=o+a,l=0,d=[],p=new s,f=new s,m=[],v=[],g=[],y=[];for(u=0;u<=n;u++){var x=[],_=u/n;for(c=0;c<=e;c++){var b=c/e;p.x=-t*Math.cos(r+b*i)*Math.sin(o+_*a),p.y=t*Math.cos(o+_*a),p.z=t*Math.sin(r+b*i)*Math.sin(o+_*a),v.push(p.x,p.y,p.z),f.set(p.x,p.y,p.z).normalize(),g.push(f.x,f.y,f.z),y.push(b,1-_),x.push(l++)}d.push(x)}for(u=0;u<n;u++)for(c=0;c<e;c++){var w=d[u][c+1],M=d[u][c],E=d[u+1][c],T=d[u+1][c+1];(0!==u||o>0)&&m.push(w,M,T),(u!==n-1||h<Math.PI)&&m.push(M,E,T)}this.setIndex(m),this.addAttribute("position",new U(v,3)),this.addAttribute("normal",new U(g,3)),this.addAttribute("uv",new U(y,2))}function Kn(t,e,n,r,i,o){A.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new $n(t,e,n,r,i,o)),this.mergeVertices()}function $n(t,e,n,r,o,a){G.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:o,thetaLength:a},t=t||.5,e=e||1,o=void 0!==o?o:0,a=void 0!==a?a:2*Math.PI,n=void 0!==n?Math.max(3,n):8,r=void 0!==r?Math.max(1,r):1;var c,u,h,l=[],d=[],p=[],f=[],m=t,v=(e-t)/r,g=new s,y=new i;for(u=0;u<=r;u++){for(h=0;h<=n;h++)c=o+h/n*a,g.x=m*Math.cos(c),g.y=m*Math.sin(c),d.push(g.x,g.y,g.z),p.push(0,0,1),y.x=(g.x/e+1)/2,y.y=(g.y/e+1)/2,f.push(y.x,y.y);m+=v}for(u=0;u<r;u++){var x=u*(n+1);for(h=0;h<n;h++){c=h+x;var _=c,b=c+n+1,w=c+n+2,M=c+1;l.push(_,b,M),l.push(b,w,M)}}this.setIndex(l),this.addAttribute("position",new U(d,3)),this.addAttribute("normal",new U(p,3)),this.addAttribute("uv",new U(f,2))}function tr(t,e,n,r){A.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new er(t,e,n,r)),this.mergeVertices()}function er(t,e,n,r){G.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e)||12,n=n||0,r=r||2*Math.PI,r=Ic.clamp(r,0,2*Math.PI);var o,a,c,u=[],h=[],l=[],d=1/e,p=new s,f=new i;for(a=0;a<=e;a++){var m=n+a*d*r,v=Math.sin(m),g=Math.cos(m);for(c=0;c<=t.length-1;c++)p.x=t[c].x*v,p.y=t[c].y,p.z=t[c].x*g,h.push(p.x,p.y,p.z),f.x=a/e,f.y=c/(t.length-1),l.push(f.x,f.y)}for(a=0;a<e;a++)for(c=0;c<t.length-1;c++){o=c+a*t.length;var y=o,x=o+t.length,_=o+t.length+1,b=o+1;u.push(y,x,b),u.push(x,_,b)}if(this.setIndex(u),this.addAttribute("position",new U(h,3)),this.addAttribute("uv",new U(l,2)),this.computeVertexNormals(),r===2*Math.PI){var w=this.attributes.normal.array,M=new s,E=new s,T=new s;for(o=e*t.length*3,a=0,c=0;a<t.length;a++,c+=3)M.x=w[c+0],M.y=w[c+1],M.z=w[c+2],E.x=w[o+c+0],E.y=w[o+c+1],E.z=w[o+c+2],T.addVectors(M,E).normalize(),w[c+0]=w[o+c+0]=T.x,w[c+1]=w[o+c+1]=T.y,w[c+2]=w[o+c+2]=T.z}}function nr(t,e){A.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new rr(t,e)),this.mergeVertices()}function rr(t,e){function n(t){var n,s,u,h=i.length/3,l=t.extractPoints(e),d=l.shape,p=l.holes;if(!1===eu.isClockWise(d))for(d=d.reverse(),n=0,s=p.length;n<s;n++)u=p[n],!0===eu.isClockWise(u)&&(p[n]=u.reverse());var f=eu.triangulateShape(d,p);for(n=0,s=p.length;n<s;n++)u=p[n],d=d.concat(u);for(n=0,s=d.length;n<s;n++){var m=d[n];i.push(m.x,m.y,0),o.push(0,0,1),a.push(m.x,m.y)}for(n=0,s=f.length;n<s;n++){var v=f[n],g=v[0]+h,y=v[1]+h,x=v[2]+h;r.push(g,y,x),c+=3}}G.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var r=[],i=[],o=[],a=[],s=0,c=0;if(!1===Array.isArray(t))n(t);else for(var u=0;u<t.length;u++)n(t[u]),this.addGroup(s,c,u),s+=c,c=0;this.setIndex(r),this.addAttribute("position",new U(i,3)),this.addAttribute("normal",new U(o,3)),this.addAttribute("uv",new U(a,2))}function ir(t,e){if(e.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}function or(t,e){G.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var n,r,i,o,a=[],s=Math.cos(Ic.DEG2RAD*e),c=[0,0],u={},h=["a","b","c"];t.isBufferGeometry?(o=new A,o.fromBufferGeometry(t)):o=t.clone(),o.mergeVertices(),o.computeFaceNormals();for(var l=o.vertices,d=o.faces,p=0,f=d.length;p<f;p++)for(var m=d[p],v=0;v<3;v++)n=m[h[v]],r=m[h[(v+1)%3]],c[0]=Math.min(n,r),c[1]=Math.max(n,r),i=c[0]+","+c[1],void 0===u[i]?u[i]={index1:c[0],index2:c[1],face1:p,face2:void 0}:u[i].face2=p;for(i in u){var g=u[i];if(void 0===g.face2||d[g.face1].normal.dot(d[g.face2].normal)<=s){var y=l[g.index1];a.push(y.x,y.y,y.z),y=l[g.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new U(a,3))}function ar(t,e,n,r,i,o,a,s){A.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new sr(t,e,n,r,i,o,a,s)),this.mergeVertices()}function sr(t,e,n,r,o,a,c,u){function h(n){var o,a,h,g=new i,_=new s,b=0,w=!0===n?t:e,M=!0===n?1:-1;for(a=v,o=1;o<=r;o++)p.push(0,y*M,0),f.push(0,M,0),m.push(.5,.5),v++;for(h=v,o=0;o<=r;o++){var E=o/r,T=E*u+c,S=Math.cos(T),A=Math.sin(T);_.x=w*A,_.y=y*M,_.z=w*S,p.push(_.x,_.y,_.z),f.push(0,M,0),g.x=.5*S+.5,g.y=.5*A*M+.5,m.push(g.x,g.y),v++}for(o=0;o<r;o++){var R=a+o,L=h+o;!0===n?d.push(L,L+1,R):d.push(L+1,L,R),b+=3}l.addGroup(x,b,!0===n?1:2),x+=b}G.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:o,openEnded:a,thetaStart:c,thetaLength:u};var l=this;t=void 0!==t?t:1,e=void 0!==e?e:1,n=n||1,r=Math.floor(r)||8,o=Math.floor(o)||1,a=void 0!==a&&a,c=void 0!==c?c:0,u=void 0!==u?u:2*Math.PI;var d=[],p=[],f=[],m=[],v=0,g=[],y=n/2,x=0;!function(){var i,a,h=new s,_=new s,b=0,w=(e-t)/n;for(a=0;a<=o;a++){var M=[],E=a/o,T=E*(e-t)+t;for(i=0;i<=r;i++){var S=i/r,A=S*u+c,R=Math.sin(A),L=Math.cos(A);_.x=T*R,_.y=-E*n+y,_.z=T*L,p.push(_.x,_.y,_.z),h.set(R,w,L).normalize(),f.push(h.x,h.y,h.z),m.push(S,1-E),M.push(v++)}g.push(M)}for(i=0;i<r;i++)for(a=0;a<o;a++){var C=g[a][i],P=g[a+1][i],O=g[a+1][i+1],I=g[a][i+1];d.push(C,P,I),d.push(P,O,I),b+=6}l.addGroup(x,b,0),x+=b}(),!1===a&&(t>0&&h(!0),e>0&&h(!1)),this.setIndex(d),this.addAttribute("position",new U(p,3)),this.addAttribute("normal",new U(f,3)),this.addAttribute("uv",new U(m,2))}function cr(t,e,n,r,i,o,a){ar.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function ur(t,e,n,r,i,o,a){sr.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function hr(t,e,n,r){A.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new lr(t,e,n,r)),this.mergeVertices()}function lr(t,e,n,r){G.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||1,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var o,a,c=[],u=[],h=[],l=[],d=new s,p=new i;for(u.push(0,0,0),h.push(0,0,1),l.push(.5,.5),a=0,o=3;a<=e;a++,o+=3){var f=n+a/e*r;d.x=t*Math.cos(f),d.y=t*Math.sin(f),u.push(d.x,d.y,d.z),h.push(0,0,1),p.x=(u[o]/t+1)/2,p.y=(u[o+1]/t+1)/2,l.push(p.x,p.y)}for(o=1;o<=e;o++)c.push(o,o+1,0);this.setIndex(c),this.addAttribute("position",new U(u,3)),this.addAttribute("normal",new U(h,3)),this.addAttribute("uv",new U(l,2))}function dr(t){W.call(this),this.type="ShadowMaterial",this.color=new y(0),this.transparent=!0,this.setValues(t)}function pr(t){q.call(this,t),this.type="RawShaderMaterial"}function fr(t){W.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new y(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new y(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new i(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function mr(t){fr.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function vr(t){W.call(this),this.type="MeshPhongMaterial",this.color=new y(16777215),this.specular=new y(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new y(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new i(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Qa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function gr(t){vr.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function yr(t){W.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new i(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function xr(t){W.call(this),this.type="MeshLambertMaterial",this.color=new y(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new y(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Qa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function _r(t){ze.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}function br(t,e,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}function wr(t){this.manager=void 0!==t?t:au}function Mr(t){this.manager=void 0!==t?t:au,this._parser=null}function Er(t){this.manager=void 0!==t?t:au,this._parser=null}function Tr(t){this.manager=void 0!==t?t:au}function Sr(t){this.manager=void 0!==t?t:au}function Ar(t){this.manager=void 0!==t?t:au}function Rr(){this.type="Curve",this.arcLengthDivisions=200}function Lr(t,e,n,r,i,o,a,s){Rr.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function Cr(t,e,n,r,i,o){Lr.call(this,t,e,n,n,r,i,o),this.type="ArcCurve"}function Pr(){function t(t,o,a,s){e=t,n=a,r=-3*t+3*o-2*a-s,i=2*t-2*o+a+s}var e=0,n=0,r=0,i=0;return{initCatmullRom:function(e,n,r,i,o){t(n,r,o*(r-e),o*(i-n))},initNonuniformCatmullRom:function(e,n,r,i,o,a,s){var c=(n-e)/o-(r-e)/(o+a)+(r-n)/a,u=(r-n)/a-(i-n)/(a+s)+(i-r)/s;c*=a,u*=a,t(n,r,c,u)},calc:function(t){var o=t*t;return e+n*t+r*o+i*(o*t)}}}function Or(t,e,n,r){Rr.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=n||"centripetal",this.tension=r||.5}function Ir(t,e,n,r,i){var o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function Nr(t,e){var n=1-t;return n*n*e}function Dr(t,e){return 2*(1-t)*t*e}function Ur(t,e){return t*t*e}function Br(t,e,n,r){return Nr(t,e)+Dr(t,n)+Ur(t,r)}function Fr(t,e){var n=1-t;return n*n*n*e}function zr(t,e){var n=1-t;return 3*n*n*t*e}function Gr(t,e){return 3*(1-t)*t*t*e}function Hr(t,e){return t*t*t*e}function Vr(t,e,n,r,i){return Fr(t,e)+zr(t,n)+Gr(t,r)+Hr(t,i)}function kr(t,e,n,r){Rr.call(this),this.type="CubicBezierCurve",this.v0=t||new i,this.v1=e||new i,this.v2=n||new i,this.v3=r||new i}function jr(t,e,n,r){Rr.call(this),this.type="CubicBezierCurve3",this.v0=t||new s,this.v1=e||new s,this.v2=n||new s,this.v3=r||new s}function Wr(t,e){Rr.call(this),this.type="LineCurve",this.v1=t||new i,this.v2=e||new i}function Xr(t,e){Rr.call(this),this.type="LineCurve3",this.v1=t||new s,this.v2=e||new s}function qr(t,e,n){Rr.call(this),this.type="QuadraticBezierCurve",this.v0=t||new i,this.v1=e||new i,this.v2=n||new i}function Yr(t,e,n){Rr.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new s,this.v1=e||new s,this.v2=n||new s}function Zr(t){Rr.call(this),this.type="SplineCurve",this.points=t||[]}function Jr(){Rr.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function Qr(t){Jr.call(this),this.type="Path",this.currentPoint=new i,t&&this.setFromPoints(t)}function Kr(t){Qr.call(this,t),this.uuid=Ic.generateUUID(),this.type="Shape",this.holes=[]}function $r(t,e){M.call(this),this.type="Light",this.color=new y(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function ti(t,e,n){$r.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(M.DefaultUp),this.updateMatrix(),this.groundColor=new y(e)}function ei(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new i(512,512),this.map=null,this.matrix=new o}function ni(){ei.call(this,new Te(50,1,.5,500))}function ri(t,e,n,r,i,o){$r.call(this,t,e),this.type="SpotLight",this.position.copy(M.DefaultUp),this.updateMatrix(),this.target=new M,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new ni}function ii(t,e,n,r){$r.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new ei(new Te(90,1,.5,500))}function oi(){ei.call(this,new T(-5,5,5,-5,.5,500))}function ai(t,e){$r.call(this,t,e),this.type="DirectionalLight",this.position.copy(M.DefaultUp),this.updateMatrix(),this.target=new M,this.shadow=new oi}function si(t,e){$r.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function ci(t,e,n,r){$r.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function ui(t,e,n,r){xi.call(this,t,e,n,r)}function hi(t,e,n){xi.call(this,t,e,n)}function li(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function di(t,e,n,r){li.call(this,t,e,n,r)}function pi(t,e,n,r){xi.call(this,t,e,n,r)}function fi(t,e,n,r){xi.call(this,t,e,n,r)}function mi(t,e,n,r){xi.call(this,t,e,n,r)}function vi(t,e,n,r){li.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function gi(t,e,n,r){li.call(this,t,e,n,r)}function yi(t,e,n,r){li.call(this,t,e,n,r)}function xi(t,e,n,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=pu.convertArray(e,this.TimeBufferType),this.values=pu.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function _i(t,e,n,r){xi.call(this,t,e,n,r)}function bi(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=Ic.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function wi(t){this.manager=void 0!==t?t:au,this.textures={}}function Mi(t){this.manager=void 0!==t?t:au}function Ei(){}function Ti(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:au,this.withCredentials=!1}function Si(t){this.manager=void 0!==t?t:au,this.texturePath=""}function Ai(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:au,this.options=void 0}function Ri(){this.type="ShapePath",this.color=new y,this.subPaths=[],this.currentPath=null}function Li(t){this.type="Font",this.data=t}function Ci(t,e,n,r){for(var i=Array.from?Array.from(t):String(t).split(""),o=e/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*o,s=[],c=0,u=0,h=0;h<i.length;h++){var l=i[h];if("\n"===l)c=0,u-=a;else{var d=Pi(l,n,o,c,u,r);c+=d.offsetX,s.push(d.path)}}return s}function Pi(t,e,n,r,i,o){var a=o.glyphs[t]||o.glyphs["?"];if(a){var s,c,u,h,l,d,p,f,m=new Ri;if(a.o)for(var v=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),g=0,y=v.length;g<y;){var x=v[g++];switch(x){case"m":s=v[g++]*n+r,c=v[g++]*n+i,m.moveTo(s,c);break;case"l":s=v[g++]*n+r,c=v[g++]*n+i,m.lineTo(s,c);break;case"q":u=v[g++]*n+r,h=v[g++]*n+i,l=v[g++]*n+r,d=v[g++]*n+i,m.quadraticCurveTo(l,d,u,h);break;case"b":u=v[g++]*n+r,h=v[g++]*n+i,l=v[g++]*n+r,d=v[g++]*n+i,p=v[g++]*n+r,f=v[g++]*n+i,m.bezierCurveTo(l,d,p,f,u,h)}}return{offsetX:a.ha*n,path:m}}}function Oi(t){this.manager=void 0!==t?t:au}function Ii(t){this.manager=void 0!==t?t:au}function Ni(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Te,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Te,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function Di(t,e,n){M.call(this),this.type="CubeCamera";var r=new Te(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new s(1,0,0)),this.add(r);var i=new Te(90,1,t,e);i.up.set(0,-1,0),i.lookAt(new s(-1,0,0)),this.add(i);var o=new Te(90,1,t,e);o.up.set(0,0,1),o.lookAt(new s(0,1,0)),this.add(o);var a=new Te(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new s(0,-1,0)),this.add(a);var c=new Te(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new s(0,0,1)),this.add(c);var u=new Te(90,1,t,e);u.up.set(0,-1,0),u.lookAt(new s(0,0,-1)),this.add(u);var h={format:Ds,magFilter:xs,minFilter:xs};this.renderTarget=new d(n,n,h),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,s=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,r,n),n.activeCubeFace=1,t.render(e,i,n),n.activeCubeFace=2,t.render(e,o,n),n.activeCubeFace=3,t.render(e,a,n),n.activeCubeFace=4,t.render(e,c,n),n.texture.generateMipmaps=s,n.activeCubeFace=5,t.render(e,u,n),t.setRenderTarget(null)},this.clear=function(t,e,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,t.setRenderTarget(i),t.clear(e,n,r);t.setRenderTarget(null)}}function Ui(){M.call(this),this.type="AudioListener",this.context=_u.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function Bi(t){M.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function Fi(t){Bi.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function zi(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function Gi(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}function Hi(t,e,n){var r=n||Vi.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Vi(t,e,n){this.path=e,this.parsedPath=n||Vi.parseTrackName(e),this.node=Vi.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function ki(){this.uuid=Ic.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function ji(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:gc,endingEnd:gc},s=0;s!==i;++s){var c=r[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=dc,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function Wi(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Xi(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function qi(){G.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Yi(t,e,n,r){this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}function Zi(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Ji(t,e,n){Zi.call(this,t,e),this.meshPerAttribute=n||1}function Qi(t,e,n){R.call(this,t,e),this.meshPerAttribute=n||1}function Ki(t,e,n,r){this.ray=new Y(t,e),this.near=n||0,this.far=r||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function $i(t,e){return t.distance-e.distance}function to(t,e,n,r){if(!1!==t.visible&&(t.raycast(e,n),!0===r))for(var i=t.children,o=0,a=i.length;o<a;o++)to(i[o],e,n,!0)}function eo(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function no(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function ro(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function io(t,e){this.min=void 0!==t?t:new i(1/0,1/0),this.max=void 0!==e?e:new i(-1/0,-1/0)}function oo(t){M.call(this),this.material=t,this.render=function(){}}function ao(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var c=new G,u=new U(2*a*3,3);c.addAttribute("position",u),He.call(this,c,new ze({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function so(t,e){M.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var n=new G,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new U(r,3));var c=new ze({fog:!1});this.cone=new He(n,c),this.add(this.cone),this.update()}function co(t){var e=[];t&&t.isBone&&e.push(t);for(var n=0;n<t.children.length;n++)e.push.apply(e,co(t.children[n]));return e}function uo(t){for(var e=co(t),n=new G,r=[],i=[],o=new y(0,0,1),a=new y(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new U(r,3)),n.addAttribute("color",new U(i,3));var u=new ze({vertexColors:_a,depthTest:!1,depthWrite:!1,transparent:!0});He.call(this,n,u),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function ho(t,e,n){this.light=t,this.light.updateMatrixWorld(),this.color=n;var r=new Qn(e,4,2),i=new X({wireframe:!0,fog:!1});Q.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function lo(t,e){M.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var n=new ze({fog:!1}),r=new G;r.addAttribute("position",new R(new Float32Array(15),3)),this.line=new Ge(r,n),this.add(this.line),this.update()}function po(t,e,n){M.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new rn(e);r.rotateY(.5*Math.PI),this.material=new X({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=_a);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new R(o,3)),this.add(new Q(r,this.material)),this.update()}function fo(t,e,n,r){t=t||10,e=e||10,n=new y(void 0!==n?n:4473924),r=new y(void 0!==r?r:8947848);for(var i=e/2,o=t/e,a=t/2,s=[],c=[],u=0,h=0,l=-a;u<=e;u++,l+=o){s.push(-a,0,l,a,0,l),s.push(l,0,-a,l,0,a);var d=u===i?n:r;d.toArray(c,h),h+=3,d.toArray(c,h),h+=3,d.toArray(c,h),h+=3,d.toArray(c,h),h+=3}var p=new G;p.addAttribute("position",new U(s,3)),p.addAttribute("color",new U(c,3));var f=new ze({vertexColors:_a});He.call(this,p,f)}function mo(t,e,n,r,i,o){t=t||10,e=e||16,n=n||8,r=r||64,i=new y(void 0!==i?i:4473924),o=new y(void 0!==o?o:8947848);var a,s,c,u,h,l,d,p=[],f=[];for(u=0;u<=e;u++)c=u/e*(2*Math.PI),a=Math.sin(c)*t,s=Math.cos(c)*t,p.push(0,0,0),p.push(a,0,s),d=1&u?i:o,f.push(d.r,d.g,d.b),f.push(d.r,d.g,d.b);for(u=0;u<=n;u++)for(d=1&u?i:o,l=t-t/n*u,h=0;h<r;h++)c=h/r*(2*Math.PI),a=Math.sin(c)*l,s=Math.cos(c)*l,p.push(a,0,s),f.push(d.r,d.g,d.b),c=(h+1)/r*(2*Math.PI),a=Math.sin(c)*l,s=Math.cos(c)*l,p.push(a,0,s),f.push(d.r,d.g,d.b);var m=new G;m.addAttribute("position",new U(p,3)),m.addAttribute("color",new U(f,3));var v=new ze({vertexColors:_a});He.call(this,m,v)}function vo(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new G,u=new U(2*a*3,3);c.addAttribute("position",u),He.call(this,c,new ze({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function go(t,e,n){M.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);var r=new G;r.addAttribute("position",new U([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var i=new ze({fog:!1});this.lightPlane=new Ge(r,i),this.add(this.lightPlane),r=new G,r.addAttribute("position",new U([0,0,0,0,0,1],3)),this.targetLine=new Ge(r,i),this.add(this.targetLine),this.update()}function yo(t){function e(t,e,r){n(t,r),n(e,r)}function n(t,e){o.push(0,0,0),a.push(e.r,e.g,e.b),void 0===s[t]&&(s[t]=[]),s[t].push(o.length/3-1)}var r=new G,i=new ze({color:16777215,vertexColors:xa}),o=[],a=[],s={},c=new y(16755200),u=new y(16711680),h=new y(43775),l=new y(16777215),d=new y(3355443);e("n1","n2",c),e("n2","n4",c),e("n4","n3",c),e("n3","n1",c),e("f1","f2",c),e("f2","f4",c),e("f4","f3",c),e("f3","f1",c),e("n1","f1",c),e("n2","f2",c),e("n3","f3",c),e("n4","f4",c),e("p","n1",u),e("p","n2",u),e("p","n3",u),e("p","n4",u),e("u1","u2",h),e("u2","u3",h),e("u3","u1",h),e("c","t",l),e("p","c",d),e("cn1","cn2",d),e("cn3","cn4",d),e("cf1","cf2",d),e("cf3","cf4",d),r.addAttribute("position",new U(o,3)),r.addAttribute("color",new U(a,3)),He.call(this,r,i),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=s,this.update()}function xo(t,e){this.object=t,void 0===e&&(e=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new G;i.setIndex(new R(n,1)),i.addAttribute("position",new R(r,3)),He.call(this,i,new ze({color:e})),this.matrixAutoUpdate=!1,this.update()}function _o(t,e){this.type="Box3Helper",this.box=t;var n=void 0!==e?e:16776960,r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],o=new G;o.setIndex(new R(r,1)),o.addAttribute("position",new U(i,3)),He.call(this,o,new ze({color:n})),this.geometry.computeBoundingSphere()}function bo(t,e,n){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var r=void 0!==n?n:16776960,i=[1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],o=new G;o.addAttribute("position",new U(i,3)),o.computeBoundingSphere(),Ge.call(this,o,new ze({color:r}));var a=[1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],s=new G;s.addAttribute("position",new U(a,3)),s.computeBoundingSphere(),this.add(new Q(s,new X({color:r,opacity:.2,transparent:!0,depthWrite:!1})))}function wo(t,e,n,r,i,o){M.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===wu&&(wu=new G,wu.addAttribute("position",new U([0,0,0,0,1,0],3)),Mu=new sr(0,.5,1,5,1),Mu.translate(0,-.5,0)),this.position.copy(e),this.line=new Ge(wu,new ze({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Q(Mu,new X({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function Mo(t){t=t||1;var e=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new G;r.addAttribute("position",new U(e,3)),r.addAttribute("color",new U(n,3));var i=new ze({vertexColors:_a});He.call(this,r,i)}function Eo(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new S(t,e,n,i,o,a)}function To(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function So(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function Ao(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new je(t,e)}function Ro(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Ne(t)}function Lo(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new je(t,e)}function Co(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new ke(t)}function Po(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new ke(t)}function Oo(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new ke(t)}function Io(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new s(t,e,n)}function No(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new R(t,e).setDynamic(!0)}function Do(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new L(t,e)}function Uo(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new C(t,e)}function Bo(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new P(t,e)}function Fo(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new O(t,e)}function zo(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new I(t,e)}function Go(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new N(t,e)}function Ho(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new D(t,e)}function Vo(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new U(t,e)}function ko(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new B(t,e)}function jo(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Or.call(this,t),this.type="catmullrom",this.closed=!0}function Wo(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Or.call(this,t),this.type="catmullrom"}function Xo(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Or.call(this,t),this.type="catmullrom"}function qo(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new Mo(t)}function Yo(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new xo(t,e)}function Zo(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new He(new or(t.geometry),new ze({color:void 0!==e?e:16777215}))}function Jo(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new He(new Ze(t.geometry),new ze({color:void 0!==e?e:16777215}))}function Qo(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new wr(t)}function Ko(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Er(t)}function $o(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."),this.projectVector=function(t,e){console.warn("THREE.Projector: .projectVector() is now vector.project()."),t.project(e)},this.unprojectVector=function(t,e){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),t.unproject(e)},this.pickingRay=function(){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}}function ta(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}function ea(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"WebGLRenderTargetCube",function(){return d}),n.d(e,"WebGLRenderTarget",function(){return l}),n.d(e,"WebGLRenderer",function(){return Le}),n.d(e,"ShaderLib",function(){return zc}),n.d(e,"UniformsLib",function(){return Fc}),n.d(e,"UniformsUtils",function(){return Uc}),n.d(e,"ShaderChunk",function(){return Dc}),n.d(e,"FogExp2",function(){return Ce}),n.d(e,"Fog",function(){return Pe}),n.d(e,"Scene",function(){return Oe}),n.d(e,"Sprite",function(){return Ne}),n.d(e,"LOD",function(){return De}),n.d(e,"SkinnedMesh",function(){return Fe}),n.d(e,"Skeleton",function(){return Ue}),n.d(e,"Bone",function(){return Be}),n.d(e,"Mesh",function(){return Q}),n.d(e,"LineSegments",function(){return He}),n.d(e,"LineLoop",function(){return Ve}),n.d(e,"Line",function(){return Ge}),n.d(e,"Points",function(){return je}),n.d(e,"Group",function(){return We}),n.d(e,"VideoTexture",function(){return Xe}),n.d(e,"DataTexture",function(){return p}),n.d(e,"CompressedTexture",function(){return qe}),n.d(e,"CubeTexture",function(){return ut}),n.d(e,"CanvasTexture",function(){return _e}),n.d(e,"DepthTexture",function(){return Ye}),n.d(e,"Texture",function(){return u}),n.d(e,"CompressedTextureLoader",function(){return Mr}),n.d(e,"DataTextureLoader",function(){return Er}),n.d(e,"CubeTextureLoader",function(){return Sr}),n.d(e,"TextureLoader",function(){return Ar}),n.d(e,"ObjectLoader",function(){return Si}),n.d(e,"MaterialLoader",function(){return wi}),n.d(e,"BufferGeometryLoader",function(){return Mi}),n.d(e,"DefaultLoadingManager",function(){return au}),n.d(e,"LoadingManager",function(){return br}),n.d(e,"JSONLoader",function(){return Ti}),n.d(e,"ImageLoader",function(){return Tr}),n.d(e,"ImageBitmapLoader",function(){return Ai}),n.d(e,"FontLoader",function(){return Oi}),n.d(e,"FileLoader",function(){return wr}),n.d(e,"Loader",function(){return Ei}),n.d(e,"LoaderUtils",function(){return mu}),n.d(e,"Cache",function(){return ou}),n.d(e,"AudioLoader",function(){return Ii}),n.d(e,"SpotLightShadow",function(){return ni}),n.d(e,"SpotLight",function(){return ri}),n.d(e,"PointLight",function(){return ii}),n.d(e,"RectAreaLight",function(){return ci}),n.d(e,"HemisphereLight",function(){return ti}),n.d(e,"DirectionalLightShadow",function(){return oi}),n.d(e,"DirectionalLight",function(){return ai}),n.d(e,"AmbientLight",function(){return si}),n.d(e,"LightShadow",function(){return ei}),n.d(e,"Light",function(){return $r}),n.d(e,"StereoCamera",function(){return Ni}),n.d(e,"PerspectiveCamera",function(){return Te}),n.d(e,"OrthographicCamera",function(){return T}),n.d(e,"CubeCamera",function(){return Di}),n.d(e,"ArrayCamera",function(){return Se}),n.d(e,"Camera",function(){return E}),n.d(e,"AudioListener",function(){return Ui}),n.d(e,"PositionalAudio",function(){return Fi}),n.d(e,"AudioContext",function(){return _u}),n.d(e,"AudioAnalyser",function(){return zi}),n.d(e,"Audio",function(){return Bi}),n.d(e,"VectorKeyframeTrack",function(){return _i}),n.d(e,"StringKeyframeTrack",function(){return ui}),n.d(e,"QuaternionKeyframeTrack",function(){return pi}),n.d(e,"NumberKeyframeTrack",function(){return mi}),n.d(e,"ColorKeyframeTrack",function(){return fi}),n.d(e,"BooleanKeyframeTrack",function(){return hi}),n.d(e,"PropertyMixer",function(){return Gi}),n.d(e,"PropertyBinding",function(){return Vi}),n.d(e,"KeyframeTrack",function(){return xi}),n.d(e,"AnimationUtils",function(){return pu}),n.d(e,"AnimationObjectGroup",function(){return ki}),n.d(e,"AnimationMixer",function(){return Wi}),n.d(e,"AnimationClip",function(){return bi}),n.d(e,"Uniform",function(){return Xi}),n.d(e,"InstancedBufferGeometry",function(){return qi}),n.d(e,"BufferGeometry",function(){return G}),n.d(e,"Geometry",function(){return A}),n.d(e,"InterleavedBufferAttribute",function(){return Yi}),n.d(e,"InstancedInterleavedBuffer",function(){return Ji}),n.d(e,"InterleavedBuffer",function(){return Zi}),n.d(e,"InstancedBufferAttribute",function(){return Qi}),n.d(e,"Face3",function(){return S}),n.d(e,"Object3D",function(){return M}),n.d(e,"Raycaster",function(){return Ki}),n.d(e,"Layers",function(){return w}),n.d(e,"EventDispatcher",function(){return r}),n.d(e,"Clock",function(){return eo}),n.d(e,"QuaternionLinearInterpolant",function(){return di}),n.d(e,"LinearInterpolant",function(){return gi}),n.d(e,"DiscreteInterpolant",function(){return yi}),n.d(e,"CubicInterpolant",function(){return vi}),n.d(e,"Interpolant",function(){return li}),n.d(e,"Triangle",function(){return J}),n.d(e,"Math",function(){return Ic}),n.d(e,"Spherical",function(){return no}),n.d(e,"Cylindrical",function(){return ro}),n.d(e,"Plane",function(){return v}),n.d(e,"Frustum",function(){return g}),n.d(e,"Sphere",function(){return m}),n.d(e,"Ray",function(){return Y}),n.d(e,"Matrix4",function(){return o}),n.d(e,"Matrix3",function(){return c}),n.d(e,"Box3",function(){return f}),n.d(e,"Box2",function(){return io}),n.d(e,"Line3",function(){return Z}),n.d(e,"Euler",function(){return b}),n.d(e,"Vector4",function(){return h}),n.d(e,"Vector3",function(){return s}),n.d(e,"Vector2",function(){return i}),n.d(e,"Quaternion",function(){return a}),n.d(e,"Color",function(){return y}),n.d(e,"ImmediateRenderObject",function(){return oo}),n.d(e,"VertexNormalsHelper",function(){return ao}),n.d(e,"SpotLightHelper",function(){return so}),n.d(e,"SkeletonHelper",function(){return uo}),n.d(e,"PointLightHelper",function(){return ho}),n.d(e,"RectAreaLightHelper",function(){return lo}),n.d(e,"HemisphereLightHelper",function(){return po}),n.d(e,"GridHelper",function(){return fo}),n.d(e,"PolarGridHelper",function(){return mo}),n.d(e,"FaceNormalsHelper",function(){return vo}),n.d(e,"DirectionalLightHelper",function(){return go}),n.d(e,"CameraHelper",function(){return yo}),n.d(e,"BoxHelper",function(){return xo}),n.d(e,"Box3Helper",function(){return _o}),n.d(e,"PlaneHelper",function(){return bo}),n.d(e,"ArrowHelper",function(){return wo}),n.d(e,"AxesHelper",function(){return Mo}),n.d(e,"Shape",function(){return Kr}),n.d(e,"Path",function(){return Qr}),n.d(e,"ShapePath",function(){return Ri}),n.d(e,"Font",function(){return Li}),n.d(e,"CurvePath",function(){return Jr}),n.d(e,"Curve",function(){return Rr}),n.d(e,"ShapeUtils",function(){return eu}),n.d(e,"WebGLUtils",function(){return Ee}),n.d(e,"WireframeGeometry",function(){return Ze}),n.d(e,"ParametricGeometry",function(){return Je}),n.d(e,"ParametricBufferGeometry",function(){return Qe}),n.d(e,"TetrahedronGeometry",function(){return tn}),n.d(e,"TetrahedronBufferGeometry",function(){return en}),n.d(e,"OctahedronGeometry",function(){return nn}),n.d(e,"OctahedronBufferGeometry",function(){return rn}),n.d(e,"IcosahedronGeometry",function(){return on}),n.d(e,"IcosahedronBufferGeometry",function(){return an}),n.d(e,"DodecahedronGeometry",function(){return sn}),n.d(e,"DodecahedronBufferGeometry",function(){return cn}),n.d(e,"PolyhedronGeometry",function(){return Ke}),n.d(e,"PolyhedronBufferGeometry",function(){return $e}),n.d(e,"TubeGeometry",function(){return un}),n.d(e,"TubeBufferGeometry",function(){return hn}),n.d(e,"TorusKnotGeometry",function(){return ln}),n.d(e,"TorusKnotBufferGeometry",function(){return dn}),n.d(e,"TorusGeometry",function(){return pn}),n.d(e,"TorusBufferGeometry",function(){return fn}),n.d(e,"TextGeometry",function(){return Yn}),n.d(e,"TextBufferGeometry",function(){return Zn}),n.d(e,"SphereGeometry",function(){return Jn}),n.d(e,"SphereBufferGeometry",function(){return Qn}),n.d(e,"RingGeometry",function(){return Kn}),n.d(e,"RingBufferGeometry",function(){return $n}),n.d(e,"PlaneGeometry",function(){return k}),n.d(e,"PlaneBufferGeometry",function(){return j}),n.d(e,"LatheGeometry",function(){return tr}),n.d(e,"LatheBufferGeometry",function(){return er}),n.d(e,"ShapeGeometry",function(){return nr}),n.d(e,"ShapeBufferGeometry",function(){return rr}),n.d(e,"ExtrudeGeometry",function(){return Wn}),n.d(e,"ExtrudeBufferGeometry",function(){return Xn}),n.d(e,"EdgesGeometry",function(){return or}),n.d(e,"ConeGeometry",function(){return cr}),n.d(e,"ConeBufferGeometry",function(){return ur}),n.d(e,"CylinderGeometry",function(){return ar}),n.d(e,"CylinderBufferGeometry",function(){return sr}),n.d(e,"CircleGeometry",function(){return hr}),n.d(e,"CircleBufferGeometry",function(){return lr}),n.d(e,"BoxGeometry",function(){return H}),n.d(e,"BoxBufferGeometry",function(){return V}),n.d(e,"ShadowMaterial",function(){return dr}),n.d(e,"SpriteMaterial",function(){return Ie}),n.d(e,"RawShaderMaterial",function(){return pr}),n.d(e,"ShaderMaterial",function(){return q}),n.d(e,"PointsMaterial",function(){return ke}),n.d(e,"MeshPhysicalMaterial",function(){return mr}),n.d(e,"MeshStandardMaterial",function(){return fr}),n.d(e,"MeshPhongMaterial",function(){return vr}),n.d(e,"MeshToonMaterial",function(){return gr}),n.d(e,"MeshNormalMaterial",function(){return yr}),n.d(e,"MeshLambertMaterial",function(){return xr}),n.d(e,"MeshDepthMaterial",function(){return ge}),n.d(e,"MeshDistanceMaterial",function(){return ye}),n.d(e,"MeshBasicMaterial",function(){return X});n.d(e,"LineDashedMaterial",function(){return _r}),n.d(e,"LineBasicMaterial",function(){return ze}),n.d(e,"Material",function(){return W}),n.d(e,"Float64BufferAttribute",function(){return B}),n.d(e,"Float32BufferAttribute",function(){return U}),n.d(e,"Uint32BufferAttribute",function(){return D}),n.d(e,"Int32BufferAttribute",function(){return N}),n.d(e,"Uint16BufferAttribute",function(){return I}),n.d(e,"Int16BufferAttribute",function(){return O}),n.d(e,"Uint8ClampedBufferAttribute",function(){return P}),n.d(e,"Uint8BufferAttribute",function(){return C}),n.d(e,"Int8BufferAttribute",function(){return L}),n.d(e,"BufferAttribute",function(){return R}),n.d(e,"ArcCurve",function(){return Cr}),n.d(e,"CatmullRomCurve3",function(){return Or}),n.d(e,"CubicBezierCurve",function(){return kr}),n.d(e,"CubicBezierCurve3",function(){return jr}),n.d(e,"EllipseCurve",function(){return Lr}),n.d(e,"LineCurve",function(){return Wr}),n.d(e,"LineCurve3",function(){return Xr}),n.d(e,"QuadraticBezierCurve",function(){return qr}),n.d(e,"QuadraticBezierCurve3",function(){return Yr}),n.d(e,"SplineCurve",function(){return Zr}),n.d(e,"REVISION",function(){return na}),n.d(e,"MOUSE",function(){return ra}),n.d(e,"CullFaceNone",function(){return ia}),n.d(e,"CullFaceBack",function(){return oa}),n.d(e,"CullFaceFront",function(){return aa}),n.d(e,"CullFaceFrontBack",function(){return sa}),n.d(e,"FrontFaceDirectionCW",function(){return ca}),n.d(e,"FrontFaceDirectionCCW",function(){return ua}),n.d(e,"BasicShadowMap",function(){return ha}),n.d(e,"PCFShadowMap",function(){return la}),n.d(e,"PCFSoftShadowMap",function(){return da}),n.d(e,"FrontSide",function(){return pa}),n.d(e,"BackSide",function(){return fa}),n.d(e,"DoubleSide",function(){return ma}),n.d(e,"FlatShading",function(){return va}),n.d(e,"SmoothShading",function(){return ga}),n.d(e,"NoColors",function(){return ya}),n.d(e,"FaceColors",function(){return xa}),n.d(e,"VertexColors",function(){return _a}),n.d(e,"NoBlending",function(){return ba}),n.d(e,"NormalBlending",function(){return wa}),n.d(e,"AdditiveBlending",function(){return Ma}),n.d(e,"SubtractiveBlending",function(){return Ea}),n.d(e,"MultiplyBlending",function(){return Ta}),n.d(e,"CustomBlending",function(){return Sa}),n.d(e,"AddEquation",function(){return Aa}),n.d(e,"SubtractEquation",function(){return Ra}),n.d(e,"ReverseSubtractEquation",function(){return La}),n.d(e,"MinEquation",function(){return Ca}),n.d(e,"MaxEquation",function(){return Pa}),n.d(e,"ZeroFactor",function(){return Oa}),n.d(e,"OneFactor",function(){return Ia}),n.d(e,"SrcColorFactor",function(){return Na}),n.d(e,"OneMinusSrcColorFactor",function(){return Da}),n.d(e,"SrcAlphaFactor",function(){return Ua}),n.d(e,"OneMinusSrcAlphaFactor",function(){return Ba}),n.d(e,"DstAlphaFactor",function(){return Fa}),n.d(e,"OneMinusDstAlphaFactor",function(){return za}),n.d(e,"DstColorFactor",function(){return Ga}),n.d(e,"OneMinusDstColorFactor",function(){return Ha}),n.d(e,"SrcAlphaSaturateFactor",function(){return Va}),n.d(e,"NeverDepth",function(){return ka}),n.d(e,"AlwaysDepth",function(){return ja}),n.d(e,"LessDepth",function(){return Wa}),n.d(e,"LessEqualDepth",function(){return Xa}),n.d(e,"EqualDepth",function(){return qa}),n.d(e,"GreaterEqualDepth",function(){return Ya}),n.d(e,"GreaterDepth",function(){return Za}),n.d(e,"NotEqualDepth",function(){return Ja}),n.d(e,"MultiplyOperation",function(){return Qa}),n.d(e,"MixOperation",function(){return Ka}),n.d(e,"AddOperation",function(){return $a}),n.d(e,"NoToneMapping",function(){return ts}),n.d(e,"LinearToneMapping",function(){return es}),n.d(e,"ReinhardToneMapping",function(){return ns}),n.d(e,"Uncharted2ToneMapping",function(){return rs}),n.d(e,"CineonToneMapping",function(){return is}),n.d(e,"UVMapping",function(){return os}),n.d(e,"CubeReflectionMapping",function(){return as}),n.d(e,"CubeRefractionMapping",function(){return ss}),n.d(e,"EquirectangularReflectionMapping",function(){return cs}),n.d(e,"EquirectangularRefractionMapping",function(){return us}),n.d(e,"SphericalReflectionMapping",function(){return hs}),n.d(e,"CubeUVReflectionMapping",function(){return ls}),n.d(e,"CubeUVRefractionMapping",function(){return ds}),n.d(e,"RepeatWrapping",function(){return ps}),n.d(e,"ClampToEdgeWrapping",function(){return fs}),n.d(e,"MirroredRepeatWrapping",function(){return ms}),n.d(e,"NearestFilter",function(){return vs}),n.d(e,"NearestMipMapNearestFilter",function(){return gs}),n.d(e,"NearestMipMapLinearFilter",function(){return ys}),n.d(e,"LinearFilter",function(){return xs}),n.d(e,"LinearMipMapNearestFilter",function(){return _s}),n.d(e,"LinearMipMapLinearFilter",function(){return bs}),n.d(e,"UnsignedByteType",function(){return ws}),n.d(e,"ByteType",function(){return Ms}),n.d(e,"ShortType",function(){return Es}),n.d(e,"UnsignedShortType",function(){return Ts}),n.d(e,"IntType",function(){return Ss}),n.d(e,"UnsignedIntType",function(){return As}),n.d(e,"FloatType",function(){return Rs}),n.d(e,"HalfFloatType",function(){return Ls}),n.d(e,"UnsignedShort4444Type",function(){return Cs}),n.d(e,"UnsignedShort5551Type",function(){return Ps}),n.d(e,"UnsignedShort565Type",function(){return Os}),n.d(e,"UnsignedInt248Type",function(){return Is}),n.d(e,"AlphaFormat",function(){return Ns}),n.d(e,"RGBFormat",function(){return Ds}),n.d(e,"RGBAFormat",function(){return Us}),n.d(e,"LuminanceFormat",function(){return Bs}),n.d(e,"LuminanceAlphaFormat",function(){return Fs}),n.d(e,"RGBEFormat",function(){return zs}),n.d(e,"DepthFormat",function(){return Gs}),n.d(e,"DepthStencilFormat",function(){return Hs}),n.d(e,"RGB_S3TC_DXT1_Format",function(){return Vs}),n.d(e,"RGBA_S3TC_DXT1_Format",function(){return ks}),n.d(e,"RGBA_S3TC_DXT3_Format",function(){return js}),n.d(e,"RGBA_S3TC_DXT5_Format",function(){return Ws}),n.d(e,"RGB_PVRTC_4BPPV1_Format",function(){return Xs}),n.d(e,"RGB_PVRTC_2BPPV1_Format",function(){return qs}),n.d(e,"RGBA_PVRTC_4BPPV1_Format",function(){return Ys}),n.d(e,"RGBA_PVRTC_2BPPV1_Format",function(){return Zs}),n.d(e,"RGB_ETC1_Format",function(){return Js}),n.d(e,"RGBA_ASTC_4x4_Format",function(){return Qs}),n.d(e,"RGBA_ASTC_5x4_Format",function(){return Ks}),n.d(e,"RGBA_ASTC_5x5_Format",function(){return $s}),n.d(e,"RGBA_ASTC_6x5_Format",function(){return tc}),n.d(e,"RGBA_ASTC_6x6_Format",function(){return ec}),n.d(e,"RGBA_ASTC_8x5_Format",function(){return nc}),n.d(e,"RGBA_ASTC_8x6_Format",function(){return rc}),n.d(e,"RGBA_ASTC_8x8_Format",function(){return ic}),n.d(e,"RGBA_ASTC_10x5_Format",function(){return oc}),n.d(e,"RGBA_ASTC_10x6_Format",function(){return ac}),n.d(e,"RGBA_ASTC_10x8_Format",function(){return sc}),n.d(e,"RGBA_ASTC_10x10_Format",function(){return cc}),n.d(e,"RGBA_ASTC_12x10_Format",function(){return uc}),n.d(e,"RGBA_ASTC_12x12_Format",function(){return hc}),n.d(e,"LoopOnce",function(){return lc}),n.d(e,"LoopRepeat",function(){return dc}),n.d(e,"LoopPingPong",function(){return pc}),n.d(e,"InterpolateDiscrete",function(){return fc}),n.d(e,"InterpolateLinear",function(){return mc}),n.d(e,"InterpolateSmooth",function(){return vc}),n.d(e,"ZeroCurvatureEnding",function(){return gc}),n.d(e,"ZeroSlopeEnding",function(){return yc}),n.d(e,"WrapAroundEnding",function(){return xc}),n.d(e,"TrianglesDrawMode",function(){return _c}),n.d(e,"TriangleStripDrawMode",function(){return bc}),n.d(e,"TriangleFanDrawMode",function(){return wc}),n.d(e,"LinearEncoding",function(){return Mc}),n.d(e,"sRGBEncoding",function(){return Ec}),n.d(e,"GammaEncoding",function(){return Tc}),n.d(e,"RGBEEncoding",function(){return Sc}),n.d(e,"LogLuvEncoding",function(){return Ac}),n.d(e,"RGBM7Encoding",function(){return Rc}),n.d(e,"RGBM16Encoding",function(){return Lc}),n.d(e,"RGBDEncoding",function(){return Cc}),n.d(e,"BasicDepthPacking",function(){return Pc}),n.d(e,"RGBADepthPacking",function(){return Oc}),n.d(e,"CubeGeometry",function(){return H}),n.d(e,"Face4",function(){return Eo}),n.d(e,"LineStrip",function(){return Eu}),n.d(e,"LinePieces",function(){return Tu}),n.d(e,"MeshFaceMaterial",function(){return To}),n.d(e,"MultiMaterial",function(){return So}),n.d(e,"PointCloud",function(){return Ao}),n.d(e,"Particle",function(){return Ro}),n.d(e,"ParticleSystem",function(){return Lo}),n.d(e,"PointCloudMaterial",function(){return Co}),n.d(e,"ParticleBasicMaterial",function(){return Po}),n.d(e,"ParticleSystemMaterial",function(){return Oo}),n.d(e,"Vertex",function(){return Io}),n.d(e,"DynamicBufferAttribute",function(){return No}),n.d(e,"Int8Attribute",function(){return Do}),n.d(e,"Uint8Attribute",function(){return Uo}),n.d(e,"Uint8ClampedAttribute",function(){return Bo}),n.d(e,"Int16Attribute",function(){return Fo}),n.d(e,"Uint16Attribute",function(){return zo}),n.d(e,"Int32Attribute",function(){return Go}),n.d(e,"Uint32Attribute",function(){return Ho}),n.d(e,"Float32Attribute",function(){return Vo}),n.d(e,"Float64Attribute",function(){return ko}),n.d(e,"ClosedSplineCurve3",function(){return jo}),n.d(e,"SplineCurve3",function(){return Wo}),n.d(e,"Spline",function(){return Xo}),n.d(e,"AxisHelper",function(){return qo}),n.d(e,"BoundingBoxHelper",function(){return Yo}),n.d(e,"EdgesHelper",function(){return Zo}),n.d(e,"WireframeHelper",function(){return Jo}),n.d(e,"XHRLoader",function(){return Qo}),n.d(e,"BinaryTextureLoader",function(){return Ko}),n.d(e,"GeometryUtils",function(){return Su}),n.d(e,"ImageUtils",function(){return Au}),n.d(e,"Projector",function(){return $o}),n.d(e,"CanvasRenderer",function(){return ta}),n.d(e,"SceneUtils",function(){return Ru}),n.d(e,"LensFlare",function(){return ea});void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&function(){Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}}(),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners,r=n[t];if(void 0!==r){var i=r.indexOf(e);-1!==i&&r.splice(i,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners,n=e[t.type];if(void 0!==n){t.target=this;for(var r=n.slice(0),i=0,o=r.length;i<o;i++)r[i].call(this,t)}}}});var na="93",ra={LEFT:0,MIDDLE:1,RIGHT:2},ia=0,oa=1,aa=2,sa=3,ca=0,ua=1,ha=0,la=1,da=2,pa=0,fa=1,ma=2,va=1,ga=2,ya=0,xa=1,_a=2,ba=0,wa=1,Ma=2,Ea=3,Ta=4,Sa=5,Aa=100,Ra=101,La=102,Ca=103,Pa=104,Oa=200,Ia=201,Na=202,Da=203,Ua=204,Ba=205,Fa=206,za=207,Ga=208,Ha=209,Va=210,ka=0,ja=1,Wa=2,Xa=3,qa=4,Ya=5,Za=6,Ja=7,Qa=0,Ka=1,$a=2,ts=0,es=1,ns=2,rs=3,is=4,os=300,as=301,ss=302,cs=303,us=304,hs=305,ls=306,ds=307,ps=1e3,fs=1001,ms=1002,vs=1003,gs=1004,ys=1005,xs=1006,_s=1007,bs=1008,ws=1009,Ms=1010,Es=1011,Ts=1012,Ss=1013,As=1014,Rs=1015,Ls=1016,Cs=1017,Ps=1018,Os=1019,Is=1020,Ns=1021,Ds=1022,Us=1023,Bs=1024,Fs=1025,zs=Us,Gs=1026,Hs=1027,Vs=33776,ks=33777,js=33778,Ws=33779,Xs=35840,qs=35841,Ys=35842,Zs=35843,Js=36196,Qs=37808,Ks=37809,$s=37810,tc=37811,ec=37812,nc=37813,rc=37814,ic=37815,oc=37816,ac=37817,sc=37818,cc=37819,uc=37820,hc=37821,lc=2200,dc=2201,pc=2202,fc=2300,mc=2301,vc=2302,gc=2400,yc=2401,xc=2402,_c=0,bc=1,wc=2,Mc=3e3,Ec=3001,Tc=3007,Sc=3002,Ac=3003,Rc=3004,Lc=3005,Cc=3006,Pc=3200,Oc=3201,Ic={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;e<256;e++)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&n]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[63&r|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[255&i]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]).toUpperCase()}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*Ic.DEG2RAD},radToDeg:function(t){return t*Ic.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};Object.defineProperties(i.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(i.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)},subScalar:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:function(){var t=new i,e=new i;return function(n,r){return t.set(n,n),e.set(r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(t){return this.x*t.x+this.y*t.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}}),Object.assign(o.prototype,{isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,c,u,h,l,d,p,f,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=c,v[6]=u,v[10]=h,v[14]=l,v[3]=d,v[7]=p,v[11]=f,v[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new o).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:function(){var t=new s;return function(e){var n=this.elements,r=e.elements,i=1/t.setFromMatrixColumn(e,0).length(),o=1/t.setFromMatrixColumn(e,1).length(),a=1/t.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=0,n[4]=r[4]*o,n[5]=r[5]*o,n[6]=r[6]*o,n[7]=0,n[8]=r[8]*a,n[9]=r[9]*a,n[10]=r[10]*a,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}}(),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),h=Math.sin(i);if("XYZ"===t.order){var l=o*u,d=o*h,p=a*u,f=a*h;e[0]=s*u,e[4]=-s*h,e[8]=c,e[1]=d+p*c,e[5]=l-f*c,e[9]=-a*s,e[2]=f-l*c,e[6]=p+d*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,v=s*h,g=c*u,y=c*h;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*c,e[1]=o*h,e[5]=o*u,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){var m=s*u,v=s*h,g=c*u,y=c*h;e[0]=m-y*a,e[4]=-o*h,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){var l=o*u,d=o*h,p=a*u,f=a*h;e[0]=s*u,e[4]=p*c-d,e[8]=l*c+f,e[1]=s*h,e[5]=f*c+l,e[9]=d*c-p,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var x=o*s,_=o*c,b=a*s,w=a*c;e[0]=s*u,e[4]=w-x*h,e[8]=b*h+_,e[1]=h,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=_*h+b,e[10]=x-w*h}else if("XZY"===t.order){var x=o*s,_=o*c,b=a*s,w=a*c;e[0]=s*u,e[4]=-h,e[8]=c*u,e[1]=x*h+w,e[5]=o*u,e[9]=_*h-b,e[2]=b*h-_,e[6]=a*u,e[10]=w*h+x}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(){var t=new s(0,0,0),e=new s(1,1,1);return function(n){return this.compose(t,n,e)}}(),lookAt:function(){var t=new s,e=new s,n=new s;return function(r,i,o){var a=this.elements;return n.subVectors(r,i),0===n.lengthSq()&&(n.z=1),n.normalize(),t.crossVectors(o,n),0===t.lengthSq()&&(1===Math.abs(o.z)?n.x+=1e-4:n.z+=1e-4,n.normalize(),t.crossVectors(o,n)),t.normalize(),e.crossVectors(n,t),a[0]=t.x,a[4]=e.x,a[8]=n.x,a[1]=t.y,a[5]=e.y,a[9]=n.y,a[2]=t.z,a[6]=e.z,a[10]=n.z,this}}(),multiply:function(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],h=n[5],l=n[9],d=n[13],p=n[2],f=n[6],m=n[10],v=n[14],g=n[3],y=n[7],x=n[11],_=n[15],b=r[0],w=r[4],M=r[8],E=r[12],T=r[1],S=r[5],A=r[9],R=r[13],L=r[2],C=r[6],P=r[10],O=r[14],I=r[3],N=r[7],D=r[11],U=r[15];return i[0]=o*b+a*T+s*L+c*I,i[4]=o*w+a*S+s*C+c*N,i[8]=o*M+a*A+s*P+c*D,i[12]=o*E+a*R+s*O+c*U,i[1]=u*b+h*T+l*L+d*I,i[5]=u*w+h*S+l*C+d*N,i[9]=u*M+h*A+l*P+d*D,i[13]=u*E+h*R+l*O+d*U,i[2]=p*b+f*T+m*L+v*I,i[6]=p*w+f*S+m*C+v*N,i[10]=p*M+f*A+m*P+v*D,i[14]=p*E+f*R+m*O+v*U,i[3]=g*b+y*T+x*L+_*I,i[7]=g*w+y*S+x*C+_*N,i[11]=g*M+y*A+x*P+_*D,i[15]=g*E+y*R+x*O+_*U,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},applyToBufferAttribute:function(){var t=new s;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],c=t[13],u=t[2],h=t[6],l=t[10],d=t[14];return t[3]*(+i*s*h-r*c*h-i*a*l+n*c*l+r*a*d-n*s*d)+t[7]*(+e*s*d-e*c*l+i*o*l-r*o*d+r*c*u-i*s*u)+t[11]*(+e*c*h-e*a*d-i*o*h+n*o*d+i*a*u-n*c*u)+t[15]*(-r*a*u-e*s*h+e*a*l+r*o*h-n*o*l+n*s*u)},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this},setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},getInverse:function(t,e){var n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=r[5],h=r[6],l=r[7],d=r[8],p=r[9],f=r[10],m=r[11],v=r[12],g=r[13],y=r[14],x=r[15],_=p*y*l-g*f*l+g*h*m-u*y*m-p*h*x+u*f*x,b=v*f*l-d*y*l-v*h*m+c*y*m+d*h*x-c*f*x,w=d*g*l-v*p*l+v*u*m-c*g*m-d*u*x+c*p*x,M=v*p*h-d*g*h-v*u*f+c*g*f+d*u*y-c*p*y,E=i*_+o*b+a*w+s*M;if(0===E){var T="THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0";if(!0===e)throw new Error(T);return console.warn(T),this.identity()}var S=1/E;return n[0]=_*S,n[1]=(g*f*s-p*y*s-g*a*m+o*y*m+p*a*x-o*f*x)*S,n[2]=(u*y*s-g*h*s+g*a*l-o*y*l-u*a*x+o*h*x)*S,n[3]=(p*h*s-u*f*s-p*a*l+o*f*l+u*a*m-o*h*m)*S,n[4]=b*S,n[5]=(d*y*s-v*f*s+v*a*m-i*y*m-d*a*x+i*f*x)*S,n[6]=(v*h*s-c*y*s-v*a*l+i*y*l+c*a*x-i*h*x)*S,n[7]=(c*f*s-d*h*s+d*a*l-i*f*l-c*a*m+i*h*m)*S,n[8]=w*S,n[9]=(v*p*s-d*g*s-v*o*m+i*g*m+d*o*x-i*p*x)*S,n[10]=(c*g*s-v*u*s+v*o*l-i*g*l-c*o*x+i*u*x)*S,n[11]=(d*u*s-c*p*s-d*o*l+i*p*l+c*o*m-i*u*m)*S,n[12]=M*S,n[13]=(d*g*a-v*p*a+v*o*f-i*g*f-d*o*y+i*p*y)*S,n[14]=(v*u*a-c*g*a-v*o*h+i*g*h+c*o*y-i*u*y)*S,n[15]=(c*p*a-d*u*a+d*o*h-i*p*h-c*o*f+i*u*f)*S,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){var r=this.elements,i=e._x,o=e._y,a=e._z,s=e._w,c=i+i,u=o+o,h=a+a,l=i*c,d=i*u,p=i*h,f=o*u,m=o*h,v=a*h,g=s*c,y=s*u,x=s*h,_=n.x,b=n.y,w=n.z;return r[0]=(1-(f+v))*_,r[1]=(d+x)*_,r[2]=(p-y)*_,r[3]=0,r[4]=(d-x)*b,r[5]=(1-(l+v))*b,r[6]=(m+g)*b,r[7]=0,r[8]=(p+y)*w,r[9]=(m-g)*w,r[10]=(1-(l+f))*w,r[11]=0,r[12]=t.x,r[13]=t.y,r[14]=t.z,r[15]=1,this},decompose:function(){var t=new s,e=new o;return function(n,r,i){var o=this.elements,a=t.set(o[0],o[1],o[2]).length(),s=t.set(o[4],o[5],o[6]).length(),c=t.set(o[8],o[9],o[10]).length();this.determinant()<0&&(a=-a),n.x=o[12],n.y=o[13],n.z=o[14],e.copy(this);var u=1/a,h=1/s,l=1/c;return e.elements[0]*=u,e.elements[1]*=u,e.elements[2]*=u,e.elements[4]*=h,e.elements[5]*=h,e.elements[6]*=h,e.elements[8]*=l,e.elements[9]*=l,e.elements[10]*=l,r.setFromRotationMatrix(e),i.x=a,i.y=s,i.z=c,this}}(),makePerspective:function(t,e,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(e-t),c=2*i/(n-r),u=(e+t)/(e-t),h=(n+r)/(n-r),l=-(o+i)/(o-i),d=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=h,a[13]=0,a[2]=0,a[6]=0,a[10]=l,a[14]=d,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),c=1/(n-r),u=1/(o-i),h=(e+t)*s,l=(n+r)*c,d=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-h,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-l,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}),Object.assign(a,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],c=n[r+1],u=n[r+2],h=n[r+3],l=i[o+0],d=i[o+1],p=i[o+2],f=i[o+3];if(h!==f||s!==l||c!==d||u!==p){var m=1-a,v=s*l+c*d+u*p+h*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var x=Math.sqrt(y),_=Math.atan2(x,v*g);m=Math.sin(m*_)/x,a=Math.sin(a*_)/x}var b=a*g;if(s=s*m+l*b,c=c*m+d*b,u=u*m+p*b,h=h*m+f*b,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+h*h);s*=w,c*=w,u*=w,h*=w}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=h}}),Object.defineProperties(a.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(a.prototype,{set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,e){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,r=t._y,i=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(n/2),u=a(r/2),h=a(i/2),l=s(n/2),d=s(r/2),p=s(i/2);return"XYZ"===o?(this._x=l*u*h+c*d*p,this._y=c*d*h-l*u*p,this._z=c*u*p+l*d*h,this._w=c*u*h-l*d*p):"YXZ"===o?(this._x=l*u*h+c*d*p,this._y=c*d*h-l*u*p,this._z=c*u*p-l*d*h,this._w=c*u*h+l*d*p):"ZXY"===o?(this._x=l*u*h-c*d*p,this._y=c*d*h+l*u*p,this._z=c*u*p+l*d*h,this._w=c*u*h-l*d*p):"ZYX"===o?(this._x=l*u*h-c*d*p,this._y=c*d*h+l*u*p,this._z=c*u*p-l*d*h,this._w=c*u*h+l*d*p):"YZX"===o?(this._x=l*u*h+c*d*p,this._y=c*d*h+l*u*p,this._z=c*u*p-l*d*h,this._w=c*u*h-l*d*p):"XZY"===o&&(this._x=l*u*h-c*d*p,this._y=c*d*h-l*u*p,this._z=c*u*p+l*d*h,this._w=c*u*h+l*d*p),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],u=n[2],h=n[6],l=n[10],d=r+s+l;return d>0?(e=.5/Math.sqrt(d+1),this._w=.25/e,this._x=(h-c)*e,this._y=(o-u)*e,this._z=(a-i)*e):r>s&&r>l?(e=2*Math.sqrt(1+r-s-l),this._w=(h-c)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+u)/e):s>l?(e=2*Math.sqrt(1+s-r-l),this._w=(o-u)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(c+h)/e):(e=2*Math.sqrt(1+l-r-s),this._w=(a-i)/e,this._x=(o+u)/e,this._y=(c+h)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new s;return function(n,r){return void 0===e&&(e=new s),t=n.dot(r)+1,t<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this.onChangeCallback(),this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,h=Math.sin(e*c)/s;return this._w=o*u+this._w*h,this._x=n*u+this._x*h,this._y=r*u+this._y*h,this._z=i*u+this._z*h,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return void 0===e&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(s.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyEuler:function(){var t=new a;return function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(t.setFromEuler(e))}}(),applyAxisAngle:function(){var t=new a;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*r-a*n,u=s*n+a*e-i*r,h=s*r+i*n-o*e,l=-i*e-o*n-a*r;return this.x=c*s+l*-i+u*-a-h*-o,this.y=u*s+l*-o+h*-i-c*-a,this.z=h*s+l*-a+c*-o-u*-i,this},project:function(){var t=new o;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new o;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new s,e=new s;return function(n,r){return t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new s;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new s;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ic.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(c.prototype,{isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new s;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],u=n[4],h=n[7],l=n[2],d=n[5],p=n[8],f=r[0],m=r[3],v=r[6],g=r[1],y=r[4],x=r[7],_=r[2],b=r[5],w=r[8];return i[0]=o*f+a*g+s*_,i[3]=o*m+a*y+s*b,i[6]=o*v+a*x+s*w,i[1]=c*f+u*g+h*_,i[4]=c*m+u*y+h*b,i[7]=c*v+u*x+h*w,i[2]=l*f+d*g+p*_,i[5]=l*m+d*y+p*b,i[8]=l*v+d*x+p*w,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this},determinant:function(){var t=this.elements,e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*i*u+n*a*s+r*i*c-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],u=n[5],h=n[6],l=n[7],d=n[8],p=d*c-u*l,f=u*h-d*s,m=l*s-c*h,v=i*p+o*f+a*m;if(0===v){var g="THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=p*y,r[1]=(a*l-d*o)*y,r[2]=(u*o-a*c)*y,r[3]=f*y,r[4]=(d*i-a*h)*y,r[5]=(a*s-u*i)*y,r[6]=m*y,r[7]=(o*h-l*i)*y,r[8]=(c*i-o*s)*y,this},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},transposeIntoArray:function(t){var e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this},setUvTransform:function(t,e,n,r,i,o,a){var s=Math.cos(i),c=Math.sin(i);this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-r*c,r*s,-r*(-c*o+s*a)+a+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],u=r[7];return r[0]=e*i+n*s,r[3]=e*o+n*c,r[6]=e*a+n*u,r[1]=-n*i+e*s,r[4]=-n*o+e*c,r[7]=-n*a+e*u,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var Nc=0;u.DEFAULT_IMAGE=void 0,u.DEFAULT_MAPPING=os,u.prototype=Object.assign(Object.create(r.prototype),{constructor:u,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ic.generateUUID()),e||void 0!==t.images[r.uuid]||(t.images[r.uuid]={uuid:r.uuid,url:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),e.width=t.width,e.height=t.height;var n=e.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(r)}),n.image=r.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===os){if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case ps:t.x=t.x-Math.floor(t.x);break;case fs:t.x=t.x<0?0:1;break;case ms:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case ps:t.y=t.y-Math.floor(t.y);break;case fs:t.y=t.y<0?0:1;break;case ms:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.defineProperty(u.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(h.prototype,{isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,r,i,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],h=o[5],l=o[9],d=o[2],p=o[6],f=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-d)<.01&&Math.abs(l-p)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+d)<.1&&Math.abs(l+p)<.1&&Math.abs(a+h+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(h+1)/2,g=(f+1)/2,y=(s+u)/4,x=(c+d)/4,_=(l+p)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(m),r=y/n,i=x/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(v),n=y/r,i=_/r):g<.01?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(g),n=x/i,r=_/i),this.set(n,r,i,e),this}var b=Math.sqrt((p-l)*(p-l)+(c-d)*(c-d)+(u-s)*(u-s));return Math.abs(b)<.001&&(b=1),this.x=(p-l)/b,this.y=(c-d)/b,this.z=(u-s)/b,this.w=Math.acos((a+h+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new h,e=new h),t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),l.prototype=Object.assign(Object.create(r.prototype),{constructor:l,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),d.prototype=Object.create(l.prototype),d.prototype.constructor=d,d.prototype.isWebGLRenderTargetCube=!0,p.prototype=Object.create(u.prototype),p.prototype.constructor=p,p.prototype.isDataTexture=!0,Object.assign(f.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;s<c;s+=3){var u=t[s],h=t[s+1],l=t[s+2];u<e&&(e=u),h<n&&(n=h),l<r&&(r=l),u>i&&(i=u),h>o&&(o=h),l>a&&(a=l)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;s<c;s++){var u=t.getX(s),h=t.getY(s),l=t.getZ(s);u<e&&(e=u),h<n&&(n=h),l<r&&(r=l),u>i&&(i=u),h>o&&(o=h),l>a&&(a=l)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new s;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new s),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new s),this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},expandByObject:function(){function t(t){var o=t.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(n=0,r=a.length;n<r;n++)i.copy(a[n]),i.applyMatrix4(t.matrixWorld),e.expandByPoint(i)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(n=0,r=s.count;n<r;n++)i.fromBufferAttribute(s,n).applyMatrix4(t.matrixWorld),e.expandByPoint(i)}}var e,n,r,i=new s;return function(n){return e=this,n.updateMatrixWorld(!0),n.traverse(t),this}}(),containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new s),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)},intersectsSphere:function(){var t=new s;return function(e){return this.clampPoint(e.center,t),t.distanceToSquared(e.center)<=e.radius*e.radius}}(),intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=t.constant&&n>=t.constant},intersectsTriangle:function(){function t(t){var i,o;for(i=0,o=t.length-3;i<=o;i+=3){c.fromArray(t,i);var a=h.x*Math.abs(c.x)+h.y*Math.abs(c.y)+h.z*Math.abs(c.z),s=e.dot(c),u=n.dot(c),l=r.dot(c);if(Math.max(-Math.max(s,u,l),Math.min(s,u,l))>a)return!1}return!0}var e=new s,n=new s,r=new s,i=new s,o=new s,a=new s,c=new s,u=new s,h=new s,l=new s;return function(s){if(this.isEmpty())return!1;this.getCenter(u),h.subVectors(this.max,u),e.subVectors(s.a,u),n.subVectors(s.b,u),r.subVectors(s.c,u),i.subVectors(n,e),o.subVectors(r,n),a.subVectors(e,r);var c=[0,-i.z,i.y,0,-o.z,o.y,0,-a.z,a.y,i.z,0,-i.x,o.z,0,-o.x,a.z,0,-a.x,-i.y,i.x,0,-o.y,o.x,0,-a.y,a.x,0];return!!t(c)&&(c=[1,0,0,0,1,0,0,0,1],!!t(c)&&(l.crossVectors(i,o),c=[l.x,l.y,l.z],t(c)))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new s),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new s;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new s;return function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new m),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(t){if(this.isEmpty())return this;var e=t.elements,n=e[0]*this.min.x,r=e[1]*this.min.x,i=e[2]*this.min.x,o=e[0]*this.max.x,a=e[1]*this.max.x,s=e[2]*this.max.x,c=e[4]*this.min.y,u=e[5]*this.min.y,h=e[6]*this.min.y,l=e[4]*this.max.y,d=e[5]*this.max.y,p=e[6]*this.max.y,f=e[8]*this.min.z,m=e[9]*this.min.z,v=e[10]*this.min.z,g=e[8]*this.max.z,y=e[9]*this.max.z,x=e[10]*this.max.z;return this.min.x=Math.min(n,o)+Math.min(c,l)+Math.min(f,g)+e[12],this.min.y=Math.min(r,a)+Math.min(u,d)+Math.min(m,y)+e[13],this.min.z=Math.min(i,s)+Math.min(h,p)+Math.min(v,x)+e[14],this.max.x=Math.max(n,o)+Math.max(c,l)+Math.max(f,g)+e[12],this.max.y=Math.max(r,a)+Math.max(u,d)+Math.max(m,y)+e[13],this.max.z=Math.max(i,s)+Math.max(h,p)+Math.max(v,x)+e[14],this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(m.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new f;return function(e,n){var r=this.center;void 0!==n?r.copy(n):t.setFromPoints(e).getCenter(r);for(var i=0,o=0,a=e.length;o<a;o++)i=Math.max(i,r.distanceToSquared(e[o]));return this.radius=Math.sqrt(i),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},containsPoint:function(t){return t.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(t){return t.distanceTo(this.center)-this.radius},intersectsSphere:function(t){var e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new s),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new f),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius}}),Object.assign(v.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new s,e=new s;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.normal.copy(t.normal),this.constant=t.constant,this},normalize:function(){var t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(t){return this.normal.dot(t)+this.constant},distanceToSphere:function(t){return this.distanceToPoint(t.center)-t.radius},projectPoint:function(t,e){return void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new s),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new s;return function(e,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new s);var r=e.delta(t),i=this.normal.dot(r);if(0!==i){var o=-(e.start.dot(this.normal)+this.constant)/i;if(!(o<0||o>1))return n.copy(r).multiplyScalar(o).add(e.start)}else if(0===this.distanceToPoint(e.start))return n.copy(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new s),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new s,e=new c;return function(n,r){var i=r||e.getNormalMatrix(n),o=this.coplanarPoint(t).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),this}}(),translate:function(t){return this.constant-=t.dot(this.normal),this},equals:function(t){return t.normal.equals(this.normal)&&t.constant===this.constant}}),Object.assign(g.prototype,{set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],h=n[7],l=n[8],d=n[9],p=n[10],f=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,h-s,f-l,y-m).normalize(),e[1].setComponents(a+r,h+s,f+l,y+m).normalize(),e[2].setComponents(a+i,h+c,f+d,y+v).normalize(),e[3].setComponents(a-i,h-c,f-d,y-v).normalize(),e[4].setComponents(a-o,h-u,f-p,y-g).normalize(),e[5].setComponents(a+o,h+u,f+p,y+g).normalize(),this},intersectsObject:function(){var t=new m;return function(e){var n=e.geometry;return null===n.boundingSphere&&n.computeBoundingSphere(),t.copy(n.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSprite:function(){var t=new m;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){if(e[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:function(){var t=new s,e=new s;return function(n){for(var r=this.planes,i=0;i<6;i++){var o=r[i];t.x=o.normal.x>0?n.min.x:n.max.x,e.x=o.normal.x>0?n.max.x:n.min.x,t.y=o.normal.y>0?n.min.y:n.max.y,e.y=o.normal.y>0?n.max.y:n.min.y,t.z=o.normal.z>0?n.min.z:n.max.z,e.z=o.normal.z>0?n.max.z:n.min.z;var a=o.distanceToPoint(t),s=o.distanceToPoint(e);if(a<0&&s<0)return!1}return!0}}(),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}});var Dc={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"\nvec3 transformed = vec3( position );\n",beginnormal_vertex:"\nvec3 objectNormal = vec3( normal );\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tif( decayExponent > 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t}\n\treturn 1.0;\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE  = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale =  bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",encodings_fragment:"  gl_FragColor = linearToOutputTexel( gl_FragColor );\n",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM            = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat D      = max( maxRange / maxRGB, 1.0 );\n\tD            = min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value )  {\n\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract(Le);\n\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n\treturn vec4( max(vRGB, 0.0), 1.0 );\n}\n",envmap_fragment:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntensity;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif\n",envmap_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif\n",fog_vertex:"\n#ifdef USE_FOG\nfogDepth = -mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n  varying float fogDepth;\n#endif\n",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif\n",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif\n",gradientmap_pars_fragment:"#ifdef TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n",lights_pars_begin:"uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)\n",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearCoatRadiance = vec3( 0.0 );\n#endif\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\n\t#ifndef STANDARD\n\t\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\n\t#endif\n#endif\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\tgl_Position.z *= gl_Position.w;\n\t#endif\n#endif\n",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",map_particle_fragment:"#ifdef USE_MAP\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform mat3 uvTransform;\n\tuniform sampler2D map;\n#endif\n",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n",normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n#endif\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tmat3 tsn = mat3( S, T, N );\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\tmapN.xy *= normalScale;\n\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\n",dithering_fragment:"#if defined( DITHERING )\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif\n",dithering_pars_fragment:"#if defined( DITHERING )\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif\n",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif\n",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif\n",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n",tonemapping_pars_fragment:"#ifndef saturate\n\t#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif\n",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n}\n",cube_vert:"varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}\n",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\n",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}\n",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}\n",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}\n",equirect_vert:"varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}\n",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}\n",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}\n",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",meshphysical_frag:"#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",meshphysical_vert:"#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}\n",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}\n",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}\n",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <fog_fragment>\n}\n",shadow_vert:"#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n"},Uc={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t){e[n]={};for(var r in t[n]){var i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}}return e}},Bc={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Object.assign(y.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=t,this},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this},setRGB:function(t,e,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(e,n,r){if(e=Ic.euclideanModulo(e,1),n=Ic.clamp(n,0,1),r=Ic.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=t(o,i,e+1/3),this.g=t(o,i,e),this.b=t(o,i,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,e(r[5]),this;if(r=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return e(r[5]),this.setHSL(a,s,c)}}}else if(n=/^\#([A-Fa-f0-9]+)$/.exec(t)){var u=n[1],h=u.length;if(3===h)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===h)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}if(t&&t.length>0){var u=Bc[t];void 0!==u?this.setHex(u):console.warn("THREE.Color: Unknown color "+t)}return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(t){return this.copyGammaToLinear(this,t),this},convertLinearToGamma:function(t){return this.copyLinearToGamma(this,t),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(t){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),c=(s+a)/2;if(s===a)e=0,n=0;else{var u=a-s;switch(n=c<=.5?u/(a+s):u/(2-a-s),a){case r:e=(i-o)/u+(i<o?6:0);break;case i:e=(o-r)/u+2;break;case o:e=(r-i)/u+4}e/=6}return t.h=e,t.s=n,t.l=c,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(){var t={};return function(e,n,r){return this.getHSL(t),t.h+=e,t.s+=n,t.l+=r,this.setHSL(t.h,t.s,t.l),this}}(),add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this},addScalar:function(t){return this.r+=t,this.g+=t,this.b+=t,this},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this},multiply:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this},multiplyScalar:function(t){return this.r*=t,this.g*=t,this.b*=t,this},lerp:function(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this},equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var Fc={common:{diffuse:{value:new y(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new c},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new i(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new y(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new y(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new c}}},zc={basic:{uniforms:Uc.merge([Fc.common,Fc.specularmap,Fc.envmap,Fc.aomap,Fc.lightmap,Fc.fog]),vertexShader:Dc.meshbasic_vert,fragmentShader:Dc.meshbasic_frag},lambert:{uniforms:Uc.merge([Fc.common,Fc.specularmap,Fc.envmap,Fc.aomap,Fc.lightmap,Fc.emissivemap,Fc.fog,Fc.lights,{emissive:{value:new y(0)}}]),vertexShader:Dc.meshlambert_vert,fragmentShader:Dc.meshlambert_frag},phong:{uniforms:Uc.merge([Fc.common,Fc.specularmap,Fc.envmap,Fc.aomap,Fc.lightmap,Fc.emissivemap,Fc.bumpmap,Fc.normalmap,Fc.displacementmap,Fc.gradientmap,Fc.fog,Fc.lights,{emissive:{value:new y(0)},specular:{value:new y(1118481)},shininess:{value:30}}]),vertexShader:Dc.meshphong_vert,fragmentShader:Dc.meshphong_frag},standard:{uniforms:Uc.merge([Fc.common,Fc.envmap,Fc.aomap,Fc.lightmap,Fc.emissivemap,Fc.bumpmap,Fc.normalmap,Fc.displacementmap,Fc.roughnessmap,Fc.metalnessmap,Fc.fog,Fc.lights,{emissive:{value:new y(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:Dc.meshphysical_vert,fragmentShader:Dc.meshphysical_frag},points:{uniforms:Uc.merge([Fc.points,Fc.fog]),vertexShader:Dc.points_vert,fragmentShader:Dc.points_frag},dashed:{uniforms:Uc.merge([Fc.common,Fc.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Dc.linedashed_vert,fragmentShader:Dc.linedashed_frag},depth:{uniforms:Uc.merge([Fc.common,Fc.displacementmap]),vertexShader:Dc.depth_vert,fragmentShader:Dc.depth_frag},normal:{uniforms:Uc.merge([Fc.common,Fc.bumpmap,Fc.normalmap,Fc.displacementmap,{opacity:{value:1}}]),vertexShader:Dc.normal_vert,fragmentShader:Dc.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Dc.cube_vert,fragmentShader:Dc.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Dc.equirect_vert,fragmentShader:Dc.equirect_frag},distanceRGBA:{uniforms:Uc.merge([Fc.common,Fc.displacementmap,{referencePosition:{value:new s},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Dc.distanceRGBA_vert,fragmentShader:Dc.distanceRGBA_frag},shadow:{uniforms:Uc.merge([Fc.lights,Fc.fog,{color:{value:new y(0)},opacity:{value:1}}]),vertexShader:Dc.shadow_vert,fragmentShader:Dc.shadow_frag}};zc.physical={uniforms:Uc.merge([zc.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:Dc.meshphysical_vert,fragmentShader:Dc.meshphysical_frag},b.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],b.DefaultOrder="XYZ",Object.defineProperties(b.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(b.prototype,{isEuler:!0,set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(t,e,n){var r=Ic.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],c=i[1],u=i[5],h=i[9],l=i[2],d=i[6],p=i[10];return e=e||this._order,"XYZ"===e?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-h,p),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(d,u),this._z=0)):"YXZ"===e?(this._x=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._y=Math.atan2(s,p),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-l,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(r(d,-1,1)),Math.abs(d)<.99999?(this._y=Math.atan2(-l,p),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._x=Math.atan2(d,p),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===e?(this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-h,u),this._y=Math.atan2(-l,o)):(this._x=0,this._y=Math.atan2(s,p))):"XZY"===e?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(d,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-h,p),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new o;return function(e,n,r){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:function(){var t=new a;return function(e){return t.setFromEuler(this),this.setFromQuaternion(t,e)}}(),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new s(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(w.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var Gc=0;M.DefaultUp=new s(0,1,0),M.DefaultMatrixAutoUpdate=!0,M.prototype=Object.assign(Object.create(r.prototype),{constructor:M,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:function(){var t=new a;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.multiply(t),this}}(),rotateOnWorldAxis:function(){var t=new a;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new s(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new s(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new s(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new s;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new s(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new s(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new s(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new o;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new o,e=new s;return function(n,r,i){n.isVector3?e.copy(n):e.set(n,r,i),this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var n=this.children.indexOf(t);return-1!==n&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n],o=i.getObjectByProperty(t,e);if(void 0!==o)return o}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new s),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new s,e=new s;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),n=new a),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,n,e),n}}(),getWorldScale:function(){var t=new s,e=new a;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new s),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,n),n}}(),getWorldDirection:function(){var t=new a;return function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new s),this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},toJSON:function(t){function e(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}function n(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}var r=void 0===t||"string"==typeof t,i={};r&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},i.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var o={};if(o.uuid=this.uuid,o.type=this.type,""!==this.name&&(o.name=this.name),!0===this.castShadow&&(o.castShadow=!0),!0===this.receiveShadow&&(o.receiveShadow=!0),!1===this.visible&&(o.visible=!1),!1===this.frustumCulled&&(o.frustumCulled=!1),0!==this.renderOrder&&(o.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(o.userData=this.userData),o.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(o.matrixAutoUpdate=!1),void 0!==this.geometry){o.geometry=e(t.geometries,this.geometry);var a=this.geometry.parameters;if(void 0!==a&&void 0!==a.shapes){var s=a.shapes;if(Array.isArray(s))for(var c=0,u=s.length;c<u;c++){var h=s[c];e(t.shapes,h)}else e(t.shapes,s)}}if(void 0!==this.material)if(Array.isArray(this.material)){for(var l=[],c=0,u=this.material.length;c<u;c++)l.push(e(t.materials,this.material[c]));o.material=l}else o.material=e(t.materials,this.material);if(this.children.length>0){o.children=[];for(var c=0;c<this.children.length;c++)o.children.push(this.children[c].toJSON(t).object)}if(r){var d=n(t.geometries),p=n(t.materials),f=n(t.textures),m=n(t.images),s=n(t.shapes);d.length>0&&(i.geometries=d),p.length>0&&(i.materials=p),f.length>0&&(i.textures=f),m.length>0&&(i.images=m),s.length>0&&(i.shapes=s)}return i.object=o,i},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}}),E.prototype=Object.assign(Object.create(M.prototype),{constructor:E,isCamera:!0,copy:function(t,e){return M.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new a;return function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new s),this.getWorldQuaternion(t),e.set(0,0,-1).applyQuaternion(t)}}(),updateMatrixWorld:function(t){M.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),T.prototype=Object.assign(Object.create(E.prototype),{constructor:T,isOrthographicCamera:!0,copy:function(t,e){return E.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),h=(this.right-this.left)/this.view.width,l=(this.top-this.bottom)/this.view.height;i+=h*(this.view.offsetX/c),o=i+h*(this.view.width/c),a-=l*(this.view.offsetY/u),s=a-l*(this.view.height/u)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(t){var e=M.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(S.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(var e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var Hc=0;A.prototype=Object.assign(Object.create(r.prototype),{constructor:A,isGeometry:!0,applyMatrix:function(t){for(var e=(new c).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(t)}for(var n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(e).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new o;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new o;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new o;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new o;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new o;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new M;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function e(t,e,r,i){var o=void 0!==c?[d[t].clone(),d[e].clone(),d[r].clone()]:[],a=void 0!==u?[n.colors[t].clone(),n.colors[e].clone(),n.colors[r].clone()]:[],s=new S(t,e,r,o,a,i);n.faces.push(s),void 0!==h&&n.faceVertexUvs[0].push([p[t].clone(),p[e].clone(),p[r].clone()]),void 0!==l&&n.faceVertexUvs[1].push([f[t].clone(),f[e].clone(),f[r].clone()])}var n=this,r=null!==t.index?t.index.array:void 0,o=t.attributes,a=o.position.array,c=void 0!==o.normal?o.normal.array:void 0,u=void 0!==o.color?o.color.array:void 0,h=void 0!==o.uv?o.uv.array:void 0,l=void 0!==o.uv2?o.uv2.array:void 0;void 0!==l&&(this.faceVertexUvs[1]=[]);for(var d=[],p=[],f=[],m=0,v=0;m<a.length;m+=3,v+=2)n.vertices.push(new s(a[m],a[m+1],a[m+2])),void 0!==c&&d.push(new s(c[m],c[m+1],c[m+2])),void 0!==u&&n.colors.push(new y(u[m],u[m+1],u[m+2])),void 0!==h&&p.push(new i(h[v],h[v+1])),void 0!==l&&f.push(new i(l[v],l[v+1]));var g=t.groups;if(g.length>0)for(var m=0;m<g.length;m++)for(var x=g[m],_=x.start,b=x.count,v=_,w=_+b;v<w;v+=3)void 0!==r?e(r[v],r[v+1],r[v+2],x.materialIndex):e(v,v+1,v+2,x.materialIndex);else if(void 0!==r)for(var m=0;m<r.length;m+=3)e(r[m],r[m+1],r[m+2]);else for(var m=0;m<a.length/3;m+=3)e(m,m+1,m+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){var t=new s;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new o;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new s,e=new s,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],c=this.vertices[i.c];t.subVectors(c,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){void 0===t&&(t=!0);var e,n,r,i,o,a;for(a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new s;if(t){var c,u,h,l=new s,d=new s;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],c=this.vertices[o.a],u=this.vertices[o.b],h=this.vertices[o.c],l.subVectors(h,u),d.subVectors(c,u),l.cross(d),a[o.a].add(l),a[o.b].add(l),a[o.c].add(l)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)o=this.faces[r],a[o.a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){o=this.faces[r];var p=o.vertexNormals;3===p.length?(p[0].copy(a[o.a]),p[1].copy(a[o.b]),p[2].copy(a[o.c])):(p[0]=a[o.a].clone(),p[1]=a[o.b].clone(),p[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){n=this.faces[t];var r=n.vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for(i=this.faces[n],i.__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new A;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a,c,u=this.morphNormals[t].faceNormals,h=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)a=new s,c={a:new s,b:new s,c:new s},u.push(a),h.push(c)}var l=this.morphNormals[t];o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals();var a,c;for(n=0,r=this.faces.length;n<r;n++)i=this.faces[n],a=l.faceNormals[n],c=l.vertexNormals[n],a.copy(i.normal),c.a.copy(i.vertexNormals[0]),c.b.copy(i.vertexNormals[1]),c.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)i=this.faces[n],i.normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new f),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new m),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(!t||!t.isGeometry)return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t);var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,u=t.faces,h=this.faceVertexUvs[0],l=t.faceVertexUvs[0],d=this.colors,p=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new c).getNormalMatrix(e));for(var f=0,m=a.length;f<m;f++){var v=a[f],g=v.clone();void 0!==e&&g.applyMatrix4(e),o.push(g)}for(var f=0,m=p.length;f<m;f++)d.push(p[f].clone());for(f=0,m=u.length;f<m;f++){var y,x,_,b=u[f],w=b.vertexNormals,M=b.vertexColors;y=new S(b.a+i,b.b+i,b.c+i),y.normal.copy(b.normal),void 0!==r&&y.normal.applyMatrix3(r).normalize();for(var E=0,T=w.length;E<T;E++)x=w[E].clone(),void 0!==r&&x.applyMatrix3(r).normalize(),y.vertexNormals.push(x);y.color.copy(b.color);for(var E=0,T=M.length;E<T;E++)_=M[E],y.vertexColors.push(_.clone());y.materialIndex=b.materialIndex+n,s.push(y)}for(f=0,m=l.length;f<m;f++){var A=l[f],R=[];if(void 0!==A){for(var E=0,T=A.length;E<T;E++)R.push(A[E].clone());h.push(R)}}},mergeMesh:function(t){if(!t||!t.isMesh)return void console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t);t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)},mergeVertices:function(){var t,e,n,r,i,o,a,s,c={},u=[],h=[],l=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],e=Math.round(t.x*l)+"_"+Math.round(t.y*l)+"_"+Math.round(t.z*l),void 0===c[e]?(c[e]=n,u.push(this.vertices[n]),h[n]=u.length-1):h[n]=h[c[e]];var d=[];for(n=0,r=this.faces.length;n<r;n++){i=this.faces[n],i.a=h[i.a],i.b=h[i.b],i.c=h[i.c],o=[i.a,i.b,i.c];for(var p=0;p<3;p++)if(o[p]===o[(p+1)%3]){d.push(n);break}}for(n=d.length-1;n>=0;n--){var f=d[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(f,1)}var m=this.vertices.length-u.length;return this.vertices=u,m},setFromPoints:function(t){this.vertices=[];for(var e=0,n=t.length;e<n;e++){var r=t[e];this.vertices.push(new s(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){function t(t,e){return t.materialIndex-e.materialIndex}for(var e=this.faces,n=e.length,r=0;r<n;r++)e[r]._id=r;e.sort(t);var i,o,a=this.faceVertexUvs[0],s=this.faceVertexUvs[1];a&&a.length===n&&(i=[]),s&&s.length===n&&(o=[]);for(var r=0;r<n;r++){var c=e[r]._id;i&&i.push(a[c]),o&&o.push(s[c])}i&&(this.faceVertexUvs[0]=i),o&&(this.faceVertexUvs[1]=o)},toJSON:function(){function t(t,e,n){return n?t|1<<e:t&~(1<<e)}function e(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==d[e]?d[e]:(d[e]=l.length/3,l.push(t.x,t.y,t.z),d[e])}function n(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==f[e]?f[e]:(f[e]=p.length,p.push(t.getHex()),f[e])}function r(t){var e=t.x.toString()+t.y.toString();return void 0!==v[e]?v[e]:(v[e]=m.length/2,m.push(t.x,t.y),v[e])}var i={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),void 0!==this.parameters){var o=this.parameters;for(var a in o)void 0!==o[a]&&(i[a]=o[a]);return i}for(var s=[],c=0;c<this.vertices.length;c++){var u=this.vertices[c];s.push(u.x,u.y,u.z)}for(var h=[],l=[],d={},p=[],f={},m=[],v={},c=0;c<this.faces.length;c++){var g=this.faces[c],y=void 0!==this.faceVertexUvs[0][c],x=g.normal.length()>0,_=g.vertexNormals.length>0,b=1!==g.color.r||1!==g.color.g||1!==g.color.b,w=g.vertexColors.length>0,M=0;if(M=t(M,0,0),M=t(M,1,!0),M=t(M,2,!1),M=t(M,3,y),M=t(M,4,x),M=t(M,5,_),M=t(M,6,b),M=t(M,7,w),h.push(M),h.push(g.a,g.b,g.c),h.push(g.materialIndex),y){var E=this.faceVertexUvs[0][c];h.push(r(E[0]),r(E[1]),r(E[2]))}if(x&&h.push(e(g.normal)),_){var T=g.vertexNormals;h.push(e(T[0]),e(T[1]),e(T[2]))}if(b&&h.push(n(g.color)),w){var S=g.vertexColors;h.push(n(S[0]),n(S[1]),n(S[2]))}}return i.data={},i.data.vertices=s,i.data.normals=l,p.length>0&&(i.data.colors=p),m.length>0&&(i.data.uvs=[m]),i.data.faces=h,i},clone:function(){return(new A).copy(this)},copy:function(t){var e,n,r,i,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var s=t.vertices;for(e=0,n=s.length;e<n;e++)this.vertices.push(s[e].clone());var c=t.colors;for(e=0,n=c.length;e<n;e++)this.colors.push(c[e].clone());var u=t.faces;for(e=0,n=u.length;e<n;e++)this.faces.push(u[e].clone());for(e=0,n=t.faceVertexUvs.length;e<n;e++){var h=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),r=0,i=h.length;r<i;r++){var l=h[r],d=[];for(o=0,a=l.length;o<a;o++){var p=l[o];d.push(p.clone())}this.faceVertexUvs[e].push(d)}}var f=t.morphTargets;for(e=0,n=f.length;e<n;e++){var m={};if(m.name=f[e].name,void 0!==f[e].vertices)for(m.vertices=[],r=0,i=f[e].vertices.length;r<i;r++)m.vertices.push(f[e].vertices[r].clone());if(void 0!==f[e].normals)for(m.normals=[],r=0,i=f[e].normals.length;r<i;r++)m.normals.push(f[e].normals[r].clone());this.morphTargets.push(m)}var v=t.morphNormals;for(e=0,n=v.length;e<n;e++){var g={};if(void 0!==v[e].vertexNormals)for(g.vertexNormals=[],r=0,i=v[e].vertexNormals.length;r<i;r++){var y=v[e].vertexNormals[r],x={};x.a=y.a.clone(),x.b=y.b.clone(),x.c=y.c.clone(),g.vertexNormals.push(x)}if(void 0!==v[e].faceNormals)for(g.faceNormals=[],r=0,i=v[e].faceNormals.length;r<i;r++)g.faceNormals.push(v[e].faceNormals[r].clone());this.morphNormals.push(g)}var _=t.skinWeights;for(e=0,n=_.length;e<n;e++)this.skinWeights.push(_[e].clone());var b=t.skinIndices;for(e=0,n=b.length;e<n;e++)this.skinIndices.push(b[e].clone());var w=t.lineDistances;for(e=0,n=w.length;e<n;e++)this.lineDistances.push(w[e]);var M=t.boundingBox;null!==M&&(this.boundingBox=M.clone());var E=t.boundingSphere;return null!==E&&(this.boundingSphere=E.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(R.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(R.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new y),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,o=t.length;r<o;r++){var a=t[r];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),a=new i),e[n++]=a.x,e[n++]=a.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new s),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new h),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z,e[n++]=o.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),L.prototype=Object.create(R.prototype),L.prototype.constructor=L,C.prototype=Object.create(R.prototype),C.prototype.constructor=C,P.prototype=Object.create(R.prototype),P.prototype.constructor=P,O.prototype=Object.create(R.prototype),O.prototype.constructor=O,I.prototype=Object.create(R.prototype),I.prototype.constructor=I,N.prototype=Object.create(R.prototype),N.prototype.constructor=N,D.prototype=Object.create(R.prototype),D.prototype.constructor=D,U.prototype=Object.create(R.prototype),U.prototype.constructor=U,B.prototype=Object.create(R.prototype),B.prototype.constructor=B,Object.assign(F.prototype,{computeGroups:function(t){for(var e,n=[],r=void 0,i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,n.push(e)),e={start:3*o,materialIndex:r})}void 0!==e&&(e.count=3*o-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,o=t.faceVertexUvs,a=o[0]&&o[0].length>0,s=o[1]&&o[1].length>0,c=t.morphTargets,u=c.length;if(u>0){e=[];for(var h=0;h<u;h++)e[h]=[];this.morphTargets.position=e}var l,d=t.morphNormals,p=d.length;if(p>0){l=[];for(var h=0;h<p;h++)l[h]=[];this.morphTargets.normal=l}var f=t.skinIndices,m=t.skinWeights,v=f.length===r.length,g=m.length===r.length;0===n.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(var h=0;h<n.length;h++){var y=n[h];this.vertices.push(r[y.a],r[y.b],r[y.c]);var x=y.vertexNormals;if(3===x.length)this.normals.push(x[0],x[1],x[2]);else{var _=y.normal;this.normals.push(_,_,_)}var b=y.vertexColors;if(3===b.length)this.colors.push(b[0],b[1],b[2]);else{var w=y.color;this.colors.push(w,w,w)}if(!0===a){var M=o[0][h];void 0!==M?this.uvs.push(M[0],M[1],M[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",h),this.uvs.push(new i,new i,new i))}if(!0===s){var M=o[1][h];void 0!==M?this.uvs2.push(M[0],M[1],M[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",h),this.uvs2.push(new i,new i,new i))}for(var E=0;E<u;E++){var T=c[E].vertices;e[E].push(T[y.a],T[y.b],T[y.c])}for(var E=0;E<p;E++){var S=d[E].vertexNormals[h];l[E].push(S.a,S.b,S.c)}v&&this.skinIndices.push(f[y.a],f[y.b],f[y.c]),g&&this.skinWeights.push(m[y.a],m[y.b],m[y.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var Vc=1;G.prototype=Object.assign(Object.create(r.prototype),{constructor:G,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(z(t)>65535?D:I)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(t,new R(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;if(void 0!==n){(new c).getNormalMatrix(t).applyToBufferAttribute(n),n.needsUpdate=!0}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new o;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new o;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new o;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new o;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new o;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new M;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new s;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new U(3*e.vertices.length,3),r=new U(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new U(e.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new U(e,3)),this},updateFromObject:function(t){var e=t.geometry;if(t.isMesh){var n=e.__directGeometry;if(!0===e.elementsNeedUpdate&&(n=void 0,e.elementsNeedUpdate=!1),void 0===n)return this.fromGeometry(e);n.verticesNeedUpdate=e.verticesNeedUpdate,n.normalsNeedUpdate=e.normalsNeedUpdate,n.colorsNeedUpdate=e.colorsNeedUpdate,n.uvsNeedUpdate=e.uvsNeedUpdate,n.groupsNeedUpdate=e.groupsNeedUpdate,e.verticesNeedUpdate=!1,e.normalsNeedUpdate=!1,e.colorsNeedUpdate=!1,e.uvsNeedUpdate=!1,e.groupsNeedUpdate=!1,e=n}var r;return!0===e.verticesNeedUpdate&&(r=this.attributes.position,void 0!==r&&(r.copyVector3sArray(e.vertices),r.needsUpdate=!0),e.verticesNeedUpdate=!1),!0===e.normalsNeedUpdate&&(r=this.attributes.normal,void 0!==r&&(r.copyVector3sArray(e.normals),r.needsUpdate=!0),e.normalsNeedUpdate=!1),!0===e.colorsNeedUpdate&&(r=this.attributes.color,void 0!==r&&(r.copyColorsArray(e.colors),r.needsUpdate=!0),e.colorsNeedUpdate=!1),e.uvsNeedUpdate&&(r=this.attributes.uv,void 0!==r&&(r.copyVector2sArray(e.uvs),r.needsUpdate=!0),e.uvsNeedUpdate=!1),e.lineDistancesNeedUpdate&&(r=this.attributes.lineDistance,void 0!==r&&(r.copyArray(e.lineDistances),r.needsUpdate=!0),e.lineDistancesNeedUpdate=!1),e.groupsNeedUpdate&&(e.computeGroups(t.geometry),this.groups=e.groups,e.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new F).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new R(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new R(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new R(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new R(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new R(o,2).copyVector2sArray(t.uvs2))}this.groups=t.groups;for(var a in t.morphTargets){for(var s=[],c=t.morphTargets[a],u=0,h=c.length;u<h;u++){var l=c[u],d=new U(3*l.length,3);s.push(d.copyVector3sArray(l))}this.morphAttributes[a]=s}if(t.skinIndices.length>0){var p=new U(4*t.skinIndices.length,4);this.addAttribute("skinIndex",p.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var f=new U(4*t.skinWeights.length,4);this.addAttribute("skinWeight",f.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new f);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var t=new f,e=new s;return function(){null===this.boundingSphere&&(this.boundingSphere=new m);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;t.setFromBufferAttribute(n),t.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)e.x=n.getX(o),e.y=n.getY(o),e.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,n=this.groups;if(e.position){var r=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new R(new Float32Array(r.length),3));else for(var i=e.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var c,u,h,l=e.normal.array,d=new s,p=new s,f=new s,m=new s,v=new s;if(t){var g=t.array;0===n.length&&this.addGroup(0,g.length);for(var y=0,x=n.length;y<x;++y)for(var _=n[y],b=_.start,w=_.count,o=b,a=b+w;o<a;o+=3)c=3*g[o+0],u=3*g[o+1],h=3*g[o+2],d.fromArray(r,c),p.fromArray(r,u),f.fromArray(r,h),m.subVectors(f,p),v.subVectors(d,p),m.cross(v),l[c]+=m.x,l[c+1]+=m.y,l[c+2]+=m.z,l[u]+=m.x,l[u+1]+=m.y,l[u+2]+=m.z,l[h]+=m.x,l[h+1]+=m.y,l[h+2]+=m.z}else for(var o=0,a=r.length;o<a;o+=9)d.fromArray(r,o),p.fromArray(r,o+3),f.fromArray(r,o+6),m.subVectors(f,p),v.subVectors(d,p),m.cross(v),l[o]=m.x,l[o+1]=m.y,l[o+2]=m.z,l[o+3]=m.x,l[o+4]=m.y,l[o+5]=m.z,l[o+6]=m.x,l[o+7]=m.y,l[o+8]=m.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(!t||!t.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t);void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r],o=i.array,a=t.attributes[r],s=a.array,c=a.itemSize,u=0,h=c*e;u<s.length;u++,h++)o[h]=s[u];return this},normalizeNormals:function(){var t=new s;return function(){for(var e=this.attributes.normal,n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.normalize(),e.setXYZ(n,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new G,e=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(e.length*a),c=0,u=0,h=0,l=e.length;h<l;h++){c=e[h]*a;for(var d=0;d<a;d++)s[u++]=o[c++]}t.addAttribute(r,new R(s,a))}for(var p=this.groups,h=0,l=p.length;h<l;h++){var f=p[h];t.addGroup(f.start,f.count,f.materialIndex)}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n],i=Array.prototype.slice.call(a.array);t.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new G).copy(this)},copy:function(t){var e,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone());var o=t.attributes;for(e in o){var a=o[e];this.addAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var c=[],u=s[e];for(n=0,r=u.length;n<r;n++)c.push(u[n].clone());this.morphAttributes[e]=c}var h=t.groups;for(n=0,r=h.length;n<r;n++){var l=h[n];this.addGroup(l.start,l.count,l.materialIndex)}var d=t.boundingBox;null!==d&&(this.boundingBox=d.clone());var p=t.boundingSphere;return null!==p&&(this.boundingSphere=p.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),H.prototype=Object.create(A.prototype),H.prototype.constructor=H,V.prototype=Object.create(G.prototype),V.prototype.constructor=V,k.prototype=Object.create(A.prototype),k.prototype.constructor=k,j.prototype=Object.create(G.prototype),j.prototype.constructor=j;var kc=0;W.prototype=Object.assign(Object.create(r.prototype),{constructor:W,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n)if("shading"!==e){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]="overdraw"===e?Number(n):n:console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===va;else console.warn("THREE.Material: '"+e+"' parameter is undefined.")}},toJSON:function(t){function e(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}var n=void 0===t||"string"==typeof t;n&&(t={textures:{},images:{}});var r={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),void 0!==this.roughness&&(r.roughness=this.roughness),void 0!==this.metalness&&(r.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),void 0!==this.shininess&&(r.shininess=this.shininess),void 0!==this.clearCoat&&(r.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(r.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(t).uuid),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(t).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(t).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(t).uuid,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(t).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(t).uuid,r.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(r.size=this.size),void 0!==this.sizeAttenuation&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==wa&&(r.blending=this.blending),!0===this.flatShading&&(r.flatShading=this.flatShading),this.side!==pa&&(r.side=this.side),this.vertexColors!==ya&&(r.vertexColors=this.vertexColors),this.opacity<1&&(r.opacity=this.opacity),!0===this.transparent&&(r.transparent=this.transparent),r.depthFunc=this.depthFunc,r.depthTest=this.depthTest,r.depthWrite=this.depthWrite,0!==this.rotation&&(r.rotation=this.rotation),1!==this.linewidth&&(r.linewidth=this.linewidth),void 0!==this.dashSize&&(r.dashSize=this.dashSize),void 0!==this.gapSize&&(r.gapSize=this.gapSize),void 0!==this.scale&&(r.scale=this.scale),!0===this.dithering&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(r.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(r.wireframe=this.wireframe),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(r.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(r.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(r.morphTargets=!0),!0===this.skinning&&(r.skinning=!0),!1===this.visible&&(r.visible=!1),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),n){var i=e(t.textures),o=e(t.images);i.length>0&&(r.textures=i),o.length>0&&(r.images=o)}return r},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),X.prototype=Object.create(W.prototype),X.prototype.constructor=X,X.prototype.isMeshBasicMaterial=!0,X.prototype.copy=function(t){return W.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},q.prototype=Object.create(W.prototype),q.prototype.constructor=q,q.prototype.isShaderMaterial=!0,q.prototype.copy=function(t){return W.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=Uc.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},q.prototype.toJSON=function(t){var e=W.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(Y.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new s),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new s;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new s),e.subVectors(t,this.origin);var n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new s;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:function(){var t=new s,e=new s,n=new s;return function(r,i,o,a){t.copy(r).add(i).multiplyScalar(.5),e.copy(i).sub(r).normalize(),n.copy(this.origin).sub(t);var s,c,u,h,l=.5*r.distanceTo(i),d=-this.direction.dot(e),p=n.dot(this.direction),f=-n.dot(e),m=n.lengthSq(),v=Math.abs(1-d*d);if(v>0)if(s=d*f-p,c=d*p-f,h=l*v,s>=0)if(c>=-h)if(c<=h){var g=1/v;s*=g,c*=g,u=s*(s+d*c+2*p)+c*(d*s+c+2*f)+m}else c=l,s=Math.max(0,-(d*c+p)),u=-s*s+c*(c+2*f)+m;else c=-l,s=Math.max(0,-(d*c+p)),u=-s*s+c*(c+2*f)+m;else c<=-h?(s=Math.max(0,-(-d*l+p)),c=s>0?-l:Math.min(Math.max(-l,-f),l),u=-s*s+c*(c+2*f)+m):c<=h?(s=0,c=Math.min(Math.max(-l,-f),l),u=c*(c+2*f)+m):(s=Math.max(0,-(d*l+p)),c=s>0?l:Math.min(Math.max(-l,-f),l),u=-s*s+c*(c+2*f)+m);else c=d>0?-l:l,s=Math.max(0,-(d*c+p)),u=-s*s+c*(c+2*f)+m;return o&&o.copy(this.direction).multiplyScalar(s).add(this.origin),a&&a.copy(e).multiplyScalar(c).add(t),u}}(),intersectSphere:function(){var t=new s;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,c=1/this.direction.x,u=1/this.direction.y,h=1/this.direction.z,l=this.origin;return c>=0?(n=(t.min.x-l.x)*c,r=(t.max.x-l.x)*c):(n=(t.max.x-l.x)*c,r=(t.min.x-l.x)*c),u>=0?(i=(t.min.y-l.y)*u,o=(t.max.y-l.y)*u):(i=(t.max.y-l.y)*u,o=(t.min.y-l.y)*u),n>o||i>r?null:((i>n||n!==n)&&(n=i),(o<r||r!==r)&&(r=o),h>=0?(a=(t.min.z-l.z)*h,s=(t.max.z-l.z)*h):(a=(t.max.z-l.z)*h,s=(t.min.z-l.z)*h),n>s||a>r?null:((a>n||n!==n)&&(n=a),(s<r||r!==r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))},intersectsBox:function(){var t=new s;return function(e){return null!==this.intersectBox(e,t)}}(),intersectTriangle:function(){var t=new s,e=new s,n=new s,r=new s;return function(i,o,a,s,c){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var u,h=this.direction.dot(r);if(h>0){if(s)return null;u=1}else{if(!(h<0))return null;u=-1,h=-h}t.subVectors(this.origin,i);var l=u*this.direction.dot(n.crossVectors(t,n));if(l<0)return null;var d=u*this.direction.dot(e.cross(t));if(d<0)return null;if(l+d>h)return null;var p=-u*t.dot(r);return p<0?null:this.at(p/h,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(Z.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new s),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new s),t.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new s),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new s,e=new s;return function(n,r){t.subVectors(n,this.start),e.subVectors(this.end,this.start);var i=e.dot(e),o=e.dot(t),a=o/i;return r&&(a=Ic.clamp(a,0,1)),a}}(),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new s),this.delta(n).multiplyScalar(r).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)}}),Object.assign(J,{getNormal:function(){var t=new s;return function(e,n,r,i){void 0===i&&(console.warn("THREE.Triangle: .getNormal() target is now required"),i=new s),i.subVectors(r,n),t.subVectors(e,n),i.cross(t);var o=i.lengthSq();return o>0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}}(),getBarycoord:function(){var t=new s,e=new s,n=new s;return function(r,i,o,a,c){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var u=t.dot(t),h=t.dot(e),l=t.dot(n),d=e.dot(e),p=e.dot(n),f=u*d-h*h;if(void 0===c&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),c=new s),0===f)return c.set(-2,-1,-1);var m=1/f,v=(d*l-h*p)*m,g=(u*p-h*l)*m;return c.set(1-v-g,g,v)}}(),containsPoint:function(){var t=new s;return function(e,n,r,i){return J.getBarycoord(e,n,r,i,t),t.x>=0&&t.y>=0&&t.x+t.y<=1}}()}),Object.assign(J.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new s,e=new s;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new s),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return J.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new s),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return J.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return J.containsPoint(t,this.a,this.b,this.c)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new v,e=[new Z,new Z,new Z],n=new s,r=new s;return function(i,o){void 0===o&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),o=new s);var a=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(i,n),!0===this.containsPoint(n))o.copy(n);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var c=0;c<e.length;c++){e[c].closestPointToPoint(n,!0,r);var u=n.distanceToSquared(r);u<a&&(a=u,o.copy(r))}}return o}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),Q.prototype=Object.assign(Object.create(M.prototype),{constructor:Q,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return M.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t,e,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t<e;t++)n=a[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)n=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}},raycast:function(){function t(t,e,n,r,i,o,a){return J.getBarycoord(t,e,n,r,x),i.multiplyScalar(x.x),o.multiplyScalar(x.y),a.multiplyScalar(x.z),i.add(o).add(a),i.clone()}function e(t,e,n,r,i,o,a,s){if(null===(e.side===fa?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,e.side!==ma,s)))return null;b.copy(s),b.applyMatrix4(t.matrixWorld);var c=n.ray.origin.distanceTo(b);return c<n.near||c>n.far?null:{distance:c,point:b.clone(),object:t}}function n(n,r,i,o,a,s,c,d){u.fromBufferAttribute(o,s),h.fromBufferAttribute(o,c),l.fromBufferAttribute(o,d);var p=e(n,n.material,r,i,u,h,l,_);if(p){a&&(v.fromBufferAttribute(a,s),g.fromBufferAttribute(a,c),y.fromBufferAttribute(a,d),p.uv=t(_,u,h,l,v,g,y));var f=new S(s,c,d);J.getNormal(u,h,l,f.normal),p.face=f}return p}var r=new o,a=new Y,c=new m,u=new s,h=new s,l=new s,d=new s,p=new s,f=new s,v=new i,g=new i,y=new i,x=new s,_=new s,b=new s;return function(i,o){var s=this.geometry,m=this.material,x=this.matrixWorld;if(void 0!==m&&(null===s.boundingSphere&&s.computeBoundingSphere(),c.copy(s.boundingSphere),c.applyMatrix4(x),!1!==i.ray.intersectsSphere(c)&&(r.getInverse(x),a.copy(i.ray).applyMatrix4(r),null===s.boundingBox||!1!==a.intersectsBox(s.boundingBox)))){var b;if(s.isBufferGeometry){var w,M,E,T,S,A=s.index,R=s.attributes.position,L=s.attributes.uv;if(null!==A)for(T=0,S=A.count;T<S;T+=3)w=A.getX(T),M=A.getX(T+1),E=A.getX(T+2),(b=n(this,i,a,R,L,w,M,E))&&(b.faceIndex=Math.floor(T/3),o.push(b));else if(void 0!==R)for(T=0,S=R.count;T<S;T+=3)w=T,M=T+1,E=T+2,(b=n(this,i,a,R,L,w,M,E))&&(b.faceIndex=Math.floor(T/3),o.push(b))}else if(s.isGeometry){var C,P,O,I,N=Array.isArray(m),D=s.vertices,U=s.faces,B=s.faceVertexUvs[0];B.length>0&&(I=B);for(var F=0,z=U.length;F<z;F++){var G=U[F],H=N?m[G.materialIndex]:m;if(void 0!==H){if(C=D[G.a],P=D[G.b],O=D[G.c],!0===H.morphTargets){var V=s.morphTargets,k=this.morphTargetInfluences;u.set(0,0,0),h.set(0,0,0),l.set(0,0,0);for(var j=0,W=V.length;j<W;j++){var X=k[j];if(0!==X){var q=V[j].vertices;u.addScaledVector(d.subVectors(q[G.a],C),X),h.addScaledVector(p.subVectors(q[G.b],P),X),l.addScaledVector(f.subVectors(q[G.c],O),X)}}u.add(C),h.add(P),l.add(O),C=u,P=h,O=l}if(b=e(this,H,i,a,C,P,O,_)){if(I&&I[F]){var Y=I[F];v.copy(Y[0]),g.copy(Y[1]),y.copy(Y[2]),b.uv=t(_,C,P,O,v,g,y)}b.face=G,b.faceIndex=F,o.push(b)}}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),ut.prototype=Object.create(u.prototype),ut.prototype.constructor=ut,ut.prototype.isCubeTexture=!0,Object.defineProperty(ut.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var jc=new u,Wc=new ut,Xc=[],qc=[],Yc=new Float32Array(16),Zc=new Float32Array(9),Jc=new Float32Array(4);Ht.prototype.updateCache=function(t){var e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),pt(e,t)},Vt.prototype.setValue=function(t,e){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(t,e[o.id])}};var Qc=/([\w\d_]+)(\])?(\[|\.)?/g;Wt.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},Wt.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},Wt.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(t,s.value,r)}},Wt.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n};var Kc=0,$c=0;ge.prototype=Object.create(W.prototype),ge.prototype.constructor=ge,ge.prototype.isMeshDepthMaterial=!0,ge.prototype.copy=function(t){return W.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},ye.prototype=Object.create(W.prototype),ye.prototype.constructor=ye,ye.prototype.isMeshDistanceMaterial=!0,ye.prototype.copy=function(t){return W.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},_e.prototype=Object.create(u.prototype),_e.prototype.constructor=_e,_e.prototype.isCanvasTexture=!0,Te.prototype=Object.assign(Object.create(E.prototype),{constructor:Te,isPerspectiveCamera:!0,copy:function(t,e){return E.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*Ic.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ic.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ic.RAD2DEG*Math.atan(Math.tan(.5*Ic.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,r,i,o){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ic.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,e-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(i+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far)},toJSON:function(t){var e=M.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Se.prototype=Object.assign(Object.create(Te.prototype),{constructor:Se,isArrayCamera:!0}),Ce.prototype.isFogExp2=!0,Ce.prototype.clone=function(){return new Ce(this.color,this.density)},Ce.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},Pe.prototype.isFog=!0,Pe.prototype.clone=function(){return new Pe(this.color,this.near,this.far)},Pe.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},Oe.prototype=Object.assign(Object.create(M.prototype),{constructor:Oe,copy:function(t,e){return M.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=M.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),Ie.prototype=Object.create(W.prototype),Ie.prototype.constructor=Ie,Ie.prototype.isSpriteMaterial=!0,Ie.prototype.copy=function(t){return W.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},Ne.prototype=Object.assign(Object.create(M.prototype),{constructor:Ne,isSprite:!0,raycast:function(){var t=new s,e=new s,n=new s;return function(r,i){e.setFromMatrixPosition(this.matrixWorld),r.ray.closestPointToPoint(e,t),n.setFromMatrixScale(this.matrixWorld);var o=n.x*n.y/4;if(!(e.distanceToSquared(t)>o)){var a=r.ray.origin.distanceTo(t);a<r.near||a>r.far||i.push({distance:a,point:t.clone(),face:null,object:this})}}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return M.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),De.prototype=Object.assign(Object.create(M.prototype),{constructor:De,copy:function(t){M.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:function(){var t=new s;return function(e,n){t.setFromMatrixPosition(this.matrixWorld);var r=e.ray.origin.distanceTo(t);this.getObjectForDistance(r).raycast(e,n)}}(),update:function(){var t=new s,e=new s;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(t){var e=M.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),Object.assign(Ue.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new o;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n;for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(t.matrix.getInverse(t.parent.matrixWorld),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))},update:function(){var t=new o,e=new o;return function(){for(var n=this.bones,r=this.boneInverses,i=this.boneMatrices,o=this.boneTexture,a=0,s=n.length;a<s;a++){var c=n[a]?n[a].matrixWorld:e;t.multiplyMatrices(c,r[a]),t.toArray(i,16*a)}void 0!==o&&(o.needsUpdate=!0)}}(),clone:function(){return new Ue(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,n=this.bones.length;e<n;e++){var r=this.bones[e];if(r.name===t)return r}}}),Be.prototype=Object.assign(Object.create(M.prototype),{constructor:Be,isBone:!0}),Fe.prototype=Object.assign(Object.create(Q.prototype),{constructor:Fe,isSkinnedMesh:!0,initBones:function(){var t,e,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],t=new Be,i.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],-1!==e.parent&&null!==e.parent&&void 0!==i[e.parent]?i[e.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var n=this.geometry.skinWeights[e];t=1/n.manhattanLength(),t!==1/0?n.multiplyScalar(t):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new h,i=this.geometry.attributes.skinWeight;for(e=0;e<i.count;e++)r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e),t=1/r.manhattanLength(),t!==1/0?r.multiplyScalar(t):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){Q.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),ze.prototype=Object.create(W.prototype),ze.prototype.constructor=ze,ze.prototype.isLineBasicMaterial=!0,ze.prototype.copy=function(t){return W.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Ge.prototype=Object.assign(Object.create(M.prototype),{constructor:Ge,isLine:!0,computeLineDistances:function(){var t=new s,e=new s;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[0],o=1,a=r.count;o<a;o++)t.fromBufferAttribute(r,o-1),e.fromBufferAttribute(r,o),i[o]=i[o-1],i[o]+=t.distanceTo(e);n.addAttribute("lineDistance",new U(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices,i=n.lineDistances;i[0]=0;for(var o=1,a=s.length;o<a;o++)i[o]=i[o-1],i[o]+=s[o-1].distanceTo(s[o])}return this}}(),raycast:function(){var t=new o,e=new Y,n=new m;return function(r,i){var o=r.linePrecision,a=o*o,c=this.geometry,u=this.matrixWorld;if(null===c.boundingSphere&&c.computeBoundingSphere(),n.copy(c.boundingSphere),n.applyMatrix4(u),!1!==r.ray.intersectsSphere(n)){t.getInverse(u),e.copy(r.ray).applyMatrix4(t);var h=new s,l=new s,d=new s,p=new s,f=this&&this.isLineSegments?2:1;if(c.isBufferGeometry){var m=c.index,v=c.attributes,g=v.position.array;if(null!==m)for(var y=m.array,x=0,_=y.length-1;x<_;x+=f){var b=y[x],w=y[x+1];h.fromArray(g,3*b),l.fromArray(g,3*w);var M=e.distanceSqToSegment(h,l,p,d);if(!(M>a)){p.applyMatrix4(this.matrixWorld);var E=r.ray.origin.distanceTo(p);E<r.near||E>r.far||i.push({distance:E,point:d.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}else for(var x=0,_=g.length/3-1;x<_;x+=f){h.fromArray(g,3*x),l.fromArray(g,3*x+3);var M=e.distanceSqToSegment(h,l,p,d);if(!(M>a)){p.applyMatrix4(this.matrixWorld);var E=r.ray.origin.distanceTo(p);E<r.near||E>r.far||i.push({distance:E,point:d.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}}else if(c.isGeometry)for(var T=c.vertices,S=T.length,x=0;x<S-1;x+=f){var M=e.distanceSqToSegment(T[x],T[x+1],p,d);if(!(M>a)){p.applyMatrix4(this.matrixWorld);var E=r.ray.origin.distanceTo(p);E<r.near||E>r.far||i.push({distance:E,point:d.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),He.prototype=Object.assign(Object.create(Ge.prototype),{constructor:He,isLineSegments:!0,computeLineDistances:function(){var t=new s,e=new s;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)t.fromBufferAttribute(r,o),e.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e);n.addAttribute("lineDistance",new U(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry)for(var s=n.vertices,i=n.lineDistances,o=0,a=s.length;o<a;o+=2)t.copy(s[o]),e.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e);return this}}()}),Ve.prototype=Object.assign(Object.create(Ge.prototype),{constructor:Ve,isLineLoop:!0}),ke.prototype=Object.create(W.prototype),ke.prototype.constructor=ke,ke.prototype.isPointsMaterial=!0,ke.prototype.copy=function(t){return W.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.morphTargets=t.morphTargets,this},je.prototype=Object.assign(Object.create(M.prototype),{constructor:je,isPoints:!0,raycast:function(){var t=new o,e=new Y,n=new m;return function(r,i){function o(t,n){var o=e.distanceSqToPoint(t);if(o<d){e.closestPointToPoint(t,f),f.applyMatrix4(u);var s=r.ray.origin.distanceTo(f);if(s<r.near||s>r.far)return;i.push({distance:s,distanceToRay:Math.sqrt(o),point:f.clone(),index:n,face:null,object:a})}}var a=this,c=this.geometry,u=this.matrixWorld,h=r.params.Points.threshold;if(null===c.boundingSphere&&c.computeBoundingSphere(),n.copy(c.boundingSphere),n.applyMatrix4(u),n.radius+=h,!1!==r.ray.intersectsSphere(n)){t.getInverse(u),e.copy(r.ray).applyMatrix4(t);var l=h/((this.scale.x+this.scale.y+this.scale.z)/3),d=l*l,p=new s,f=new s;if(c.isBufferGeometry){var m=c.index,v=c.attributes,g=v.position.array;if(null!==m)for(var y=m.array,x=0,_=y.length;x<_;x++){var b=y[x];p.fromArray(g,3*b),o(p,b)}else for(var x=0,w=g.length/3;x<w;x++)p.fromArray(g,3*x),o(p,x)}else for(var M=c.vertices,x=0,w=M.length;x<w;x++)o(M[x],x)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),We.prototype=Object.assign(Object.create(M.prototype),{constructor:We,isGroup:!0}),Xe.prototype=Object.assign(Object.create(u.prototype),{constructor:Xe,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),qe.prototype=Object.create(u.prototype),qe.prototype.constructor=qe,qe.prototype.isCompressedTexture=!0,Ye.prototype=Object.create(u.prototype),Ye.prototype.constructor=Ye,Ye.prototype.isDepthTexture=!0,Ze.prototype=Object.create(G.prototype),Ze.prototype.constructor=Ze,Je.prototype=Object.create(A.prototype),Je.prototype.constructor=Je,Qe.prototype=Object.create(G.prototype),Qe.prototype.constructor=Qe,Ke.prototype=Object.create(A.prototype),Ke.prototype.constructor=Ke,$e.prototype=Object.create(G.prototype),$e.prototype.constructor=$e,tn.prototype=Object.create(A.prototype),tn.prototype.constructor=tn,en.prototype=Object.create($e.prototype),en.prototype.constructor=en,nn.prototype=Object.create(A.prototype),nn.prototype.constructor=nn,rn.prototype=Object.create($e.prototype),rn.prototype.constructor=rn,on.prototype=Object.create(A.prototype),on.prototype.constructor=on,an.prototype=Object.create($e.prototype),an.prototype.constructor=an,sn.prototype=Object.create(A.prototype),sn.prototype.constructor=sn,cn.prototype=Object.create($e.prototype),cn.prototype.constructor=cn,un.prototype=Object.create(A.prototype),un.prototype.constructor=un,hn.prototype=Object.create(G.prototype),hn.prototype.constructor=hn,ln.prototype=Object.create(A.prototype),ln.prototype.constructor=ln,dn.prototype=Object.create(G.prototype),dn.prototype.constructor=dn,pn.prototype=Object.create(A.prototype),pn.prototype.constructor=pn,fn.prototype=Object.create(G.prototype),fn.prototype.constructor=fn;var tu={triangulate:function(t,e,n){n=n||2;var r=e&&e.length,i=r?e[0]*n:t.length,o=mn(t,0,i,n,!0),a=[];if(!o)return a;var s,c,u,h,l,d,p;if(r&&(o=wn(t,e,o,n)),t.length>80*n){s=u=t[0],c=h=t[1];for(var f=n;f<i;f+=n)l=t[f],d=t[f+1],l<s&&(s=l),d<c&&(c=d),l>u&&(u=l),d>h&&(h=d);p=Math.max(u-s,h-c),p=0!==p?1/p:0}return gn(o,a,n,s,c,p),a}},eu={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},isClockWise:function(t){return eu.area(t)<0},triangulateShape:function(t,e){var n=[],r=[],i=[];kn(t),jn(n,t);var o=t.length;e.forEach(kn);for(var a=0;a<e.length;a++)r.push(o),o+=e[a].length,jn(n,e[a]);for(var s=tu.triangulate(n,r),a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};Wn.prototype=Object.create(A.prototype),Wn.prototype.constructor=Wn,Wn.prototype.toJSON=function(){var t=A.prototype.toJSON.call(this);return qn(this.parameters.shapes,this.parameters.options,t)},Xn.prototype=Object.create(G.prototype),Xn.prototype.constructor=Xn,Xn.prototype.toJSON=function(){var t=G.prototype.toJSON.call(this);return qn(this.parameters.shapes,this.parameters.options,t)};var nu={generateTopUV:function(t,e,n,r,o){var a=e[3*n],s=e[3*n+1],c=e[3*r],u=e[3*r+1],h=e[3*o],l=e[3*o+1];return[new i(a,s),new i(c,u),new i(h,l)]},generateSideWallUV:function(t,e,n,r,o,a){var s=e[3*n],c=e[3*n+1],u=e[3*n+2],h=e[3*r],l=e[3*r+1],d=e[3*r+2],p=e[3*o],f=e[3*o+1],m=e[3*o+2],v=e[3*a],g=e[3*a+1],y=e[3*a+2];return Math.abs(c-l)<.01?[new i(s,1-u),new i(h,1-d),new i(p,1-m),new i(v,1-y)]:[new i(c,1-u),new i(l,1-d),new i(f,1-m),new i(g,1-y)]}};Yn.prototype=Object.create(A.prototype),Yn.prototype.constructor=Yn,Zn.prototype=Object.create(Xn.prototype),Zn.prototype.constructor=Zn,Jn.prototype=Object.create(A.prototype),Jn.prototype.constructor=Jn,Qn.prototype=Object.create(G.prototype),Qn.prototype.constructor=Qn,Kn.prototype=Object.create(A.prototype),Kn.prototype.constructor=Kn,$n.prototype=Object.create(G.prototype),$n.prototype.constructor=$n,tr.prototype=Object.create(A.prototype),tr.prototype.constructor=tr,er.prototype=Object.create(G.prototype),er.prototype.constructor=er,nr.prototype=Object.create(A.prototype),nr.prototype.constructor=nr,nr.prototype.toJSON=function(){var t=A.prototype.toJSON.call(this);return ir(this.parameters.shapes,t)},rr.prototype=Object.create(G.prototype),rr.prototype.constructor=rr,rr.prototype.toJSON=function(){var t=G.prototype.toJSON.call(this);return ir(this.parameters.shapes,t)},or.prototype=Object.create(G.prototype),or.prototype.constructor=or,ar.prototype=Object.create(A.prototype),ar.prototype.constructor=ar,sr.prototype=Object.create(G.prototype),sr.prototype.constructor=sr,cr.prototype=Object.create(ar.prototype),cr.prototype.constructor=cr,ur.prototype=Object.create(sr.prototype),ur.prototype.constructor=ur,hr.prototype=Object.create(A.prototype),hr.prototype.constructor=hr,lr.prototype=Object.create(G.prototype),lr.prototype.constructor=lr;var ru=Object.freeze({WireframeGeometry:Ze,ParametricGeometry:Je,ParametricBufferGeometry:Qe,TetrahedronGeometry:tn,TetrahedronBufferGeometry:en,OctahedronGeometry:nn,OctahedronBufferGeometry:rn,IcosahedronGeometry:on,IcosahedronBufferGeometry:an,DodecahedronGeometry:sn,DodecahedronBufferGeometry:cn,PolyhedronGeometry:Ke,PolyhedronBufferGeometry:$e,TubeGeometry:un,TubeBufferGeometry:hn,TorusKnotGeometry:ln,TorusKnotBufferGeometry:dn,TorusGeometry:pn,TorusBufferGeometry:fn,TextGeometry:Yn,TextBufferGeometry:Zn,SphereGeometry:Jn,SphereBufferGeometry:Qn,RingGeometry:Kn,RingBufferGeometry:$n,PlaneGeometry:k,PlaneBufferGeometry:j,LatheGeometry:tr,LatheBufferGeometry:er,ShapeGeometry:nr,ShapeBufferGeometry:rr,ExtrudeGeometry:Wn,ExtrudeBufferGeometry:Xn,EdgesGeometry:or,ConeGeometry:cr,ConeBufferGeometry:ur,CylinderGeometry:ar,CylinderBufferGeometry:sr,CircleGeometry:hr,CircleBufferGeometry:lr,BoxGeometry:H,BoxBufferGeometry:V});dr.prototype=Object.create(W.prototype),dr.prototype.constructor=dr,dr.prototype.isShadowMaterial=!0,dr.prototype.copy=function(t){return W.prototype.copy.call(this,t),this.color.copy(t.color),this},pr.prototype=Object.create(q.prototype),pr.prototype.constructor=pr,pr.prototype.isRawShaderMaterial=!0,fr.prototype=Object.create(W.prototype),fr.prototype.constructor=fr,fr.prototype.isMeshStandardMaterial=!0,fr.prototype.copy=function(t){return W.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},mr.prototype=Object.create(fr.prototype),mr.prototype.constructor=mr,mr.prototype.isMeshPhysicalMaterial=!0,mr.prototype.copy=function(t){return fr.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},vr.prototype=Object.create(W.prototype),vr.prototype.constructor=vr,vr.prototype.isMeshPhongMaterial=!0,vr.prototype.copy=function(t){return W.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},gr.prototype=Object.create(vr.prototype),gr.prototype.constructor=gr,gr.prototype.isMeshToonMaterial=!0,gr.prototype.copy=function(t){return vr.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},yr.prototype=Object.create(W.prototype),yr.prototype.constructor=yr,yr.prototype.isMeshNormalMaterial=!0,yr.prototype.copy=function(t){return W.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},xr.prototype=Object.create(W.prototype),xr.prototype.constructor=xr,xr.prototype.isMeshLambertMaterial=!0,xr.prototype.copy=function(t){return W.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},_r.prototype=Object.create(ze.prototype),_r.prototype.constructor=_r,_r.prototype.isLineDashedMaterial=!0,_r.prototype.copy=function(t){return ze.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var iu=Object.freeze({ShadowMaterial:dr,SpriteMaterial:Ie,RawShaderMaterial:pr,ShaderMaterial:q,PointsMaterial:ke,MeshPhysicalMaterial:mr,MeshStandardMaterial:fr,MeshPhongMaterial:vr,MeshToonMaterial:gr,MeshNormalMaterial:yr,MeshLambertMaterial:xr,MeshDepthMaterial:ge,MeshDistanceMaterial:ye,MeshBasicMaterial:X,LineDashedMaterial:_r,LineBasicMaterial:ze,Material:W}),ou={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}},au=new br,su={};Object.assign(wr.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=ou.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;if(void 0!==su[t])return void su[t].push({onLoad:e,onProgress:n,onError:r});var a=/^data:(.*?)(;base64)?,(.*)$/,s=t.match(a);if(s){var c=s[1],u=!!s[2],h=s[3];h=window.decodeURIComponent(h),u&&(h=window.atob(h));try{var l,d=(this.responseType||"").toLowerCase();switch(d){case"arraybuffer":case"blob":for(var p=new Uint8Array(h.length),f=0;f<h.length;f++)p[f]=h.charCodeAt(f);l="blob"===d?new Blob([p.buffer],{type:c}):p.buffer;break;case"document":var m=new DOMParser;l=m.parseFromString(h,c);break;case"json":l=JSON.parse(h);break;default:l=h}window.setTimeout(function(){e&&e(l),i.manager.itemEnd(t)},0)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},0)}}else{su[t]=[],su[t].push({onLoad:e,onProgress:n,onError:r});var v=new XMLHttpRequest;v.open("GET",t,!0),v.addEventListener("load",function(e){var n=this.response;ou.add(t,n);var r=su[t];if(delete su[t],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var o=0,a=r.length;o<a;o++){var s=r[o];s.onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else{for(var o=0,a=r.length;o<a;o++){var s=r[o];s.onError&&s.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)}},!1),v.addEventListener("progress",function(e){for(var n=su[t],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(e)}},!1),v.addEventListener("error",function(e){var n=su[t];delete su[t];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)},!1),void 0!==this.responseType&&(v.responseType=this.responseType),void 0!==this.withCredentials&&(v.withCredentials=this.withCredentials),v.overrideMimeType&&v.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain");for(var g in this.requestHeader)v.setRequestHeader(g,this.requestHeader[g]);v.send(null)}return i.manager.itemStart(t),v},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Mr.prototype,{load:function(t,e,n,r){var i=this,o=[],a=new qe;a.image=o;var s=new wr(this.manager);if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var c=0,u=0,h=t.length;u<h;++u)!function(u){s.load(t[u],function(t){var n=i._parser(t,!0);o[u]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(c+=1)&&(1===n.mipmapCount&&(a.minFilter=xs),a.format=n.format,a.needsUpdate=!0,e&&e(a))},n,r)}(u);else s.load(t,function(t){var n=i._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+c]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=xs),a.format=n.format,a.needsUpdate=!0,e&&e(a)},n,r);return a},setPath:function(t){return this.path=t,this}}),Object.assign(Er.prototype,{load:function(t,e,n,r){var i=this,o=new p,a=new wr(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:fs,o.wrapT=void 0!==n.wrapT?n.wrapT:fs,o.magFilter=void 0!==n.magFilter?n.magFilter:xs,o.minFilter=void 0!==n.minFilter?n.minFilter:bs,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=xs),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(Tr.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){function i(){c.removeEventListener("load",i,!1),c.removeEventListener("error",o,!1),ou.add(t,this),e&&e(this),a.manager.itemEnd(t)}function o(e){c.removeEventListener("load",i,!1),c.removeEventListener("error",o,!1),r&&r(e),a.manager.itemEnd(t),a.manager.itemError(t)}void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var a=this,s=ou.get(t);if(void 0!==s)return a.manager.itemStart(t),setTimeout(function(){e&&e(s),a.manager.itemEnd(t)},0),s;var c=document.createElementNS("http://www.w3.org/1999/xhtml","img");return c.addEventListener("load",i,!1),c.addEventListener("error",o,!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(c.crossOrigin=this.crossOrigin),a.manager.itemStart(t),c.src=t,c},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Sr.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new ut,o=new Tr(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);for(var a=0,s=0;s<t.length;++s)!function(n){o.load(t[n],function(t){i.images[n]=t,6==++a&&(i.needsUpdate=!0,e&&e(i))},void 0,r)}(s);return i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ar.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new u,o=new Tr(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(n){i.image=n;var r=t.search(/\.(jpg|jpeg)$/)>0||0===t.search(/^data\:image\/jpeg/);i.format=r?Ds:Us,i.needsUpdate=!0,void 0!==e&&e(i)},n,r),i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Rr.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)e=this.getPoint(n/t),o+=e.distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e||t*r[o-1];for(var a,s=0,c=o-1;s<=c;)if(i=Math.floor(s+(c-s)/2),(a=r[i]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(i=c,r[i]===n)return i/(o-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var r=this.getPoint(e);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,r,i,a=new s,c=[],u=[],h=[],l=new s,d=new o;for(n=0;n<=t;n++)r=n/t,c[n]=this.getTangentAt(r),c[n].normalize();u[0]=new s,h[0]=new s;var p=Number.MAX_VALUE,f=Math.abs(c[0].x),m=Math.abs(c[0].y),v=Math.abs(c[0].z);for(f<=p&&(p=f,a.set(1,0,0)),m<=p&&(p=m,a.set(0,1,0)),v<=p&&a.set(0,0,1),l.crossVectors(c[0],a).normalize(),u[0].crossVectors(c[0],l),h[0].crossVectors(c[0],u[0]),n=1;n<=t;n++)u[n]=u[n-1].clone(),h[n]=h[n-1].clone(),l.crossVectors(c[n-1],c[n]),l.length()>Number.EPSILON&&(l.normalize(),i=Math.acos(Ic.clamp(c[n-1].dot(c[n]),-1,1)),u[n].applyMatrix4(d.makeRotationAxis(l,i))),h[n].crossVectors(c[n],u[n]);if(!0===e)for(i=Math.acos(Ic.clamp(u[0].dot(u[t]),-1,1)),i/=t,c[0].dot(l.crossVectors(u[0],u[t]))>0&&(i=-i),n=1;n<=t;n++)u[n].applyMatrix4(d.makeRotationAxis(c[n],i*n)),h[n].crossVectors(c[n],u[n]);return{tangents:c,normals:u,binormals:h}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Lr.prototype=Object.create(Rr.prototype),Lr.prototype.constructor=Lr,Lr.prototype.isEllipseCurve=!0,Lr.prototype.getPoint=function(t,e){for(var n=e||new i,r=2*Math.PI,o=this.aEndAngle-this.aStartAngle,a=Math.abs(o)<Number.EPSILON;o<0;)o+=r;for(;o>r;)o-=r;o<Number.EPSILON&&(o=a?0:r),!0!==this.aClockwise||a||(o===r?o=-r:o-=r);var s=this.aStartAngle+t*o,c=this.aX+this.xRadius*Math.cos(s),u=this.aY+this.yRadius*Math.sin(s);if(0!==this.aRotation){var h=Math.cos(this.aRotation),l=Math.sin(this.aRotation),d=c-this.aX,p=u-this.aY;c=d*h-p*l+this.aX,u=d*l+p*h+this.aY}return n.set(c,u)},Lr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Lr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Lr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Cr.prototype=Object.create(Lr.prototype),Cr.prototype.constructor=Cr,Cr.prototype.isArcCurve=!0;var cu=new s,uu=new Pr,hu=new Pr,lu=new Pr;Or.prototype=Object.create(Rr.prototype),Or.prototype.constructor=Or,Or.prototype.isCatmullRomCurve3=!0,Or.prototype.getPoint=function(t,e){var n=e||new s,r=this.points,i=r.length,o=(i-(this.closed?0:1))*t,a=Math.floor(o),c=o-a;this.closed?a+=a>0?0:(Math.floor(Math.abs(a)/i)+1)*i:0===c&&a===i-1&&(a=i-2,c=1);var u,h,l,d;if(this.closed||a>0?u=r[(a-1)%i]:(cu.subVectors(r[0],r[1]).add(r[0]),u=cu),h=r[a%i],l=r[(a+1)%i],this.closed||a+2<i?d=r[(a+2)%i]:(cu.subVectors(r[i-1],r[i-2]).add(r[i-1]),d=cu),"centripetal"===this.curveType||"chordal"===this.curveType){var p="chordal"===this.curveType?.5:.25,f=Math.pow(u.distanceToSquared(h),p),m=Math.pow(h.distanceToSquared(l),p),v=Math.pow(l.distanceToSquared(d),p);m<1e-4&&(m=1),f<1e-4&&(f=m),v<1e-4&&(v=m),uu.initNonuniformCatmullRom(u.x,h.x,l.x,d.x,f,m,v),hu.initNonuniformCatmullRom(u.y,h.y,l.y,d.y,f,m,v),lu.initNonuniformCatmullRom(u.z,h.z,l.z,d.z,f,m,v)}else"catmullrom"===this.curveType&&(uu.initCatmullRom(u.x,h.x,l.x,d.x,this.tension),hu.initCatmullRom(u.y,h.y,l.y,d.y,this.tension),lu.initCatmullRom(u.z,h.z,l.z,d.z,this.tension));return n.set(uu.calc(c),hu.calc(c),lu.calc(c)),n},Or.prototype.copy=function(t){Rr.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Or.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Or.prototype.fromJSON=function(t){Rr.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new s).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},kr.prototype=Object.create(Rr.prototype),kr.prototype.constructor=kr,kr.prototype.isCubicBezierCurve=!0,kr.prototype.getPoint=function(t,e){var n=e||new i,r=this.v0,o=this.v1,a=this.v2,s=this.v3;return n.set(Vr(t,r.x,o.x,a.x,s.x),Vr(t,r.y,o.y,a.y,s.y)),n},kr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},kr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},kr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},jr.prototype=Object.create(Rr.prototype),jr.prototype.constructor=jr,jr.prototype.isCubicBezierCurve3=!0,jr.prototype.getPoint=function(t,e){var n=e||new s,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Vr(t,r.x,i.x,o.x,a.x),Vr(t,r.y,i.y,o.y,a.y),Vr(t,r.z,i.z,o.z,a.z)),n},jr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},jr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},jr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Wr.prototype=Object.create(Rr.prototype),Wr.prototype.constructor=Wr,Wr.prototype.isLineCurve=!0,Wr.prototype.getPoint=function(t,e){var n=e||new i;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Wr.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Wr.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Wr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Wr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Wr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Xr.prototype=Object.create(Rr.prototype),Xr.prototype.constructor=Xr,Xr.prototype.isLineCurve3=!0,Xr.prototype.getPoint=function(t,e){var n=e||new s;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Xr.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Xr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Xr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Xr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},qr.prototype=Object.create(Rr.prototype),qr.prototype.constructor=qr,qr.prototype.isQuadraticBezierCurve=!0,qr.prototype.getPoint=function(t,e){var n=e||new i,r=this.v0,o=this.v1,a=this.v2;return n.set(Br(t,r.x,o.x,a.x),Br(t,r.y,o.y,a.y)),n},qr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},qr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},qr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Yr.prototype=Object.create(Rr.prototype),Yr.prototype.constructor=Yr,Yr.prototype.isQuadraticBezierCurve3=!0,Yr.prototype.getPoint=function(t,e){var n=e||new s,r=this.v0,i=this.v1,o=this.v2;return n.set(Br(t,r.x,i.x,o.x),Br(t,r.y,i.y,o.y),Br(t,r.z,i.z,o.z)),n},Yr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Yr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Yr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Zr.prototype=Object.create(Rr.prototype),Zr.prototype.constructor=Zr,Zr.prototype.isSplineCurve=!0,Zr.prototype.getPoint=function(t,e){var n=e||new i,r=this.points,o=(r.length-1)*t,a=Math.floor(o),s=o-a,c=r[0===a?a:a-1],u=r[a],h=r[a>r.length-2?r.length-1:a+1],l=r[a>r.length-3?r.length-1:a+2];return n.set(Ir(s,c.x,u.x,h.x,l.x),Ir(s,c.y,u.y,h.y,l.y)),n},Zr.prototype.copy=function(t){Rr.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this},Zr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t},Zr.prototype.fromJSON=function(t){Rr.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new i).fromArray(r))}return this};var du=Object.freeze({ArcCurve:Cr,CatmullRomCurve3:Or,CubicBezierCurve:kr,CubicBezierCurve3:jr,EllipseCurve:Lr,LineCurve:Wr,LineCurve3:Xr,QuadraticBezierCurve:qr,QuadraticBezierCurve3:Yr,SplineCurve:Zr});Jr.prototype=Object.assign(Object.create(Rr.prototype),{constructor:Jr,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new Wr(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&o.isLineCurve?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),c=0;c<s.length;c++){var u=s[c];e&&e.equals(u)||(n.push(u),e=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(t){Rr.prototype.copy.call(this,t),this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push(r.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){var t=Rr.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,n=this.curves.length;e<n;e++){var r=this.curves[e];t.curves.push(r.toJSON())}return t},fromJSON:function(t){Rr.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push((new du[r.type]).fromJSON(r))}return this}}),Qr.prototype=Object.assign(Object.create(Jr.prototype),{constructor:Qr,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new Wr(this.currentPoint.clone(),new i(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var o=new qr(this.currentPoint.clone(),new i(t,e),new i(n,r));this.curves.push(o),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,o,a){var s=new kr(this.currentPoint.clone(),new i(t,e),new i(n,r),new i(o,a));this.curves.push(s),this.currentPoint.set(o,a)},splineThru:function(t){var e=[this.currentPoint.clone()].concat(t),n=new Zr(e);this.curves.push(n),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var c=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(t+c,e+u,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var c=new Lr(t,e,n,r,i,o,a,s);if(this.curves.length>0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var h=c.getPoint(1);this.currentPoint.copy(h)},copy:function(t){return Jr.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=Jr.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return Jr.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),Kr.prototype=Object.assign(Object.create(Qr.prototype),{constructor:Kr,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){Qr.prototype.copy.call(this,t),this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push(r.clone())}return this},toJSON:function(){var t=Qr.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,n=this.holes.length;e<n;e++){var r=this.holes[e];t.holes.push(r.toJSON())}return t},fromJSON:function(t){Qr.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push((new Qr).fromJSON(r))}return this}}),$r.prototype=Object.assign(Object.create(M.prototype),{constructor:$r,isLight:!0,copy:function(t){return M.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=M.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),ti.prototype=Object.assign(Object.create($r.prototype),{constructor:ti,isHemisphereLight:!0,copy:function(t){return $r.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(ei.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),ni.prototype=Object.assign(Object.create(ei.prototype),{constructor:ni,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*Ic.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix())}}),ri.prototype=Object.assign(Object.create($r.prototype),{constructor:ri,isSpotLight:!0,copy:function(t){return $r.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),ii.prototype=Object.assign(Object.create($r.prototype),{constructor:ii,isPointLight:!0,copy:function(t){return $r.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),oi.prototype=Object.assign(Object.create(ei.prototype),{constructor:oi}),ai.prototype=Object.assign(Object.create($r.prototype),{constructor:ai,isDirectionalLight:!0,copy:function(t){return $r.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),si.prototype=Object.assign(Object.create($r.prototype),{constructor:si,isAmbientLight:!0}),ci.prototype=Object.assign(Object.create($r.prototype),{constructor:ci,isRectAreaLight:!0,copy:function(t){return $r.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=$r.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}}),ui.prototype=Object.assign(Object.create(xi.prototype),{constructor:ui,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:fc,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),hi.prototype=Object.assign(Object.create(xi.prototype),{constructor:hi,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:fc,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(li.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(var a=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===a)break;if(i=r,r=e[++n],t<r)break e}o=e.length;break n}{if(t>=i)break t;var s=e[1];t<s&&(n=2,i=s);for(var a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===a)break;if(r=i,i=e[--n-1],t>=i)break e}o=n,n=0}}for(;n<o;){var c=n+o>>>1;t<e[c]?o=c:n=c+1}if(r=e[n],void 0===(i=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),
//!\ DECLARE ALIAS AFTER assign prototype !
Object.assign(li.prototype,{beforeStart_:li.prototype.copySampleValue_,afterEnd_:li.prototype.copySampleValue_}),di.prototype=Object.assign(Object.create(li.prototype),{constructor:di,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,s=this.valueSize,c=t*s,u=(n-e)/(r-e),h=c+s;c!==h;c+=4)a.slerpFlat(i,0,o,c-s,o,c,u);return i}}),pi.prototype=Object.assign(Object.create(xi.prototype),{constructor:pi,ValueTypeName:"quaternion",DefaultInterpolation:mc,InterpolantFactoryMethodLinear:function(t){return new di(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),fi.prototype=Object.assign(Object.create(xi.prototype),{constructor:fi,ValueTypeName:"color"}),mi.prototype=Object.assign(Object.create(xi.prototype),{constructor:mi,ValueTypeName:"number"}),vi.prototype=Object.assign(Object.create(li.prototype),{constructor:vi,DefaultSettings_:{endingStart:gc,endingEnd:gc},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case yc:i=t,a=2*e-n;break;case xc:i=r.length-2,a=e+r[i]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case yc:o=t,s=2*n-e;break;case xc:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var c=.5*(n-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=this._offsetPrev,h=this._offsetNext,l=this._weightPrev,d=this._weightNext,p=(n-e)/(r-e),f=p*p,m=f*p,v=-l*m+2*l*f-l*p,g=(1+l)*m+(-1.5-2*l)*f+(-.5+l)*p+1,y=(-1-d)*m+(1.5+d)*f+.5*p,x=d*m-d*f,_=0;_!==a;++_)i[_]=v*o[u+_]+g*o[c+_]+y*o[s+_]+x*o[h+_];return i}}),gi.prototype=Object.assign(Object.create(li.prototype),{constructor:gi,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=(n-e)/(r-e),h=1-u,l=0;l!==a;++l)i[l]=o[c+l]*h+o[s+l]*u;return i}}),yi.prototype=Object.assign(Object.create(li.prototype),{constructor:yi,interpolate_:function(t){return this.copySampleValue_(t-1)}});var pu={arraySlice:function(t,e,n){return pu.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){function e(e,n){return t[e]-t[n]}for(var n=t.length,r=new Array(n),i=0;i!==n;++i)r[i]=i;return r.sort(e),r},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,c=0;c!==e;++c)i[a++]=t[s+c];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{a=o[r],void 0!==a&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{a=o[r],void 0!==a&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{a=o[r],void 0!==a&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)}}};Object.assign(xi,{parse:function(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=xi._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var n=[],r=[];pu.flattenJSON(t.keys,n,r,"value"),t.times=n,t.values=r}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,n=t.constructor;if(void 0!==n.toJSON)e=n.toJSON(t);else{e={name:t.name,times:pu.convertArray(t.times,Array),values:pu.convertArray(t.values,Array)};var r=t.getInterpolation();r!==t.DefaultInterpolation&&(e.interpolation=r)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return mi;case"vector":case"vector2":case"vector3":case"vector4":return _i;case"color":return fi;case"quaternion":return pi;case"bool":case"boolean":return hi;case"string":return ui}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}}),Object.assign(xi.prototype,{constructor:xi,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:mc,InterpolantFactoryMethodDiscrete:function(t){return new yi(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new gi(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new vi(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case fc:e=this.InterpolantFactoryMethodDiscrete;break;case mc:e=this.InterpolantFactoryMethodLinear;break;case vc:e=this.InterpolantFactoryMethodSmooth}if(void 0===e){var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}return void console.warn("THREE.KeyframeTrack:",n)}this.createInterpolant=e},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return fc;case this.InterpolantFactoryMethodLinear:return mc;case this.InterpolantFactoryMethodSmooth:return vc}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(o=Math.max(o,1),i=o-1);var a=this.getValueSize();this.times=pu.arraySlice(n,i,o),this.values=pu.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),t=!1;break}o=s}if(void 0!==r&&pu.isTypedArray(r))for(var a=0,c=r.length;a!==c;++a){var u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),t=!1;break}}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),r=this.getInterpolation()===vc,i=1,o=t.length-1,a=1;a<o;++a){var s=!1,c=t[a];if(c!==t[a+1]&&(1!==a||c!==c[0]))if(r)s=!0;else for(var u=a*n,h=u-n,l=u+n,d=0;d!==n;++d){var p=e[u+d];if(p!==e[h+d]||p!==e[l+d]){s=!0;break}}if(s){if(a!==i){t[i]=t[a];for(var f=a*n,m=i*n,d=0;d!==n;++d)e[m+d]=e[f+d]}++i}}if(o>0){t[i]=t[o];for(var f=o*n,m=i*n,d=0;d!==n;++d)e[m+d]=e[f+d];++i}return i!==t.length&&(this.times=pu.arraySlice(t,0,i),this.values=pu.arraySlice(e,0,i*n)),this}}),_i.prototype=Object.assign(Object.create(xi.prototype),{constructor:_i,ValueTypeName:"vector"}),Object.assign(bi,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(xi.parse(n[i]).scale(r));return new bi(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid},i=0,o=n.length;i!==o;++i)e.push(xi.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(t,e,n,r){for(var i=e.length,o=[],a=0;a<i;a++){var s=[],c=[];s.push((a+i-1)%i,a,(a+1)%i),c.push(0,1,0);var u=pu.getKeyframeOrder(s);s=pu.sortedArray(s,1,u),c=pu.sortedArray(c,1,u),r||0!==s[0]||(s.push(i),c.push(c[0])),o.push(new mi(".morphTargetInfluences["+e[a].name+"]",s,c).scale(1/n))}return new bi(t,-1,o)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\w-]*?)([\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],c=s.name.match(i);if(c&&c.length>1){var u=c[1],h=r[u];h||(r[u]=h=[]),h.push(s)}}var l=[];for(var u in r)l.push(bi.CreateFromMorphTargetSequence(u,r[u],e,n));return l},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(t,e,n,r,i){if(0!==n.length){var o=[],a=[];pu.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c<s.length;c++){var u=s[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var h={},l=0;l<u.length;l++)if(u[l].morphTargets)for(var d=0;d<u[l].morphTargets.length;d++)h[u[l].morphTargets[d]]=-1;for(var p in h){for(var f=[],m=[],d=0;d!==u[l].morphTargets.length;++d){var v=u[l];f.push(v.time),m.push(v.morphTarget===p?1:0)}r.push(new mi(".morphTargetInfluence["+p+"]",f,m))}o=h.length*(a||1)}else{var g=".bones["+e[c].name+"]";n(_i,g+".position",u,"pos",r),n(pi,g+".quaternion",u,"rot",r),n(_i,g+".scale",u,"scl",r)}}return 0===r.length?null:new bi(i,o,r)}}),Object.assign(bi.prototype,{resetDuration:function(){for(var t=this.tracks,e=0,n=0,r=t.length;n!==r;++n){var i=this.tracks[n];e=Math.max(e,i.times[i.times.length-1])}this.duration=e},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(wi.prototype,{load:function(t,e,n,r){var i=this;new wr(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){function e(t){return void 0===n[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),n[t]}var n=this.textures,r=new iu[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearCoat&&(r.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(r.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(r.uniforms=t.uniforms),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.flatShading&&(r.flatShading=t.flatShading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(r.rotation=t.rotation),1!==t.linewidth&&(r.linewidth=t.linewidth),void 0!==t.dashSize&&(r.dashSize=t.dashSize),void 0!==t.gapSize&&(r.gapSize=t.gapSize),void 0!==t.scale&&(r.scale=t.scale),void 0!==t.polygonOffset&&(r.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(r.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(r.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.dithering&&(r.dithering=t.dithering),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.shading&&(r.flatShading=1===t.shading),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=e(t.map)),void 0!==t.alphaMap&&(r.alphaMap=e(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=e(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=e(t.normalMap)),void 0!==t.normalScale){var o=t.normalScale;!1===Array.isArray(o)&&(o=[o,o]),r.normalScale=(new i).fromArray(o)}return void 0!==t.displacementMap&&(r.displacementMap=e(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=e(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=e(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=e(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=e(t.specularMap)),void 0!==t.envMap&&(r.envMap=e(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=e(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=e(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=e(t.gradientMap)),r}}),Object.assign(Mi.prototype,{load:function(t,e,n,r){var i=this;new wr(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},parse:function(t){var e=new G,n=t.data.index;if(void 0!==n){var r=new fu[n.type](n.array);e.setIndex(new R(r,1))}var i=t.data.attributes;for(var o in i){var a=i[o],r=new fu[a.type](a.array);e.addAttribute(o,new R(r,a.itemSize,a.normalized))}var c=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==c)for(var u=0,h=c.length;u!==h;++u){var l=c[u];e.addGroup(l.start,l.count,l.materialIndex)}var d=t.data.boundingSphere;if(void 0!==d){var p=new s;void 0!==d.center&&p.fromArray(d.center),e.boundingSphere=new m(p,d.radius)}return e}});var fu={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};Ei.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(Ei.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:function(){var t={NoBlending:ba,NormalBlending:wa,AdditiveBlending:Ma,SubtractiveBlending:Ea,MultiplyBlending:Ta,CustomBlending:Sa},e=new y,n=new Ar,r=new wi;return function(i,o,a){function s(t,e,r,i,s){var u,h=o+t,l=Ei.Handlers.get(h);null!==l?u=l.load(h):(n.setCrossOrigin(a),u=n.load(h)),void 0!==e&&(u.repeat.fromArray(e),1!==e[0]&&(u.wrapS=ps),1!==e[1]&&(u.wrapT=ps)),void 0!==r&&u.offset.fromArray(r),void 0!==i&&("repeat"===i[0]&&(u.wrapS=ps),"mirror"===i[0]&&(u.wrapS=ms),"repeat"===i[1]&&(u.wrapT=ps),"mirror"===i[1]&&(u.wrapT=ms)),void 0!==s&&(u.anisotropy=s);var d=Ic.generateUUID();return c[d]=u,d}var c={},u={uuid:Ic.generateUUID(),type:"MeshLambertMaterial"};for(var h in i){var l=i[h];switch(h){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":u.name=l;break;case"blending":u.blending=t[l];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",h,"is no longer supported.");break;case"colorDiffuse":u.color=e.fromArray(l).getHex();break;case"colorSpecular":u.specular=e.fromArray(l).getHex();break;case"colorEmissive":u.emissive=e.fromArray(l).getHex();break;case"specularCoef":u.shininess=l;break;case"shading":"basic"===l.toLowerCase()&&(u.type="MeshBasicMaterial"),"phong"===l.toLowerCase()&&(u.type="MeshPhongMaterial"),"standard"===l.toLowerCase()&&(u.type="MeshStandardMaterial");break;case"mapDiffuse":u.map=s(l,i.mapDiffuseRepeat,i.mapDiffuseOffset,i.mapDiffuseWrap,i.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":u.emissiveMap=s(l,i.mapEmissiveRepeat,i.mapEmissiveOffset,i.mapEmissiveWrap,i.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":u.lightMap=s(l,i.mapLightRepeat,i.mapLightOffset,i.mapLightWrap,i.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":u.aoMap=s(l,i.mapAORepeat,i.mapAOOffset,i.mapAOWrap,i.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":u.bumpMap=s(l,i.mapBumpRepeat,i.mapBumpOffset,i.mapBumpWrap,i.mapBumpAnisotropy);break;case"mapBumpScale":u.bumpScale=l;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":u.normalMap=s(l,i.mapNormalRepeat,i.mapNormalOffset,i.mapNormalWrap,i.mapNormalAnisotropy);break;case"mapNormalFactor":u.normalScale=l;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":u.specularMap=s(l,i.mapSpecularRepeat,i.mapSpecularOffset,i.mapSpecularWrap,i.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":u.metalnessMap=s(l,i.mapMetalnessRepeat,i.mapMetalnessOffset,i.mapMetalnessWrap,i.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":u.roughnessMap=s(l,i.mapRoughnessRepeat,i.mapRoughnessOffset,i.mapRoughnessWrap,i.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":u.alphaMap=s(l,i.mapAlphaRepeat,i.mapAlphaOffset,i.mapAlphaWrap,i.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":u.side=fa;break;case"doubleSided":u.side=ma;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),u.opacity=l;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":u[h]=l;break;case"vertexColors":!0===l&&(u.vertexColors=_a),"face"===l&&(u.vertexColors=xa);break;default:console.error("THREE.Loader.createMaterial: Unsupported",h,l)}}return"MeshBasicMaterial"===u.type&&delete u.emissive,"MeshPhongMaterial"!==u.type&&delete u.specular,u.opacity<1&&(u.transparent=!0),r.setTextures(c),r.parse(u)}}()});var mu={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e="",n=0,r=t.length;n<r;n++)e+=String.fromCharCode(t[n]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}};Object.assign(Ti.prototype,{load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:mu.extractUrlBase(t),a=new wr(this.manager);a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.")}var c=i.parse(r,o);e(c.geometry,c.materials)},n,r)},setTexturePath:function(t){this.texturePath=t},parse:function(){function t(t,e){function n(t,e){return t&1<<e}var r,o,a,c,u,h,l,d,p,f,m,v,g,x,_,b,w,M,E,T,A,R,L,C,P,O,I,N=t.faces,D=t.vertices,U=t.normals,B=t.colors,F=t.scale,z=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&z++;for(r=0;r<z;r++)e.faceVertexUvs[r]=[]}for(c=0,u=D.length;c<u;)M=new s,M.x=D[c++]*F,M.y=D[c++]*F,M.z=D[c++]*F,e.vertices.push(M);for(c=0,u=N.length;c<u;)if(f=N[c++],m=n(f,0),v=n(f,1),g=n(f,3),x=n(f,4),_=n(f,5),b=n(f,6),w=n(f,7),m){if(T=new S,T.a=N[c],T.b=N[c+1],T.c=N[c+3],A=new S,A.a=N[c+1],A.b=N[c+2],A.c=N[c+3],c+=4,v&&(p=N[c++],T.materialIndex=p,A.materialIndex=p),a=e.faces.length,g)for(r=0;r<z;r++)for(C=t.uvs[r],e.faceVertexUvs[r][a]=[],e.faceVertexUvs[r][a+1]=[],o=0;o<4;o++)d=N[c++],O=C[2*d],I=C[2*d+1],P=new i(O,I),2!==o&&e.faceVertexUvs[r][a].push(P),0!==o&&e.faceVertexUvs[r][a+1].push(P);if(x&&(l=3*N[c++],T.normal.set(U[l++],U[l++],U[l]),A.normal.copy(T.normal)),_)for(r=0;r<4;r++)l=3*N[c++],L=new s(U[l++],U[l++],U[l]),2!==r&&T.vertexNormals.push(L),0!==r&&A.vertexNormals.push(L);if(b&&(h=N[c++],R=B[h],T.color.setHex(R),A.color.setHex(R)),w)for(r=0;r<4;r++)h=N[c++],R=B[h],2!==r&&T.vertexColors.push(new y(R)),0!==r&&A.vertexColors.push(new y(R));e.faces.push(T),e.faces.push(A)}else{if(E=new S,E.a=N[c++],E.b=N[c++],E.c=N[c++],v&&(p=N[c++],E.materialIndex=p),a=e.faces.length,g)for(r=0;r<z;r++)for(C=t.uvs[r],e.faceVertexUvs[r][a]=[],o=0;o<3;o++)d=N[c++],O=C[2*d],I=C[2*d+1],P=new i(O,I),e.faceVertexUvs[r][a].push(P);if(x&&(l=3*N[c++],E.normal.set(U[l++],U[l++],U[l])),_)for(r=0;r<3;r++)l=3*N[c++],L=new s(U[l++],U[l++],U[l]),E.vertexNormals.push(L);if(b&&(h=N[c++],E.color.setHex(B[h])),w)for(r=0;r<3;r++)h=N[c++],E.vertexColors.push(new y(B[h]));e.faces.push(E)}}function e(t,e){var n=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var r=0,i=t.skinWeights.length;r<i;r+=n){var o=t.skinWeights[r],a=n>1?t.skinWeights[r+1]:0,s=n>2?t.skinWeights[r+2]:0,c=n>3?t.skinWeights[r+3]:0;e.skinWeights.push(new h(o,a,s,c))}if(t.skinIndices)for(var r=0,i=t.skinIndices.length;r<i;r+=n){var u=t.skinIndices[r],l=n>1?t.skinIndices[r+1]:0,d=n>2?t.skinIndices[r+2]:0,p=n>3?t.skinIndices[r+3]:0;e.skinIndices.push(new h(u,l,d,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}function n(t,e){var n=t.scale;if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r<i;r++){e.morphTargets[r]={},e.morphTargets[r].name=t.morphTargets[r].name,e.morphTargets[r].vertices=[];for(var o=e.morphTargets[r].vertices,a=t.morphTargets[r].vertices,c=0,u=a.length;c<u;c+=3){var h=new s;h.x=a[c]*n,h.y=a[c+1]*n,h.z=a[c+2]*n,o.push(h)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');for(var l=e.faces,d=t.morphColors[0].colors,r=0,i=l.length;r<i;r++)l[r].color.fromArray(d,3*r)}}function r(t,e){var n=[],r=[];void 0!==t.animation&&r.push(t.animation),void 0!==t.animations&&(t.animations.length?r=r.concat(t.animations):r.push(t.animations));for(var i=0;i<r.length;i++){var o=bi.parseAnimation(r[i],e.bones);o&&n.push(o)}if(e.morphTargets){var a=bi.CreateClipsFromMorphTargetSequences(e.morphTargets,10);n=n.concat(a)}n.length>0&&(e.animations=n)}return function(i,o){void 0!==i.data&&(i=i.data),void 0!==i.scale?i.scale=1/i.scale:i.scale=1;var a=new A;return t(i,a),e(i,a),n(i,a),r(i,a),a.computeFaceNormals(),a.computeBoundingSphere(),void 0===i.materials||0===i.materials.length?{geometry:a}:{geometry:a,materials:Ei.prototype.initMaterials(i.materials,o,this.crossOrigin)}}}()}),Object.assign(Si.prototype,{load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this;new wr(i.manager).load(t,function(n){var o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can't parse "+t+".",e.message)}var a=o.metadata;if(void 0===a||void 0===a.type||"geometry"===a.type.toLowerCase())return void console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead.");i.parse(o,e)},n,r)},setTexturePath:function(t){return this.texturePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(t,e){var n=this.parseShape(t.shapes),r=this.parseGeometries(t.geometries,n),i=this.parseImages(t.images,function(){void 0!==e&&e(s)}),o=this.parseTextures(t.textures,i),a=this.parseMaterials(t.materials,o),s=this.parseObject(t.object,r,a);return t.animations&&(s.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(s),s},parseShape:function(t){var e={};if(void 0!==t)for(var n=0,r=t.length;n<r;n++){var i=(new Kr).fromJSON(t[n]);e[i.uuid]=i}return e},parseGeometries:function(t,e){var n={};if(void 0!==t)for(var r=new Ti,i=new Mi,o=0,a=t.length;o<a;o++){var s,c=t[o];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new ru[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new ru[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new ru[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new ru[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new ru[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new ru[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new ru[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new ru[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new ru[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new ru[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new ru[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new ru[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var u=[],h=0,l=c.shapes.length;h<l;h++){var d=e[c.shapes[h]];u.push(d)}s=new ru[c.type](u,c.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(var u=[],h=0,l=c.shapes.length;h<l;h++){var d=e[c.shapes[h]];u.push(d)}var p=c.options.extrudePath;void 0!==p&&(c.options.extrudePath=(new du[p.type]).fromJSON(p)),s=new ru[c.type](u,c.options);break;case"BufferGeometry":s=i.parse(c);break;case"Geometry":s=r.parse(c,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+c.type+'"');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),!0===s.isBufferGeometry&&void 0!==c.userData&&(s.userData=c.userData),n[c.uuid]=s}return n},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new wi;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=t[i];if("MultiMaterial"===a.type){for(var s=[],c=0;c<a.materials.length;c++)s.push(r.parse(a.materials[c]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n],i=bi.parse(r);void 0!==r.uuid&&(i.uuid=r.uuid),e.push(i)}return e},parseImages:function(t,e){var n=this,r={};if(void 0!==t&&t.length>0){var i=new br(e),o=new Tr(i);o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;a<s;a++){var c=t[a],u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(c.url)?c.url:n.texturePath+c.url;r[c.uuid]=function(t){return n.manager.itemStart(t),o.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemEnd(t),n.manager.itemError(t)})}(u)}}return r},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var r={};if(void 0!==t)for(var i=0,o=t.length;i<o;i++){var a=t[i];void 0===a.image&&console.warn('THREE.ObjectLoader: No "image" specified for',a.uuid),void 0===e[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=new u(e[a.image]);s.needsUpdate=!0,s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,vu)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],gu),s.wrapT=n(a.wrap[1],gu)),void 0!==a.format&&(s.format=a.format),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,yu)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,yu)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),r[a.uuid]=s}return r},parseObject:function(t,e,n){function r(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function i(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],r=0,i=t.length;r<i;r++){var o=t[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),e.push(n[o])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}var o;switch(t.type){case"Scene":o=new Oe,void 0!==t.background&&Number.isInteger(t.background)&&(o.background=new y(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?o.fog=new Pe(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(o.fog=new Ce(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":o=new Te(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(o.focus=t.focus),void 0!==t.zoom&&(o.zoom=t.zoom),void 0!==t.filmGauge&&(o.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(o.filmOffset=t.filmOffset),void 0!==t.view&&(o.view=Object.assign({},t.view));break;case"OrthographicCamera":o=new T(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(o.zoom=t.zoom),void 0!==t.view&&(o.view=Object.assign({},t.view));break;case"AmbientLight":o=new si(t.color,t.intensity);break;case"DirectionalLight":o=new ai(t.color,t.intensity);break;case"PointLight":o=new ii(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":o=new ci(t.color,t.intensity,t.width,t.height);break;case"SpotLight":o=new ri(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":o=new ti(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var a=r(t.geometry),s=i(t.material);o=a.bones&&a.bones.length>0?new Fe(a,s):new Q(a,s);break;case"LOD":o=new De;break;case"Line":o=new Ge(r(t.geometry),i(t.material),t.mode);break;case"LineLoop":o=new Ve(r(t.geometry),i(t.material));break;case"LineSegments":o=new He(r(t.geometry),i(t.material));break;case"PointCloud":case"Points":o=new je(r(t.geometry),i(t.material));break;case"Sprite":o=new Ne(i(t.material));break;case"Group":o=new We;break;default:o=new M}if(o.uuid=t.uuid,void 0!==t.name&&(o.name=t.name),void 0!==t.matrix?(o.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(o.matrixAutoUpdate=t.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(void 0!==t.position&&o.position.fromArray(t.position),void 0!==t.rotation&&o.rotation.fromArray(t.rotation),void 0!==t.quaternion&&o.quaternion.fromArray(t.quaternion),void 0!==t.scale&&o.scale.fromArray(t.scale)),void 0!==t.castShadow&&(o.castShadow=t.castShadow),void 0!==t.receiveShadow&&(o.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(o.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(o.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&o.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(o.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(o.visible=t.visible),void 0!==t.frustumCulled&&(o.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(o.renderOrder=t.renderOrder),void 0!==t.userData&&(o.userData=t.userData),void 0!==t.children)for(var c=t.children,u=0;u<c.length;u++)o.add(this.parseObject(c[u],e,n));if("LOD"===t.type)for(var h=t.levels,l=0;l<h.length;l++){var d=h[l],p=o.getObjectByProperty("uuid",d.object);void 0!==p&&o.addLevel(p,d.distance)}return o}});var vu={UVMapping:os,CubeReflectionMapping:as,CubeRefractionMapping:ss,EquirectangularReflectionMapping:cs,EquirectangularRefractionMapping:us,SphericalReflectionMapping:hs,CubeUVReflectionMapping:ls,CubeUVRefractionMapping:ds},gu={RepeatWrapping:ps,ClampToEdgeWrapping:fs,MirroredRepeatWrapping:ms},yu={NearestFilter:vs,NearestMipMapNearestFilter:gs,NearestMipMapLinearFilter:ys,LinearFilter:xs,LinearMipMapNearestFilter:_s,LinearMipMapLinearFilter:bs};Ai.prototype={constructor:Ai,setOptions:function(t){return this.options=t,this},load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=ou.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;fetch(t).then(function(t){return t.blob()}).then(function(t){return createImageBitmap(t,i.options)}).then(function(n){ou.add(t,n),e&&e(n),i.manager.itemEnd(t)}).catch(function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Ri.prototype,{moveTo:function(t,e){this.currentPath=new Qr,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new Kr;o.curves=i.curves,e.push(o)}return e}var r=eu.isClockWise,i=this.subPaths;if(0===i.length)return[];if(!0===e)return n(i);var o,a,s,c=[];if(1===i.length)return a=i[0],s=new Kr,s.curves=a.curves,c.push(s),c;var u=!r(i[0].getPoints());u=t?!u:u;var h,l=[],d=[],p=[],f=0;d[f]=void 0,p[f]=[];for(var m=0,v=i.length;m<v;m++)a=i[m],h=a.getPoints(),o=r(h),o=t?!o:o,o?(!u&&d[f]&&f++,d[f]={s:new Kr,p:h},d[f].s.curves=a.curves,u&&f++,p[f]=[]):p[f].push({h:a,p:h[0]});if(!d[0])return n(i);if(d.length>1){for(var g=!1,y=[],x=0,_=d.length;x<_;x++)l[x]=[];for(var x=0,_=d.length;x<_;x++)for(var b=p[x],w=0;w<b.length;w++){for(var M=b[w],E=!0,T=0;T<d.length;T++)(function(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],c=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[i],u=-u),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var h=u*(t.x-a.x)-c*(t.y-a.y);if(0===h)return!0;if(h<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r})(M.p,d[T].p)&&(x!==T&&y.push({froms:x,tos:T,hole:w}),E?(E=!1,l[T].push(M)):g=!0);E&&l[x].push(M)}y.length>0&&(g||(p=l))}for(var S,m=0,A=d.length;m<A;m++){s=d[m].s,c.push(s),S=p[m];for(var R=0,L=S.length;R<L;R++)s.holes.push(S[R].h)}return c}}),Object.assign(Li.prototype,{isFont:!0,generateShapes:function(t,e,n){void 0===e&&(e=100),void 0===n&&(n=4);for(var r=[],i=Ci(t,e,n,this.data),o=0,a=i.length;o<a;o++)Array.prototype.push.apply(r,i[o].toShapes());return r}}),Object.assign(Oi.prototype,{load:function(t,e,n,r){var i=this,o=new wr(this.manager);o.setPath(this.path),o.load(t,function(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}var r=i.parse(n);e&&e(r)},n,r)},parse:function(t){return new Li(t)},setPath:function(t){return this.path=t,this}});var xu,_u={getContext:function(){return void 0===xu&&(xu=new(window.AudioContext||window.webkitAudioContext)),xu},setContext:function(t){xu=t}};Object.assign(Ii.prototype,{load:function(t,e,n,r){var i=new wr(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){_u.getContext().decodeAudioData(t,function(t){e(t)})},n,r)}}),Object.assign(Ni.prototype,{update:function(){var t,e,n,r,i,a,s,c,u=new o,h=new o;return function(o){if(t!==this||e!==o.focus||n!==o.fov||r!==o.aspect*this.aspect||i!==o.near||a!==o.far||s!==o.zoom||c!==this.eyeSep){t=this,e=o.focus,n=o.fov,r=o.aspect*this.aspect,i=o.near,a=o.far,s=o.zoom;var l=o.projectionMatrix.clone();c=this.eyeSep/2;var d,p,f=c*i/e,m=i*Math.tan(Ic.DEG2RAD*n*.5)/s;h.elements[12]=-c,u.elements[12]=c,d=-m*r+f,p=m*r+f,l.elements[0]=2*i/(p-d),l.elements[8]=(p+d)/(p-d),this.cameraL.projectionMatrix.copy(l),d=-m*r-f,p=m*r-f,l.elements[0]=2*i/(p-d),l.elements[8]=(p+d)/(p-d),this.cameraR.projectionMatrix.copy(l)}this.cameraL.matrixWorld.copy(o.matrixWorld).multiply(h),this.cameraR.matrixWorld.copy(o.matrixWorld).multiply(u)}}()}),Di.prototype=Object.create(M.prototype),Di.prototype.constructor=Di,Ui.prototype=Object.assign(Object.create(M.prototype),{constructor:Ui,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01)},updateMatrixWorld:function(){var t=new s,e=new a,n=new s,r=new s;return function(i){M.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.positionX?(o.positionX.setValueAtTime(t.x,this.context.currentTime),o.positionY.setValueAtTime(t.y,this.context.currentTime),o.positionZ.setValueAtTime(t.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),Bi.prototype=Object.assign(Object.create(M.prototype),{constructor:Bi,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setMediaElementSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()},pause:function(){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this)},stop:function(){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(this.source.stop(),this.offset=0,this.isPlaying=!1,this)},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this)},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this)},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),Fi.prototype=Object.assign(Object.create(Bi.prototype),{constructor:Fi,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new s;return function(e){M.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(zi.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(Gi.prototype,{accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{o+=e;var s=e/o;this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,c=e+e;s!==c;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r){a.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}});var bu="\\[\\]\\.:\\/";Object.assign(Hi.prototype,{getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Vi,{Composite:Hi,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Vi.Composite(t,e,n):new Vi(t,e,n)},sanitizeNodeName:function(){var t=new RegExp("["+bu+"]","g");return function(e){return e.replace(/\s/g,"_").replace(t,"")}}(),parseTrackName:function(){var t="[^"+bu+"]",e="[^"+bu.replace("\\.","")+"]",n=/((?:WC+[\/:])*)/.source.replace("WC",t),r=/(WCOD+)?/.source.replace("WCOD",e),i=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",t),o=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",t),a=new RegExp("^"+n+r+i+o+"$"),s=["material","materials","bones"];return function(t){var e=a.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==s.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}}(),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){var r=function(t){for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e||i.uuid===e)return i;var o=r(i.children);if(o)return o}return null},i=r(t.children);if(i)return i}return null}}),Object.assign(Vi.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=Vi.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(n){var o=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var a=0;a<t.length;a++)if(t[a].name===o){o=a;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==o){if(void 0===t[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[o]}}var s=t[r];if(void 0===s){var c=e.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+c+"."+r+" but it wasn't found.",t)}var u=this.Versioning.None;void 0!==t.needsUpdate?(u=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(u=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var h=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(var a=0;a<this.node.geometry.morphAttributes.position.length;a++)if(t.geometry.morphAttributes.position[a].name===i){i=a;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(var a=0;a<this.node.geometry.morphTargets.length;a++)if(t.geometry.morphTargets[a].name===i){i=a;break}}}h=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(h=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(h=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[h],this.setValue=this.SetterByBindingTypeAndVersioning[h][u]},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),
//!\ DECLARE ALIAS AFTER assign prototype !
Object.assign(Vi.prototype,{_getValue_unbound:Vi.prototype.getValue,_setValue_unbound:Vi.prototype.setValue}),Object.assign(ki.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length,c=void 0,u=0,h=arguments.length;u!==h;++u){var l=arguments[u],d=l.uuid,p=r[d];if(void 0===p){p=e++,r[d]=p,t.push(l);for(var f=0,m=s;f!==m;++f)a[f].push(new Vi(l,i[f],o[f]))}else if(p<n){c=t[p];var v=--n,g=t[v];r[g.uuid]=p,t[p]=g,r[d]=v,t[v]=l;for(var f=0,m=s;f!==m;++f){var y=a[f],x=y[v],_=y[p];y[p]=x,void 0===_&&(_=new Vi(l,i[f],o[f])),y[v]=_}}else t[p]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,i=r.length,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],c=s.uuid,u=n[c];if(void 0!==u&&u>=e){var h=e++,l=t[h];n[l.uuid]=u,t[u]=l,n[c]=h,t[h]=s;for(var d=0,p=i;d!==p;++d){var f=r[d],m=f[h],v=f[u];f[u]=m,f[h]=v}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a],u=c.uuid,h=r[u];if(void 0!==h)if(delete r[u],h<n){var l=--n,d=t[l],p=--e,f=t[p];r[d.uuid]=h,t[h]=d,r[f.uuid]=l,t[l]=f,t.pop();for(var m=0,v=o;m!==v;++m){var g=i[m],y=g[l],x=g[p];g[h]=y,g[l]=x,g.pop()}}else{var p=--e,f=t[p];r[f.uuid]=h,t[h]=f,t.pop();for(var m=0,v=o;m!==v;++m){var g=i[m];g[h]=g[p],g.pop()}}}this.nCachedObjects_=n},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,h=new Array(c);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(h);for(var l=u,d=s.length;l!==d;++l){var p=s[l];h[l]=new Vi(p,t,e)}return h},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(ji.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=t/a,c[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){if(!this.enabled)return void this._updateWeight(t);var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,u=this._propertyBindings,h=0,l=c.length;h!==l;++h)c[h].evaluate(a),u[h].accumulate(r,s)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n){e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===lc){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=r===pc;if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=yc,r.endingEnd=yc):(r.endingStart=t?this.zeroSlopeAtStart?yc:gc:xc,r.endingEnd=e?this.zeroSlopeAtEnd?yc:gc:xc)},_scheduleFading:function(t,e,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}}),Wi.prototype=Object.assign(Object.create(r.prototype),{constructor:Wi,_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName,u=c[s];void 0===u&&(u={},c[s]=u);for(var h=0;h!==i;++h){var l=r[h],d=l.name,p=u[d];if(void 0!==p)o[h]=p;else{if(void 0!==(p=o[h])){null===p._cacheIndex&&(++p.referenceCount,this._addInactiveBinding(p,s,d));continue}var f=e&&e._propertyBindings[h].binding.parsedPath;p=new Gi(Vi.create(n,d,f),l.ValueTypeName,l.getValueSize()),++p.referenceCount,this._addInactiveBinding(p,s,d),o[h]=p}a[h].resultBuffer=p.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete a[i];t:{for(var u in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&(n=new gi(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?bi.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var c=a.actionByRoot[r];if(void 0!==c)return c;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var u=new ji(this,i,e);return this._bindAction(u,s),this._addInactiveAction(u,o,r),u},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?bi.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a?a.actionByRoot[r]||null:null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==e;++i)t[i].reset();for(var i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){e[a]._update(r,t,i,o)}for(var s=this._bindings,c=this._nActiveBindings,a=0;a!==c;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var c=o[a];this._deactivateAction(c);var u=c._cacheIndex,h=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,h._cacheIndex=u,e[u]=h,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot,o=i[e];void 0!==o&&(this._deactivateAction(o),this._removeInactiveAction(o))}var a=this._bindingsByRootAndName,s=a[e];if(void 0!==s)for(var c in s){var u=s[c];u.restoreOriginalState(),this._removeInactiveBinding(u)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Xi.prototype.clone=function(){return new Xi(void 0===this.value.clone?this.value:this.value.clone())},qi.prototype=Object.assign(Object.create(G.prototype),{constructor:qi,isInstancedBufferGeometry:!0,copy:function(t){return G.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(Yi.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Yi.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this}}),Object.defineProperty(Zi.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Zi.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Ji.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ji,isInstancedInterleavedBuffer:!0,copy:function(t){return Zi.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Qi.prototype=Object.assign(Object.create(R.prototype),{constructor:Qi,isInstancedBufferAttribute:!0,copy:function(t){return R.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Ki.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,n){var r=n||[];return to(t,this,r,e),r.sort($i),r},intersectObjects:function(t,e,n){var r=n||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=t.length;i<o;i++)to(t[i],this,r,e);return r.sort($i),r}}),Object.assign(eo.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(no.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(Ic.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(ro.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),Object.assign(io.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new i;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new i),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new i),this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new i),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new i),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new i;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),oo.prototype=Object.create(M.prototype),oo.prototype.constructor=oo,oo.prototype.isImmediateRenderObject=!0,ao.prototype=Object.create(He.prototype),ao.prototype.constructor=ao,ao.prototype.update=function(){var t=new s,e=new s,n=new c;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,c=a.faces,u=0,h=0,l=c.length;h<l;h++)for(var d=c[h],p=0,f=d.vertexNormals.length;p<f;p++){var m=s[d[r[p]]],v=d.vertexNormals[p];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}else if(a&&a.isBufferGeometry)for(var g=a.attributes.position,y=a.attributes.normal,u=0,p=0,f=g.count;p<f;p++)t.set(g.getX(p),g.getY(p),g.getZ(p)).applyMatrix4(i),e.set(y.getX(p),y.getY(p),y.getZ(p)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1;o.needsUpdate=!0}}(),so.prototype=Object.create(M.prototype),so.prototype.constructor=so,so.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},so.prototype.update=function(){var t=new s,e=new s;return function(){this.light.updateMatrixWorld();var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),uo.prototype=Object.create(He.prototype),uo.prototype.constructor=uo,uo.prototype.updateMatrixWorld=function(){var t=new s,e=new o,n=new o;return function(r){var i=this.bones,o=this.geometry,a=o.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<i.length;s++){var u=i[s];u.parent&&u.parent.isBone&&(e.multiplyMatrices(n,u.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(n,u.parent.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c+1,t.x,t.y,t.z),c+=2)}o.getAttribute("position").needsUpdate=!0,M.prototype.updateMatrixWorld.call(this,r)}}(),ho.prototype=Object.create(Q.prototype),ho.prototype.constructor=ho,ho.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},ho.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},lo.prototype=Object.create(M.prototype),lo.prototype.constructor=lo,lo.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},lo.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,n=this.line.geometry.attributes.position,r=n.array;r[0]=t,r[1]=-e,r[2]=0,r[3]=t,r[4]=e,r[5]=0,r[6]=-t,r[7]=e,r[8]=0,r[9]=-t,r[10]=-e,r[11]=0,r[12]=t,r[13]=-e,r[14]=0,n.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},po.prototype=Object.create(M.prototype),po.prototype.constructor=po,po.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},po.prototype.update=function(){var t=new s,e=new y,n=new y;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var i=r.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?e:n;i.setXYZ(o,s.r,s.g,s.b)}i.needsUpdate=!0}r.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),fo.prototype=Object.create(He.prototype),fo.prototype.constructor=fo,mo.prototype=Object.create(He.prototype),mo.prototype.constructor=mo,vo.prototype=Object.create(He.prototype),vo.prototype.constructor=vo,vo.prototype.update=function(){var t=new s,e=new s,n=new c;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,c=0,u=0,h=s.length;u<h;u++){var l=s[u],d=l.normal;t.copy(a[l.a]).add(a[l.b]).add(a[l.c]).divideScalar(3).applyMatrix4(r),e.copy(d).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(c,t.x,t.y,t.z),c+=1,i.setXYZ(c,e.x,e.y,e.z),c+=1}i.needsUpdate=!0}}(),go.prototype=Object.create(M.prototype),go.prototype.constructor=go,go.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},go.prototype.update=function(){var t=new s,e=new s,n=new s;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t),this.lightPlane.lookAt(n),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(n),this.targetLine.scale.z=n.length()}}(),yo.prototype=Object.create(He.prototype),yo.prototype.constructor=yo,yo.prototype.update=function(){function t(t,o,a,s){r.set(o,a,s).unproject(i);var c=n[t];if(void 0!==c)for(var u=e.getAttribute("position"),h=0,l=c.length;h<l;h++)u.setXYZ(c[h],r.x,r.y,r.z)}var e,n,r=new s,i=new E;return function(){e=this.geometry,n=this.pointMap;i.projectionMatrix.copy(this.camera.projectionMatrix),t("c",0,0,-1),t("t",0,0,1),t("n1",-1,-1,-1),t("n2",1,-1,-1),t("n3",-1,1,-1),t("n4",1,1,-1),t("f1",-1,-1,1),t("f2",1,-1,1),t("f3",-1,1,1),t("f4",1,1,1),t("u1",.7,1.1,-1),t("u2",-.7,1.1,-1),t("u3",0,2,-1),t("cf1",-1,0,1),t("cf2",1,0,1),t("cf3",0,-1,1),t("cf4",0,1,1),t("cn1",-1,0,-1),t("cn2",1,0,-1),t("cn3",0,-1,-1),t("cn4",0,1,-1),e.getAttribute("position").needsUpdate=!0}}(),xo.prototype=Object.create(He.prototype),xo.prototype.constructor=xo,xo.prototype.update=function(){var t=new f;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var n=t.min,r=t.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),xo.prototype.setFromObject=function(t){return this.object=t,this.update(),this},_o.prototype=Object.create(He.prototype),_o.prototype.constructor=_o,_o.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),M.prototype.updateMatrixWorld.call(this,t))},bo.prototype=Object.create(Ge.prototype),bo.prototype.constructor=bo,bo.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.children[0].material.side=e<0?fa:pa,this.lookAt(this.plane.normal),M.prototype.updateMatrixWorld.call(this,t)};var wu,Mu;wo.prototype=Object.create(M.prototype),wo.prototype.constructor=wo,wo.prototype.setDirection=function(){var t,e=new s;return function(n){n.y>.99999?this.quaternion.set(0,0,0,1):n.y<-.99999?this.quaternion.set(1,0,0,0):(e.set(n.z,0,-n.x).normalize(),t=Math.acos(n.y),this.quaternion.setFromAxisAngle(e,t))}}(),wo.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},wo.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},Mo.prototype=Object.create(He.prototype),Mo.prototype.constructor=Mo;var Eu=0,Tu=1;Rr.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Rr.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(Jr.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new A,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new s(i.x,i.y,i.z||0))}return e}}),Object.assign(Qr.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),jo.prototype=Object.create(Or.prototype),Wo.prototype=Object.create(Or.prototype),Xo.prototype=Object.create(Or.prototype),Object.assign(Xo.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),fo.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},uo.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Ei.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),mu.extractUrlBase(t)}}),Object.assign(io.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(f.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),Z.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Ic,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Ic.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ic.ceilPowerOfTwo(t)}}),Object.assign(c.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(o.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new s),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},crossVector:function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)}}),v.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},a.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(Y.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(J.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(J,{barycoordFromPoint:function(t,e,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),J.getBarycoord(t,e,n,r,i)},normal:function(t,e,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),J.getNormal(t,e,n,r)}}),Object.assign(Kr.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Wn(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new nr(this,t)}}),Object.assign(i.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(s.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},getScaleFromMatrix:function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},getColumnFromMatrix:function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(h.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(A.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(M.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(M.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(De.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Ue.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Rr.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Te.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties($r.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(R.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(G.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(G.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Xn.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Xi.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(W.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new y}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===va}}}),Object.defineProperties(vr.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(q.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Le.prototype,{animate:function(t){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(t)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Le.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(xe.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(l.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ae.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),Bi.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new Ii).load(t,function(t){e.setBuffer(t)}),this},zi.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Di.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};var Su={merge:function(t,e,n){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");var r;e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},Au={crossOrigin:void 0,loadTexture:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Ar;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadTextureCube:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Sr;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadCompressedTexture:function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},loadCompressedTextureCube:function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")}},Ru={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}}},function(e,n){e.exports=t},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NAME=e.VERSION=e.Plugin=void 0;var r=n(1),i=n(3);e.Plugin=i.Vr,e.VERSION="1.3.2",e.NAME="@playkit-js/playkit-js-vr";(0,r.registerPlugin)("vr",i.Vr)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.Vr=void 0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(1),c=n(0),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(c),h=n(4),l=n(5),d=n(6);n(7);var p=function(t){function e(t,n,o){r(this,e);var a=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,o));return a._initMembers(),a._addBindings(),a}return o(e,t),a(e,null,[{key:"isValid",value:function(){return!0}}]),a(e,[{key:"_addBindings",value:function(){var t=this;this.eventManager.listen(this.player,this.player.Event.SOURCE_SELECTED,function(e){t.player.isVr()&&(t.logger.debug("VR entry has detected"),t._isVrSupported(e.payload.selectedSource[0])&&(t._requestDeviceMotionPermission(),t.eventManager.listen(t.player,t.player.Event.MEDIA_LOADED,function(){return t._addMotionBindings()}),t.eventManager.listen(t.player,t.player.Event.FIRST_PLAY,function(){return t._initComponents()}),t.eventManager.listen(t.player,t.player.Event.ENDED,function(){return t._cancelAnimationFrame()}),t.eventManager.listen(t.player,t.player.Event.PLAY,function(){return t._onPlay()}),t.eventManager.listen(t.player,t.player.Event.PLAYING,function(){return t._onPlaying()}),t.eventManager.listen(t.player,t.player.Event.RESIZE,function(){return t._updateCanvasSize()}),t._setCrossOrigin()))})}},{key:"_setCrossOrigin",value:function(){var t=this.player.env;"string"==typeof this.player.crossOrigin||"iOS"!==t.os.name&&"Safari"!==t.browser.name&&"Android Browser"!==t.browser.name||(this._crossOriginSet=!0,this.player.crossOrigin=this.player.CorsType.ANONYMOUS)}},{key:"_isIOSPlayer",value:function(){return!1===this.player.config.playback.playsinline&&"iPhone"===this.player.env.device.model}},{key:"_isUnSpportedBrowser",value:function(){var t=this.player.env;return"Safari"===t.browser.name&&t.browser.major<11||"iOS"===t.os.name&&s.Utils.VERSION.compare(t.os.version,"11.3")<0||"IE"===t.browser.name&&!("11"===t.browser.major&&("8.1"===t.os.version||"10"===t.os.version))}},{key:"_isVrSupported",value:function(t){var e=this,n="";return this._isUnSpportedBrowser()&&(n=d.Error.UNSUPPORTED_BROWSER),this._isIOSPlayer()&&(n=d.Error.PLAYSINLINE),t.drmData&&(n=d.Error.DRM),!n||(this.eventManager.listen(this.player,this.player.Event.PLAYING,function(){e.logger.warn("The playback paused due to VR experience not supported"),e.player.pause()}),this.player.dispatchEvent(new s.FakeEvent(this.player.Event.ERROR,new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.VR,s.Error.Code.VR_NOT_SUPPORTED,n))),!1)}},{key:"_addMotionBindings",value:function(){var t=this,e=s.Utils.Dom.getElementBySelector("#"+this.config.rootElement+" .playkit-overlay-action");e&&(this.eventManager.listen(e,"mousedown",function(e){return t._onOverlayActionPointerDown(e)}),this.eventManager.listen(e,"touchstart",function(e){return t._onOverlayActionPointerDown(e)}),this.eventManager.listen(window,"mousemove",function(e){return t._onDocumentPointerMove(e)}),this.eventManager.listen(window,"touchmove",function(e){return t._onDocumentPointerMove(e)},{passive:!1}),this.eventManager.listen(window,"mouseup",this._onDocumentPointerUp.bind(this)),this.eventManager.listen(window,"touchend",this._onDocumentPointerUp.bind(this))),window.DeviceMotionEvent&&this.eventManager.listen(window,"devicemotion",this._onDeviceMotion.bind(this))}},{key:"_initComponents",value:function(){this.logger.debug("Init VR components");var t=this.player.getVideoElement();s.Utils.Dom.addClassName(t,"playkit-vr-video"),this._renderer=new u.WebGLRenderer({devicePixelRatio:window.devicePixelRatio,alpha:!1,clearColor:16777215,antialias:!0});var e=this._renderer.domElement;s.Utils.Dom.addClassName(e,"playkit-vr-canvas"),s.Utils.Dom.insertBefore(this.player.getView(),e,t.nextSibling);var n=this.config.cameraOptions,r=this._getCanvasDimensions(),i=r.width&&r.height?r.width/r.height:n.aspect;this._camera=new u.PerspectiveCamera(n.fov,i,n.near,n.far),this._camera.target=new u.Vector3(0,0,0),this._texture=this._getVideoTexture(t),this._texture.minFilter=this._texture.magFilter=u.LinearFilter,this._texture.generateMipmaps=!1,this._texture.format=u.RGBFormat;var o=new u.SphereBufferGeometry(256,32,32);o.applyMatrix((new u.Matrix4).makeScale(-1,1,1));var a=new u.MeshBasicMaterial({map:this._texture,overdraw:!0}),c=new u.Mesh(o,a);c.position.set(0,0,0),this._scene=new u.Scene,this._scene.add(c),this._effect=new l.StereoEffect(this._renderer),this._updateCanvasSize()}},{key:"_getVideoTexture",value:function(t){if("IE"===this.player.env.browser.name){var e=s.Utils.Dom.createElement("canvas").getContext("2d");return new h.CustomVideoTexture(e)}return new u.VideoTexture(t)}},{key:"_render",value:function(){var t=this.player.getVideoElement();this._texture&&t.readyState>=t.HAVE_CURRENT_DATA&&(this._texture.needsUpdate=!0,this._texture instanceof h.CustomVideoTexture&&this._texture.render(t,this._getCanvasDimensions())),this._rafId=requestAnimationFrame(this._render.bind(this)),this._updateCamera(),this._stereoMode&&this._effect?this._effect.render(this._scene,this._camera):this._renderer&&this._renderer.render(this._scene,this._camera)}},{key:"_updateCamera",value:function(){this._camera&&(this._latitude=Math.max(-89,Math.min(89,this._latitude)),this._camera.target.x=500*Math.sin(u.Math.degToRad(90-this._latitude))*Math.cos(u.Math.degToRad(this._longitude)),this._camera.target.y=500*Math.cos(u.Math.degToRad(90-this._latitude)),this._camera.target.z=500*Math.sin(u.Math.degToRad(90-this._latitude))*Math.sin(u.Math.degToRad(this._longitude)),this._camera.lookAt(this._camera.target))}},{key:"_getCanvasDimensions",value:function(){var t=this.player.getView(),e=this.player.getVideoElement(),n=parseInt(e.videoWidth/e.videoHeight*t.offsetHeight),r=void 0,i=void 0;return t.offsetWidth<n?(r=e.videoHeight/e.videoWidth,i={width:t.offsetWidth,height:r*t.offsetWidth}):(r=e.videoWidth/e.videoHeight,i={width:r*t.offsetHeight,height:t.offsetHeight}),i}},{key:"_clearCalculateInterval",value:function(){this._calculateCanvasSizeInterval&&(clearInterval(this._calculateCanvasSizeInterval),this._calculateCanvasSizeInterval=null)}},{key:"_setRendererSize",value:function(t){this._renderer.setSize(t.width,t.height,!1),this.logger.debug("Update the VR canvas dimensions",t)}},{key:"_updateCanvasSizeByInterval",value:function(){var t=this,e=0,n=void 0;this._clearCalculateInterval(),this._calculateCanvasSizeInterval=setInterval(function(){n=t._getCanvasDimensions(),n.width?(t._clearCalculateInterval(),t._setRendererSize(n)):++e>=600&&(t.player.pause(),t._clean(),t.player.dispatchEvent(new s.FakeEvent(t.player.Event.ERROR,new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.VR,s.Error.Code.VR_NOT_SUPPORTED,d.Error.VIDEO_SIZE))))},100)}},{key:"_updateCanvasSize",value:function(){if(this._renderer){var t=this._getCanvasDimensions();t.width?this._setRendererSize(t):this._updateCanvasSizeByInterval()}}},{key:"_onPlay",value:function(){this._rafId||this._render()}},{key:"_onPlaying",value:function(){this._updateCanvasSize()}},{key:"destroy",value:function(){this._clean()}},{key:"reset",value:function(){this._clean(),this._initMembers(),this._addBindings()}},{key:"toggleVrStereoMode",value:function(){this._stereoMode=!this._stereoMode,this.player.dispatchEvent(new s.FakeEvent(this.player.Event.VR_STEREO_MODE_CHANGED,{mode:this._stereoMode})),this._updateCanvasSize()}},{key:"isInStereoMode",value:function(){return this._stereoMode}},{key:"_clean",value:function(){this._cancelAnimationFrame(),this.eventManager.removeAll(),s.Utils.Dom.removeClassName(this.player.getVideoElement(),"playkit-vr-video"),this._renderer&&s.Utils.Dom.removeChild(this.player.getView(),this._renderer.domElement),this._crossOriginSet&&(this.player.crossOrigin=null),this._clearCalculateInterval()}},{key:"_initMembers",value:function(){this._renderer=null,this._scene=null,this._camera=null,this._texture=null,this._effect=null,this._stereoMode=this.config.startInStereo,this._rafId=NaN,this._pointerDown=!1,this._previousX=NaN,this._previousY=NaN,this._latitude=0,this._longitude=180,this._crossOriginSet=!1}},{key:"_cancelAnimationFrame",value:function(){cancelAnimationFrame(this._rafId),this._rafId=NaN}},{key:"_onOverlayActionPointerDown",value:function(t){this._pointerDown=!0,this._previousX=t.clientX||t.touches[0].clientX,this._previousY=t.clientY||t.touches[0].clientY}},{key:"_onDocumentPointerMove",value:function(t){this._pointerDown&&((t.clientX||t.touches&&1===t.touches.length)&&(this._longitude=(this._previousX-(t.clientX||t.touches[0].clientX))*this.config.moveMultiplier+this._longitude,this._latitude=((t.clientY||t.touches[0].clientY)-this._previousY)*this.config.moveMultiplier+this._latitude,this._previousX=t.clientX||t.touches[0].clientX,this._previousY=t.clientY||t.touches[0].clientY),t.preventDefault())}},{key:"_onDocumentPointerUp",value:function(){this._pointerDown=!1}},{key:"_getMobileVibrationValue",value:function(){return"Android Browser"===this.player.env.browser.name?1:.01}},{key:"_requestDeviceMotionPermission",value:function(){var t=this;if("iOS"===this.player.env.os.name&&s.Utils.VERSION.compare(this.player.env.os.version,"13")>0){var e=s.Utils.Dom.getElementBySelector("#"+this.config.rootElement);this.eventManager.listenOnce(e,"click",function(){window.DeviceOrientationEvent&&"function"==typeof window.DeviceOrientationEvent.requestPermission&&window.DeviceOrientationEvent.requestPermission().then(function(e){t.logger.debug("Permission device motion state ",e)}).catch(function(e){t.logger.warn("Error occurred on permission request for device motion ",e)})})}}},{key:"_onDeviceMotion",value:function(t){if(t.rotationRate){var e=t.rotationRate.alpha,n=t.rotationRate.beta,r=window.innerHeight>window.innerWidth,i=t.orientation||window.orientation,o=this.config.deviceMotionMultiplier*this._getMobileVibrationValue();if(r)this._longitude=this._longitude-n*o,this._latitude=this._latitude+e*o;else{var a=-90;i&&(a=i),this._longitude=-90===a?this._longitude+e*o:this._longitude-e*o,this._latitude=-90===a?this._latitude+n*o:this._latitude-n*o}}}}]),e}(s.BasePlugin);p.defaultConfig={moveMultiplier:.15,deviceMotionMultiplier:1,startInStereo:!1,cameraOptions:{fov:75,aspect:640/360,near:.1,far:1e3}},e.Vr=p},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.CustomVideoTexture=void 0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(0),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),u=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.canvas));return n._ctx2d=t,n}return o(e,t),a(e,[{key:"render",value:function(t,e){this._ctx2d.canvas.width=e.width,this._ctx2d.canvas.height=e.height,this._ctx2d.drawImage(t,0,0,e.width,e.height)}}]),e}(c.Texture);e.CustomVideoTexture=u},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.StereoEffect=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(0),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(o),s=function(){function t(e){r(this,t),this._renderer=e,this._stereo=new a.StereoCamera,this._stereo.aspect=.5}return i(t,[{key:"setEyeSeparation",value:function(t){this._stereo.eyeSep=t}},{key:"setSize",value:function(t,e){this._renderer.setSize(t,e)}},{key:"render",value:function(t,e){t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),this._stereo.update(e);var n=this._renderer.getSize();this._renderer.autoClear&&this._renderer.clear(),this._renderer.setScissorTest(!0),this._renderer.setScissor(0,0,n.width/2,n.height),this._renderer.setViewport(0,0,n.width/2,n.height),this._renderer.render(t,this._stereo.cameraL),this._renderer.setScissor(n.width/2,0,n.width/2,n.height),this._renderer.setViewport(n.width/2,0,n.width/2,n.height),this._renderer.render(t,this._stereo.cameraR),this._renderer.setScissorTest(!1)}}]),t}();e.StereoEffect=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={UNSUPPORTED_BROWSER:"Your browser doesn't support features to enable VR experience",PLAYSINLINE:"playsinline must be true for VR experience",DRM:"Cannot apply VR experience for DRM content",VIDEO_SIZE:"Unable to obtain the video size for VR canvas"};e.Error=r},function(t,e,n){var r=n(8);"string"==typeof r&&(r=[[t.i,r,""]]);var i={};i.transform=void 0;n(10)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){e=t.exports=n(9)(void 0),e.push([t.i,".playkit-vr-video {\n  display: none;\n}\n\n.playkit-vr-canvas {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  right: 0;\n  left: 0;\n  margin: auto;\n  width: 100%;\n}\n",""])},function(t,e){function n(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var o=r(i);return[n].concat(i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"})).concat([o]).join("\n")}return[n].join("\n")}function r(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r=n(e,t);return e[2]?"@media "+e[2]+"{"+r+"}":r}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<t.length;i++){var a=t[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e,n){function r(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=f[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(h(r.parts[o],e))}else{for(var a=[],o=0;o<r.parts.length;o++)a.push(h(r.parts[o],e));f[r.id]={id:r.id,refs:1,parts:a}}}}function i(t,e){for(var n=[],r={},i=0;i<t.length;i++){var o=t[i],a=e.base?o[0]+e.base:o[0],s=o[1],c=o[2],u=o[3],h={css:s,media:c,sourceMap:u};r[a]?r[a].parts.push(h):n.push(r[a]={id:a,parts:[h]})}return n}function o(t,e){var n=v(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=x[x.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),x.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(e)}}function a(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=x.indexOf(t);e>=0&&x.splice(e,1)}function s(t){var e=document.createElement("style");return t.attrs.type="text/css",u(e,t.attrs),o(t,e),e}function c(t){var e=document.createElement("link");return t.attrs.type="text/css",t.attrs.rel="stylesheet",u(e,t.attrs),o(t,e),e}function u(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function h(t,e){var n,r,i,o;if(e.transform&&t.css){if(!(o=e.transform(t.css)))return function(){};t.css=o}if(e.singleton){var u=y++;n=g||(g=s(e)),r=l.bind(null,n,u,!1),i=l.bind(null,n,u,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=c(e),r=p.bind(null,n,e),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(e),r=d.bind(null,n),i=function(){a(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}function l(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=b(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function d(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function p(t,e,n){var r=n.css,i=n.sourceMap,o=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||o)&&(r=_(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var f={},m=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}(function(){return window&&document&&document.all&&!window.atob}),v=function(t){var e={};return function(n){return void 0===e[n]&&(e[n]=t.call(this,n)),e[n]}}(function(t){return document.querySelector(t)}),g=null,y=0,x=[],_=n(11);t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");e=e||{},e.attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||(e.singleton=m()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=i(t,e);return r(n,e),function(t){for(var o=[],a=0;a<n.length;a++){var s=n[a],c=f[s.id];c.refs--,o.push(c)}if(t){r(i(t,e),e)}for(var a=0;a<o.length;a++){var c=o[a];if(0===c.refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete f[c.id]}}}};var b=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var i=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i))return t;var o;return o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")"})}}])});

//# sourceMappingURL=https://cdnapisec.kaltura.com/embedPlaykitJsSourceMaps/path/3_b69fc95c49a4c4e5a21ef2edc45dbf1b
		window.__kalturaplayerdata = (window.__kalturaplayerdata || {});
		window.__kalturaplayerdata.UIConf = (window.__kalturaplayerdata.UIConf||{});window.__kalturaplayerdata.UIConf["43634011"]={"disableUserCache":true,"provider":{"env":{"serviceUrl":"https:\/\/cdnapisec.kaltura.com\/api_v3","cdnUrl":"https:\/\/cdnsecakmi.kaltura.com","statsServiceUrl":"https:\/\/stats.kaltura.com","liveStatsServiceUrl":"https:\/\/livestats.kaltura.com","analyticsServiceUrl":"https:\/\/analytics.kaltura.com","apiFeatures":{"entryRedirect":"1"}}},"plugins":{"vr":{"toggleStereo":true,"moveMultiplier":0.15,"deviceMotionMultiplier":1,"cameraOptions":{"fov":75,"near":0.1,"far":1000},"startInStereo":false}},"playback":{},"ui":{"locale":"en"}};
		