@mibmo/jellyfin-tizen 10.11.4 → 10.11.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mibmo/jellyfin-tizen",
3
- "version": "10.11.4",
3
+ "version": "10.11.5",
4
4
  "description": "Jellyfin for Samsung Smart TV (Tizen)",
5
5
  "repository": {
6
6
  "type": "git",
package/tizen-adapter.js CHANGED
@@ -4,7 +4,7 @@
4
4
  const currentApplication = {
5
5
  appInfo: {
6
6
  // Just emulate the value cause I don't see any sense to provide TizenBrew version here
7
- version: '10.11.4'
7
+ version: '10.11.5'
8
8
  },
9
9
  exit: () => {
10
10
  // cannot do anything about it :(
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[12011,78938],{22832:function(e,t,r){r(29305),r(32733),r(84701),r(81678),r(24776),r(14382),r(69892),r(44962),r(89336),r(4754),r(94),r(33087),r(36947),r(36457),r(88908),r(83810),r(78557),r(96054),r(90076),r(95021),r(73687),r(83994),r(23630),r(82367);var n=r(53096),a=r(39738),i=r(38490),o=r(70267),l=r(5898),s=r(67430),u=r(36300),c=r(78938),d=r(71866),f=r(82885),y=r(75384);function m(e){return m="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},m(e)}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e,t,r){return(t=function(e){var t=function(e){if("object"!=m(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){if(e){if("string"==typeof e)return b(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function g(e,t,r){for(var n,i=e.parentNode,o=e.classList.length?".".concat(e.classList[0]):"",l=i.querySelectorAll("".concat(o,"[data-id]")),s=[],c=!1,d=0,f=l.length;d<f;d++)l[d]===e&&(c=!0,n=d),!c&&r||s.push(l[d].getAttribute("data-id"));var y=u.Ay.parentWithClass(e,"itemsContainer");if(null!=y&&y.fetchData){var m=r?{StartIndex:n}:{};return y.fetchData(m).then((function(e){return r?a.f.queue({items:e.Items}):a.f.play({items:e.Items,startIndex:n})}))}if(s.length)return r?a.f.queue({ids:s,serverId:t}):a.f.play({ids:s,serverId:t,startIndex:n})}function A(e){var t=(e=u.Ay.parentWithAttribute(e,"data-id")).getAttribute("data-serverid"),r=e.getAttribute("data-id"),n=e.getAttribute("data-type"),a=s.tF.getApiClient(t);return"Timer"===n?a.getLiveTvTimer(r):"SeriesTimer"===n?a.getLiveTvSeriesTimer(r):a.getItem(a.getCurrentUserId(),r)}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};A(e).then((function(a){var i=e.getAttribute("data-playlistid"),o=e.getAttribute("data-collectionid");if(i){var l=u.Ay.parentWithAttribute(e,"data-playlistitemid");a.PlaylistItemId=l?l.getAttribute("data-playlistitemid"):null;var c=u.Ay.parentWithAttribute(e,"is","emby-itemscontainer");if(c){var d,f=0,m=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=p(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==t.return||t.return()}finally{if(o)throw a}}}}(c.querySelectorAll(".listItem"));try{for(m.s();!(d=m.n()).done;)d.value.getAttribute("data-playlistitemid")==a.PlaylistItemId&&(a.PlaylistIndex=f),f++}catch(e){m.e(e)}finally{m.f()}a.PlaylistItemCount=f}}var b=s.tF.getApiClient(a.ServerId),g=(0,y.C)(b);Promise.all([Promise.all([r.e(55802),r.e(40501)]).then(r.bind(r,55802)),b.getCurrentUser(),i?(0,n.C)(g).getPlaylistUser({playlistId:i,userId:b.getCurrentUserId()}).then((function(e){return e.data})).catch((function(e){return console.info("[Shortcuts] Failed to fetch playlist permissions",e),{CanEdit:!1}})):Promise.resolve({CanEdit:!1})]).then((function(e){var r,n,l=(n=3,function(e){if(Array.isArray(e))return e}(r=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}(r,n)||p(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=l[0],u=l[1],c=l[2];return s.show(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){v(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({item:a,play:!0,queue:!0,playAllFromHere:"Season"===a.Type||!a.IsFolder,queueAllFromHere:!a.IsFolder,playlistId:i,canEditPlaylist:!!c.CanEdit,collectionId:o,user:u},t))})).then((function(r){"playallfromhere"===r.command||"queueallfromhere"===r.command?w(e,t.positionTo,r.command):(r.updated||r.deleted)&&function(e,t){(t=t||u.Ay.parentWithAttribute(e,"is","emby-itemscontainer"))&&t.notifyRefreshNeeded(!0)}(e,t.itemsContainer)})).catch((function(){}))}))}function S(e){return{Type:e.getAttribute("data-type"),Id:e.getAttribute("data-id"),TimerId:e.getAttribute("data-timerid"),CollectionType:e.getAttribute("data-collectiontype"),ChannelId:e.getAttribute("data-channelid"),SeriesId:e.getAttribute("data-seriesid"),ServerId:e.getAttribute("data-serverid"),MediaType:e.getAttribute("data-mediatype"),Path:e.getAttribute("data-path"),IsFolder:"true"===e.getAttribute("data-isfolder"),StartDate:e.getAttribute("data-startdate"),EndDate:e.getAttribute("data-enddate"),UserData:{PlaybackPositionTicks:parseInt(e.getAttribute("data-positionticks")||"0",10)}}}function w(e,t,n){t=t||e;var i=e.getAttribute("data-id");i||(i=(e=u.Ay.parentWithAttribute(e,"data-id")).getAttribute("data-id"));var y=S(e),m=u.Ay.parentWithClass(e,"itemsContainer"),h="items-"+(y.IsFolder?y.Id:null==m?void 0:m.getAttribute("data-parentid"))+"-Folder",v=y.ServerId,p=y.Type,b="Program"===p?y.ChannelId:y.Id;if("Photo"===y.MediaType&&"link"===n&&(n="play"),"link"===n)o.appRouter.showItem(y,{context:e.getAttribute("data-context"),parentId:e.getAttribute("data-parentid")});else if("programdialog"===n)!function(e){Promise.all([r.e(10739),r.e(22882)]).then(r.bind(r,63834)).then((function(t){t.default.show(e.Id,e.ServerId)}))}(y);else if("instantmix"===n)a.f.instantMix({Id:b,ServerId:v});else if("play"===n||"resume"===n){var w=parseInt(e.getAttribute("data-positionticks")||"0",10),P=f.getSortValuesLegacy(h,"SortName");a.f.canPlay(y)?a.f.play({ids:[b],startPositionTicks:w,serverId:v,queryOptions:{SortBy:P.sortBy,SortOrder:P.sortOrder}}):console.warn("Unable to play item",y)}else if("queue"===n)a.f.isPlaying()?(a.f.queue({ids:[b],serverId:v}),(0,d.A)(l.Ay.translate("MediaQueued"))):a.f.queue({ids:[b],serverId:v});else if("playallfromhere"===n)g(e,v);else if("queueallfromhere"===n)g(e,v,!0);else if("setplaylistindex"===n)a.f.setCurrentPlaylistItem(e.getAttribute("data-playlistitemid"));else if("record"===n)!function(e,t,r,n,a){if("Program"===r||n||a){var i="Program"===r?t:null;c.default.toggleRecording(e,i,n,a)}}(v,i,p,e.getAttribute("data-timerid"),e.getAttribute("data-seriestimerid"));else if("menu"===n){var L="false"===t.getAttribute("data-playoptions")?{shuffle:!1,instantMix:!1,play:!1,playAllFromHere:!1,queue:!1,queueAllFromHere:!1}:{};L.positionTo=t,I(e,L)}else if("playmenu"===n)!function(e,t){var n=S(e);r.e(44910).then(r.bind(r,44910)).then((function(e){e.show({item:n,positionTo:t})}))}(e,t);else if("edit"===n)A(t).then((function(e){!function(e,t){var n=s.tF.getApiClient(t);new Promise((function(t,a){var i=n.serverInfo().Id;"Timer"===e.Type?e.ProgramId?Promise.all([r.e(10739),r.e(22882)]).then(r.bind(r,63834)).then((function(r){r.default.show(e.ProgramId,i).then(t,a)})):r.e(59801).then(r.bind(r,59801)).then((function(r){r.default.show(e.Id,i).then(t,a)})):Promise.all([r.e(45642),r.e(26855),r.e(63741)]).then(r.bind(r,26855)).then((function(r){r.default.show(e.Id,i).then(t,a)}))}))}(e,v)}));else if("playtrailer"===n)A(t).then(T);else if("addtoplaylist"===n)A(t).then(C);else if("custom"===n){var O=t.getAttribute("data-customaction");e.dispatchEvent(new CustomEvent("action-".concat(O),{detail:{playlistItemId:e.getAttribute("data-playlistitemid")},cancelable:!1,bubbles:!0}))}}function C(e){Promise.all([r.e(45642),r.e(81949)]).then(r.bind(r,4330)).then((function(t){(new(0,t.default)).show({items:[e.Id],serverId:e.ServerId}).catch((function(){}))})).catch((function(e){console.error("[addToPlaylist] failed to load playlist editor",e)}))}function T(e){var t=s.tF.getApiClient(e.ServerId);t.getLocalTrailers(t.getCurrentUserId(),e.Id).then((function(e){a.f.play({items:e})}))}function P(e){var t=u.Ay.parentWithClass(e.target,"itemAction");if(t){var r=t,n=r.getAttribute("data-action");if(n||(r=u.Ay.parentWithAttribute(r,"data-action"))&&(n=r.getAttribute("data-action")),n&&"none"!==n)return w(t,r,n),e.preventDefault(),e.stopPropagation(),!1}}function L(e){var t=e.detail.command;if("play"===t||"resume"===t||"record"===t||"menu"===t||"info"===t){var r=e.target,n=u.Ay.parentWithClass(r,"itemAction")||u.Ay.parentWithAttribute(r,"data-id");n&&(e.preventDefault(),e.stopPropagation(),w(n,n,t))}}t.Ay={on:function(e,t){!1!==(t=t||{}).click&&e.addEventListener("click",P),!1!==t.command&&i.default.on(e,L)},off:function(e,t){t=t||{},e.removeEventListener("click",P),!1!==t.command&&i.default.off(e,L)},onClick:P,getShortcutAttributesHtml:function(e,t){var r='data-id="'.concat(e.Id,'" data-serverid="').concat(t||e.ServerId,'" data-type="').concat(e.Type,'" data-mediatype="').concat(e.MediaType,'" data-channelid="').concat(e.ChannelId,'" data-isfolder="').concat(e.IsFolder,'"'),n=e.CollectionType;return n&&(r+=' data-collectiontype="'.concat(n,'"')),r}}},76542:function(e,t,r){r.r(t),r.d(t,{default:function(){return g},fillImage:function(){return f},fillImages:function(){return p},getPrimaryImageAspectRatio:function(){return v},lazyChildren:function(){return h},lazyImage:function(){return u},setLazyImage:function(){return b}}),r(29305),r(32733),r(84701),r(14382),r(69892),r(44962),r(89336),r(26448),r(78557),r(95021),r(73687),r(83994),r(93062),r(82367);var n=r(99891),a=r(82885);function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,l=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){s=!0,i=e},f:function(){try{l||null==r.return||r.return()}finally{if(s)throw i}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var l=new function(){return new Worker(r.p+"blurhash.worker.bundle.js")},s={};function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.getAttribute("data-src");t&&m(e,t)}function c(e,t,r,n){var a=document.createElement("canvas");a.setAttribute("aria-hidden","true"),a.width=r,a.height=n;var i=a.getContext("2d"),o=i.createImageData(r,n);o.data.set(t),i.putImageData(o,0,0),requestAnimationFrame((function(){a.classList.add("blurhash-canvas"),e.parentNode.insertBefore(a,e),e.classList.add("blurhashed"),e.removeAttribute("data-blurhash")}))}function d(e,t){try{s[t]=(s[t]||[]).filter((function(t){return t!==e})),s[t].push(e),l.postMessage({hash:t,width:20,height:20})}catch(t){return console.error(t),void e.classList.add("non-blurhashable")}}function f(e){if(!e)throw new Error("entry cannot be null");var t,r=e.target;t=r?r.getAttribute("data-src"):e,e.isIntersecting?t&&m(r,t):t||function(e){var t;e.removeEventListener("animationend",y);var r,n=e.previousSibling;"CANVAS"===(null==n?void 0:n.tagName)&&n.classList.remove("lazy-hidden"),null===(t=e.parentNode)||void 0===t||null===(t=t.querySelector(".cardPadder"))||void 0===t||t.classList.remove("lazy-hidden-children"),"IMG"!==e.tagName?(r=e.style.backgroundImage.slice(4,-1).replace(/"/g,""),e.style.backgroundImage="none"):(r=e.getAttribute("src"),e.setAttribute("src","")),e.setAttribute("data-src",r),e.classList.remove("lazy-image-fadein-fast","lazy-image-fadein"),e.classList.add("lazy-hidden")}(r)}function y(e){var t=e.target;requestAnimationFrame((function(){var e,r=t.previousSibling;t.classList.contains("blurhashed")&&"CANVAS"===(null==r?void 0:r.tagName)&&r.classList.add("lazy-hidden"),null===(e=t.parentNode)||void 0===e||null===(e=e.querySelector(".cardPadder"))||void 0===e||e.classList.add("lazy-hidden-children")})),t.removeEventListener("animationend",y)}function m(e,t){if(void 0===t)throw new TypeError("url cannot be undefined");var r=new Image;r.src=t,e.classList.add("lazy-hidden"),e.addEventListener("animationend",y),r.addEventListener("load",(function(){requestAnimationFrame((function(){"IMG"!==e.tagName?e.style.backgroundImage="url('"+t+"')":e.setAttribute("src",t),e.removeAttribute("data-src"),a.enableFastFadein()?e.classList.add("lazy-image-fadein-fast"):e.classList.add("lazy-image-fadein"),e.classList.remove("lazy-hidden")}))}))}function h(e){if(a.enableBlurhash()){var t,r=i(e.querySelectorAll(".lazy"));try{for(r.s();!(t=r.n()).done;){var o=t.value,l=o.getAttribute("data-blurhash");!o.classList.contains("blurhashed","non-blurhashable")&&l?d(o,l):l||o.classList.contains("blurhashed")||o.classList.add("non-blurhashable")}}catch(e){r.e(e)}finally{r.f()}}n.WK(e,f)}function v(e){for(var t=[],r=0,n=e.length;r<n;r++){var a=e[r].PrimaryImageAspectRatio||0;a&&(t[t.length]=a)}if(!t.length)return null;t.sort((function(e,t){return e-t}));var i,o=Math.floor(t.length/2);i=t.length%2?t[o]:(t[o-1]+t[o])/2;var l=2/3;if(Math.abs(l-i)<=.15)return l;var s=16/9;if(Math.abs(s-i)<=.2)return s;if(Math.abs(1-i)<=.15)return 1;var u=4/3;return Math.abs(u-i)<=.15?u:i}function p(e){for(var t=0,r=e.length;t<r;t++)f(e[0])}function b(e,t){e.classList.add("lazy"),e.setAttribute("data-src",t),u(e)}l.addEventListener("message",(function(e){var t=e.data,r=t.pixels,n=t.hsh,a=t.width,o=t.height,l=s[n];if(null!=l&&l.length){var u,d=i(l);try{for(d.s();!(u=d.n()).done;)c(u.value,r,a,o)}catch(e){d.e(e)}finally{d.f()}delete s[n]}}));var g={setLazyImage:b,fillImages:p,fillImage:f,lazyImage:u,lazyChildren:h,getPrimaryImageAspectRatio:v}},78938:function(e,t,r){r.r(t),r(78557),r(90076);var n=r(5898),a=r(67430),i=r(8566),o=r(71866),l=r(47602),s=r(48080);function u(e,t,r,a){return i.Ay.show(),e.getItem(e.getCurrentUserId(),r).then((function(l){return l.IsSeries?e.getNewLiveTvTimerDefaults({programId:r}).then((function(t){return e.createLiveTvSeriesTimer(t).then((function(){i.Ay.hide(),(0,o.A)(n.Ay.translate("SeriesRecordingScheduled"))}))})):a?c(t,e.serverId()):d(e.serverId(),t,!0)}))}function c(e,t){return new Promise((function(r,o){(0,l.A)({text:n.Ay.translate("MessageConfirmRecordingCancellation"),primary:"delete",confirmText:n.Ay.translate("HeaderCancelRecording"),cancelText:n.Ay.translate("HeaderKeepRecording")}).then((function(){i.Ay.show(),d(a.tF.getApiClient(t),e,!0).then(r,o)}),o)}))}function d(e,t,r){return i.Ay.show(),e.cancelLiveTvTimer(t).then((function(){!1!==r&&(i.Ay.hide(),(0,o.A)(n.Ay.translate("RecordingCancelled")))}))}function f(e,t,r){return i.Ay.show(),e.getNewLiveTvTimerDefaults({programId:t}).then((function(t){return(r?e.createLiveTvSeriesTimer(t):e.createLiveTvTimer(t)).then((function(){i.Ay.hide(),(0,o.A)(n.Ay.translate("RecordingScheduled"))}))}))}t.default={cancelTimer:d,createRecording:f,changeRecordingToSeries:u,toggleRecording:function(e,t,r,l,c){var y=a.tF.getApiClient(e),m=r&&"Cancelled"!==l;return c&&m?function(e,t,r,l,u){return new Promise((function(t,c){var f=[];f.push({name:n.Ay.translate("HeaderKeepRecording"),id:"cancel",type:"submit"}),"InProgress"===l?f.push({name:n.Ay.translate("HeaderStopRecording"),id:"canceltimer",type:"cancel"}):f.push({name:n.Ay.translate("HeaderCancelRecording"),id:"canceltimer",type:"cancel"}),f.push({name:n.Ay.translate("HeaderCancelSeries"),id:"cancelseriestimer",type:"cancel"}),s.A.show({text:n.Ay.translate("MessageConfirmRecordingCancellation"),buttons:f}).then((function(l){var s=a.tF.getApiClient(e);"canceltimer"===l?(i.Ay.show(),d(s,r,!0).then(t,c)):"cancelseriestimer"===l?(i.Ay.show(),s.cancelLiveTvSeriesTimer(u).then((function(){(0,o.A)(n.Ay.translate("SeriesCancelled")),i.Ay.hide(),t()}),c)):t()}),c)}))}(e,0,r,l,c):m&&t?u(y,r,t,!0):t?f(y,t):Promise.reject()},cancelTimerWithConfirmation:c,cancelSeriesTimerWithConfirmation:function(e,t){return new Promise((function(r,s){(0,l.A)({text:n.Ay.translate("MessageConfirmRecordingCancellation"),primary:"delete",confirmText:n.Ay.translate("HeaderCancelSeries"),cancelText:n.Ay.translate("HeaderKeepSeries")}).then((function(){i.Ay.show(),a.tF.getApiClient(t).cancelLiveTvSeriesTimer(e).then((function(){(0,o.A)(n.Ay.translate("SeriesCancelled")),i.Ay.hide(),r()}),s)}),s)}))}}},99891:function(e,t,r){function n(e){return n="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},n(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.d(t,{WK:function(){return l}}),r(29305),r(32733),r(84701),r(81678),r(69892),r(44962),r(4754),r(94),r(36947),r(78557),r(83994),r(23630),r(82367);var o=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t},(t=[{key:"createObserver",value:function(){var e=this.options.callback,t=new IntersectionObserver((function(t,r){t.forEach((function(t){e(t,r)}))}),{rootMargin:"50%",threshold:0});this.observer=t}},{key:"addElements",value:function(e){var t=this.observer;t||(this.createObserver(),t=this.observer),Array.from(e).forEach((function(e){t.observe(e)}))}},{key:"destroyObserver",value:function(){var e=this.observer;e&&(e.disconnect(),this.observer=null)}},{key:"destroy",value:function(){this.destroyObserver(),this.options=null}}])&&a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function l(e,t){!function(e,t,r){e.length&&new o({callback:r}).addElements(e)}(e.getElementsByClassName("lazy"),0,t)}t.Ay={LazyLoader:o,lazyChildren:l}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[35308,44599],{35308:function(e,t,n){n.r(t),n.d(t,{default:function(){return F},startMultiSelect:function(){return L},stopMultiSelect:function(){return E}}),n(24776),n(14382),n(76281),n(44962),n(86584),n(89336),n(78557),n(90076),n(99425),n(83994),n(23630),n(82367);var a,i=n(97339),r=n(34789),c=n(22622),s=n(8566),l=n(5898),o=n(67430),d=n(36300),u=n(41177),h=n(47602),p=n(23648),v=n(98320),f=[],y=[];function b(){var e=a;if(e){e.parentNode.removeChild(e),a=null,f=[],y=[];for(var t=document.querySelectorAll(".itemSelectionPanel"),n=0,i=t.length;n<i;n++){var r=t[n].parentNode;r.removeChild(t[n]),r.classList.remove("withMultiSelect")}}}function m(e,t){var n=d.Ay.parentWithAttribute(e,"data-id").getAttribute("data-id");if(t?f.filter((function(e){return e===n})).length||(f.push(n),y.push(e)):(f=f.filter((function(e){return e!==n})),y=y.filter((function(t){return t!==e}))),f.length){var a=document.querySelector(".itemSelectionCount");a&&(a.innerHTML=v.Ay.toLocaleString(f.length))}else b()}function k(){m(this,this.checked)}function S(e,t,n){var a=e.querySelector(".itemSelectionPanel");if(!a){(a=document.createElement("div")).classList.add("itemSelectionPanel");var i=e.querySelector(".cardBox")||e.querySelector(".cardContent");i.classList.add("withMultiSelect"),i.appendChild(a);var r="chkItemSelect";t&&n&&(r+=" checkedInitial");var c=t?" checked":"";a.innerHTML='<label class="checkboxContainer"><input type="checkbox" is="emby-checkbox" data-outlineclass="multiSelectCheckboxOutline" class="'.concat(r,'"').concat(c,"/><span></span></label>"),a.querySelector(".chkItemSelect").addEventListener("change",k)}}function g(e){var t=o.tF.currentApiClient();t.getCurrentUser().then((function(a){t.getItem(t.getCurrentUserId(),f[0]).then((function(r){var o=[];o.push({name:l.Ay.translate("SelectAll"),id:"selectall",icon:"select_all"}),o.push({name:l.Ay.translate("AddToCollection"),id:"addtocollection",icon:"add"}),o.push({name:l.Ay.translate("AddToPlaylist"),id:"playlist",icon:"playlist_add"}),a.Policy.EnableContentDeletion&&o.push({name:l.Ay.translate("Delete"),id:"delete",icon:"delete"}),a.Policy.EnableContentDownloading&&c.g.supports(i.Y.FileDownload),a.Policy.IsAdministrator&&o.push({name:l.Ay.translate("GroupVersions"),id:"groupvideos",icon:"call_merge"}),o.push({name:l.Ay.translate("MarkPlayed"),id:"markplayed",icon:"check_box"}),o.push({name:l.Ay.translate("MarkUnplayed"),id:"markunplayed",icon:"check_box_outline_blank"}),p.Ay.canRefreshMetadata(r,a)&&o.push({name:l.Ay.translate("RefreshMetadata"),id:"refresh",icon:"refresh"}),n.e(62882).then(n.bind(n,62882)).then((function(a){a.show({items:o,positionTo:e.target,callback:function(e){var a=f.slice(0),i=t.serverInfo().Id;switch(e){case"selectall":for(var r=document.querySelectorAll(".itemSelectionPanel"),c=0,o=r.length;c<o;c++){var d=r[c].querySelector(".chkItemSelect");!d||d.classList.contains("checkedInitial")||d.checked||0==d.getBoundingClientRect().width||(d.checked=!0,m(d,!0))}break;case"addtocollection":n.e(3380).then(n.bind(n,3380)).then((function(e){(new(0,e.default)).show({items:a,serverId:i})})),b(),x();break;case"playlist":Promise.all([n.e(45642),n.e(81949)]).then(n.bind(n,4330)).then((function(e){(new(0,e.default)).show({items:a,serverId:i}).catch((function(){}))})).catch((function(e){console.error("[AddToPlaylist] failed to load playlist editor",e)})),b(),x();break;case"delete":(function(e,t){return new Promise((function(n,a){var i=l.Ay.translate("ConfirmDeleteItem"),r=l.Ay.translate("HeaderDeleteItem");t.length>1&&(i=l.Ay.translate("ConfirmDeleteItems"),r=l.Ay.translate("HeaderDeleteItems")),(0,h.A)(i,r).then((function(){var i=t.map((function(t){return e.deleteItem(t)}));Promise.all(i).then(n,(function(){var e;(e=l.Ay.translate("ErrorDeletingItem"),new Promise((function(t){(0,u.A)(e).then(t,t)}))).then(a,a)}))}),a)}))})(t,a).then(x),b(),x();break;case"groupvideos":!function(e,t){t.length<2?(0,u.A)({text:l.Ay.translate("PleaseSelectTwoItems")}):(s.Ay.show(),e.ajax({type:"POST",url:e.getUrl("Videos/MergeVersions",{Ids:t.join(",")})}).then((function(){s.Ay.hide(),b(),x()})))}(t,a);break;case"markplayed":a.forEach((function(e){t.markPlayed(t.getCurrentUserId(),e)})),b(),x();break;case"markunplayed":a.forEach((function(e){t.markUnplayed(t.getCurrentUserId(),e)})),b(),x();break;case"refresh":n.e(77004).then(n.bind(n,77004)).then((function(e){new(0,e.default)({itemIds:a,serverId:i}).show()})),b(),x()}}})}))}))}))}function x(){var e=[];[].forEach.call(y,(function(t){var n=d.Ay.parentWithAttribute(t,"is","emby-itemscontainer");n&&!e.includes(n)&&e.push(n)}));for(var t=0,n=e.length;t<n;t++)e[t].notifyRefreshNeeded(!0)}function A(e,t){Promise.resolve().then(n.bind(n,77157)).then((function(){for(var n=document.querySelectorAll(".card"),i=0,r=n.length;i<r;i++)S(n[i],e===n[i],t);!function(){var e=a;if(!e){(e=document.createElement("div")).classList.add("selectionCommandsPanel"),document.body.appendChild(e),a=e;var t="";t+='<button is="paper-icon-button-light" class="btnCloseSelectionPanel autoSize"><span class="material-icons close" aria-hidden="true"></span></button>',t+='<h1 class="itemSelectionCount"></h1>',t+='<button is="paper-icon-button-light" class="btnSelectionPanelOptions autoSize"><span class="material-icons '.concat("more_vert",'" aria-hidden="true"></span></button>'),e.innerHTML=t,e.querySelector(".btnCloseSelectionPanel").addEventListener("click",b);var n=e.querySelector(".btnSelectionPanelOptions");d.Ay.addEventListener(n,"click",g,{passive:!0})}}(),m(e,!0)}))}function I(e){var t=e.target;if(f.length){var n=d.Ay.parentWithClass(t,"card");if(n){var a=n.querySelector(".itemSelectionPanel");if(a)return function(e,t){if(!d.Ay.parentWithClass(e.target,"chkItemSelect")){var n=t.querySelector(".chkItemSelect");if(n)if(n.classList.contains("checkedInitial"))n.classList.remove("checkedInitial");else{var a=!n.checked;n.checked=a,m(n,a)}}return e.preventDefault(),e.stopPropagation(),!1}(e,a)}return e.preventDefault(),e.stopPropagation(),!1}}function F(e){var t,n,a,i,c,s=e.container;function l(e){var t=d.Ay.parentWithClass(e.target,"card");return t&&A(t,!0),e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function o(e){return e.changedTouches||e.targetTouches||e.touches}function u(e){var r=o(e)[0];if(t=null,a=0,i=0,r){a=r.clientX,i=r.clientY;var c=r.target;if(c){var s=d.Ay.parentWithClass(c,"card");s&&(n&&(clearTimeout(n),n=null),t=s,n=setTimeout(y,550))}}}function h(e){if(t){var n,r,c=o(e)[0];if(c){var s=c.clientX||0,l=c.clientY||0;n=Math.abs(s-(a||0)),r=Math.abs(l-(i||0))}else n=100,r=100;(n>=5||r>=5)&&f()}}function p(){f()}function v(e){n&&(clearTimeout(n),n=null),t=e.target,n=setTimeout(y,550)}function f(){n&&(clearTimeout(n),n=null),t=null}function y(){if(t){var e=d.Ay.parentWithClass(t,"card");t=null,e&&A(e,!0)}}c=s,r.A.touch&&!r.A.safari?c.addEventListener("contextmenu",l):(d.Ay.addEventListener(c,"touchstart",u,{passive:!0}),d.Ay.addEventListener(c,"touchmove",h,{passive:!0}),d.Ay.addEventListener(c,"touchend",p,{passive:!0}),d.Ay.addEventListener(c,"touchcancel",p,{passive:!0}),d.Ay.addEventListener(c,"mousedown",v,{passive:!0}),d.Ay.addEventListener(c,"mouseleave",f,{passive:!0}),d.Ay.addEventListener(c,"mouseup",f,{passive:!0})),!1!==e.bindOnClick&&s.addEventListener("click",I),this.onContainerClick=I,this.destroy=function(){s.removeEventListener("click",I),s.removeEventListener("contextmenu",l);var e=s;d.Ay.removeEventListener(e,"touchstart",u,{passive:!0}),d.Ay.removeEventListener(e,"touchmove",h,{passive:!0}),d.Ay.removeEventListener(e,"touchend",p,{passive:!0}),d.Ay.removeEventListener(e,"mousedown",v,{passive:!0}),d.Ay.removeEventListener(e,"mouseleave",f,{passive:!0}),d.Ay.removeEventListener(e,"mouseup",f,{passive:!0})}}document.addEventListener("viewbeforehide",b);var L=function(e){A(e,!1)},E=function(){b()}},44599:function(e,t,n){n.r(t),n.d(t,{default:function(){return k}}),n(29305),n(32733),n(84701),n(81678),n(24776),n(14382),n(69892),n(76281),n(44962),n(86584),n(89336),n(26448),n(4754),n(94),n(36947),n(78557),n(90076),n(95021),n(73687),n(99425),n(83994),n(93062),n(11810),n(82367);var a=n(36300),i=n(79754),r=n(5898),c=n(67430),s=n(58867),l=n(44797),o=(n(77157),n(81077),n(35308));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 u(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,h(a.key),a)}}function h(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function p(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return v(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},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 r,c=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){s=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(s)throw r}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function f(e,t,n){return t?(0,s.A)(e,t.split(n)).sort():e}function y(e,t,n,a,i){var r=e.querySelector(t);a.length?r.classList.remove("hide"):r.classList.add("hide");var c="";c+='<div class="checkboxList">',c+=a.map((function(e){var t="",a=i(e)?"checked":"";return t+="<label>",t+='<input is="emby-checkbox" type="checkbox" '.concat(a,' data-filter="').concat(e,'" class="').concat(n,'"/>'),(t+="<span>".concat(e,"</span>"))+"</label>"})).join(""),c+="</div>",r.querySelector(".filterOptions").innerHTML=c}function b(e){(0,o.stopMultiSelect)(),l.A.trigger(e,"filterchange")}function m(e){return"movies"===e||"series"===e||"albums"===e||"albumartists"===e||"artists"===e||"songs"===e||"episodes"===e}var k=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t},t=[{key:"onFavoriteChange",value:function(e){var t=this.options.query;t.StartIndex=0,t.IsFavorite=!!e.checked||null,b(this)}},{key:"onStandardFilterChange",value:function(e){var t=this.options.query,n=e.getAttribute("data-filter"),a=t.Filters||"";a=",".concat(a).replace(",".concat(n),"").substring(1),e.checked&&(a=a?"".concat(a,",").concat(n):n),t.StartIndex=0,t.Filters=a,b(this)}},{key:"onVideoTypeFilterChange",value:function(e){var t=this.options.query,n=e.getAttribute("data-filter"),a=t.VideoTypes||"";a=",".concat(a).replace(",".concat(n),"").substring(1),e.checked&&(a=a?"".concat(a,",").concat(n):n),t.StartIndex=0,t.VideoTypes=a,b(this)}},{key:"onStatusChange",value:function(e){var t=this.options.query,n=e.getAttribute("data-filter"),a=t.SeriesStatus||"";a=",".concat(a).replace(",".concat(n),"").substring(1),e.checked&&(a=a?"".concat(a,",").concat(n):n),t.SeriesStatus=a,t.StartIndex=0,b(this)}},{key:"bindEvents",value:function(e){var t=this,n=this.options.query;if("livetvchannels"===this.options.mode){var i,r=p(e.querySelectorAll(".chkFavorite"));try{var c=function(){var e=i.value;e.addEventListener("change",(function(){return t.onFavoriteChange(e)}))};for(r.s();!(i=r.n()).done;)c()}catch(e){r.e(e)}finally{r.f()}}else{var s,l=p(e.querySelectorAll(".chkStandardFilter"));try{var o=function(){var e=s.value;e.addEventListener("change",(function(){return t.onStandardFilterChange(e)}))};for(l.s();!(s=l.n()).done;)o()}catch(e){l.e(e)}finally{l.f()}}var d,u=p(e.querySelectorAll(".chkVideoTypeFilter"));try{var h=function(){var e=d.value;e.addEventListener("change",(function(){return t.onVideoTypeFilterChange(e)}))};for(u.s();!(d=u.n()).done;)h()}catch(e){u.e(e)}finally{u.f()}var v=e.querySelector(".chk3DFilter");v.addEventListener("change",(function(){n.StartIndex=0,n.Is3D=!!v.checked||null,b(t)}));var f=e.querySelector(".chk4KFilter");f.addEventListener("change",(function(){n.StartIndex=0,n.Is4K=!!f.checked||null,b(t)}));var y=e.querySelector(".chkHDFilter"),m=e.querySelector(".chkSDFilter");y.addEventListener("change",(function(){n.StartIndex=0,y.checked?(m.checked=!1,n.IsHD=!0):n.IsHD=null,b(t)})),m.addEventListener("change",(function(){n.StartIndex=0,m.checked?(y.checked=!1,n.IsHD=!1):n.IsHD=null,b(t)}));var k,S=p(e.querySelectorAll(".chkStatus"));try{var g=function(){var e=k.value;e.addEventListener("change",(function(){return t.onStatusChange(e)}))};for(S.s();!(k=S.n()).done;)g()}catch(e){S.e(e)}finally{S.f()}var x=e.querySelector("#chkTrailer");x.addEventListener("change",(function(){n.StartIndex=0,n.HasTrailer=!!x.checked||null,b(t)}));var A=e.querySelector("#chkThemeSong");A.addEventListener("change",(function(){n.StartIndex=0,n.HasThemeSong=!!A.checked||null,b(t)}));var I=e.querySelector("#chkSpecialFeature");I.addEventListener("change",(function(){n.StartIndex=0,n.HasSpecialFeature=!!I.checked||null,b(t)}));var F=e.querySelector("#chkThemeVideo");F.addEventListener("change",(function(){n.StartIndex=0,n.HasThemeVideo=!!F.checked||null,b(t)}));var L=e.querySelector("#chkMissingEpisode");L.addEventListener("change",(function(){n.StartIndex=0,n.IsMissing=!!L.checked,b(t)}));var E=e.querySelector("#chkSpecialEpisode");E.addEventListener("change",(function(){n.StartIndex=0,n.ParentIndexNumber=E.checked?0:null,b(t)}));var q=e.querySelector("#chkFutureEpisode");q.addEventListener("change",(function(){n.StartIndex=0,q.checked?(n.IsUnaired=!0,n.IsVirtualUnaired=null):(n.IsUnaired=null,n.IsVirtualUnaired=!1),b(t)}));var T=e.querySelector("#chkSubtitle");T.addEventListener("change",(function(){n.StartIndex=0,n.HasSubtitles=!!T.checked||null,b(t)})),e.addEventListener("change",(function(e){var i=a.Ay.parentWithClass(e.target,"chkGenreFilter");if(i){var r=i.getAttribute("data-filter"),c=n.Genres||"";return c=c.split("|").filter((function(e){return e!==r})).join("|"),i.checked&&(c=c?c+"|"+r:r),n.StartIndex=0,n.Genres=c,void b(t)}var s=a.Ay.parentWithClass(e.target,"chkTagFilter");if(s){var l=s.getAttribute("data-filter"),o=n.Tags||"";return o=o.split("|").filter((function(e){return e!==l})).join("|"),s.checked&&(o=o?o+"|"+l:l),n.StartIndex=0,n.Tags=o,void b(t)}var d=a.Ay.parentWithClass(e.target,"chkYearFilter");if(d){var u=d.getAttribute("data-filter"),h=n.Years||"";return h=h.split(",").filter((function(e){return e!==u})).join(","),d.checked&&(h=h?h+","+u:u),n.StartIndex=0,n.Years=h,void b(t)}var p=a.Ay.parentWithClass(e.target,"chkOfficialRatingFilter");if(p){var v=p.getAttribute("data-filter"),f=n.OfficialRatings||"";f=f.split("|").filter((function(e){return e!==v})).join("|"),p.checked&&(f=f?f+"|"+v:v),n.StartIndex=0,n.OfficialRatings=f,b(t)}}))}},{key:"show",value:function(){var e=this;return new Promise((function(t){var n,a,s=i.default.createDialog({removeOnClose:!0,modal:!1});if(s.classList.add("ui-body-a"),s.classList.add("background-theme-a"),s.classList.add("formDialog"),s.classList.add("filterDialog"),s.innerHTML=r.Ay.translateHtml('<div style="margin:0;padding:1.5em 2em" class="filterDialogContent"> <div is="emby-collapse" title="${Filters}"> <div class="collapseContent"> <div class="checkboxList"> <label class="videoStandard"> <input type="checkbox" is="emby-checkbox" class="chkStandardFilter" data-filter="IsPlayed"/> <span>${Played}</span> </label> <label class="videoStandard"> <input type="checkbox" is="emby-checkbox" class="chkStandardFilter" data-filter="IsUnPlayed"/> <span>${Unplayed}</span> </label> <label class="videoStandard"> <input type="checkbox" is="emby-checkbox" class="chkStandardFilter" data-filter="IsResumable"/> <span>${OptionResumable}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkStandardFilter chkFavorite" data-filter="IsFavorite"/> <span>${Favorites}</span> </label> <label class="episodeFilter hide"> <input type="checkbox" is="emby-checkbox" id="chkSpecialEpisode"/> <span>${OptionSpecialEpisode}</span> </label> <label class="episodeFilter hide"> <input type="checkbox" is="emby-checkbox" id="chkMissingEpisode"/> <span>${OptionMissingEpisode}</span> </label> <label class="episodeFilter hide"> <input type="checkbox" is="emby-checkbox" id="chkFutureEpisode"/> <span>${OptionUnairedEpisode}</span> </label> </div> </div> </div> <div is="emby-collapse" title="${HeaderStatus}" class="seriesStatus hide"> <div class="collapseContent"> <div class="checkboxList"> <label> <input type="checkbox" is="emby-checkbox" class="chkStatus" data-filter="Continuing"/> <span>${Continuing}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkStatus" data-filter="Ended"/> <span>${Ended}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkStatus" data-filter="Unreleased"/> <span>${Unreleased}</span> </label> </div> </div> </div> <div is="emby-collapse" title="${Features}" class="features hide"> <div class="collapseContent"> <div class="checkboxList"> <label> <input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkSubtitle"/> <span>${Subtitles}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkTrailer"/> <span>${ButtonTrailer}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkSpecialFeature"/> <span>${SpecialFeatures}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkThemeSong"/> <span>${OptionHasThemeSong}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkThemeVideo"/> <span>${OptionHasThemeVideo}</span> </label> </div> </div> </div> <div is="emby-collapse" title="${Genres}" class="genreFilters hide"> <div class="collapseContent filterOptions"> </div> </div> <div is="emby-collapse" title="${HeaderParentalRatings}" class="officialRatingFilters hide"> <div class="collapseContent filterOptions"> </div> </div> <div is="emby-collapse" title="${Tags}" class="tagFilters hide"> <div class="collapseContent filterOptions"> </div> </div> <div is="emby-collapse" title="${HeaderVideoTypes}" class="videoTypeFilters hide"> <div class="collapseContent"> <div class="checkboxList"> <label> <input type="checkbox" is="emby-checkbox" class="chkVideoTypeFilter chkBluray" data-filter="Bluray"/> <span>${OptionBluray}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkVideoTypeFilter chkDvd" data-filter="Dvd"/> <span>${OptionDvd}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkHDFilter IsHD"/> <span>${OptionIsHD}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chk4KFilter Is4K"/> <span>4K</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkSDFilter IsHD"/> <span>${OptionIsSD}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chk3DFilter chk3D"/> <span>${Option3D}</span> </label> </div> </div> </div> <div is="emby-collapse" title="${HeaderYears}" class="yearFilters hide"> <div class="collapseContent filterOptions"> </div> </div> </div> '),n=s,"livetvchannels"!==(a=e.options).mode&&"albums"!==a.mode&&"artists"!==a.mode&&"albumartists"!==a.mode&&"songs"!==a.mode||function(e){var t,n=p(e.querySelectorAll(".".concat("videoStandard")));try{for(n.s();!(t=n.n()).done;)t.value.classList.add("hide")}catch(e){n.e(e)}finally{n.f()}}(n),m(a.mode)&&(n.querySelector(".genreFilters").classList.remove("hide"),n.querySelector(".officialRatingFilters").classList.remove("hide"),n.querySelector(".tagFilters").classList.remove("hide"),n.querySelector(".yearFilters").classList.remove("hide")),"movies"!==a.mode&&"episodes"!==a.mode||n.querySelector(".videoTypeFilters").classList.remove("hide"),"movies"!==a.mode&&"series"!==a.mode&&"episodes"!==a.mode||n.querySelector(".features").classList.remove("hide"),"series"===a.mode&&n.querySelector(".seriesStatus").classList.remove("hide"),"episodes"===a.mode&&function(e){var t,n=p(e.querySelectorAll(".".concat("episodeFilter")));try{for(n.s();!(t=n.n()).done;)t.value.classList.remove("hide")}catch(e){n.e(e)}finally{n.f()}}(n),i.default.open(s),s.addEventListener("close",t),function(e,t){var n=t.query;if("livetvchannels"===t.mode)e.querySelector(".chkFavorite").checked=!0===n.IsFavorite;else{var a,i=p(e.querySelectorAll(".chkStandardFilter"));try{for(i.s();!(a=i.n()).done;){var r=a.value,c=",".concat(n.Filters||""),s=r.getAttribute("data-filter");r.checked=c.includes(",".concat(s))}}catch(e){i.e(e)}finally{i.f()}}var l,o=p(e.querySelectorAll(".chkVideoTypeFilter"));try{for(o.s();!(l=o.n()).done;){var d=l.value,u=",".concat(n.VideoTypes||""),h=d.getAttribute("data-filter");d.checked=u.includes(",".concat(h))}}catch(e){o.e(e)}finally{o.f()}e.querySelector(".chk3DFilter").checked=!0===n.Is3D,e.querySelector(".chkHDFilter").checked=!0===n.IsHD,e.querySelector(".chk4KFilter").checked=!0===n.Is4K,e.querySelector(".chkSDFilter").checked=!1===n.IsHD,e.querySelector("#chkSubtitle").checked=!0===n.HasSubtitles,e.querySelector("#chkTrailer").checked=!0===n.HasTrailer,e.querySelector("#chkThemeSong").checked=!0===n.HasThemeSong,e.querySelector("#chkThemeVideo").checked=!0===n.HasThemeVideo,e.querySelector("#chkSpecialFeature").checked=!0===n.HasSpecialFeature,e.querySelector("#chkSpecialEpisode").checked=0===n.ParentIndexNumber,e.querySelector("#chkMissingEpisode").checked=!0===n.IsMissing,e.querySelector("#chkFutureEpisode").checked=!0===n.IsUnaired;var v,f=p(e.querySelectorAll(".chkStatus"));try{for(f.s();!(v=f.n()).done;){var y=v.value,b=",".concat(n.SeriesStatus||""),m=y.getAttribute("data-filter");y.checked=b.includes(",".concat(m))}}catch(e){f.e(e)}finally{f.f()}}(s,e.options),e.bindEvents(s),m(e.options.mode)){s.classList.add("dynamicFilterDialog");var l=c.tF.getApiClient(e.options.serverId);!function(e,t,n,a){t.getJSON(t.getUrl("Items/Filters",{UserId:n,ParentId:a.ParentId,IncludeItemTypes:a.IncludeItemTypes})).then((function(t){!function(e,t,n){y(e,".genreFilters","chkGenreFilter",f(t.Genres,n.Genres,"|"),(function(e){var t="|";return(t+(n.Genres||"")+t).includes(t+e+t)})),y(e,".officialRatingFilters","chkOfficialRatingFilter",f(t.OfficialRatings,n.OfficialRatings,"|"),(function(e){var t="|";return(t+(n.OfficialRatings||"")+t).includes(t+e+t)})),y(e,".tagFilters","chkTagFilter",f(t.Tags,n.Tags,"|"),(function(e){var t="|";return(t+(n.Tags||"")+t).includes(t+e+t)})),y(e,".yearFilters","chkYearFilter",f(t.Years,n.Years,","),(function(e){var t=",";return(t+(n.Years||"")+t).includes(t+e+t)}))}(e,t,a)}))}(s,l,l.getCurrentUserId(),e.options.query)}}))}}],t&&u(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},81077:function(e,t,n){n(69177),n(10353);var a=Object.create(HTMLDivElement.prototype);function i(){var e=this,t=e.parentNode.querySelector(".collapseContent");t.expanded?(t.expanded=!1,function(e,t){requestAnimationFrame((function(){t.style.height=t.offsetHeight+"px",t.offsetHeight,t.classList.remove("expanded"),t.style.height="0",setTimeout((function(){t.classList.contains("expanded")?t.classList.remove("hide"):t.classList.add("hide")}),300),e.querySelector(".material-icons").classList.remove("emby-collapse-expandIconExpanded")}))}(e,t)):(t.expanded=!0,function(e,t){requestAnimationFrame((function(){t.classList.remove("hide"),t.classList.add("expanded"),t.style.height="auto";var n=t.offsetHeight+"px";t.style.height="0",t.offsetHeight,t.style.height=n,setTimeout((function(){t.classList.contains("expanded")?t.classList.remove("hide"):t.classList.add("hide"),t.style.height="auto"}),300),e.querySelector(".material-icons").classList.add("emby-collapse-expandIconExpanded")}))}(e,t))}a.attachedCallback=function(){if(!this.classList.contains("emby-collapse")){this.classList.add("emby-collapse");var e=this.querySelector(".collapseContent");e&&e.classList.add("hide");var t=this.getAttribute("title"),n='<button is="emby-button" type="button" on-click="toggleExpand" id="expandButton" class="emby-collapsible-button iconRight"><h3 class="emby-collapsible-title" title="'+t+'">'+t+'</h3><span class="material-icons emby-collapse-expandIcon expand_more" aria-hidden="true"></span></button>';this.insertAdjacentHTML("afterbegin",n);var a=this.querySelector(".emby-collapsible-button");a.addEventListener("click",i),"true"===this.getAttribute("data-expanded")&&i.call(a)}},document.registerElement("emby-collapse",{prototype:a,extends:"div"})}}]);
1
+ "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[35308,44599],{35308:function(e,t,n){n.r(t),n.d(t,{default:function(){return F},startMultiSelect:function(){return L},stopMultiSelect:function(){return E}}),n(24776),n(14382),n(76281),n(44962),n(86584),n(89336),n(78557),n(90076),n(99425),n(83994),n(23630),n(82367);var a,i=n(97339),r=n(34789),c=n(22622),s=n(8566),l=n(5898),o=n(67430),d=n(36300),u=n(41177),h=n(47602),p=n(23648),v=n(98320),f=[],y=[];function b(){var e=a;if(e){e.parentNode.removeChild(e),a=null,f=[],y=[];for(var t=document.querySelectorAll(".itemSelectionPanel"),n=0,i=t.length;n<i;n++){var r=t[n].parentNode;r.removeChild(t[n]),r.classList.remove("withMultiSelect")}}}function m(e,t){var n=d.Ay.parentWithAttribute(e,"data-id").getAttribute("data-id");if(t?f.filter((function(e){return e===n})).length||(f.push(n),y.push(e)):(f=f.filter((function(e){return e!==n})),y=y.filter((function(t){return t!==e}))),f.length){var a=document.querySelector(".itemSelectionCount");a&&(a.innerHTML=v.Ay.toLocaleString(f.length))}else b()}function k(){m(this,this.checked)}function S(e,t,n){var a=e.querySelector(".itemSelectionPanel");if(!a){(a=document.createElement("div")).classList.add("itemSelectionPanel");var i=e.querySelector(".cardBox")||e.querySelector(".cardContent");i.classList.add("withMultiSelect"),i.appendChild(a);var r="chkItemSelect";t&&n&&(r+=" checkedInitial");var c=t?" checked":"";a.innerHTML='<label class="checkboxContainer"><input type="checkbox" is="emby-checkbox" data-outlineclass="multiSelectCheckboxOutline" class="'.concat(r,'"').concat(c,"/><span></span></label>"),a.querySelector(".chkItemSelect").addEventListener("change",k)}}function g(e){var t=o.tF.currentApiClient();t.getCurrentUser().then((function(a){t.getItem(t.getCurrentUserId(),f[0]).then((function(r){var o=[];o.push({name:l.Ay.translate("SelectAll"),id:"selectall",icon:"select_all"}),o.push({name:l.Ay.translate("AddToCollection"),id:"addtocollection",icon:"add"}),o.push({name:l.Ay.translate("AddToPlaylist"),id:"playlist",icon:"playlist_add"}),a.Policy.EnableContentDeletion&&o.push({name:l.Ay.translate("Delete"),id:"delete",icon:"delete"}),a.Policy.EnableContentDownloading&&c.g.supports(i.Y.FileDownload),a.Policy.IsAdministrator&&o.push({name:l.Ay.translate("GroupVersions"),id:"groupvideos",icon:"call_merge"}),o.push({name:l.Ay.translate("MarkPlayed"),id:"markplayed",icon:"check_box"}),o.push({name:l.Ay.translate("MarkUnplayed"),id:"markunplayed",icon:"check_box_outline_blank"}),p.Ay.canRefreshMetadata(r,a)&&o.push({name:l.Ay.translate("RefreshMetadata"),id:"refresh",icon:"refresh"}),n.e(62882).then(n.bind(n,62882)).then((function(a){a.show({items:o,positionTo:e.target,callback:function(e){var a=f.slice(0),i=t.serverInfo().Id;switch(e){case"selectall":for(var r=document.querySelectorAll(".itemSelectionPanel"),c=0,o=r.length;c<o;c++){var d=r[c].querySelector(".chkItemSelect");!d||d.classList.contains("checkedInitial")||d.checked||0==d.getBoundingClientRect().width||(d.checked=!0,m(d,!0))}break;case"addtocollection":n.e(3380).then(n.bind(n,3380)).then((function(e){(new(0,e.default)).show({items:a,serverId:i})})),b(),x();break;case"playlist":Promise.all([n.e(45642),n.e(81949)]).then(n.bind(n,4330)).then((function(e){(new(0,e.default)).show({items:a,serverId:i}).catch((function(){}))})).catch((function(e){console.error("[AddToPlaylist] failed to load playlist editor",e)})),b(),x();break;case"delete":(function(e,t){return new Promise((function(n,a){var i=l.Ay.translate("ConfirmDeleteItem"),r=l.Ay.translate("HeaderDeleteItem");t.length>1&&(i=l.Ay.translate("ConfirmDeleteItems"),r=l.Ay.translate("HeaderDeleteItems")),(0,h.A)(i,r).then((function(){var i=t.map((function(t){return e.deleteItem(t)}));Promise.all(i).then(n,(function(){var e;(e=l.Ay.translate("ErrorDeletingItem"),new Promise((function(t){(0,u.A)(e).then(t,t)}))).then(a,a)}))}),a)}))})(t,a).then(x),b(),x();break;case"groupvideos":!function(e,t){t.length<2?(0,u.A)({text:l.Ay.translate("PleaseSelectTwoItems")}):(s.Ay.show(),e.ajax({type:"POST",url:e.getUrl("Videos/MergeVersions",{Ids:t.join(",")})}).then((function(){s.Ay.hide(),b(),x()})))}(t,a);break;case"markplayed":a.forEach((function(e){t.markPlayed(t.getCurrentUserId(),e)})),b(),x();break;case"markunplayed":a.forEach((function(e){t.markUnplayed(t.getCurrentUserId(),e)})),b(),x();break;case"refresh":n.e(77004).then(n.bind(n,77004)).then((function(e){new(0,e.default)({itemIds:a,serverId:i}).show()})),b(),x()}}})}))}))}))}function x(){var e=[];[].forEach.call(y,(function(t){var n=d.Ay.parentWithAttribute(t,"is","emby-itemscontainer");n&&!e.includes(n)&&e.push(n)}));for(var t=0,n=e.length;t<n;t++)e[t].notifyRefreshNeeded(!0)}function A(e,t){Promise.resolve().then(n.bind(n,77157)).then((function(){for(var n=document.querySelectorAll(".card"),i=0,r=n.length;i<r;i++)S(n[i],e===n[i],t);!function(){var e=a;if(!e){(e=document.createElement("div")).classList.add("selectionCommandsPanel"),document.body.appendChild(e),a=e;var t="";t+='<button is="paper-icon-button-light" class="btnCloseSelectionPanel autoSize"><span class="material-icons close" aria-hidden="true"></span></button>',t+='<h1 class="itemSelectionCount"></h1>',t+='<button is="paper-icon-button-light" class="btnSelectionPanelOptions autoSize"><span class="material-icons '.concat("more_vert",'" aria-hidden="true"></span></button>'),e.innerHTML=t,e.querySelector(".btnCloseSelectionPanel").addEventListener("click",b);var n=e.querySelector(".btnSelectionPanelOptions");d.Ay.addEventListener(n,"click",g,{passive:!0})}}(),m(e,!0)}))}function I(e){var t=e.target;if(f.length){var n=d.Ay.parentWithClass(t,"card");if(n){var a=n.querySelector(".itemSelectionPanel");if(a)return function(e,t){if(!d.Ay.parentWithClass(e.target,"chkItemSelect")){var n=t.querySelector(".chkItemSelect");if(n)if(n.classList.contains("checkedInitial"))n.classList.remove("checkedInitial");else{var a=!n.checked;n.checked=a,m(n,a)}}return e.preventDefault(),e.stopPropagation(),!1}(e,a)}return e.preventDefault(),e.stopPropagation(),!1}}function F(e){var t,n,a,i,c,s=e.container;function l(e){var t=d.Ay.parentWithClass(e.target,"card");return t&&A(t,!0),e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function o(e){return e.changedTouches||e.targetTouches||e.touches}function u(e){var r=o(e)[0];if(t=null,a=0,i=0,r){a=r.clientX,i=r.clientY;var c=r.target;if(c){var s=d.Ay.parentWithClass(c,"card");s&&(n&&(clearTimeout(n),n=null),t=s,n=setTimeout(y,550))}}}function h(e){if(t){var n,r,c=o(e)[0];if(c){var s=c.clientX||0,l=c.clientY||0;n=Math.abs(s-(a||0)),r=Math.abs(l-(i||0))}else n=100,r=100;(n>=5||r>=5)&&f()}}function p(){f()}function v(e){n&&(clearTimeout(n),n=null),t=e.target,n=setTimeout(y,550)}function f(){n&&(clearTimeout(n),n=null),t=null}function y(){if(t){var e=d.Ay.parentWithClass(t,"card");t=null,e&&A(e,!0)}}c=s,r.A.touch&&!r.A.safari?c.addEventListener("contextmenu",l):(d.Ay.addEventListener(c,"touchstart",u,{passive:!0}),d.Ay.addEventListener(c,"touchmove",h,{passive:!0}),d.Ay.addEventListener(c,"touchend",p,{passive:!0}),d.Ay.addEventListener(c,"touchcancel",p,{passive:!0}),d.Ay.addEventListener(c,"mousedown",v,{passive:!0}),d.Ay.addEventListener(c,"mouseleave",f,{passive:!0}),d.Ay.addEventListener(c,"mouseup",f,{passive:!0})),!1!==e.bindOnClick&&s.addEventListener("click",I),this.onContainerClick=I,this.destroy=function(){s.removeEventListener("click",I),s.removeEventListener("contextmenu",l);var e=s;d.Ay.removeEventListener(e,"touchstart",u,{passive:!0}),d.Ay.removeEventListener(e,"touchmove",h,{passive:!0}),d.Ay.removeEventListener(e,"touchend",p,{passive:!0}),d.Ay.removeEventListener(e,"mousedown",v,{passive:!0}),d.Ay.removeEventListener(e,"mouseleave",f,{passive:!0}),d.Ay.removeEventListener(e,"mouseup",f,{passive:!0})}}document.addEventListener("viewbeforehide",b);var L=function(e){A(e,!1)},E=function(){b()}},44599:function(e,t,n){n.r(t),n.d(t,{default:function(){return k}}),n(29305),n(32733),n(84701),n(81678),n(24776),n(14382),n(69892),n(76281),n(44962),n(86584),n(89336),n(26448),n(4754),n(94),n(36947),n(78557),n(90076),n(95021),n(73687),n(99425),n(83994),n(93062),n(11810),n(82367);var a=n(36300),i=n(79754),r=n(5898),c=n(67430),s=n(58867),l=n(44797),o=(n(77157),n(81077),n(35308));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 u(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,h(a.key),a)}}function h(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function p(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return v(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},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 r,c=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){s=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(s)throw r}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function f(e,t,n){return t?(0,s.A)(e,t.split(n)).sort():e}function y(e,t,n,a,i){var r=e.querySelector(t);a.length?r.classList.remove("hide"):r.classList.add("hide");var c="";c+='<div class="checkboxList">',c+=a.map((function(e){var t="",a=i(e)?"checked":"";return t+="<label>",t+='<input is="emby-checkbox" type="checkbox" '.concat(a,' data-filter="').concat(e,'" class="').concat(n,'"/>'),(t+="<span>".concat(e,"</span>"))+"</label>"})).join(""),c+="</div>",r.querySelector(".filterOptions").innerHTML=c}function b(e){(0,o.stopMultiSelect)(),l.A.trigger(e,"filterchange")}function m(e){return"movies"===e||"series"===e||"albums"===e||"albumartists"===e||"artists"===e||"songs"===e||"episodes"===e}var k=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t},t=[{key:"onFavoriteChange",value:function(e){var t=this.options.query;t.StartIndex=0,t.IsFavorite=!!e.checked||null,b(this)}},{key:"onStandardFilterChange",value:function(e){var t=this.options.query,n=e.getAttribute("data-filter"),a=t.Filters||"";a=",".concat(a).replace(",".concat(n),"").substring(1),e.checked&&(a=a?"".concat(a,",").concat(n):n),t.StartIndex=0,t.Filters=a,b(this)}},{key:"onVideoTypeFilterChange",value:function(e){var t=this.options.query,n=e.getAttribute("data-filter"),a=t.VideoTypes||"";a=",".concat(a).replace(",".concat(n),"").substring(1),e.checked&&(a=a?"".concat(a,",").concat(n):n),t.StartIndex=0,t.VideoTypes=a,b(this)}},{key:"onStatusChange",value:function(e){var t=this.options.query,n=e.getAttribute("data-filter"),a=t.SeriesStatus||"";a=",".concat(a).replace(",".concat(n),"").substring(1),e.checked&&(a=a?"".concat(a,",").concat(n):n),t.SeriesStatus=a,t.StartIndex=0,b(this)}},{key:"bindEvents",value:function(e){var t=this,n=this.options.query;if("livetvchannels"===this.options.mode){var i,r=p(e.querySelectorAll(".chkFavorite"));try{var c=function(){var e=i.value;e.addEventListener("change",(function(){return t.onFavoriteChange(e)}))};for(r.s();!(i=r.n()).done;)c()}catch(e){r.e(e)}finally{r.f()}}else{var s,l=p(e.querySelectorAll(".chkStandardFilter"));try{var o=function(){var e=s.value;e.addEventListener("change",(function(){return t.onStandardFilterChange(e)}))};for(l.s();!(s=l.n()).done;)o()}catch(e){l.e(e)}finally{l.f()}}var d,u=p(e.querySelectorAll(".chkVideoTypeFilter"));try{var h=function(){var e=d.value;e.addEventListener("change",(function(){return t.onVideoTypeFilterChange(e)}))};for(u.s();!(d=u.n()).done;)h()}catch(e){u.e(e)}finally{u.f()}var v=e.querySelector(".chk3DFilter");v.addEventListener("change",(function(){n.StartIndex=0,n.Is3D=!!v.checked||null,b(t)}));var f=e.querySelector(".chk4KFilter");f.addEventListener("change",(function(){n.StartIndex=0,n.Is4K=!!f.checked||null,b(t)}));var y=e.querySelector(".chkHDFilter"),m=e.querySelector(".chkSDFilter");y.addEventListener("change",(function(){n.StartIndex=0,y.checked?(m.checked=!1,n.IsHD=!0):n.IsHD=null,b(t)})),m.addEventListener("change",(function(){n.StartIndex=0,m.checked?(y.checked=!1,n.IsHD=!1):n.IsHD=null,b(t)}));var k,S=p(e.querySelectorAll(".chkStatus"));try{var g=function(){var e=k.value;e.addEventListener("change",(function(){return t.onStatusChange(e)}))};for(S.s();!(k=S.n()).done;)g()}catch(e){S.e(e)}finally{S.f()}var x=e.querySelector("#chkTrailer");x.addEventListener("change",(function(){n.StartIndex=0,n.HasTrailer=!!x.checked||null,b(t)}));var A=e.querySelector("#chkThemeSong");A.addEventListener("change",(function(){n.StartIndex=0,n.HasThemeSong=!!A.checked||null,b(t)}));var I=e.querySelector("#chkSpecialFeature");I.addEventListener("change",(function(){n.StartIndex=0,n.HasSpecialFeature=!!I.checked||null,b(t)}));var F=e.querySelector("#chkThemeVideo");F.addEventListener("change",(function(){n.StartIndex=0,n.HasThemeVideo=!!F.checked||null,b(t)}));var L=e.querySelector("#chkMissingEpisode");L.addEventListener("change",(function(){n.StartIndex=0,n.IsMissing=!!L.checked,b(t)}));var E=e.querySelector("#chkSpecialEpisode");E.addEventListener("change",(function(){n.StartIndex=0,n.ParentIndexNumber=E.checked?0:null,b(t)}));var q=e.querySelector("#chkFutureEpisode");q.addEventListener("change",(function(){n.StartIndex=0,q.checked?(n.IsUnaired=!0,n.IsVirtualUnaired=null):(n.IsUnaired=null,n.IsVirtualUnaired=!1),b(t)}));var T=e.querySelector("#chkSubtitle");T.addEventListener("change",(function(){n.StartIndex=0,n.HasSubtitles=!!T.checked||null,b(t)})),e.addEventListener("change",(function(e){var i=a.Ay.parentWithClass(e.target,"chkGenreFilter");if(i){var r=i.getAttribute("data-filter"),c=n.Genres||"";return c=c.split("|").filter((function(e){return e!==r})).join("|"),i.checked&&(c=c?c+"|"+r:r),n.StartIndex=0,n.Genres=c,void b(t)}var s=a.Ay.parentWithClass(e.target,"chkTagFilter");if(s){var l=s.getAttribute("data-filter"),o=n.Tags||"";return o=o.split("|").filter((function(e){return e!==l})).join("|"),s.checked&&(o=o?o+"|"+l:l),n.StartIndex=0,n.Tags=o,void b(t)}var d=a.Ay.parentWithClass(e.target,"chkYearFilter");if(d){var u=d.getAttribute("data-filter"),h=n.Years||"";return h=h.split(",").filter((function(e){return e!==u})).join(","),d.checked&&(h=h?h+","+u:u),n.StartIndex=0,n.Years=h,void b(t)}var p=a.Ay.parentWithClass(e.target,"chkOfficialRatingFilter");if(p){var v=p.getAttribute("data-filter"),f=n.OfficialRatings||"";f=f.split("|").filter((function(e){return e!==v})).join("|"),p.checked&&(f=f?f+"|"+v:v),n.StartIndex=0,n.OfficialRatings=f,b(t)}}))}},{key:"show",value:function(){var e=this;return new Promise((function(t){var n,a,s=i.default.createDialog({removeOnClose:!0,modal:!1});if(s.classList.add("ui-body-a"),s.classList.add("background-theme-a"),s.classList.add("formDialog"),s.classList.add("filterDialog"),s.innerHTML=r.Ay.translateHtml('<div style="margin:0;padding:1.5em 2em" class="filterDialogContent"> <div is="emby-collapse" title="${Filters}"> <div class="collapseContent"> <div class="checkboxList"> <label class="videoStandard"> <input type="checkbox" is="emby-checkbox" class="chkStandardFilter" data-filter="IsPlayed"/> <span>${Played}</span> </label> <label class="videoStandard"> <input type="checkbox" is="emby-checkbox" class="chkStandardFilter" data-filter="IsUnPlayed"/> <span>${Unplayed}</span> </label> <label class="videoStandard"> <input type="checkbox" is="emby-checkbox" class="chkStandardFilter" data-filter="IsResumable"/> <span>${OptionResumable}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkStandardFilter chkFavorite" data-filter="IsFavorite"/> <span>${Favorites}</span> </label> <label class="episodeFilter hide"> <input type="checkbox" is="emby-checkbox" id="chkSpecialEpisode"/> <span>${OptionSpecialEpisode}</span> </label> <label class="episodeFilter hide"> <input type="checkbox" is="emby-checkbox" id="chkMissingEpisode"/> <span>${OptionMissingEpisode}</span> </label> <label class="episodeFilter hide"> <input type="checkbox" is="emby-checkbox" id="chkFutureEpisode"/> <span>${OptionUnairedEpisode}</span> </label> </div> </div> </div> <div is="emby-collapse" title="${HeaderStatus}" class="seriesStatus hide"> <div class="collapseContent"> <div class="checkboxList"> <label> <input type="checkbox" is="emby-checkbox" class="chkStatus" data-filter="Continuing"/> <span>${Continuing}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkStatus" data-filter="Ended"/> <span>${Ended}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkStatus" data-filter="Unreleased"/> <span>${Unreleased}</span> </label> </div> </div> </div> <div is="emby-collapse" title="${Features}" class="features hide"> <div class="collapseContent"> <div class="checkboxList"> <label> <input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkSubtitle"/> <span>${Subtitles}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkTrailer"/> <span>${ButtonTrailer}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkSpecialFeature"/> <span>${SpecialFeatures}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkThemeSong"/> <span>${OptionHasThemeSong}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkThemeVideo"/> <span>${OptionHasThemeVideo}</span> </label> </div> </div> </div> <div is="emby-collapse" title="${Genres}" class="genreFilters hide"> <div class="collapseContent filterOptions"> </div> </div> <div is="emby-collapse" title="${HeaderParentalRatings}" class="officialRatingFilters hide"> <div class="collapseContent filterOptions"> </div> </div> <div is="emby-collapse" title="${Tags}" class="tagFilters hide"> <div class="collapseContent filterOptions"> </div> </div> <div is="emby-collapse" title="${HeaderVideoTypes}" class="videoTypeFilters hide"> <div class="collapseContent"> <div class="checkboxList"> <label> <input type="checkbox" is="emby-checkbox" class="chkVideoTypeFilter chkBluray" data-filter="Bluray"/> <span>${OptionBluray}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkVideoTypeFilter chkDvd" data-filter="Dvd"/> <span>${OptionDvd}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkHDFilter IsHD"/> <span>${OptionIsHD}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chk4KFilter Is4K"/> <span>4K</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkSDFilter IsHD"/> <span>${OptionIsSD}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chk3DFilter chk3D"/> <span>${Option3D}</span> </label> </div> </div> </div> <div is="emby-collapse" title="${HeaderYears}" class="yearFilters hide"> <div class="collapseContent filterOptions"> </div> </div> </div> '),n=s,"livetvchannels"!==(a=e.options).mode&&"albums"!==a.mode&&"artists"!==a.mode&&"albumartists"!==a.mode&&"songs"!==a.mode||function(e){var t,n=p(e.querySelectorAll(".".concat("videoStandard")));try{for(n.s();!(t=n.n()).done;)t.value.classList.add("hide")}catch(e){n.e(e)}finally{n.f()}}(n),m(a.mode)&&(n.querySelector(".genreFilters").classList.remove("hide"),n.querySelector(".officialRatingFilters").classList.remove("hide"),n.querySelector(".tagFilters").classList.remove("hide"),n.querySelector(".yearFilters").classList.remove("hide")),"movies"!==a.mode&&"episodes"!==a.mode||n.querySelector(".videoTypeFilters").classList.remove("hide"),"movies"!==a.mode&&"series"!==a.mode&&"episodes"!==a.mode||n.querySelector(".features").classList.remove("hide"),"series"===a.mode&&n.querySelector(".seriesStatus").classList.remove("hide"),"episodes"===a.mode&&function(e){var t,n=p(e.querySelectorAll(".".concat("episodeFilter")));try{for(n.s();!(t=n.n()).done;)t.value.classList.remove("hide")}catch(e){n.e(e)}finally{n.f()}}(n),i.default.open(s),s.addEventListener("close",t),function(e,t){var n=t.query;if("livetvchannels"===t.mode)e.querySelector(".chkFavorite").checked=!0===n.IsFavorite;else{var a,i=p(e.querySelectorAll(".chkStandardFilter"));try{for(i.s();!(a=i.n()).done;){var r=a.value,c=",".concat(n.Filters||""),s=r.getAttribute("data-filter");r.checked=c.includes(",".concat(s))}}catch(e){i.e(e)}finally{i.f()}}var l,o=p(e.querySelectorAll(".chkVideoTypeFilter"));try{for(o.s();!(l=o.n()).done;){var d=l.value,u=",".concat(n.VideoTypes||""),h=d.getAttribute("data-filter");d.checked=u.includes(",".concat(h))}}catch(e){o.e(e)}finally{o.f()}e.querySelector(".chk3DFilter").checked=!0===n.Is3D,e.querySelector(".chkHDFilter").checked=!0===n.IsHD,e.querySelector(".chk4KFilter").checked=!0===n.Is4K,e.querySelector(".chkSDFilter").checked=!1===n.IsHD,e.querySelector("#chkSubtitle").checked=!0===n.HasSubtitles,e.querySelector("#chkTrailer").checked=!0===n.HasTrailer,e.querySelector("#chkThemeSong").checked=!0===n.HasThemeSong,e.querySelector("#chkThemeVideo").checked=!0===n.HasThemeVideo,e.querySelector("#chkSpecialFeature").checked=!0===n.HasSpecialFeature,e.querySelector("#chkSpecialEpisode").checked=0===n.ParentIndexNumber,e.querySelector("#chkMissingEpisode").checked=!0===n.IsMissing,e.querySelector("#chkFutureEpisode").checked=!0===n.IsUnaired;var v,f=p(e.querySelectorAll(".chkStatus"));try{for(f.s();!(v=f.n()).done;){var y=v.value,b=",".concat(n.SeriesStatus||""),m=y.getAttribute("data-filter");y.checked=b.includes(",".concat(m))}}catch(e){f.e(e)}finally{f.f()}}(s,e.options),e.bindEvents(s),m(e.options.mode)){s.classList.add("dynamicFilterDialog");var l=c.tF.getApiClient(e.options.serverId);!function(e,t,n,a){t.getJSON(t.getUrl("Items/Filters",{UserId:n,ParentId:a.ParentId,IncludeItemTypes:a.IncludeItemTypes})).then((function(t){!function(e,t,n){y(e,".genreFilters","chkGenreFilter",f(t.Genres,n.Genres,"|"),(function(e){var t="|";return(t+(n.Genres||"")+t).includes(t+e+t)})),y(e,".officialRatingFilters","chkOfficialRatingFilter",f(t.OfficialRatings,n.OfficialRatings,"|"),(function(e){var t="|";return(t+(n.OfficialRatings||"")+t).includes(t+e+t)})),y(e,".tagFilters","chkTagFilter",f(t.Tags,n.Tags,"|"),(function(e){var t="|";return(t+(n.Tags||"")+t).includes(t+e+t)})),y(e,".yearFilters","chkYearFilter",f(t.Years.map(String),n.Years,","),(function(e){var t=",";return(t+(n.Years||"")+t).includes(t+e+t)}))}(e,t,a)}))}(s,l,l.getCurrentUserId(),e.options.query)}}))}}],t&&u(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},81077:function(e,t,n){n(69177),n(10353);var a=Object.create(HTMLDivElement.prototype);function i(){var e=this,t=e.parentNode.querySelector(".collapseContent");t.expanded?(t.expanded=!1,function(e,t){requestAnimationFrame((function(){t.style.height=t.offsetHeight+"px",t.offsetHeight,t.classList.remove("expanded"),t.style.height="0",setTimeout((function(){t.classList.contains("expanded")?t.classList.remove("hide"):t.classList.add("hide")}),300),e.querySelector(".material-icons").classList.remove("emby-collapse-expandIconExpanded")}))}(e,t)):(t.expanded=!0,function(e,t){requestAnimationFrame((function(){t.classList.remove("hide"),t.classList.add("expanded"),t.style.height="auto";var n=t.offsetHeight+"px";t.style.height="0",t.offsetHeight,t.style.height=n,setTimeout((function(){t.classList.contains("expanded")?t.classList.remove("hide"):t.classList.add("hide"),t.style.height="auto"}),300),e.querySelector(".material-icons").classList.add("emby-collapse-expandIconExpanded")}))}(e,t))}a.attachedCallback=function(){if(!this.classList.contains("emby-collapse")){this.classList.add("emby-collapse");var e=this.querySelector(".collapseContent");e&&e.classList.add("hide");var t=this.getAttribute("title"),n='<button is="emby-button" type="button" on-click="toggleExpand" id="expandButton" class="emby-collapsible-button iconRight"><h3 class="emby-collapsible-title" title="'+t+'">'+t+'</h3><span class="material-icons emby-collapse-expandIcon expand_more" aria-hidden="true"></span></button>';this.insertAdjacentHTML("afterbegin",n);var a=this.querySelector(".emby-collapsible-button");a.addEventListener("click",i),"true"===this.getAttribute("data-expanded")&&i.call(a)}},document.registerElement("emby-collapse",{prototype:a,extends:"div"})}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6496],{22776:function(e,r,n){function t(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=Array(r);n<r;n++)t[n]=e[n];return t}function a(e,r){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,r){if(e){if("string"==typeof e)return t(e,r);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e))||r&&e&&"number"==typeof e.length){n&&(e=n);var a=0,o=function(){};return{s:o,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:o}}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 i,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw i}}}}n.d(r,{A:function(){return a}})},40694:function(e,r,n){function t(e){return t="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(e)}n.d(r,{A:function(){return t}})},41705:function(e,r,n){n.d(r,{A:function(){return a}});var t=n(92162);function a(e,r,n){return(r=(0,t.A)(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}},41906:function(e,r,n){n.d(r,{Y:function(){return d}});var t=n(62864),a=n(63696),o=n(5898),i=n(93721),s=n(28626),l=function(e,r,n,t){return new(n||(n=Promise))((function(a,o){function i(e){try{l(t.next(e))}catch(e){o(e)}}function s(e){try{l(t.throw(e))}catch(e){o(e)}}function l(e){var r;e.done?a(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(i,s)}l((t=t.apply(e,r||[])).next())}))},c=function(e,r){var n,t,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(o=0)),o;)try{if(n=1,t&&(a=2&s[0]?t.return:s[0]?t.throw||((a=t.return)&&a.call(t),0):t.next)&&!(a=a.call(t,s[1])).done)return a;switch(t=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,t=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){o.label=s[1];break}if(6===s[0]&&o.label<a[1]){o.label=a[1],a=s;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(s);break}a[2]&&o.ops.pop(),o.trys.pop();continue}s=r.call(e,o)}catch(e){s=[6,e],t=0}finally{n=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},u=function(e,r){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var t,a,o=n.call(e),i=[];try{for(;(void 0===r||r-- >0)&&!(t=o.next()).done;)i.push(t.value)}catch(e){a={error:e}}finally{try{t&&!t.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i};function d(){var e=this,r=(0,s.Q)(),n=r.dateTimeLocale,d=r.language,f=u((0,a.useState)(t.A),2),h=f[0],p=f[1],y=(0,a.useMemo)((function(){return(0,o.Tl)(d||(0,o.i5)())}),[d]),b=(0,a.useMemo)((function(){return n?(0,o.Tl)(n):y}),[n,y]);return(0,a.useEffect)((function(){l(e,void 0,void 0,(function(){var e,r;return c(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,(0,i.Fq)((0,i.QC)(b))];case 1:return e=n.sent(),p(e),[3,3];case 2:return r=n.sent(),console.warn("[useLocale] failed to fetch dateFns locale",r),[3,3];case 3:return[2]}}))}))}),[b]),{locale:y,dateTimeLocale:b,dateFnsLocale:h}}},42305:function(e,r,n){n.d(r,{L:function(){return l}});var t=n(8280),a=n(80401),o=n(48272),i=n(69410),s=function(e){return(0,t.j)({queryKey:["SystemInfo"],queryFn:function(r){var n=r.signal;return function(e,r){return n=void 0,t=void 0,i=function(){return function(e,r){var n,t,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(o=0)),o;)try{if(n=1,t&&(a=2&s[0]?t.return:s[0]?t.throw||((a=t.return)&&a.call(t),0):t.next)&&!(a=a.call(t,s[1])).done)return a;switch(t=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,t=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){o.label=s[1];break}if(6===s[0]&&o.label<a[1]){o.label=a[1],a=s;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(s);break}a[2]&&o.ops.pop(),o.trys.pop();continue}s=r.call(e,o)}catch(e){s=[6,e],t=0}finally{n=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(n){switch(n.label){case 0:return[4,(0,o.c)(e).getSystemInfo(r)];case 1:return[2,n.sent().data]}}))},new((a=void 0)||(a=Promise))((function(e,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(r){var n;r.done?e(r.value):(n=r.value,n instanceof a?n:new a((function(e){e(n)}))).then(o,s)}l((i=i.apply(n,t||[])).next())}));var n,t,a,i}(e,{signal:n,headers:{"Cache-Control":"no-cache"}})},staleTime:1e3,enabled:!!e})},l=function(){var e=(0,i.gf)().api;return(0,a.I)(s(e))}},42458:function(e,r,n){var t=n(62540),a=n(92779),o=n(44790),i=n(60434),s=(n(63696),n(42305)),l=n(95858),c=n(90830);r.A=function(){var e=(0,s.L)().data;return(0,t.jsxs)(l.A,{to:"/",children:[(0,t.jsx)(o.A,{sx:{minWidth:56},children:(0,t.jsx)(a.A,{component:"img",src:c,sx:{height:"2.5rem"}})}),(0,t.jsx)(i.A,{primary:(null==e?void 0:e.ServerName)||"Jellyfin",secondary:null==e?void 0:e.Version,slotProps:{primary:{variant:"h6"}}})]})}},48183:function(e,r,n){n.d(r,{A:function(){return o}});var t=n(92162);function a(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,(0,t.A)(a.key),a)}}function o(e,r,n){return r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},50171:function(e,r,n){n.d(r,{A:function(){return a}});var t=n(91576);function a(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&(0,t.A)(e,r)}},64174:function(e,r,n){n.d(r,{d:function(){return c}});var t=n(62540),a=n(92779),o=n(19983),i=n(54710),s=n(25295),l=(n(63696),n(34789)),c=240;r.A=function(e){var r=e.children,n=e.open,u=void 0!==n&&n,d=e.onClose,f=e.onOpen;return(0,s.A)((function(e){return e.breakpoints.up("md")}))?(0,t.jsx)(o.Ay,{sx:{width:c,flexShrink:0,"& .MuiDrawer-paper":{width:c,paddingBottom:"4.2rem",boxSizing:"border-box"}},variant:"permanent",anchor:"left",children:r}):(0,t.jsx)(i.A,{anchor:"left",open:u,onClose:d,onOpen:f,disableDiscovery:l.A.iOS,ModalProps:{keepMounted:!0},children:(0,t.jsx)(a.A,{role:"presentation",onClick:d,onKeyDown:d,children:r})})}},69799:function(e,r,n){function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(a=function(){return!!e})()}n.d(r,{A:function(){return s}});var o=n(40694),i=n(72367);function s(e){var r=a();return function(){var n,a=t(e);if(r){var s=t(this).constructor;n=Reflect.construct(a,arguments,s)}else n=a.apply(this,arguments);return function(e,r){if(r&&("object"==(0,o.A)(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.A)(e)}(this,n)}}},75785:function(e,r,n){var t=n(21122),a=n(63696);r.A=function(e){var r=e.children,n=e.elevate,o=void 0!==n&&n,i=(0,t.A)({disableHysteresis:!0,threshold:0}),s=o||i;return a.cloneElement(r,{color:s?"default":"transparent",elevation:s?4:0})}},83565:function(e,r,n){var t;n.d(r,{k:function(){return t}}),function(e){e.ConfigurationPages="ConfigurationPages",e.Packages="Packages",e.Plugins="Plugins",e.Repositories="Repositories"}(t||(t={}))},85069:function(e,r,n){n.d(r,{q:function(){return c}});var t=n(55990),a=n(8280),o=n(80401),i=n(69410),s=n(83565),l=function(e,r){return(0,a.j)({queryKey:[s.k.ConfigurationPages,null==r?void 0:r.enableInMainMenu],queryFn:function(n){var a=n.signal;return function(e,r,n){return a=void 0,o=void 0,s=function(){return function(e,r){var n,t,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(o=0)),o;)try{if(n=1,t&&(a=2&s[0]?t.return:s[0]?t.throw||((a=t.return)&&a.call(t),0):t.next)&&!(a=a.call(t,s[1])).done)return a;switch(t=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,t=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){o.label=s[1];break}if(6===s[0]&&o.label<a[1]){o.label=a[1],a=s;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(s);break}a[2]&&o.ops.pop(),o.trys.pop();continue}s=r.call(e,o)}catch(e){s=[6,e],t=0}finally{n=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(a){switch(a.label){case 0:return[4,(0,t.T)(e).getConfigurationPages(r,n)];case 1:return[2,a.sent().data]}}))},new((i=void 0)||(i=Promise))((function(e,r){function n(e){try{l(s.next(e))}catch(e){r(e)}}function t(e){try{l(s.throw(e))}catch(e){r(e)}}function l(r){var a;r.done?e(r.value):(a=r.value,a instanceof i?a:new i((function(e){e(a)}))).then(n,t)}l((s=s.apply(a,o||[])).next())}));var a,o,i,s}(e,r,{signal:a})},enabled:!!e})},c=function(e){var r=(0,i.gf)().api;return(0,o.I)(l(r,e))}},86336:function(e,r,n){n.r(r),n.d(r,{Component:function(){return me}});var t=n(62540),a=n(93663),o=n(92779),i=n(25295),s=n(92218),l=n(71991),c=n(63696),u=n(87404),d=n(13258),f=n(87119),h=n(87214),p=n(75785),y=n(64174),b=n(70267),A=n(15815),x=n(69410),v=n(41906),j=n(4994),g=n(26445),m=n(23125),w=n(98526),P=n(9055),k=n(71286),S=n(44797),O=function(e,r){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var t,a,o=n.call(e),i=[];try{for(;(void 0===r||r-- >0)&&!(t=o.next()).done;)i.push(t.value)}catch(e){a={error:e}}finally{try{t&&!t.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},T=(0,m.A)((function(){return window.dispatchEvent(new Event("resize"))}),100),C=function(e){var r=e.isDrawerOpen,n=(0,c.useRef)(document),a=O((0,c.useState)(0),2),o=a[0],s=a[1],l=O((0,c.useState)(),2),u=l[0],d=l[1],f=(0,i.A)((function(e){return e.breakpoints.up("sm")})),h=(0,c.useCallback)((function(e,r,n,t){void 0===n&&(n=0),s(n),(0,w.A)(u,t)||d(t)}),[u]);return(0,c.useEffect)((function(){var e=n.current;return e&&S.A.on(e,k.B.SET_TABS,h),function(){e&&S.A.off(e,k.B.SET_TABS,h)}}),[h]),(0,c.useEffect)((function(){T()}),[r]),(null==u?void 0:u.length)?(0,t.jsx)(g.A,{value:o,sx:{width:"100%",flexShrink:{xs:0,lg:"unset"},order:{xs:100,lg:"unset"}},variant:f?"standard":"scrollable",centered:f,children:u.map((function(e,r){var n=e.href,a=e.name;return(0,t.jsx)(j.A,{label:a,"data-tab-index":"".concat(r),component:P.N_,to:n},"tab-".concat(a))}))}):null},D=n(35117),E=n(28335),I=n(42458),L=n(23849),B=n(960),H=n(91480),M=n(17071),_=n(80434),N=n(63774),R=n(32051),q=n(94568),z=n(11041),F=n(79772),G=n(44790),U=n(60434),V=n(80099),K=n(95858),W=n(5898),J=function(e,r){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var t,a,o=n.call(e),i=[];try{for(;(void 0===r||r-- >0)&&!(t=o.next()).done;)i.push(t.value)}catch(e){a={error:e}}finally{try{t&&!t.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Q=["/dashboard/libraries","/dashboard/libraries/display","/dashboard/libraries/metadata","/dashboard/libraries/nfo"],Y=["/dashboard/playback/transcoding","/dashboard/playback/resume","/dashboard/playback/streaming","/dashboard/playback/trickplay"],$=function(){var e=(0,u.zy)(),r=J((0,c.useState)(Q.includes(e.pathname)),2),n=r[0],a=r[1],o=J((0,c.useState)(Y.includes(e.pathname)),2),i=o[0],s=o[1],l=(0,c.useCallback)((function(e){e.preventDefault(),e.stopPropagation(),a((function(e){return!e}))}),[]),d=(0,c.useCallback)((function(e){e.preventDefault(),e.stopPropagation(),s((function(e){return!e}))}),[]);return(0,t.jsxs)(E.A,{"aria-labelledby":"server-subheader",subheader:(0,t.jsx)(V.A,{component:"div",id:"server-subheader",children:W.Ay.translate("TabServer")}),children:[(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(L.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("TabDashboard")})]})}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/settings",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(q.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("General")})]})}),(0,t.jsxs)(K.A,{to:"/dashboard/branding",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(_.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("HeaderBranding")})]}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/users",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(N.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("HeaderUsers")})]})}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(F.A,{onClick:l,children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(M.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("HeaderLibraries")}),n?(0,t.jsx)(B.A,{}):(0,t.jsx)(H.A,{})]})}),(0,t.jsx)(z.A,{in:n,timeout:"auto",unmountOnExit:!0,children:(0,t.jsxs)(E.A,{component:"div",disablePadding:!0,children:[(0,t.jsx)(K.A,{to:"/dashboard/libraries",sx:{pl:4},children:(0,t.jsx)(U.A,{inset:!0,primary:W.Ay.translate("HeaderLibraries")})}),(0,t.jsx)(K.A,{to:"/dashboard/libraries/display",sx:{pl:4},children:(0,t.jsx)(U.A,{inset:!0,primary:W.Ay.translate("Display")})}),(0,t.jsx)(K.A,{to:"/dashboard/libraries/metadata",sx:{pl:4},children:(0,t.jsx)(U.A,{inset:!0,primary:W.Ay.translate("LabelMetadata")})}),(0,t.jsx)(K.A,{to:"/dashboard/libraries/nfo",sx:{pl:4},children:(0,t.jsx)(U.A,{inset:!0,primary:W.Ay.translate("TabNfoSettings")})})]})}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(F.A,{onClick:d,children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(R.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("TitlePlayback")}),i?(0,t.jsx)(B.A,{}):(0,t.jsx)(H.A,{})]})}),(0,t.jsx)(z.A,{in:i,timeout:"auto",unmountOnExit:!0,children:(0,t.jsxs)(E.A,{component:"div",disablePadding:!0,children:[(0,t.jsx)(K.A,{to:"/dashboard/playback/transcoding",sx:{pl:4},children:(0,t.jsx)(U.A,{inset:!0,primary:W.Ay.translate("Transcoding")})}),(0,t.jsx)(K.A,{to:"/dashboard/playback/resume",sx:{pl:4},children:(0,t.jsx)(U.A,{inset:!0,primary:W.Ay.translate("ButtonResume")})}),(0,t.jsx)(K.A,{to:"/dashboard/playback/streaming",sx:{pl:4},children:(0,t.jsx)(U.A,{inset:!0,primary:W.Ay.translate("TabStreaming")})}),(0,t.jsx)(K.A,{to:"/dashboard/playback/trickplay",sx:{pl:4},children:(0,t.jsx)(U.A,{inset:!0,primary:W.Ay.translate("Trickplay")})})]})})]})},X=n(95041),Z=n(34266),ee=function(){return(0,t.jsxs)(E.A,{"aria-labelledby":"devices-subheader",subheader:(0,t.jsx)(V.A,{component:"div",id:"devices-subheader",children:W.Ay.translate("HeaderDevices")}),children:[(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/devices",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(Z.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("HeaderDevices")})]})}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/activity",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(X.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("HeaderActivity")})]})})]})},re=n(56465),ne=n(84917),te=function(){return(0,t.jsxs)(E.A,{"aria-labelledby":"livetv-subheader",subheader:(0,t.jsx)(V.A,{component:"div",id:"livetv-subheader",children:W.Ay.translate("LiveTV")}),children:[(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/livetv",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(ne.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("LiveTV")})]})}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/livetv/recordings",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(re.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("HeaderDVR")})]})})]})},ae=n(18203),oe=n(74655),ie=n(48066),se=n(88776),le=n(68922),ce=function(){return(0,t.jsxs)(E.A,{"aria-labelledby":"advanced-subheader",subheader:(0,t.jsx)(V.A,{component:"div",id:"advanced-subheader",children:W.Ay.translate("TabAdvanced")}),children:[(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/networking",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(ie.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("TabNetworking")})]})}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/keys",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(le.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("HeaderApiKeys")})]})}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/backups",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(oe.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("HeaderBackups")})]})}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/logs",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(ae.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("TabLogs")})]})}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/tasks",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(se.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("TabScheduledTasks")})]})})]})},ue=n(65612),de=n(82225),fe=n(89100),he=n(85069),pe=function(){var e=(0,he.q)({enableInMainMenu:!0}),r=e.data,n=e.error;return(0,c.useEffect)((function(){n&&console.error("[PluginDrawerSection] unable to fetch plugin config pages",n)}),[n]),(0,t.jsxs)(E.A,{"aria-labelledby":"plugins-subheader",subheader:(0,t.jsx)(V.A,{component:"div",id:"plugins-subheader",children:W.Ay.translate("TabPlugins")}),children:[(0,t.jsxs)(K.A,{to:"/dashboard/plugins",includePaths:["/configurationpage","/dashboard/plugins/repositories"],excludePaths:null==r?void 0:r.map((function(e){return"/".concat(fe.default.getPluginUrl(e.Name))})),children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(ue.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("TabPlugins")})]}),null==r?void 0:r.map((function(e){return(0,t.jsxs)(K.A,{to:"/".concat(fe.default.getPluginUrl(e.Name)),children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(de.A,{})}),(0,t.jsx)(U.A,{primary:e.DisplayName})]},e.PluginId)}))]})},ye=function(e){var r=e.open,n=void 0!==r&&r,a=e.onClose,o=e.onOpen;return(0,t.jsxs)(y.A,{open:n,onClose:a,onOpen:o,children:[(0,t.jsx)(E.A,{disablePadding:!0,children:(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsx)(I.A,{})})}),(0,t.jsx)($,{}),(0,t.jsx)(ee,{}),(0,t.jsx)(te,{}),(0,t.jsx)(pe,{}),(0,t.jsx)(ce,{})]})},be=n(37714),Ae=n(75487),xe=n(72073),ve=[{paths:["/dashboard/devices"],url:"https://jellyfin.org/docs/general/server/devices"},{paths:["/dashboard/libraries"],url:"https://jellyfin.org/docs/general/server/libraries"},{paths:["/dashboard/livetv","/dashboard/livetv/tuner","/dashboard/recordings"],url:"https://jellyfin.org/docs/general/server/live-tv/"},{paths:["/dashboard/livetv/guide"],url:"https://jellyfin.org/docs/general/server/live-tv/setup-guide#adding-guide-data"},{paths:["/dashboard/networking"],url:"https://jellyfin.org/docs/general/networking/"},{paths:["/dashboard/playback/transcoding"],url:"https://jellyfin.org/docs/general/server/transcoding"},{paths:["/dashboard/plugins"],url:"https://jellyfin.org/docs/general/server/plugins/"},{paths:["/dashboard/plugins/repositories"],url:"https://jellyfin.org/docs/general/server/plugins/#repositories"},{paths:["/dashboard/branding","/dashboard/settings"],url:"https://jellyfin.org/docs/general/server/settings"},{paths:["/dashboard/tasks"],url:"https://jellyfin.org/docs/general/server/tasks"},{paths:["/dashboard/users"],url:"https://jellyfin.org/docs/general/server/users/adding-managing-users"},{paths:["/dashboard/users/access","/dashboard/users/parentalcontrol","/dashboard/users/password","/dashboard/users/profile"],url:"https://jellyfin.org/docs/general/server/users/"}],je=function(){return(0,t.jsx)(u.BV,{children:ve.map((function(e){var r=e.paths,n=e.url;return r.map((function(e){return(0,t.jsx)(u.qh,{path:e,element:(0,t.jsx)(xe.A,{title:W.Ay.translate("Help"),children:(0,t.jsx)(Ae.A,{href:n,rel:"noopener noreferrer",target:"_blank",size:"large",color:"inherit",children:(0,t.jsx)(be.A,{})})})},[n,e].join("-"))}))})).flat()})},ge=n(7603),me=function(){var e=function(e,r){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var t,a,o=n.call(e),i=[];try{for(;(void 0===r||r-- >0)&&!(t=o.next()).done;)i.push(t.value)}catch(e){a={error:e}}finally{try{t&&!t.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,c.useState)(!1),2),r=e[0],n=e[1],j=(0,u.zy)(),g=(0,x.gf)().user,m=(0,v.Y)().dateFnsLocale,w=(0,i.A)((function(e){return e.breakpoints.up("md")})),P=j.pathname.startsWith("/".concat(ge.DASHBOARD_APP_PATHS.MetadataManager)),k=Boolean(g)&&!P,S=r&&k,O=(0,c.useCallback)((function(){n(!r)}),[r,n]);return(0,c.useEffect)((function(){return document.body.classList.add("dashboardDocument"),function(){document.body.classList.remove("dashboardDocument")}}),[]),(0,t.jsxs)(s.$,{dateAdapter:l.h,adapterLocale:m,children:[(0,t.jsxs)(o.A,{sx:{display:"flex"},children:[(0,t.jsxs)(c.StrictMode,{children:[(0,t.jsx)(p.A,{elevate:!1,children:(0,t.jsx)(a.A,{position:"fixed",sx:{width:{xs:"100%",md:k?"calc(100% - ".concat(y.d,"px)"):"100%"},ml:{xs:0,md:k?y.d:0}},children:(0,t.jsxs)(f.A,{isBackButtonAvailable:b.appRouter.canGoBack(),isDrawerAvailable:!w&&k,isDrawerOpen:S,onDrawerButtonClick:O,buttons:(0,t.jsx)(je,{}),children:[P&&(0,t.jsx)(h.A,{}),(0,t.jsx)(C,{isDrawerOpen:S})]})})}),k&&(0,t.jsx)(ye,{open:S,onClose:O,onOpen:O})]}),(0,t.jsx)(o.A,{component:"main",sx:{width:"100%",flexGrow:1},children:(0,t.jsx)(d.A,{children:(0,t.jsx)(u.sv,{})})})]}),(0,t.jsx)(A.A,{dashboard:!0})]})}},87214:function(e,r,n){var t=n(62540),a=n(90830),o=n(63703),i=(n(63696),n(9055)),s=n(42305);r.A=function(){var e=(0,s.L)(),r=e.data,n=e.isPending;return(0,t.jsx)(o.A,{variant:"text",size:"large",color:"inherit",startIcon:(0,t.jsx)("img",{src:a,alt:"","aria-hidden":!0,style:{maxHeight:"1.25em",maxWidth:"1.25em"}}),component:i.N_,to:"/",children:n?"":(null==r?void 0:r.ServerName)||"Jellyfin"})}},90830:function(e,r,n){e.exports=n.p+"icon-transparent.baba78f2a106d9baee83.png"},92099:function(e,r,n){function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}n.d(r,{A:function(){return t}})},92162:function(e,r,n){n.d(r,{A:function(){return a}});var t=n(40694);function a(e){var r=function(e){if("object"!=(0,t.A)(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=(0,t.A)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,t.A)(r)?r:r+""}},95858:function(e,r,n){var t=n(62540),a=n(79772),o=(n(63696),n(87404)),i=n(9055),s=function(){return s=Object.assign||function(e){for(var r,n=1,t=arguments.length;n<t;n++)for(var a in r=arguments[n])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},s.apply(this,arguments)},l=function(e,r){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var t,a,o=n.call(e),i=[];try{for(;(void 0===r||r-- >0)&&!(t=o.next()).done;)i.push(t.value)}catch(e){a={error:e}}finally{try{t&&!t.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i};r.A=function(e){var r=e.children,n=e.to,c=e.includePaths,u=void 0===c?[]:c,d=e.excludePaths,f=void 0===d?[]:d,h=function(e,r){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(t=Object.getOwnPropertySymbols(e);a<t.length;a++)r.indexOf(t[a])<0&&Object.prototype.propertyIsEnumerable.call(e,t[a])&&(n[t[a]]=e[t[a]])}return n}(e,["children","to","includePaths","excludePaths"]),p=(0,o.zy)(),y=l((0,i.ok)(),1)[0],b=l(n.split("?"),2),A=b[0],x=b[1],v=new URLSearchParams("?".concat(x)),j=function(e,r,n){if(n||2===arguments.length)for(var t,a=0,o=r.length;a<o;a++)!t&&a in r||(t||(t=Array.prototype.slice.call(r,0,a)),t[a]=r[a]);return e.concat(t||Array.prototype.slice.call(r))}([A],l(u),!1).includes(p.pathname)&&!f.includes(p.pathname+p.search)&&(!x||function(e,r){var n,t;try{for(var a=function(e){var r="function"==typeof Symbol&&Symbol.iterator,n=r&&e[r],t=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),o=a.next();!o.done;o=a.next()){var i=o.value;if(r.get(i[0])!==i[1])return!1}}catch(e){n={error:e}}finally{try{o&&!o.done&&(t=a.return)&&t.call(a)}finally{if(n)throw n.error}}return!0}(v,y));return(0,t.jsx)(a.A,s({component:i.N_,to:n,selected:j},h,{children:r}))}}}]);
1
+ "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6496],{22776:function(e,r,n){function t(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=Array(r);n<r;n++)t[n]=e[n];return t}function a(e,r){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,r){if(e){if("string"==typeof e)return t(e,r);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e))||r&&e&&"number"==typeof e.length){n&&(e=n);var a=0,o=function(){};return{s:o,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:o}}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 i,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw i}}}}n.d(r,{A:function(){return a}})},40694:function(e,r,n){function t(e){return t="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(e)}n.d(r,{A:function(){return t}})},41705:function(e,r,n){n.d(r,{A:function(){return a}});var t=n(92162);function a(e,r,n){return(r=(0,t.A)(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}},41906:function(e,r,n){n.d(r,{Y:function(){return d}});var t=n(62864),a=n(63696),o=n(5898),i=n(93721),s=n(28626),l=function(e,r,n,t){return new(n||(n=Promise))((function(a,o){function i(e){try{l(t.next(e))}catch(e){o(e)}}function s(e){try{l(t.throw(e))}catch(e){o(e)}}function l(e){var r;e.done?a(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(i,s)}l((t=t.apply(e,r||[])).next())}))},c=function(e,r){var n,t,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(o=0)),o;)try{if(n=1,t&&(a=2&s[0]?t.return:s[0]?t.throw||((a=t.return)&&a.call(t),0):t.next)&&!(a=a.call(t,s[1])).done)return a;switch(t=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,t=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){o.label=s[1];break}if(6===s[0]&&o.label<a[1]){o.label=a[1],a=s;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(s);break}a[2]&&o.ops.pop(),o.trys.pop();continue}s=r.call(e,o)}catch(e){s=[6,e],t=0}finally{n=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},u=function(e,r){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var t,a,o=n.call(e),i=[];try{for(;(void 0===r||r-- >0)&&!(t=o.next()).done;)i.push(t.value)}catch(e){a={error:e}}finally{try{t&&!t.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i};function d(){var e=this,r=(0,s.Q)(),n=r.dateTimeLocale,d=r.language,f=u((0,a.useState)(t.A),2),h=f[0],p=f[1],y=(0,a.useMemo)((function(){return(0,o.Tl)(d||(0,o.i5)())}),[d]),b=(0,a.useMemo)((function(){return n?(0,o.Tl)(n):y}),[n,y]);return(0,a.useEffect)((function(){l(e,void 0,void 0,(function(){var e,r;return c(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,(0,i.Fq)((0,i.QC)(b))];case 1:return e=n.sent(),p(e),[3,3];case 2:return r=n.sent(),console.warn("[useLocale] failed to fetch dateFns locale",r),[3,3];case 3:return[2]}}))}))}),[b]),{locale:y,dateTimeLocale:b,dateFnsLocale:h}}},42305:function(e,r,n){n.d(r,{L:function(){return l}});var t=n(8280),a=n(80401),o=n(48272),i=n(69410),s=function(e){return(0,t.j)({queryKey:["SystemInfo"],queryFn:function(r){var n=r.signal;return function(e,r){return n=void 0,t=void 0,i=function(){return function(e,r){var n,t,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(o=0)),o;)try{if(n=1,t&&(a=2&s[0]?t.return:s[0]?t.throw||((a=t.return)&&a.call(t),0):t.next)&&!(a=a.call(t,s[1])).done)return a;switch(t=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,t=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){o.label=s[1];break}if(6===s[0]&&o.label<a[1]){o.label=a[1],a=s;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(s);break}a[2]&&o.ops.pop(),o.trys.pop();continue}s=r.call(e,o)}catch(e){s=[6,e],t=0}finally{n=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(n){switch(n.label){case 0:return[4,(0,o.c)(e).getSystemInfo(r)];case 1:return[2,n.sent().data]}}))},new((a=void 0)||(a=Promise))((function(e,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(r){var n;r.done?e(r.value):(n=r.value,n instanceof a?n:new a((function(e){e(n)}))).then(o,s)}l((i=i.apply(n,t||[])).next())}));var n,t,a,i}(e,{signal:n,headers:{"Cache-Control":"no-cache"}})},staleTime:1e3,enabled:!!e})},l=function(){var e=(0,i.gf)().api;return(0,a.I)(s(e))}},42458:function(e,r,n){var t=n(62540),a=n(92779),o=n(44790),i=n(60434),s=(n(63696),n(42305)),l=n(95858),c=n(90830);r.A=function(){var e=(0,s.L)().data;return(0,t.jsxs)(l.A,{to:"/",children:[(0,t.jsx)(o.A,{sx:{minWidth:56},children:(0,t.jsx)(a.A,{component:"img",src:c,sx:{height:"2.5rem"}})}),(0,t.jsx)(i.A,{primary:(null==e?void 0:e.ServerName)||"Jellyfin",secondary:null==e?void 0:e.Version,slotProps:{primary:{variant:"h6"}}})]})}},48183:function(e,r,n){n.d(r,{A:function(){return o}});var t=n(92162);function a(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,(0,t.A)(a.key),a)}}function o(e,r,n){return r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},50171:function(e,r,n){n.d(r,{A:function(){return a}});var t=n(91576);function a(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&(0,t.A)(e,r)}},64174:function(e,r,n){n.d(r,{d:function(){return c}});var t=n(62540),a=n(92779),o=n(19983),i=n(54710),s=n(25295),l=(n(63696),n(34789)),c=240;r.A=function(e){var r=e.children,n=e.open,u=void 0!==n&&n,d=e.onClose,f=e.onOpen;return(0,s.A)((function(e){return e.breakpoints.up("md")}))?(0,t.jsx)(o.Ay,{sx:{width:c,flexShrink:0,"& .MuiDrawer-paper":{width:c,paddingBottom:"4.2rem",boxSizing:"border-box"}},variant:"permanent",anchor:"left",children:r}):(0,t.jsx)(i.A,{anchor:"left",open:u,onClose:d,onOpen:f,disableDiscovery:l.A.iOS,ModalProps:{keepMounted:!0},children:(0,t.jsx)(a.A,{role:"presentation",onClick:d,onKeyDown:d,children:r})})}},69799:function(e,r,n){function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(a=function(){return!!e})()}n.d(r,{A:function(){return s}});var o=n(40694),i=n(72367);function s(e){var r=a();return function(){var n,a=t(e);if(r){var s=t(this).constructor;n=Reflect.construct(a,arguments,s)}else n=a.apply(this,arguments);return function(e,r){if(r&&("object"==(0,o.A)(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.A)(e)}(this,n)}}},75785:function(e,r,n){var t=n(21122),a=n(63696);r.A=function(e){var r=e.children,n=e.elevate,o=void 0!==n&&n,i=(0,t.A)({disableHysteresis:!0,threshold:0}),s=o||i;return a.cloneElement(r,{color:s?"default":"transparent",elevation:s?4:0})}},83565:function(e,r,n){var t;n.d(r,{k:function(){return t}}),function(e){e.ConfigurationPages="ConfigurationPages",e.Packages="Packages",e.Plugins="Plugins",e.Repositories="Repositories"}(t||(t={}))},85069:function(e,r,n){n.d(r,{q:function(){return c}});var t=n(55990),a=n(8280),o=n(80401),i=n(69410),s=n(83565),l=function(e,r){return(0,a.j)({queryKey:[s.k.ConfigurationPages,null==r?void 0:r.enableInMainMenu],queryFn:function(n){var a=n.signal;return function(e,r,n){return a=void 0,o=void 0,s=function(){return function(e,r){var n,t,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(o=0)),o;)try{if(n=1,t&&(a=2&s[0]?t.return:s[0]?t.throw||((a=t.return)&&a.call(t),0):t.next)&&!(a=a.call(t,s[1])).done)return a;switch(t=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,t=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){o.label=s[1];break}if(6===s[0]&&o.label<a[1]){o.label=a[1],a=s;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(s);break}a[2]&&o.ops.pop(),o.trys.pop();continue}s=r.call(e,o)}catch(e){s=[6,e],t=0}finally{n=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(a){switch(a.label){case 0:return[4,(0,t.T)(e).getConfigurationPages(r,n)];case 1:return[2,a.sent().data]}}))},new((i=void 0)||(i=Promise))((function(e,r){function n(e){try{l(s.next(e))}catch(e){r(e)}}function t(e){try{l(s.throw(e))}catch(e){r(e)}}function l(r){var a;r.done?e(r.value):(a=r.value,a instanceof i?a:new i((function(e){e(a)}))).then(n,t)}l((s=s.apply(a,o||[])).next())}));var a,o,i,s}(e,r,{signal:a})},enabled:!!e})},c=function(e){var r=(0,i.gf)().api;return(0,o.I)(l(r,e))}},86336:function(e,r,n){n.r(r),n.d(r,{Component:function(){return me}});var t=n(62540),a=n(93663),o=n(92779),i=n(25295),s=n(92218),l=n(71991),c=n(63696),u=n(87404),d=n(13258),f=n(87119),h=n(87214),p=n(75785),y=n(64174),b=n(70267),A=n(15815),x=n(69410),v=n(41906),j=n(4994),g=n(26445),m=n(23125),w=n(98526),k=n(9055),P=n(71286),S=n(44797),O=function(e,r){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var t,a,o=n.call(e),i=[];try{for(;(void 0===r||r-- >0)&&!(t=o.next()).done;)i.push(t.value)}catch(e){a={error:e}}finally{try{t&&!t.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},T=(0,m.A)((function(){return window.dispatchEvent(new Event("resize"))}),100),C=function(e){var r=e.isDrawerOpen,n=(0,c.useRef)(document),a=O((0,c.useState)(0),2),o=a[0],s=a[1],l=O((0,c.useState)(),2),u=l[0],d=l[1],f=(0,i.A)((function(e){return e.breakpoints.up("sm")})),h=(0,c.useCallback)((function(e,r,n,t){void 0===n&&(n=0),s(n),(0,w.A)(u,t)||d(t)}),[u]);return(0,c.useEffect)((function(){var e=n.current;return e&&S.A.on(e,P.B.SET_TABS,h),function(){e&&S.A.off(e,P.B.SET_TABS,h)}}),[h]),(0,c.useEffect)((function(){T()}),[r]),(null==u?void 0:u.length)?(0,t.jsx)(g.A,{value:o,sx:{width:"100%",flexShrink:{xs:0,lg:"unset"},order:{xs:100,lg:"unset"}},variant:f?"standard":"scrollable",centered:f,children:u.map((function(e,r){var n=e.href,a=e.name;return(0,t.jsx)(j.A,{label:a,"data-tab-index":"".concat(r),component:k.N_,to:n},"tab-".concat(a))}))}):null},D=n(35117),E=n(28335),I=n(42458),L=n(23849),B=n(960),H=n(91480),M=n(17071),_=n(80434),N=n(63774),R=n(32051),q=n(94568),z=n(11041),F=n(79772),G=n(44790),U=n(60434),V=n(80099),K=n(95858),W=n(5898),J=function(e,r){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var t,a,o=n.call(e),i=[];try{for(;(void 0===r||r-- >0)&&!(t=o.next()).done;)i.push(t.value)}catch(e){a={error:e}}finally{try{t&&!t.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Q=["/dashboard/libraries","/dashboard/libraries/display","/dashboard/libraries/metadata","/dashboard/libraries/nfo"],Y=["/dashboard/playback/transcoding","/dashboard/playback/resume","/dashboard/playback/streaming","/dashboard/playback/trickplay"],$=function(){var e=(0,u.zy)(),r=J((0,c.useState)(Q.includes(e.pathname)),2),n=r[0],a=r[1],o=J((0,c.useState)(Y.includes(e.pathname)),2),i=o[0],s=o[1],l=(0,c.useCallback)((function(e){e.preventDefault(),e.stopPropagation(),a((function(e){return!e}))}),[]),d=(0,c.useCallback)((function(e){e.preventDefault(),e.stopPropagation(),s((function(e){return!e}))}),[]);return(0,t.jsxs)(E.A,{"aria-labelledby":"server-subheader",subheader:(0,t.jsx)(V.A,{component:"div",id:"server-subheader",children:W.Ay.translate("TabServer")}),children:[(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(L.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("TabDashboard")})]})}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/settings",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(q.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("General")})]})}),(0,t.jsxs)(K.A,{to:"/dashboard/branding",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(_.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("HeaderBranding")})]}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/users",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(N.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("HeaderUsers")})]})}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(F.A,{onClick:l,children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(M.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("HeaderLibraries")}),n?(0,t.jsx)(B.A,{}):(0,t.jsx)(H.A,{})]})}),(0,t.jsx)(z.A,{in:n,timeout:"auto",unmountOnExit:!0,children:(0,t.jsxs)(E.A,{component:"div",disablePadding:!0,children:[(0,t.jsx)(K.A,{to:"/dashboard/libraries",sx:{pl:4},children:(0,t.jsx)(U.A,{inset:!0,primary:W.Ay.translate("HeaderLibraries")})}),(0,t.jsx)(K.A,{to:"/dashboard/libraries/display",sx:{pl:4},children:(0,t.jsx)(U.A,{inset:!0,primary:W.Ay.translate("Display")})}),(0,t.jsx)(K.A,{to:"/dashboard/libraries/metadata",sx:{pl:4},children:(0,t.jsx)(U.A,{inset:!0,primary:W.Ay.translate("LabelMetadata")})}),(0,t.jsx)(K.A,{to:"/dashboard/libraries/nfo",sx:{pl:4},children:(0,t.jsx)(U.A,{inset:!0,primary:W.Ay.translate("TabNfoSettings")})})]})}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(F.A,{onClick:d,children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(R.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("TitlePlayback")}),i?(0,t.jsx)(B.A,{}):(0,t.jsx)(H.A,{})]})}),(0,t.jsx)(z.A,{in:i,timeout:"auto",unmountOnExit:!0,children:(0,t.jsxs)(E.A,{component:"div",disablePadding:!0,children:[(0,t.jsx)(K.A,{to:"/dashboard/playback/transcoding",sx:{pl:4},children:(0,t.jsx)(U.A,{inset:!0,primary:W.Ay.translate("Transcoding")})}),(0,t.jsx)(K.A,{to:"/dashboard/playback/resume",sx:{pl:4},children:(0,t.jsx)(U.A,{inset:!0,primary:W.Ay.translate("ButtonResume")})}),(0,t.jsx)(K.A,{to:"/dashboard/playback/streaming",sx:{pl:4},children:(0,t.jsx)(U.A,{inset:!0,primary:W.Ay.translate("TabStreaming")})}),(0,t.jsx)(K.A,{to:"/dashboard/playback/trickplay",sx:{pl:4},children:(0,t.jsx)(U.A,{inset:!0,primary:W.Ay.translate("Trickplay")})})]})})]})},X=n(95041),Z=n(34266),ee=function(){return(0,t.jsxs)(E.A,{"aria-labelledby":"devices-subheader",subheader:(0,t.jsx)(V.A,{component:"div",id:"devices-subheader",children:W.Ay.translate("HeaderDevices")}),children:[(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/devices",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(Z.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("HeaderDevices")})]})}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/activity",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(X.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("HeaderActivity")})]})})]})},re=n(56465),ne=n(84917),te=function(){return(0,t.jsxs)(E.A,{"aria-labelledby":"livetv-subheader",subheader:(0,t.jsx)(V.A,{component:"div",id:"livetv-subheader",children:W.Ay.translate("LiveTV")}),children:[(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/livetv",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(ne.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("LiveTV")})]})}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/livetv/recordings",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(re.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("HeaderDVR")})]})})]})},ae=n(18203),oe=n(74655),ie=n(48066),se=n(88776),le=n(68922),ce=function(){return(0,t.jsxs)(E.A,{"aria-labelledby":"advanced-subheader",subheader:(0,t.jsx)(V.A,{component:"div",id:"advanced-subheader",children:W.Ay.translate("TabAdvanced")}),children:[(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/networking",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(ie.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("TabNetworking")})]})}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/keys",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(le.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("HeaderApiKeys")})]})}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/backups",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(oe.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("HeaderBackups")})]})}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/logs",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(ae.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("TabLogs")})]})}),(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsxs)(K.A,{to:"/dashboard/tasks",children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(se.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("TabScheduledTasks")})]})})]})},ue=n(65612),de=n(82225),fe=n(89100),he=n(85069),pe=function(){var e=(0,he.q)({enableInMainMenu:!0}),r=e.data,n=e.error;return(0,c.useEffect)((function(){n&&console.error("[PluginDrawerSection] unable to fetch plugin config pages",n)}),[n]),(0,t.jsxs)(E.A,{"aria-labelledby":"plugins-subheader",subheader:(0,t.jsx)(V.A,{component:"div",id:"plugins-subheader",children:W.Ay.translate("TabPlugins")}),children:[(0,t.jsxs)(K.A,{to:"/dashboard/plugins",includePaths:["/configurationpage","/dashboard/plugins/repositories"],excludePaths:null==r?void 0:r.map((function(e){return"/".concat(fe.default.getPluginUrl(e.Name))})),children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(ue.A,{})}),(0,t.jsx)(U.A,{primary:W.Ay.translate("TabPlugins")})]}),null==r?void 0:r.map((function(e){return(0,t.jsxs)(K.A,{to:"/".concat(fe.default.getPluginUrl(e.Name)),children:[(0,t.jsx)(G.A,{children:(0,t.jsx)(de.A,{})}),(0,t.jsx)(U.A,{primary:e.DisplayName})]},e.PluginId)}))]})},ye=function(e){var r=e.open,n=void 0!==r&&r,a=e.onClose,o=e.onOpen;return(0,t.jsxs)(y.A,{open:n,onClose:a,onOpen:o,children:[(0,t.jsx)(E.A,{disablePadding:!0,children:(0,t.jsx)(D.Ay,{disablePadding:!0,children:(0,t.jsx)(I.A,{})})}),(0,t.jsx)($,{}),(0,t.jsx)(ee,{}),(0,t.jsx)(te,{}),(0,t.jsx)(pe,{}),(0,t.jsx)(ce,{})]})},be=n(37714),Ae=n(75487),xe=n(72073),ve=[{paths:["/dashboard/devices"],url:"https://jellyfin.org/docs/general/server/devices"},{paths:["/dashboard/libraries"],url:"https://jellyfin.org/docs/general/server/libraries"},{paths:["/dashboard/livetv","/dashboard/livetv/tuner","/dashboard/recordings"],url:"https://jellyfin.org/docs/general/server/live-tv/"},{paths:["/dashboard/livetv/guide"],url:"https://jellyfin.org/docs/general/server/live-tv/setup-guide#adding-guide-data"},{paths:["/dashboard/networking"],url:"https://jellyfin.org/docs/general/networking/"},{paths:["/dashboard/playback/transcoding"],url:"https://jellyfin.org/docs/general/server/transcoding"},{paths:["/dashboard/plugins"],url:"https://jellyfin.org/docs/general/server/plugins/"},{paths:["/dashboard/plugins/repositories"],url:"https://jellyfin.org/docs/general/server/plugins/#repositories"},{paths:["/dashboard/branding","/dashboard/settings"],url:"https://jellyfin.org/docs/general/server/settings"},{paths:["/dashboard/tasks"],url:"https://jellyfin.org/docs/general/server/tasks"},{paths:["/dashboard/users"],url:"https://jellyfin.org/docs/general/server/users/adding-managing-users"},{paths:["/dashboard/users/access","/dashboard/users/parentalcontrol","/dashboard/users/password","/dashboard/users/profile"],url:"https://jellyfin.org/docs/general/server/users/"},{paths:["/dashboard/backups"],url:"https://jellyfin.org/docs/general/administration/backup-and-restore/"}],je=function(){return(0,t.jsx)(u.BV,{children:ve.map((function(e){var r=e.paths,n=e.url;return r.map((function(e){return(0,t.jsx)(u.qh,{path:e,element:(0,t.jsx)(xe.A,{title:W.Ay.translate("Help"),children:(0,t.jsx)(Ae.A,{href:n,rel:"noopener noreferrer",target:"_blank",size:"large",color:"inherit",children:(0,t.jsx)(be.A,{})})})},[n,e].join("-"))}))})).flat()})},ge=n(7603),me=function(){var e=function(e,r){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var t,a,o=n.call(e),i=[];try{for(;(void 0===r||r-- >0)&&!(t=o.next()).done;)i.push(t.value)}catch(e){a={error:e}}finally{try{t&&!t.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}((0,c.useState)(!1),2),r=e[0],n=e[1],j=(0,u.zy)(),g=(0,x.gf)().user,m=(0,v.Y)().dateFnsLocale,w=(0,i.A)((function(e){return e.breakpoints.up("md")})),k=j.pathname.startsWith("/".concat(ge.DASHBOARD_APP_PATHS.MetadataManager)),P=Boolean(g)&&!k,S=r&&P,O=(0,c.useCallback)((function(){n(!r)}),[r,n]);return(0,c.useEffect)((function(){return document.body.classList.add("dashboardDocument"),function(){document.body.classList.remove("dashboardDocument")}}),[]),(0,t.jsxs)(s.$,{dateAdapter:l.h,adapterLocale:m,children:[(0,t.jsxs)(o.A,{sx:{display:"flex"},children:[(0,t.jsxs)(c.StrictMode,{children:[(0,t.jsx)(p.A,{elevate:!1,children:(0,t.jsx)(a.A,{position:"fixed",sx:{width:{xs:"100%",md:P?"calc(100% - ".concat(y.d,"px)"):"100%"},ml:{xs:0,md:P?y.d:0}},children:(0,t.jsxs)(f.A,{isBackButtonAvailable:b.appRouter.canGoBack(),isDrawerAvailable:!w&&P,isDrawerOpen:S,onDrawerButtonClick:O,buttons:(0,t.jsx)(je,{}),children:[k&&(0,t.jsx)(h.A,{}),(0,t.jsx)(C,{isDrawerOpen:S})]})})}),P&&(0,t.jsx)(ye,{open:S,onClose:O,onOpen:O})]}),(0,t.jsx)(o.A,{component:"main",sx:{width:"100%",flexGrow:1},children:(0,t.jsx)(d.A,{children:(0,t.jsx)(u.sv,{})})})]}),(0,t.jsx)(A.A,{dashboard:!0})]})}},87214:function(e,r,n){var t=n(62540),a=n(90830),o=n(63703),i=(n(63696),n(9055)),s=n(42305);r.A=function(){var e=(0,s.L)(),r=e.data,n=e.isPending;return(0,t.jsx)(o.A,{variant:"text",size:"large",color:"inherit",startIcon:(0,t.jsx)("img",{src:a,alt:"","aria-hidden":!0,style:{maxHeight:"1.25em",maxWidth:"1.25em"}}),component:i.N_,to:"/",children:n?"":(null==r?void 0:r.ServerName)||"Jellyfin"})}},90830:function(e,r,n){e.exports=n.p+"icon-transparent.baba78f2a106d9baee83.png"},92099:function(e,r,n){function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}n.d(r,{A:function(){return t}})},92162:function(e,r,n){n.d(r,{A:function(){return a}});var t=n(40694);function a(e){var r=function(e){if("object"!=(0,t.A)(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=(0,t.A)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,t.A)(r)?r:r+""}},95858:function(e,r,n){var t=n(62540),a=n(79772),o=(n(63696),n(87404)),i=n(9055),s=function(){return s=Object.assign||function(e){for(var r,n=1,t=arguments.length;n<t;n++)for(var a in r=arguments[n])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},s.apply(this,arguments)},l=function(e,r){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var t,a,o=n.call(e),i=[];try{for(;(void 0===r||r-- >0)&&!(t=o.next()).done;)i.push(t.value)}catch(e){a={error:e}}finally{try{t&&!t.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i};r.A=function(e){var r=e.children,n=e.to,c=e.includePaths,u=void 0===c?[]:c,d=e.excludePaths,f=void 0===d?[]:d,h=function(e,r){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(t=Object.getOwnPropertySymbols(e);a<t.length;a++)r.indexOf(t[a])<0&&Object.prototype.propertyIsEnumerable.call(e,t[a])&&(n[t[a]]=e[t[a]])}return n}(e,["children","to","includePaths","excludePaths"]),p=(0,o.zy)(),y=l((0,i.ok)(),1)[0],b=l(n.split("?"),2),A=b[0],x=b[1],v=new URLSearchParams("?".concat(x)),j=function(e,r,n){if(n||2===arguments.length)for(var t,a=0,o=r.length;a<o;a++)!t&&a in r||(t||(t=Array.prototype.slice.call(r,0,a)),t[a]=r[a]);return e.concat(t||Array.prototype.slice.call(r))}([A],l(u),!1).includes(p.pathname)&&!f.includes(p.pathname+p.search)&&(!x||function(e,r){var n,t;try{for(var a=function(e){var r="function"==typeof Symbol&&Symbol.iterator,n=r&&e[r],t=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),o=a.next();!o.done;o=a.next()){var i=o.value;if(r.get(i[0])!==i[1])return!1}}catch(e){n={error:e}}finally{try{o&&!o.done&&(t=a.return)&&t.call(a)}finally{if(n)throw n.error}}return!0}(v,y));return(0,t.jsx)(a.A,s({component:i.N_,to:n,selected:j},h,{children:r}))}}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 70538.23ea077c9a932337681d.chunk.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[70538],{70538:function(e,t,n){n.r(t),n.d(t,{default:function(){return O},show:function(){return I}}),n(29305),n(32733),n(84701),n(2623),n(44962),n(17731),n(10849),n(70389),n(36947),n(26437),n(52697),n(78557),n(90076),n(50987),n(83994),n(82367);var r,o,a,i=n(22696),l=n.n(i),u=n(81273),s=n(75384),c=n(79754),d=n(36300),f=n(8566),p=n(10838),v=n(46782),b=n(5898),y=n(67430),h='<div class="formDialogHeader"> <button is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1" title="${ButtonBack}"><span class="material-icons arrow_back" aria-hidden="true"></span></button> <h3 class="formDialogHeaderTitle"> ${HeaderUploadSubtitle} </h3> </div> <div class="formDialogContent"> <div class="dialogContentInner"> <form class="uploadSubtitleForm"> <div class="flex align-items-center" style="margin:1.5em 0"> <h2 style="margin:0">${HeaderAddUpdateSubtitle}</h2> <button is="emby-button" type="button" class="raised raised-mini btnBrowse"> <span class="material-icons folder" aria-hidden="true"></span> <span>${Browse}</span> </button> </div> <div> <div class="subtitleEditor-dropZone fieldDescription"> <div id="labelDropSubtitle">${LabelDropSubtitleHere}</div> <output id="subtitleOutput" class="flex align-items-center justify-content-center" style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%"></output> <input type="file" accept=".sub,.srt,.vtt,.ass,.ssa,.mks" id="uploadSubtitle" name="uploadSubtitle" style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;opacity:0"/> </div> <div id="fldUpload" class="hide"> <br/> <div class="checkboxContainer"> <label> <input type="checkbox" is="emby-checkbox" id="chkIsForced"/> <span>${LabelIsForced}</span> </label> <label> <input type="checkbox" is="emby-checkbox" id="chkIsHearingImpaired"/> <span>${LabelIsHearingImpaired}</span> </label> </div> <div class="selectContainer flex-grow"> <select is="emby-select" id="selectLanguage" required="required" label="${LabelLanguage}"></select> </div> <button is="emby-button" type="submit" class="raised button-submit block"> <span>${Upload}</span> </button> </div> </div> </form> </div> </div> ',m=n(71866),g=(n(10353),n(63001),n(76562));function S(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return w(s,"_invoke",function(n,r,o){var a,l,u,s=0,c=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,l=0,u=e,f.n=n,i}};function p(n,r){for(l=n,u=r,t=0;!d&&s&&!o&&t<c.length;t++){var o,a=c[t],p=f.p,v=a[2];n>3?(o=v===r)&&(u=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&p<a[1])?(l=0,f.v=r,f.n=a[1]):p<v&&(o=n<3||a[0]>r||r>v)&&(a[4]=n,a[5]=r,f.n=v,l=0))}if(o||n>1)return i;throw d=!0,r}return function(o,c,v){if(s>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,v),l=c,u=v;(t=l<2?e:u)||!d;){a||(l?l<3?(l>1&&(f.n=-1),p(l,u)):f.n=u:f.v=u);try{if(s=2,a){if(l||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=a.return)&&t.call(a),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);a=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==i)break}catch(t){a=e,l=1,u=t}finally{s=1}}return{value:t,done:d}}}(n,o,a),!0),s}var i={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(w(t={},r,(function(){return this})),t),d=s.prototype=l.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,w(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=s,w(d,"constructor",s),w(s,"constructor",u),u.displayName="GeneratorFunction",w(s,o,"GeneratorFunction"),w(d),w(d,o,"Generator"),w(d,r,(function(){return this})),w(d,"toString",(function(){return"[object Generator]"})),(S=function(){return{w:a,m:f}})()}function w(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}w=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var a=function(t,n){w(e,t,(function(e){return this._invoke(t,n,e)}))};a("next",0),a("throw",1),a("return",2)}},w(e,t,n,r)}function L(e,t,n,r,o,a,i){try{var l=e[a](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,o)}var k=!1;function A(e){f.Ay.hide();var t=e.target.error;t.code!==t.ABORT_ERR&&(0,m.A)(b.Ay.translate("MessageFileReadError"))}function F(e){return e&&[".sub",".srt",".vtt",".ass",".ssa",".mks"].some((function(t){return e.name.endsWith(t)}))}function q(e){return D.apply(this,arguments)}function D(){var e;return e=S().m((function e(t){var n,i,l,p,v,h,w,L;return S().w((function(e){for(;;)switch(e.n){case 0:if(F(n=a)){e.n=1;break}return(0,m.A)(b.Ay.translate("MessageSubtitleFileTypeAllowed")),t.preventDefault(),e.a(2);case 1:return f.Ay.show(),i=d.Ay.parentWithClass(this,"dialog"),l=i.querySelector("#selectLanguage").value,p=i.querySelector("#chkIsForced").checked,v=i.querySelector("#chkIsHearingImpaired").checked,h=(0,u.L)((0,s.C)(y.tF.getApiClient(o))),e.n=2,(0,g.We)(n);case 2:w=e.v,L=n.name.substring(n.name.lastIndexOf(".")+1).toLowerCase(),h.uploadSubtitle({itemId:r,uploadSubtitleDto:{Data:w,Language:l,IsForced:p,Format:L,IsHearingImpaired:v}}).then((function(){i.querySelector("#uploadSubtitle").value="",f.Ay.hide(),k=!0,c.default.close(i)})),t.preventDefault();case 3:return e.a(2)}}),e,this)})),D=function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){L(a,r,o,i,l,"next",e)}function l(e){L(a,r,o,i,l,"throw",e)}i(void 0)}))},D.apply(this,arguments)}function I(e){return new Promise((function(t){k=!1,function(e,t){r=(e=e||{}).itemId,o=e.serverId;var n={removeOnClose:!0,scrollY:!1};v.A.tv?n.size="fullscreen":n.size="small";var i,u=c.default.createDialog(n);u.classList.add("formDialog"),u.classList.add("subtitleUploaderDialog"),u.innerHTML=b.Ay.translateHtml(h,"core"),v.A.tv&&p.default.centerFocus.on(u,!1),u.addEventListener("close",(function(){v.A.tv&&p.default.centerFocus.off(u,!1),f.Ay.hide(),t(k)})),c.default.open(u),(i=u).querySelector(".uploadSubtitleForm").addEventListener("submit",q),i.querySelector("#uploadSubtitle").addEventListener("change",(function(){!function(e,t){var n=t[0];if(!F(n))return e.querySelector("#subtitleOutput").innerHTML="",e.querySelector("#fldUpload").classList.add("hide"),e.querySelector("#labelDropSubtitle").classList.remove("hide"),void(a=null);a=n;var r,o=new FileReader;o.onerror=A,o.onloadstart=function(){e.querySelector("#fldUpload").classList.add("hide")},o.onabort=function(){f.Ay.hide(),console.debug("File read cancelled")},o.onload=(r=n,function(){var t='<div><span class="material-icons subtitles" aria-hidden="true" style="transform: translateY(25%);"></span><span>'.concat(l()(r.name),"</span></div>");e.querySelector("#subtitleOutput").innerHTML=t,e.querySelector("#fldUpload").classList.remove("hide"),e.querySelector("#labelDropSubtitle").classList.add("hide")}),o.readAsDataURL(n)}(i,this.files)})),i.querySelector(".btnBrowse").addEventListener("click",(function(){i.querySelector("#uploadSubtitle").click()}));var s=u.querySelector("#selectLanguage");e.languages&&(s.innerHTML=e.languages.list||null,s.value=e.languages.value||null),u.querySelector(".btnCancel").addEventListener("click",(function(){c.default.close(u)}))}(e,t)}))}var O={show:I}},76562:function(e,t,n){function r(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(e){var n,r,o,a=null===(o=null===(r=null===(n=e.target)||void 0===n?void 0:n.result)||void 0===r?void 0:r.split)||void 0===o?void 0:o.call(r,",")[1];t(a)},r.onerror=n,r.readAsDataURL(e)}))}function o(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(e){var n,r=null===(n=e.target)||void 0===n?void 0:n.result;t(r)},r.onerror=n,r.readAsText(e)}))}function a(e,t){void 0===t&&(t=1);var n=Math.log(e)/Math.log(1024)|0;return(e/Math.pow(1024,n)).toFixed(t)+" "+(n?"KMGTPEZY"[--n]+"iB":"Bytes")}n.d(t,{Qv:function(){return o},We:function(){return r},iJ:function(){return a}})}}]);
1
+ /*! For license information please see 70538.d6c399619eb76106c279.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[70538],{70538:function(e,t,n){n.r(t),n.d(t,{default:function(){return O},show:function(){return D}}),n(29305),n(32733),n(84701),n(2623),n(44962),n(17731),n(10849),n(70389),n(36947),n(26437),n(52697),n(78557),n(90076),n(50987),n(83994),n(82367);var r,o,a,i=n(22696),l=n.n(i),u=n(81273),s=n(75384),c=n(79754),d=n(36300),f=n(8566),p=n(10838),b=n(46782),v=n(5898),y=n(67430),h='<div class="formDialogHeader"> <button is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1" title="${ButtonBack}"><span class="material-icons arrow_back" aria-hidden="true"></span></button> <h3 class="formDialogHeaderTitle"> ${HeaderUploadSubtitle} </h3> </div> <div class="formDialogContent"> <div class="dialogContentInner"> <form class="uploadSubtitleForm"> <div class="flex align-items-center" style="margin:1.5em 0"> <h2 style="margin:0">${HeaderAddUpdateSubtitle}</h2> <button is="emby-button" type="button" class="raised raised-mini btnBrowse"> <span class="material-icons folder" aria-hidden="true"></span> <span>${Browse}</span> </button> </div> <div> <div class="subtitleEditor-dropZone fieldDescription"> <div id="labelDropSubtitle">${LabelDropSubtitleHere}</div> <output id="subtitleOutput" class="flex align-items-center justify-content-center" style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%"></output> <input type="file" accept=".sub,.srt,.vtt,.ass,.ssa,.mks" id="uploadSubtitle" name="uploadSubtitle" style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;opacity:0"/> </div> <div id="fldUpload" class="hide"> <br/> <div class="checkboxContainer"> <label> <input type="checkbox" is="emby-checkbox" id="chkIsForced"/> <span>${LabelIsForced}</span> </label> <label> <input type="checkbox" is="emby-checkbox" id="chkIsHearingImpaired"/> <span>${LabelIsHearingImpaired}</span> </label> </div> <div class="selectContainer flex-grow"> <select is="emby-select" id="selectLanguage" required="required" label="${LabelLanguage}"></select> </div> <button is="emby-button" type="submit" class="raised button-submit block"> <span>${Upload}</span> </button> </div> </div> </form> </div> </div> ',m=n(71866),g=(n(10353),n(63001),n(76562));function S(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return w(s,"_invoke",function(n,r,o){var a,l,u,s=0,c=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,l=0,u=e,f.n=n,i}};function p(n,r){for(l=n,u=r,t=0;!d&&s&&!o&&t<c.length;t++){var o,a=c[t],p=f.p,b=a[2];n>3?(o=b===r)&&(u=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&p<a[1])?(l=0,f.v=r,f.n=a[1]):p<b&&(o=n<3||a[0]>r||r>b)&&(a[4]=n,a[5]=r,f.n=b,l=0))}if(o||n>1)return i;throw d=!0,r}return function(o,c,b){if(s>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,b),l=c,u=b;(t=l<2?e:u)||!d;){a||(l?l<3?(l>1&&(f.n=-1),p(l,u)):f.n=u:f.v=u);try{if(s=2,a){if(l||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=a.return)&&t.call(a),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);a=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==i)break}catch(t){a=e,l=1,u=t}finally{s=1}}return{value:t,done:d}}}(n,o,a),!0),s}var i={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(w(t={},r,(function(){return this})),t),d=s.prototype=l.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,w(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=s,w(d,"constructor",s),w(s,"constructor",u),u.displayName="GeneratorFunction",w(s,o,"GeneratorFunction"),w(d),w(d,o,"Generator"),w(d,r,(function(){return this})),w(d,"toString",(function(){return"[object Generator]"})),(S=function(){return{w:a,m:f}})()}function w(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}w=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var a=function(t,n){w(e,t,(function(e){return this._invoke(t,n,e)}))};a("next",0),a("throw",1),a("return",2)}},w(e,t,n,r)}function L(e,t,n,r,o,a,i){try{var l=e[a](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,o)}var k=!1;function A(e){f.Ay.hide();var t=e.target.error;t.code!==t.ABORT_ERR&&(0,m.A)(v.Ay.translate("MessageFileReadError"))}function F(e){return e&&[".sub",".srt",".vtt",".ass",".ssa",".mks"].some((function(t){return e.name.endsWith(t)}))}function q(e){return I.apply(this,arguments)}function I(){var e;return e=S().m((function e(t){var n,i,l,p,b,h,w,L;return S().w((function(e){for(;;)switch(e.n){case 0:if(t.preventDefault(),F(n=a)){e.n=1;break}return(0,m.A)(v.Ay.translate("MessageSubtitleFileTypeAllowed")),e.a(2);case 1:return f.Ay.show(),i=d.Ay.parentWithClass(this,"dialog"),l=i.querySelector("#selectLanguage").value,p=i.querySelector("#chkIsForced").checked,b=i.querySelector("#chkIsHearingImpaired").checked,h=(0,u.L)((0,s.C)(y.tF.getApiClient(o))),e.n=2,(0,g.We)(n);case 2:w=e.v,L=n.name.substring(n.name.lastIndexOf(".")+1).toLowerCase(),h.uploadSubtitle({itemId:r,uploadSubtitleDto:{Data:w,Language:l,IsForced:p,Format:L,IsHearingImpaired:b}}).then((function(){i.querySelector("#uploadSubtitle").value="",f.Ay.hide(),k=!0,c.default.close(i)}));case 3:return e.a(2)}}),e,this)})),I=function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){L(a,r,o,i,l,"next",e)}function l(e){L(a,r,o,i,l,"throw",e)}i(void 0)}))},I.apply(this,arguments)}function D(e){return new Promise((function(t){k=!1,function(e,t){r=(e=e||{}).itemId,o=e.serverId;var n={removeOnClose:!0,scrollY:!1};b.A.tv?n.size="fullscreen":n.size="small";var i,u=c.default.createDialog(n);u.classList.add("formDialog"),u.classList.add("subtitleUploaderDialog"),u.innerHTML=v.Ay.translateHtml(h,"core"),b.A.tv&&p.default.centerFocus.on(u,!1),u.addEventListener("close",(function(){b.A.tv&&p.default.centerFocus.off(u,!1),f.Ay.hide(),t(k)})),c.default.open(u),(i=u).querySelector(".uploadSubtitleForm").addEventListener("submit",q),i.querySelector("#uploadSubtitle").addEventListener("change",(function(){!function(e,t){var n=t[0];if(!F(n))return e.querySelector("#subtitleOutput").innerHTML="",e.querySelector("#fldUpload").classList.add("hide"),e.querySelector("#labelDropSubtitle").classList.remove("hide"),void(a=null);a=n;var r,o=new FileReader;o.onerror=A,o.onloadstart=function(){e.querySelector("#fldUpload").classList.add("hide")},o.onabort=function(){f.Ay.hide(),console.debug("File read cancelled")},o.onload=(r=n,function(){var t='<div><span class="material-icons subtitles" aria-hidden="true" style="transform: translateY(25%);"></span><span>'.concat(l()(r.name),"</span></div>");e.querySelector("#subtitleOutput").innerHTML=t,e.querySelector("#fldUpload").classList.remove("hide"),e.querySelector("#labelDropSubtitle").classList.add("hide")}),o.readAsDataURL(n)}(i,this.files)})),i.querySelector(".btnBrowse").addEventListener("click",(function(){i.querySelector("#uploadSubtitle").click()}));var s=u.querySelector("#selectLanguage");e.languages&&(s.innerHTML=e.languages.list||null,s.value=e.languages.value||null),u.querySelector(".btnCancel").addEventListener("click",(function(){c.default.close(u)}))}(e,t)}))}var O={show:D}},76562:function(e,t,n){function r(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(e){var n,r,o,a=null===(o=null===(r=null===(n=e.target)||void 0===n?void 0:n.result)||void 0===r?void 0:r.split)||void 0===o?void 0:o.call(r,",")[1];t(a)},r.onerror=n,r.readAsDataURL(e)}))}function o(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(e){var n,r=null===(n=e.target)||void 0===n?void 0:n.result;t(r)},r.onerror=n,r.readAsText(e)}))}function a(e,t){void 0===t&&(t=1);var n=Math.log(e)/Math.log(1024)|0;return(e/Math.pow(1024,n)).toFixed(t)+" "+(n?"KMGTPEZY"[--n]+"iB":"Bytes")}n.d(t,{Qv:function(){return o},We:function(){return r},iJ:function(){return a}})}}]);