From 3dbbbcfe222404b7b56c7b4b11667a9e208f3374 Mon Sep 17 00:00:00 2001 From: Koha9 Date: Sat, 4 Jan 2025 04:48:38 +0900 Subject: [PATCH] make backdrops video random play --- main.jellyfin.bundle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.jellyfin.bundle.js b/main.jellyfin.bundle.js index 5635145..7306e83 100644 --- a/main.jellyfin.bundle.js +++ b/main.jellyfin.bundle.js @@ -1,2 +1,2 @@ /*! For license information please see main.jellyfin.bundle.js.LICENSE.txt */ -(self.webpackChunk=self.webpackChunk||[]).push([[14577],{86191:function(e,t,n){"use strict";n(29305),n(32733),n(51770),n(84701),n(81678),n(2623),n(14382),n(44962),n(87324),n(89336),n(4754),n(10849),n(70389),n(94),n(33087),n(36947),n(36457),n(88908),n(26437),n(83810),n(52697),n(78557),n(96054),n(90076),n(21359),n(61642),n(83994),n(23630),n(82367);var r=n(87082),i=n(92600),o=n(22622),a=n(89100),s=n(44797),l=n(82885),u=n(90381);function c(e){return c="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},c(e)}function d(){d=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new _(r||[]);return i(a,"_invoke",{value:T(e,n,s)}),a}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",y="suspendedYield",m="executing",v="completed",g={};function b(){}function w(){}function x(){}var S={};u(S,a,(function(){return this}));var A=Object.getPrototypeOf,P=A&&A(A(O([])));P&&P!==n&&r.call(P,a)&&(S=P);var k=x.prototype=b.prototype=Object.create(S);function I(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var l=p(e[i],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==c(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function T(t,n,r){var i=h;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=C(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var u=p(t,n,r);if("normal"===u.type){if(i=r.done?v:y,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=v,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=p(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function E(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),g}},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;L(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function f(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t0&&e=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),g}},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;L(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function u(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function c(e,t){return d.apply(this,arguments)}function d(){var e;return e=l().mark((function e(t,n){var s,u;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=!(i.A.web0s||i.A.tizenVersion&&i.A.tizenVersion<3||!i.A.tv||!window.alert),u="string"==typeof t?{title:n,text:t}:t,e.next=4,r.appRouter.ready();case 4:if(!s){e.next=7;break}return alert((u.text||"").replaceAll("
","\n")),e.abrupt("return",Promise.resolve());case 7:return u.buttons=[{name:a.Ay.translate("ButtonGotIt"),id:"ok",type:"submit"}],e.abrupt("return",o.A.show(u));case 9:case"end":return e.stop()}}),e)})),d=function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){u(o,r,i,a,s,"next",e)}function s(e){u(o,r,i,a,s,"throw",e)}a(void 0)}))},d.apply(this,arguments)}},22622:function(e,t,n){"use strict";n.d(t,{g:function(){return S}}),n(14382),n(84734),n(44962),n(74576),n(78557),n(90076),n(45309),n(95021),n(73687),n(83994),n(93062),n(97747),n(23630),n(82367);var r=n(90381),i=n(34789),o=n(44797),a=n(58180),s=n(51876),l=n(5898),u=n(57634);function c(){if(!m){var e="_deviceId2";(m=r.A.get(e))||((t=[]).push(navigator.userAgent),t.push((new Date).getTime()),m=window.btoa?btoa(t.join("|")).replaceAll("=","1"):(new Date).getTime(),r.A.set(e,m))}var t;return m}function d(){return v||(v=i.A.tizen?"Samsung Smart TV":i.A.web0s?"LG Smart TV":i.A.operaTv?"Opera TV":i.A.xboxOne?"Xbox One":i.A.ps4?"Sony PS4":i.A.chrome?"Chrome":i.A.edgeChromium?"Edge Chromium":i.A.edge?"Edge":i.A.firefox?"Firefox":i.A.opera?"Opera":i.A.safari?"Safari":"Web Browser",i.A.ipad?v+=" iPad":i.A.iphone?v+=" iPhone":i.A.android&&(v+=" Android")),v}function f(){A&&(A=!1,o.A.trigger(S,"resume"))}function p(){A||(A=!0)}var h,y,m,v,g=(h=[],navigator.share&&h.push("sharing"),i.A.edgeUwp||i.A.tv||i.A.xboxOne||i.A.ps4||h.push("filedownload"),i.A.operaTv||i.A.tizen||i.A.orsay||i.A.web0s?h.push("exit"):h.push("plugins"),i.A.operaTv||i.A.tizen||i.A.orsay||i.A.web0s||i.A.ps4||(h.push("externallinks"),h.push("externalpremium")),i.A.operaTv||h.push("externallinkdisplay"),!i.A.tv&&(window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.oSpeechRecognition||window.msSpeechRecognition)&&h.push("voiceinput"),(i.A.edgeUwp||i.A.tizen||i.A.web0s||i.A.orsay||i.A.operaTv||i.A.ps4||i.A.xboxOne||!i.A.mobile)&&(h.push("htmlaudioautoplay"),h.push("htmlvideoautoplay")),function(){if(i.A.tv)return!1;var e=document.documentElement;return!!(e.requestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen||e.msRequestFullscreen||document.createElement("video").webkitEnterFullscreen)}()&&h.push("fullscreenchange"),(i.A.tv||i.A.xboxOne||i.A.ps4||i.A.mobile||i.A.ipad)&&h.push("physicalvolumecontrol"),i.A.tv||i.A.xboxOne||i.A.ps4||h.push("remotecontrol"),i.A.operaTv||i.A.tizen||i.A.orsay||i.A.web0s||i.A.edgeUwp||h.push("remotevideo"),h.push("displaylanguage"),h.push("otherapppromotions"),h.push("displaymode"),h.push("targetblank"),h.push("screensaver"),s.$A().then((function(e){e&&h.push("multiserver")})),!i.A.orsay&&(i.A.firefox||i.A.ps4||i.A.edge||function(){try{var e=document.createElement("video"),t=document.createElement("style");t.textContent="video::cue {background: inherit}",document.body.appendChild(t),document.body.appendChild(e);var n=window.getComputedStyle(e,"::cue").background;return document.body.removeChild(t),document.body.removeChild(e),!!n.length}catch(e){return console.error("error detecting cue support: "+e),!1}}())&&h.push("subtitleappearancesettings"),i.A.orsay||h.push("subtitleburnsettings"),i.A.tv||i.A.ps4||i.A.xboxOne||h.push("fileinput"),(i.A.chrome||i.A.edgeChromium)&&h.push("chromecast"),h);function b(){try{var e;null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.exit?window.NativeShell.AppHost.exit():i.A.tizen?tizen.application.getCurrentApplication().exit():i.A.web0s?webOS.platformBack():window.close()}catch(e){console.error("error closing application: "+e)}}var w,x,S={getWindowState:function(){return document.windowState||"Normal"},setWindowState:function(){alert("setWindowState is not supported and should not be called")},exit:function(){window.appMode&&i.A.tizen?y||n.e(62882).then(n.bind(n,62882)).then((function(e){y=e.show({title:l.Ay.translate("MessageConfirmAppExit"),items:[{id:"yes",name:l.Ay.translate("Yes")},{id:"no",name:l.Ay.translate("No")}]}).then((function(e){"yes"===e&&b()})).finally((function(){y=null}))})):b()},supports:function(e){return window.NativeShell?window.NativeShell.AppHost.supports(e):-1!==g.indexOf(e.toLowerCase())},preferVisualCards:i.A.android||i.A.chrome,getDefaultLayout:function(){return window.NativeShell?window.NativeShell.AppHost.getDefaultLayout():"desktop"},getDeviceProfile:function(e){return new Promise((function(t){var n,o;if(window.NativeShell)o=window.NativeShell.AppHost.getDeviceProfile(u.A,"10.10.3");else{var s=function(e){var t=[];return e&&a.JQ(e.RunTimeTicks,e.MediaType)&&(i.A.edge&&t.push("mp3"),i.A.edgeChromium||(t.push("ac3"),t.push("eac3")),i.A.chrome||i.A.edgeChromium||i.A.firefox||t.push("opus")),{enableMkvProgressive:!1,disableHlsVideoAudioCodecs:t}}(e);o=(0,u.A)(s)}var l=r.A.maxVideoWidth(),c=l<0?null===(n=S.screen())||void 0===n?void 0:n.maxAllowedWidth:l;if(c){var d={Condition:"LessThanEqual",Property:"Width",Value:c.toString(),IsRequired:!1};r.A.limitSupportedVideoResolution()&&o.CodecProfiles.push({Type:"Video",Conditions:[d]}),o.TranscodingProfiles.forEach((function(e){"Video"===e.Type&&(e.Conditions=(e.Conditions||[]).filter((function(e){return"Width"!==e.Property})),e.Conditions.push(d))}))}var f=r.A.preferredTranscodeVideoCodec();f&&o.TranscodingProfiles.forEach((function(e){if("Video"===e.Type){var t=e.VideoCodec.split(","),n=t.indexOf(f);-1!==n&&(t.splice(n,1),t.unshift(f),e.VideoCodec=t.join(","))}}));var p=r.A.preferredTranscodeVideoAudioCodec();p&&o.TranscodingProfiles.forEach((function(e){if("Video"===e.Type){var t=e.AudioCodec.split(","),n=t.indexOf(p);-1!==n&&(t.splice(n,1),t.unshift(p),e.AudioCodec=t.join(","))}})),t(o)}))},init:function(){return window.NativeShell?window.NativeShell.AppHost.init():{deviceId:c(),deviceName:d()}},deviceName:function(){var e;return null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.deviceName?window.NativeShell.AppHost.deviceName():d()},deviceId:function(){var e;return null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.deviceId?window.NativeShell.AppHost.deviceId():c()},appName:function(){var e;return null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.appName?window.NativeShell.AppHost.appName():"Jellyfin Web"},appVersion:function(){var e;return null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.appVersion?window.NativeShell.AppHost.appVersion():"10.10.3"},getPushTokenInfo:function(){return{}},setUserScalable:function(e){if(!i.A.tv){var t=e?"width=device-width, initial-scale=1, minimum-scale=1, user-scalable=yes":"width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no";document.querySelector("meta[name=viewport]").setAttribute("content",t)}},screen:function(){var e,t=null,n=null===(e=window.NativeShell)||void 0===e?void 0:e.AppHost;return null!=n&&n.screen?t=n.screen():window.screen&&!i.A.tv&&(t={width:Math.floor(window.screen.width*window.devicePixelRatio),height:Math.floor(window.screen.height*window.devicePixelRatio)}),t&&(t.maxAllowedWidth=Math.max(t.width,t.height)),t}},A=!1;void 0!==document.hidden?(w="hidden",x="visibilitychange"):void 0!==document.webkitHidden&&(w="webkitHidden",x="webkitvisibilitychange"),document.addEventListener(x,(function(){document[w]?p():f()}),!1),window.addEventListener&&(window.addEventListener("focus",f),window.addEventListener("blur",p)),S.init()},84069:function(e,t,n){"use strict";n.r(t),n.d(t,{autoFocus:function(){return l},enable:function(){return s},isEnabled:function(){return a}}),n(24776),n(69892),n(78557),n(83994);var r,i=n(9164),o=n(46782);function a(){return o.A.tv}function s(){a()&&(window.addEventListener("focusin",(function(e){r=e.target})),console.debug("AutoFocuser enabled"))}function l(e){if(!a())return null;e=e||document.body;var t,n=[];if(r&&(r.classList.contains("btnPreviousPage")?(n.push(e.querySelector(".btnPreviousPage")),n.push(e.querySelector(".btnNextPage"))):r.classList.contains("btnNextPage")?(n.push(e.querySelector(".btnNextPage")),n.push(e.querySelector(".btnPreviousPage"))):r.classList.contains("btnSelectView")&&n.push(e.querySelector(".btnSelectView")),n.push(r)),(n=n.concat(Array.from(e.querySelectorAll(".btnPlay")))).every((function(e){return!i.A.isCurrentlyFocusable(e)||(i.A.focus(e),t=e,!1)})),!t){var o=e.querySelector(".itemsContainer");o&&(t=i.A.autoFocus(o))}return t||(t=i.A.autoFocus(e)),t}t.default={isEnabled:a,enable:s,autoFocus:l}},89166:function(e,t,n){"use strict";n.d(t,{C9:function(){return T},FB:function(){return _},KH:function(){return L},gJ:function(){return w}}),n(29305),n(32733),n(84701),n(81678),n(44962),n(86584),n(4754),n(94),n(77575),n(36947),n(78557),n(83994),n(23630),n(82367);var r=n(98526),i=n(34789),o=n(47750),a=n(47629),s=n(82885),l=n(86191);function u(e){return u="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},u(e)}function c(e,t){for(var n=0;n0?e.BackdropImageTags.map((function(n,i){return r.getScaledImageUrl(e.BackdropItemId||e.Id,Object.assign(t,{type:"Backdrop",tag:n,maxWidth:a.Ay.getScreenWidth(),index:i}))})):e.ParentBackdropItemId&&null!==(n=e.ParentBackdropImageTags)&&void 0!==n&&n.length?e.ParentBackdropImageTags.map((function(n,i){return r.getScaledImageUrl(e.ParentBackdropItemId,Object.assign(t,{type:"Backdrop",tag:n,maxWidth:a.Ay.getScreenWidth(),index:i}))})):[]}var I=[],j=-1;function T(e,t,n){if(arguments.length>3&&void 0!==arguments[3]&&arguments[3]||s.enableBackdrops()){var o=function(e,t){for(var n=[],r=function(e){n.push(e)},i=0,o=e.length;i1&&!1!==t&&!i.A.tv&&!i.A.firefox&&(v=setInterval(C,24e3)),C())}(o,n):w()}}function C(){if(!o.f.isPlayingLocally(["Video"])){var e=j+1;e>=I.length&&(e=0),j=e,function(e){m&&(m.destroy(),m=null);var t=b(),n=t.querySelector(".displayingBackdropImage");if(n&&n.getAttribute("data-url")===e){if(n.getAttribute("data-url")===e)return;n.classList.remove("displayingBackdropImage")}var r=new g;r.load(e,t,n),m=r}(I[e])}}function E(){v&&clearInterval(v),v=null,I=[],j=-1}var L={Full:"full",Backdrop:"backdrop",None:"none"};function _(e){var t=b(),n=x();e===L.Full||2===e?(w(!0),document.documentElement.classList.add("transparentDocument"),n.classList.add("backgroundContainer-transparent"),t.classList.add("hide")):e===L.Backdrop||1===e?(P(!0),document.documentElement.classList.add("transparentDocument"),n.classList.add("backgroundContainer-transparent"),t.classList.add("hide")):(P(!1),document.documentElement.classList.remove("transparentDocument"),n.classList.remove("backgroundContainer-transparent"),t.classList.remove("hide"))}},40532:function(e,t,n){"use strict";n(29305),n(32733),n(51770),n(84701),n(2623),n(44962),n(87324),n(89336),n(10849),n(70389),n(36947),n(26437),n(52697),n(78557),n(90076),n(95021),n(83994),n(93062),n(97747),n(23630),n(82367);var r=n(70267),i=n(34789),o=n(48080),a=n(5898);function s(e){return 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},s(e)}function l(){l=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new _(r||[]);return i(a,"_invoke",{value:T(e,n,s)}),a}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",y="suspendedYield",m="executing",v="completed",g={};function b(){}function w(){}function x(){}var S={};d(S,a,(function(){return this}));var A=Object.getPrototypeOf,P=A&&A(A(O([])));P&&P!==n&&r.call(P,a)&&(S=P);var k=x.prototype=b.prototype=Object.create(S);function I(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,l){var u=p(e[i],e,o);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==s(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,l)}))}l(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function T(t,n,r){var i=h;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=C(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var u=p(t,n,r);if("normal"===u.type){if(i=r.done?v:y,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=v,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=p(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function E(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),g}},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;L(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function u(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){u(o,r,i,a,s,"next",e)}function s(e){u(o,r,i,a,s,"throw",e)}a(void 0)}))}}function d(){return(d=c(l().mark((function e(t){var n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"string"==typeof t&&(t={title:"",text:t}),n=(t.text||"").replaceAll("
","\n"),e.next=4,r.appRouter.ready();case 4:if(!window.confirm(n)){e.next=9;break}return e.abrupt("return",Promise.resolve());case 9:return e.abrupt("return",Promise.reject());case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(){return(f=c(l().mark((function e(t,n){var i,s;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(s=[]).push({name:(i="string"==typeof t?{title:n,text:t}:t).cancelText||a.Ay.translate("ButtonCancel"),id:"cancel",type:"cancel"}),s.push({name:i.confirmText||a.Ay.translate("ButtonOk"),id:"ok",type:"delete"===i.primary?"delete":"submit"}),i.buttons=s,e.next=7,r.appRouter.ready();case 7:return e.abrupt("return",o.A.show(i).then((function(e){return"ok"===e?Promise.resolve():Promise.reject()})));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var p=i.A.web0s||i.A.tizenVersion&&i.A.tizenVersion<3||!i.A.tv||!window.confirm?function(e,t){return f.apply(this,arguments)}:function(e){return d.apply(this,arguments)};t.A=p},48080:function(e,t,n){"use strict";n.d(t,{A:function(){return m}}),n(29305),n(32733),n(84701),n(81678),n(24776),n(14382),n(44962),n(4754),n(94),n(33087),n(36947),n(36457),n(88908),n(83810),n(78557),n(90076),n(83994),n(23630),n(82367);var r=n(31234),i=n.n(r),o=n(22696),a=n.n(o),s=n(79754),l=n(47629),u=n(46782),c=n(10838),d=n(5898),f=(n(10353),n(15453),n(98959),'

');function p(e){return p="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},p(e)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m={show:function(e,t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{dialogOptions:{},buttons:[]},t=function(e){for(var t=1;t").concat(a()(x.name),""),x.description&&(b+='
'.concat(x.description,"
"))}function P(){g=this.getAttribute("data-id"),s.default.close(r)}r.querySelector(".formDialogFooter").innerHTML=b,w&&r.querySelector(".formDialogFooter").classList.add("formDialogFooter-vertical");var k=r.querySelectorAll(".btnOption");for(p=0,m=k.length;p0&&(r.dialogs[r.dialogs.length-1]===t?(o=c.b.listen(h),c.b.back()):r.dialogs.includes(t)&&(console.warn('[dialogHelper] dialog "%s" was closed, but is not the last dialog opened',t),o=c.b.listen(h),c.b.replace("".concat(c.b.location.pathname).concat(c.b.location.search),p(p({},r),{},{dialogs:r.dialogs.filter((function(e){return e!==t}))}))))}if(a.A.tv&&i.A.focus(d),(0,l.G4)(e.getAttribute("data-removeonclose"),!0)){!function(e){a.A.tv&&(e.classList.contains("scrollX")?A(e,!0,!1):e.classList.contains("smoothScrollY")&&A(e,!1,!1))}(e);var u=e.dialogContainer;u?(m(u),e.dialogContainer=null):m(e)}o||h()})),!e.classList.contains("dialog-fixedSize")&&e.classList.add("centeredDialog"),e.classList.remove("hide"),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.createElement("div");n.classList.add("dialogBackdrop");var r=e.dialogContainer||e;r.parentNode.insertBefore(n,r),e.backdrop=n,n.offsetWidth,n.classList.add("dialogBackdropOpened"),t.preventCloseOnClick||u.Ay.addEventListener(e.dialogContainer||n,"click",(function(t){t.target===e.dialogContainer&&w(e)}),{passive:!0}),t.preventCloseOnRightClick||u.Ay.addEventListener(e.dialogContainer||n,"contextmenu",(function(t){t.target===e.dialogContainer&&(w(e),t.preventDefault())}))}(e,r),e.classList.add("opened"),e.dispatchEvent(new CustomEvent("open",{bubbles:!1,cancelable:!1})),"true"!==e.getAttribute("data-lockscroll")||document.body.classList.contains("noScroll")||(document.body.classList.add("noScroll"),f=!0),function(e){var t=function(){i.A.pushScope(e),"true"===e.getAttribute("data-autofocus")&&i.A.autoFocus(e),document.activeElement&&!e.contains(document.activeElement)&&document.activeElement.blur()};y()?u.Ay.addEventListener(e,u.Ay.whichAnimationEvent(),x(e,t),{once:!0}):t()}(e),g(e)){var b=c.b.location.state||{},S=b.dialogs||[];S.push(t),c.b.push("".concat(c.b.location.pathname).concat(c.b.location.search),p(p({},b),{},{dialogs:S})),o=c.b.listen((function(n){var r,i=!((null===(r=n.location.state)||void 0===r?void 0:r.dialogs)||[]).includes(t);!i&&function(e){return!e.classList.contains("hide")}(e)||!o||(o(),o=null),i&&w(e)}))}else s.default.on(e,v)}function g(e){return"true"===e.getAttribute("data-history")}function b(e,t){r&&r(e);var n=e.parentNode;n&&n.removeChild(e);var i=document.createElement("div");return i.classList.add("dialogContainer"),i.appendChild(e),e.dialogContainer=i,document.body.appendChild(i),new Promise((function(n){new v(e,"dlg".concat((new Date).getTime()),n,t)}))}function w(e){e.classList.contains("hide")||(e.dispatchEvent(new CustomEvent("closing",{bubbles:!1,cancelable:!1})),function(e,t){if(y()){var n=!0;switch(e.animationConfig.exit.name){case"fadeout":e.style.animation="fadeout ".concat(e.animationConfig.exit.timing.duration,"ms ease-out normal both");break;case"scaledown":e.style.animation="scaledown ".concat(e.animationConfig.exit.timing.duration,"ms ease-out normal both");break;case"slidedown":e.style.animation="slidedown ".concat(e.animationConfig.exit.timing.duration,"ms ease-out normal both");break;default:n=!1}if(u.Ay.addEventListener(e,u.Ay.whichAnimationEvent(),x(e,t),{once:!0}),n)return}t()}(e,(function(){i.A.popScope(e),e.classList.add("hide"),e.dispatchEvent(new CustomEvent("_close",{bubbles:!1,cancelable:!1}))})))}var x=function(e,t){return function n(){u.Ay.removeEventListener(e,u.Ay.whichAnimationEvent(),n,{once:!0}),t()}},S="overscroll-behavior-y"in document.body.style;function A(e,t,r){Promise.resolve().then(n.bind(n,10838)).then((function(n){var i=r?"on":"off";n.centerFocus[i](e,t)}))}function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=document.createElement("div");e.id&&(t.id=e.id),t.classList.add("focuscontainer"),t.classList.add("hide"),function(e){return null!=e.lockScroll?e.lockScroll:"fullscreen"===e.size||!(S&&(e.size||!o.A.touch))&&(!!e.size||o.A.touch)}(e)&&t.setAttribute("data-lockscroll","true"),!1!==e.enableHistory&&t.setAttribute("data-history","true"),!1!==e.modal&&t.setAttribute("modal","modal"),!1!==e.autoFocus&&t.setAttribute("data-autofocus","true");var n=e.entryAnimation||"scaleup",r=e.exitAnimation||"scaledown",i=e.entryAnimationDuration||("fullscreen"!==e.size?180:280),s=e.exitAnimationDuration||("fullscreen"!==e.size?120:220);if(t.animationConfig={entry:{name:n,timing:{duration:i,easing:"ease-out"}},exit:{name:r,timing:{duration:s,easing:"ease-out",fill:"both"}}},t.classList.add("dialog"),e.scrollX?(t.classList.add("scrollX"),t.classList.add("smoothScrollX"),a.A.tv&&A(t,!0,!0)):!1!==e.scrollY&&(t.classList.add("smoothScrollY"),a.A.tv&&A(t,!1,!0)),e.removeOnClose&&t.setAttribute("data-removeonclose","true"),e.size&&(t.classList.add("dialog-fixedSize"),t.classList.add("dialog-".concat(e.size))),y())switch(t.animationConfig.entry.name){case"fadein":t.style.animation="fadein ".concat(i,"ms ease-out normal");break;case"scaleup":t.style.animation="scaleup ".concat(i,"ms ease-out normal both");break;case"slideup":t.style.animation="slideup ".concat(i,"ms ease-out normal");break;case"slidedown":t.style.animation="slidedown ".concat(i,"ms ease-out normal")}return t}function k(e){r=e}t.default={open:b,close:w,createDialog:P,setOnOpen:k}},21840:function(e,t,n){"use strict";n.r(t),n(29305),n(32733),n(84701),n(81678),n(24776),n(44962),n(4754),n(94),n(36947),n(83810),n(78557),n(90076),n(83994),n(82367);var r,i=n(22696),o=n.n(i),a=n(8566),s=n(79754),l=n(47629),u=n(5898),c=(n(98959),n(15453),n(10353),n(41177));function d(e){return d="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},d(e)}function f(e,t){for(var n=0;n'),i+='
',i+='
',i+=o()(r),i+="
",i+="
",(i+='')+""}function b(e){var t;t={text:e},(0,c.A)(t)}function w(e){return e.path?Promise.resolve(e.path):ApiClient.getJSON(ApiClient.getUrl("Environment/DefaultDirectoryBrowser")).then((function(e){return e.Path||""}),(function(){return""}))}var x=p((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),h(this,"currentDialog",void 0),h(this,"show",(function(e){var n={includeDirectories:!0};null!=(e=e||{}).includeDirectories&&(n.includeDirectories=e.includeDirectories),null!=e.includeFiles&&(n.includeFiles=e.includeFiles),Promise.all([r?Promise.resolve(r):ApiClient.getPublicSystemInfo().then((function(e){return r=e,e})),w(e)]).then((function(r){var i=r[0],a=r[1],c=s.default.createDialog({size:"small",removeOnClose:!0,scrollY:!1});c.classList.add("ui-body-a"),c.classList.add("background-theme-a"),c.classList.add("directoryPicker"),c.classList.add("formDialog");var d="";d+='
',d+=''),d+='

',d+=o()(e.header||"")||u.Ay.translate("HeaderSelectPath"),d+="

",d+="
",d+=function(e,t){var n,r="";r+='
',r+='
',e.pathReadOnly||(r+='
',r+=e.instruction?"".concat(o()(e.instruction),"

"):"","bsd"===t.OperatingSystem.toLowerCase()?(r+="
",r+="
",r+=u.Ay.translate("MessageDirectoryPickerBSDInstruction"),r+="
"):"linux"===t.OperatingSystem.toLowerCase()&&(r+="
",r+="
",r+=u.Ay.translate("MessageDirectoryPickerLinuxInstruction"),r+="
"),r+="
"),r+='
',r+='
',r+='
',n=!0!==e.includeFiles?"LabelFolder":"LabelPath";var i=e.pathReadOnly?" readonly":"";return r+=''),r+="
",i||(r+='')),r+="
",i||(r+='
'),e.enableNetworkSharePath&&(r+='
',r+=''),r+='
',r+=u.Ay.translate("LabelOptionalNetworkPathHelp","\\\\server","\\\\192.168.1.101"),r+="
",r+="
"),r+='
',r+='"),r+="
",r+="
",r+="
",(r+="
")+""}(e,i),c.innerHTML=d,function(e,t,n){e.addEventListener("click",(function(t){var r=l.Ay.parentWithClass(t.target,"lnkPath");if(r){var i=r.getAttribute("data-path");r.classList.contains("lnkFile")?e.querySelector("#txtDirectoryPickerPath").value=i:v(e,i,n,!0)}})),e.addEventListener("click",(function(t){if(l.Ay.parentWithClass(t.target,"btnRefreshDirectories")){var r=e.querySelector("#txtDirectoryPickerPath").value;v(e,r,n)}})),e.addEventListener("change",(function(t){var r=l.Ay.parentWithTag(t.target,"INPUT");r&&"txtDirectoryPickerPath"===r.id&&v(e,r.value,n)})),e.querySelector("form").addEventListener("submit",(function(e){if(t.callback){var n=this.querySelector("#txtNetworkPath");n=n?n.value:null;var r=this.querySelector("#txtDirectoryPickerPath").value;(function(e,t,n){return n.ajax({type:"POST",url:n.getUrl("Environment/ValidatePath"),data:JSON.stringify({ValidateWriteable:t,Path:e}),contentType:"application/json"}).catch((function(e){if(e){if(404===e.status)return b(u.Ay.translate("PathNotFound")),Promise.reject();if(500===e.status)return b(t?u.Ay.translate("WriteAccessRequired"):u.Ay.translate("PathNotFound")),Promise.reject()}return Promise.resolve()}))})(r,t.validateWriteable,ApiClient).then(t.callback(r,n))}return e.preventDefault(),e.stopPropagation(),!1}))}(c,e,n),c.addEventListener("close",m),s.default.open(c),c.querySelector(".btnCloseDialog").addEventListener("click",(function(){s.default.close(c)})),t.currentDialog=c,c.querySelector("#txtDirectoryPickerPath").value=a;var f=c.querySelector("#txtNetworkPath");f&&(f.value=e.networkSharePath||""),e.pathReadOnly||v(c,a,n,!0)}))})),h(this,"close",(function(){t.currentDialog&&s.default.close(t.currentDialog)}))}));t.default=x},9164:function(e,t,n){"use strict";n(84734),n(86584),n(87324),n(89336),n(67593);var r=n(47629),i=n(93599),o=[];function a(e,t,n){var r;return!1!==n&&(r=e.querySelector("*[autofocus]"))||!1!==t&&(r=m(e,1,"noautofocus")[0])?(s(r),r):null}function s(e){try{e.focus({preventScroll:i.Ay.isEnabled()})}catch(e){console.error("Error in focusManager.autoFocus: "+e)}}var l=["INPUT","TEXTAREA","SELECT","BUTTON","A"],u=["BODY","DIALOG"],c=l.map((function(e){return"INPUT"===e&&(e+=':not([type="range"]):not([type="file"])'),e+':not([tabindex="-1"]):not(:disabled)'})).join(",")+",.focusable";function d(e){var t;return-1!==l.indexOf(e.tagName)||(null===(t=e.classList)||void 0===t?void 0:t.contains("focusable"))}function f(e,t){if(e){var n=e.tagName;n&&"HTML"!==n&&"BODY"!==n||(e=t)}return e}function p(e){for(var t=e;!d(e);){var n=e.parentNode;if(!n)return f(e,t);e=n}return f(e,t)}function h(e){return null!==e.offsetParent}function y(){return o[0]||document.body}function m(e,t,n){for(var r=(e||y()).querySelectorAll(c),i=[],o=0,a=r.length;o=t))break}return i}function v(e,t){if(-1!==u.indexOf(e.tagName))return!0;var n=e.classList;if(n.contains("focuscontainer"))return!0;if(0===t){if(n.contains("focuscontainer-x"))return!0;if(n.contains("focuscontainer-left"))return!0}else if(1===t){if(n.contains("focuscontainer-x"))return!0;if(n.contains("focuscontainer-right"))return!0}else if(2===t){if(n.contains("focuscontainer-y"))return!0}else if(3===t){if(n.contains("focuscontainer-y"))return!0;if(n.contains("focuscontainer-down"))return!0}return!1}function g(e){var t;return null===(t=e.getBoundingClientRect?e.getBoundingClientRect():{top:0,left:0,width:0,height:0}).right&&((t={top:t.top,left:t.left,width:t.width,height:t.height}).right=t.left+t.width,t.bottom=t.top+t.height),t}function b(e,t,n,i){if((e=e||document.activeElement)&&(e=p(e)),n=n||(e?function(e,t){for(;!v(e,t);)if(!(e=e.parentNode))return y();return e}(e,t):y()),e){for(var o,l=r.Ay.parentWithClass(e,"focusable"),u=g(e),d=parseFloat(u.left)||0,f=parseFloat(u.top)||0,h=parseFloat(d+u.width-1)||d,m=parseFloat(f+u.height-1)||f,b=u.left+u.width/2,w=u.top+u.height/2,S=i||n.querySelectorAll(c),A=1/0,P=0,k=S.length;P=u.left)continue;if(j.right===u.right)continue;break;case 1:if(j.right<=u.right)continue;if(j.left===u.left)continue;break;case 2:if(j.top>=u.top)continue;if(j.bottom>=u.bottom)continue;break;case 3:if(j.bottom<=u.bottom)continue;if(j.top<=u.top)continue}var T=j.left,C=j.top,E=T+j.width-1,L=C+j.height-1,_=x(d,h,T,E),O=x(f,m,C,L),M=j.left+j.width/2,R=j.top+j.height/2,D=void 0,N=void 0;switch(t){case 0:D=Math.abs(d-Math.min(d,E)),N=O?0:Math.abs(w-R);break;case 1:D=Math.abs(h-Math.max(h,T)),N=O?0:Math.abs(w-R);break;case 2:N=Math.abs(f-Math.min(f,L)),D=_?0:Math.abs(b-M);break;case 3:N=Math.abs(m-Math.max(m,C)),D=_?0:Math.abs(b-M)}var F=Math.sqrt(D*D+N*N);F=e&&n<=t||r>=e&&r<=t}function x(e,t,n,r){return w(e,t,n,r)||w(n,r,e,t)}t.A={autoFocus:a,focus:s,focusableParent:p,getFocusableElements:m,moveLeft:function(e,t){b(e,0,t?t.container:null,t?t.focusableElements:null)},moveRight:function(e,t){b(e,1,t?t.container:null,t?t.focusableElements:null)},moveUp:function(e,t){b(e,2,t?t.container:null,t?t.focusableElements:null)},moveDown:function(e,t){b(e,3,t?t.container:null,t?t.focusableElements:null)},sendText:function(e){document.activeElement.value=e},isCurrentlyFocusable:function(e){if(e.disabled)return!1;if("-1"===e.getAttribute("tabindex"))return!1;if("INPUT"===e.tagName){var t=e.type;if("range"===t)return!1;if("file"===t)return!1}return h(e)},pushScope:function(e){o.push(e)},popScope:function(){o.length&&(o.length-=1)},focusFirst:function(e,t){for(var n=e.querySelectorAll(t),r=0,i=n.length;r3e3?(r=a,console.debug("try to recover media Error ..."),o.recoverMediaError()):!i||a-i>3e3?(i=a,console.debug("try to swap Audio Codec and recover media Error ..."),o.swapAudioCodec(),o.recoverMediaError()):(console.error("cannot recover, last media error recovery failed ..."),t?t():y(e,l.F.FATAL_HLS_ERROR))}}function y(e,t){e.destroyCustomTrack&&e.destroyCustomTrack(e._mediaElement),s.A.trigger(e,"error",[{type:t}])}function m(e){return e&&!isNaN(e)&&e!==Number.POSITIVE_INFINITY&&e!==Number.NEGATIVE_INFINITY}function v(e,t){Math.abs((e.currentTime||0)-t)>=1&&(e.currentTime=t)}function g(e,t,n,r){var i=(n||0)/1e7;if(i)if(t.duration>=i)v(t,i),r&&r();else{var o=["durationchange","loadeddata","play","loadedmetadata"],a=function(e){0===t.currentTime&&t.duration>=i&&(console.debug("seeking to ".concat(i," on ").concat(e.type," event")),v(t,i),o.forEach((function(e){t.removeEventListener(e,a)})),r&&r())};o.forEach((function(e){t.addEventListener(e,a)}))}}function b(e,t,n){var r;return window.Windows&&null!==(r=n.mediaSource)&&void 0!==r&&r.IsLocal?Windows.Storage.StorageFile.getFileFromPathAsync(n.url).then((function(t){var r=new Windows.Media.Playback.MediaPlaybackList,i=Windows.Media.Core.MediaSource.createFromStorageFile(t),o=(n.playerStartPositionTicks||0)/1e4;return r.items.append(new Windows.Media.Playback.MediaPlaybackItem(i,o)),e.src=URL.createObjectURL(r,{oneTimeOnly:!0}),Promise.resolve()})):(e.src=t,Promise.resolve())}function w(e){e.src="",e.innerHTML="",e.removeAttribute("src")}function x(e,t){try{return e.play().catch((function(e){var t=(e.name||"").toLowerCase();return"notallowederror"===t||"aborterror"===t?Promise.resolve():Promise.reject(e)})).then((function(){return function(e,t){e.addEventListener("error",t)}(e,t),Promise.resolve()}))}catch(e){return console.error("error calling video.play: "+e),Promise.reject()}}function S(e){var t=e._castPlayer;if(t){try{t.unload()}catch(e){console.error(e)}e._castPlayer=null}}function A(e){var t=e._hlsPlayer;if(t){try{t.destroy()}catch(e){console.error(e)}e._hlsPlayer=null}}function P(e){var t=e._flvPlayer;if(t){try{t.unload(),t.detachMediaElement(),t.destroy()}catch(e){console.error(e)}e._flvPlayer=null}}function k(e,t,n,r,i,o){t.on(Hls.Events.MANIFEST_PARSED,(function(){x(n,r).then(i,(function(){o&&(o(),o=null)}))})),t.on(Hls.Events.ERROR,(function(n,r){var i;if(console.error("HLS Error: Type: "+r.type+" Details: "+(r.details||"")+" Fatal: "+(r.fatal||!1)),r.type===Hls.ErrorTypes.NETWORK_ERROR&&null!==(i=r.response)&&void 0!==i&&i.code&&r.response.code>=400)return console.debug("hls.js response error code: "+r.response.code),t.destroy(),void(o?(o(l.F.SERVER_ERROR),o=null):y(e,l.F.SERVER_ERROR));if(r.fatal)switch(r.type){case Hls.ErrorTypes.NETWORK_ERROR:r.response&&0===r.response.code?(console.debug("hls.js response error code: "+r.response.code),t.destroy(),o?(o(l.F.NETWORK_ERROR),o=null):y(e,l.F.NETWORK_ERROR)):(console.debug("fatal network error encountered, try to recover"),t.startLoad());break;case Hls.ErrorTypes.MEDIA_ERROR:console.debug("fatal media error encountered, try to recover"),h(e,o),o=null;break;default:console.debug("Cannot recover from hls error - destroy and trigger error"),t.destroy(),o?(o(),o=null):y(e,l.F.FATAL_HLS_ERROR)}}))}function I(e,t,n){t.removeEventListener("error",n),w(t),A(e),P(e),S(e);var r={src:e._currentSrc};s.A.trigger(e,"stopped",[r]),e._currentTime=null,e._currentSrc=null,e._currentPlayOptions=null}function j(e,t){var n,r=[],i=t.buffered||[],o=e._currentPlayOptions;o&&(n=o.transcodingOffsetTicks),n=n||0;for(var a=0,s=i.length;a=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),g}},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;L(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function y(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function m(e,t){var n=t.Type;return"UserRootFolder"!==n&&"UserView"!==n&&"Program"!==n&&"Timer"!==n&&"SeriesTimer"!==n&&("Recording"!==t.Type||"Completed"===t.Status)&&!v(t)&&e.Policy.IsAdministrator}function v(e){return(null==e?void 0:e.Id)&&"string"==typeof e.Id&&0===e.Id.indexOf("local")}function g(e,t){return b.apply(this,arguments)}function b(){var e;return e=h().mark((function e(t,n){var r,i,o,a;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=d.A.getApiClient(n.ServerId),i=(0,f.C)(r),e.prev=2,e.next=5,(0,l.C)(i).getPlaylistUser({userId:t.Id,playlistId:n.Id});case 5:return o=e.sent,a=o.data,e.abrupt("return",!!a.CanEdit);case 10:e.prev=10,e.t0=e.catch(2),console.error("Failed to get playlist permissions",e.t0);case 13:return e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e,null,[[2,10]])})),b=function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){y(o,r,i,a,s,"next",e)}function s(e){y(o,r,i,a,s,"throw",e)}a(void 0)}))},b.apply(this,arguments)}t.Ay={getDisplayName:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("null item passed into getDisplayName");"Timer"===e.Type&&(e=e.ProgramInfo||e);var n=("Program"!==e.Type&&"Recording"!==e.Type||!e.IsSeries&&!e.EpisodeTitle?e.Name:e.EpisodeTitle)||"";if("TvChannel"===e.Type)return e.ChannelNumber?e.ChannelNumber+" "+n:n;if("Episode"===e.Type&&0===e.ParentIndexNumber)n=c.Ay.translate("ValueSpecialEpisodeName",n);else if(("Episode"===e.Type||"Program"===e.Type||"Recording"===e.Type)&&null!=e.IndexNumber&&null!=e.ParentIndexNumber&&!1!==t.includeIndexNumber){var r=e.IndexNumber,i=r,o=" - ";!1!==t.includeParentInfo?i="S"+e.ParentIndexNumber+":E"+i:o=". ",e.IndexNumberEnd&&(i+="-"+(r=e.IndexNumberEnd)),i&&(n=n?i+o+n:i)}return n},supportsAddingToCollection:function(e){return!("Recording"===e.Type&&"Completed"!==e.Status||e.CollectionType||-1!==["Genre","MusicGenre","Studio","UserView","CollectionFolder","Audio","Program","Timer","SeriesTimer"].indexOf(e.Type)||"Photo"===e.MediaType||v(e))},supportsAddingToPlaylist:function(e){return"Program"!==e.Type&&"TvChannel"!==e.Type&&"Timer"!==e.Type&&"SeriesTimer"!==e.Type&&"Photo"!==e.MediaType&&("Recording"!==e.Type||"Completed"===e.Status)&&!v(e)&&e.CollectionType!==r.X.Livetv&&(e.MediaType||e.IsFolder||"Genre"===e.Type||"MusicGenre"===e.Type||"MusicArtist"===e.Type)},isLocalItem:v,canIdentify:function(e,t){var n=t.Type;return("Movie"===n||"Trailer"===n||"Series"===n||"BoxSet"===n||"Person"===n||"Book"===n||"MusicAlbum"===n||"MusicArtist"===n||"MusicVideo"===n)&&e.Policy.IsAdministrator&&!v(t)},canEdit:m,canEditImages:function(e,t){var n=t.Type;return"Photo"!==t.MediaType&&("UserView"===n?!!e.Policy.IsAdministrator:("Recording"!==t.Type||"Completed"===t.Status)&&"Timer"!==n&&"SeriesTimer"!==n&&m(e,t)&&!v(t))},canEditSubtitles:function(e,t){if(t.MediaType!==s.z.Video)return!1;var n=t.Type;return(n!==i.D.Recording||t.Status===a.k.Completed)&&n!==i.D.TvChannel&&n!==i.D.Program&&"Timer"!==n&&"SeriesTimer"!==n&&n!==i.D.UserRootFolder&&n!==i.D.UserView&&!v(t)&&t.LocationType!==o.i.Virtual&&(e.Policy.EnableSubtitleManagement||e.Policy.IsAdministrator)},canEditLyrics:function(e,t){return t.MediaType===s.z.Audio&&!v(t)&&e.Policy.IsAdministrator},canShare:function(e,t){return"Program"!==e.Type&&"TvChannel"!==e.Type&&"Timer"!==e.Type&&"SeriesTimer"!==e.Type&&("Recording"!==e.Type||"Completed"===e.Status)&&!v(e)&&t.Policy.EnablePublicSharing&&u.g.supports("sharing")},enableDateAddedDisplay:function(e){return!e.IsFolder&&e.MediaType&&"Program"!==e.Type&&"TvChannel"!==e.Type&&"Trailer"!==e.Type},canMarkPlayed:function(e){if("Program"===e.Type)return!1;if("Video"===e.MediaType){if("TvChannel"!==e.Type)return!0}else if("Audio"===e.MediaType){if("AudioPodcast"===e.Type)return!0;if("AudioBook"===e.Type)return!0}return"Series"===e.Type||"Season"===e.Type||"BoxSet"===e.Type||"Book"===e.MediaType||"Recording"===e.MediaType},canRate:function(e){return"Program"!==e.Type&&"Timer"!==e.Type&&"SeriesTimer"!==e.Type&&"CollectionFolder"!==e.Type&&"UserView"!==e.Type&&"Channel"!==e.Type&&e.UserData},canConvert:function(e,t){if(!t.Policy.EnableMediaConversion)return!1;if(v(e))return!1;var n=e.MediaType;if("Book"===n||"Photo"===n||"Audio"===n)return!1;if(e.CollectionType===r.X.Livetv)return!1;var i=e.Type;return!("Channel"===i||"Person"===i||"Year"===i||"Program"===i||"Timer"===i||"SeriesTimer"===i||"Virtual"===e.LocationType&&!e.IsFolder||e.IsPlaceHolder)},canRefreshMetadata:function(e,t){return!!t.Policy.IsAdministrator&&e.CollectionType!==r.X.Livetv&&!("Timer"===e.Type||"SeriesTimer"===e.Type||"Program"===e.Type||"TvChannel"===e.Type||"Recording"===e.Type&&"Completed"!==e.Status||v(e))},supportsMediaSourceSelection:function(e){return"Video"===e.MediaType&&"TvChannel"!==e.Type&&!(!e.MediaSources||1===e.MediaSources.length&&"Placeholder"===e.MediaSources[0].Type)&&(null!=e.EnableMediaSourceDisplay?!!e.EnableMediaSourceDisplay:!e.SourceType||"Library"===e.SourceType)},sortTracks:function(e,t){var n=e.IsExternal-t.IsExternal;return 0!=n||0!=(n=t.IsForced-e.IsForced)||0!=(n=t.IsDefault-e.IsDefault)?n:e.Index-t.Index}}},92305:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return E},show:function(){return T},showFindNew:function(){return C}}),n(24776),n(78557),n(96054),n(90076);var r,i,o,a,s,l,u=n(22696),c=n.n(u),d=n(79754),f=n(8566),p=n(5898),h=n(10838),y=n(46782),m=n(9164),v=n(34789),g=(n(98959),n(77157),n(15453),n(86191)),b=n(50764),w='

${Identify}

${HeaderIdentifyItemHelp}

${LabelPath}

${SearchResults}



',x=n(98320),S=!v.A.slow&&!v.A.edge,A=!1;function P(){return g.A.getApiClient(o)}function k(e){var t,n,o,a,s={ProviderIds:{}},u=e.querySelectorAll(".identifyField");for(n=0,o=u.length;n");t.ImageUrl&&(i='
').concat(i,"
")),e.querySelector(".selectedSearchResult").innerHTML=i,m.A.focus(n.querySelector(".btnSubmit"))}(e,o):(n=e,l=o,A=!0,f.Ay.hide(),d.default.close(n))}s.innerHTML=a;var p=s.querySelectorAll(".card");for(i=0,o=p.length;i'),r+='
'),r+='
',r+='
'),r+='
',e.ImageUrl?r+='
"):r+='
'.concat(c()(e.Name),"
"),r+="
",r+="
";var a=3;"MusicAlbum"===i&&a++;var s=[e.Name];s.push(e.SearchProviderName),e.AlbumArtist&&s.push(e.AlbumArtist.Name),e.ProductionYear&&s.push(e.ProductionYear);for(var l=0;l':'
',r+=c()(s[l]||"")||" ",r+="
";return(r+="
")+""}function j(){f.Ay.hide(),A?a():s()}function T(e,t){return new Promise((function(n,u){a=n,s=u,o=t,A=!1,function(e){f.Ay.show();var t=P();t.getItem(t.getCurrentUserId(),e).then((function(e){i=(r=e).Type;var t={size:"small",removeOnClose:!0,scrollY:!1};y.A.tv&&(t.size="fullscreen");var n=d.default.createDialog(t);n.classList.add("formDialog"),n.classList.add("recordingDialog");var o="";o+=p.Ay.translateHtml(w,"core"),n.innerHTML=o,n.addEventListener("close",j),y.A.tv&&h.default.centerFocus.on(n.querySelector(".formDialogContent"),!1),e.Path?n.querySelector(".fldPath").classList.remove("hide"):n.querySelector(".fldPath").classList.add("hide"),n.querySelector(".txtPath").innerText=e.Path||"",d.default.open(n),n.querySelector(".popupIdentifyForm").addEventListener("submit",(function(e){return e.preventDefault(),k(n),!1})),n.querySelector(".identifyOptionsForm").addEventListener("submit",(function(e){return e.preventDefault(),function(e){f.Ay.show();var t={ReplaceAllImages:e.querySelector("#chkIdentifyReplaceImages").checked},n=P();n.ajax({type:"POST",url:n.getUrl("Items/RemoteSearch/Apply/".concat(r.Id),t),data:JSON.stringify(l),contentType:"application/json"}).then((function(){A=!0,f.Ay.hide(),d.default.close(e)}),(function(){f.Ay.hide(),d.default.close(e)}))}(n),!1})),n.querySelector(".btnCancel").addEventListener("click",(function(){d.default.close(n)})),n.classList.add("identifyDialog"),function(e,t){var n=P();n.getJSON(n.getUrl("Items/".concat(t.Id,"/ExternalIdInfos"))).then((function(n){for(var r="",i=0,o=n.length;i';var l=a.Name;a.Type&&(l="".concat(a.Name," ").concat(p.Ay.translate(a.Type)));var u=p.Ay.translate("LabelDynamicExternalId",c()(l));r+=''),r+="
"}e.querySelector("#txtLookupName").value="","Person"===t.Type||"BoxSet"===t.Type?(e.querySelector(".fldLookupYear").classList.add("hide"),e.querySelector("#txtLookupYear").value=""):(e.querySelector(".fldLookupYear").classList.remove("hide"),e.querySelector("#txtLookupYear").value=""),e.querySelector(".identifyProviderIds").innerHTML=r,e.querySelector(".formDialogHeaderTitle").innerHTML=p.Ay.translate("Identify")}))}(n,e),f.Ay.hide()}))}(e)}))}function C(e,t,n,a){return new Promise((function(s){o=a,A=!1,function(e,t,n,o){r=null,i=n;var a={size:"small",removeOnClose:!0,scrollY:!1};y.A.tv&&(a.size="fullscreen");var s=d.default.createDialog(a);s.classList.add("formDialog"),s.classList.add("recordingDialog");var u="";u+=p.Ay.translateHtml(w,"core"),s.innerHTML=u,y.A.tv&&h.default.centerFocus.on(s.querySelector(".formDialogContent"),!1),d.default.open(s),s.querySelector(".btnCancel").addEventListener("click",(function(){d.default.close(s)})),s.querySelector(".popupIdentifyForm").addEventListener("submit",(function(e){return e.preventDefault(),k(s),!1})),s.addEventListener("close",(function(){f.Ay.hide(),o(A?l:null)})),s.classList.add("identifyDialog"),function(e,t,n,r){e.querySelector("#txtLookupName").value=t,"Person"===r||"BoxSet"===r?(e.querySelector(".fldLookupYear").classList.add("hide"),e.querySelector("#txtLookupYear").value=""):(e.querySelector(".fldLookupYear").classList.remove("hide"),e.querySelector("#txtLookupYear").value=n),e.querySelector(".formDialogHeaderTitle").innerHTML=p.Ay.translate("Search")}(s,e,t,n)}(e,t,n,s)}))}var E={show:T,showFindNew:C}},46782:function(e,t,n){"use strict";n(29305),n(32733),n(84701),n(81678),n(44962),n(4754),n(94),n(36947),n(78557),n(83994),n(82367);var r=n(22622),i=n(34789),o=n(90381),a=n(44797);function s(e){return 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},s(e)}function l(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0;i--){var o=(0,p.HO)(0,i-1),a=this._playlist[i];this._playlist[i]=this._playlist[o],this._playlist[o]=a}this._playlist.unshift(r),this._shuffleMode="Shuffle"}},{key:"sortShuffledPlaylist",value:function(){this._playlist=[];var e,t=y(this._sortedPlaylist);try{for(t.s();!(e=t.n()).done;){var n=e.value;this._playlist.push(n)}}catch(e){t.e(e)}finally{t.f()}this._sortedPlaylist=[],this._shuffleMode="Sorted"}},{key:"clearPlaylist",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this._playlist.splice(this.getCurrentPlaylistIndex(),1)[0];this._playlist=[],e||this._playlist.push(t)}},{key:"queueNext",value:function(e){for(var t=0,n=e.length;t=a.length)throw new Error("newIndex out of bounds");return i=n,o=t,(r=a).splice(o,0,r.splice(i,1)[0]),this._playlist=a,{result:"moved",playlistItemId:e,newIndex:t}}},{key:"reset",value:function(){this._sortedPlaylist=[],this._playlist=[],this._currentPlaylistItemId=null,this._repeatMode="RepeatNone",this._shuffleMode="Sorted"}},{key:"setRepeatMode",value:function(e){if(!["RepeatOne","RepeatAll","RepeatNone"].includes(e))throw new TypeError("invalid value provided for setRepeatMode");this._repeatMode=e}},{key:"getRepeatMode",value:function(){return this._repeatMode}},{key:"setShuffleMode",value:function(e){switch(e){case"Shuffle":this.shufflePlaylist();break;case"Sorted":this.sortShuffledPlaylist();break;default:throw new TypeError("invalid value provided to setShuffleMode")}}},{key:"toggleShuffleMode",value:function(){switch(this._shuffleMode){case"Shuffle":this.setShuffleMode("Sorted");break;case"Sorted":this.setShuffleMode("Shuffle");break;default:throw new TypeError("current value for shufflequeue is invalid")}}},{key:"getShuffleMode",value:function(){return this._shuffleMode}},{key:"getNextItemInfo",value:function(){var e,t=this.getPlaylist(),n=t.length;switch(this.getRepeatMode()){case"RepeatOne":e=this.getCurrentPlaylistIndex();break;case"RepeatAll":(e=this.getCurrentPlaylistIndex()+1)>=n&&(e=0);break;default:e=this.getCurrentPlaylistIndex()+1}if(e<0||e>=n)return null;var r=t[e];return r?{item:r,index:e}:null}}],t&&v(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),P=A,k=n(82885),I=n(5898),j=n(8566),T=n(22622),C=n(86191),E=n(41177),L=n(38783),_=n(53089),O=n(2290),M=n(97067),R=n(41087),D=n(22934),N=n(10989),F=n(75384),z=n(73025),U=function(e,t,n){return-1===n?void 0!==e.EndTicks&&e.EndTicks<=t:void 0!==e.StartTicks&&e.StartTicks>t},V=function(e,t){return void 0!==e.StartTicks&&e.StartTicks<=t&&(void 0===e.EndTicks||e.EndTicks>t)};!function(e){e.Pairing="pairing",e.Paired="paired",e.PairError="pairerror",e.PlaybackCancelled="playbackcancelled",e.PlaybackError="playbackerror",e.PlaybackStart="playbackstart",e.PlaybackStop="playbackstop",e.PlayerChange="playerchange",e.ReportPlayback="reportplayback"}(S||(S={}));var B,q=n(57178),H=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},G=function(){function e(e){var t,n,r,i,o,a,s,u,c,d,f,p,h,y,m,v,g,b,w,x,A,P,k,I,j,T;this.playbackManager=e,this.playbackManagerEvents=((t={})[S.PlaybackCancelled]=null===(r=this.onPlaybackCancelled)||void 0===r?void 0:r.bind(this),t[S.PlaybackError]=null===(i=this.onPlaybackError)||void 0===i?void 0:i.bind(this),t[S.PlaybackStart]=null===(o=this.onPlaybackStart)||void 0===o?void 0:o.bind(this),t[S.PlaybackStop]=null===(a=this.onPlaybackStop)||void 0===a?void 0:a.bind(this),t[S.PlayerChange]=null===(s=this.onPlayerChange)||void 0===s?void 0:s.bind(this),t[S.ReportPlayback]=null===(u=this.onReportPlayback)||void 0===u?void 0:u.bind(this),t),this.playerEvents=((n={})[q.g.Error]=null===(c=this.onPlayerError)||void 0===c?void 0:c.bind(this),n[q.g.FullscreenChange]=null===(d=this.onPlayerFullscreenChange)||void 0===d?void 0:d.bind(this),n[q.g.ItemStarted]=null===(f=this.onPlayerItemStarted)||void 0===f?void 0:f.bind(this),n[q.g.ItemStopped]=null===(p=this.onPlayerItemStopped)||void 0===p?void 0:p.bind(this),n[q.g.MediaStreamsChange]=null===(h=this.onPlayerMediaStreamsChange)||void 0===h?void 0:h.bind(this),n[q.g.Pause]=null===(y=this.onPlayerPause)||void 0===y?void 0:y.bind(this),n[q.g.PlaybackStart]=null===(m=this.onPlayerPlaybackStart)||void 0===m?void 0:m.bind(this),n[q.g.PlaybackStop]=null===(v=this.onPlayerPlaybackStop)||void 0===v?void 0:v.bind(this),n[q.g.PlaylistItemAdd]=null===(g=this.onPlayerPlaylistItemAdd)||void 0===g?void 0:g.bind(this),n[q.g.PlaylistItemMove]=null===(b=this.onPlayerPlaylistItemMove)||void 0===b?void 0:b.bind(this),n[q.g.PlaylistItemRemove]=null===(w=this.onPlayerPlaylistItemRemove)||void 0===w?void 0:w.bind(this),n[q.g.PromptSkip]=null===(x=this.onPromptSkip)||void 0===x?void 0:x.bind(this),n[q.g.RepeatModeChange]=null===(A=this.onPlayerRepeatModeChange)||void 0===A?void 0:A.bind(this),n[q.g.ShuffleModeChange]=null===(P=this.onPlayerShuffleModeChange)||void 0===P?void 0:P.bind(this),n[q.g.Stopped]=null===(k=this.onPlayerStopped)||void 0===k?void 0:k.bind(this),n[q.g.TimeUpdate]=null===(I=this.onPlayerTimeUpdate)||void 0===I?void 0:I.bind(this),n[q.g.Unpause]=null===(j=this.onPlayerUnpause)||void 0===j?void 0:j.bind(this),n[q.g.VolumeChange]=null===(T=this.onPlayerVolumeChange)||void 0===T?void 0:T.bind(this),n),Object.entries(this.playbackManagerEvents).forEach((function(t){var n=H(t,2),r=n[0],i=n[1];i&&l.A.on(e,r,i)})),this.bindPlayerEvents(),l.A.on(e,S.PlayerChange,this.bindPlayerEvents.bind(this))}return e.prototype.bindPlayerEvents=function(){var e=this,t=this.playbackManager.getCurrentPlayer();this.player!==t&&(this.player&&Object.entries(this.playerEvents).forEach((function(t){var n=H(t,2),r=n[0],i=n[1];i&&l.A.off(e.player,r,i)})),this.player=t,this.player&&Object.entries(this.playerEvents).forEach((function(t){var n=H(t,2),r=n[0],i=n[1];i&&l.A.on(e.player,r,i)})))},e}(),W=n(94738),Y=(B=function(e,t){return B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},B(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}B(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Q=function(e){function t(){var t=e.apply(this,function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(arguments),!1))||this;return t.hasSegments=!1,t.isLastSegmentIgnored=!1,t.lastSegmentIndex=0,t.lastTime=-1,t.mediaSegments=[],t}return Y(t,e),t.prototype.fetchMediaSegments=function(e,t,n){return r=this,i=void 0,a=function(){var r,i,o;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]e.StartTicks)console.info("[MediaSegmentManager] ignoring skipping segment that has been seeked back into",e),this.isLastSegmentIgnored=!0;else if(e.EndTicks){if(e.StartTicks&&e.EndTicks-e.StartTicks0&&r.StartTicks&&r.StartTicks>t&&(i=-1);for(var o=n,a=e[o];o>=0&&o