Files
pgsql-jellyfin/publish_test2/wwwroot/55802.f8496f55901a6b8dfa6f.chunk.js
T

2 lines
15 KiB
JavaScript

/*! For license information please see 55802.f8496f55901a6b8dfa6f.chunk.js.LICENSE.txt */
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[55802],{27351:function(e,t,n){n.d(t,{C:function(){return i}}),n(78557),n(90076);var a=n(34789);function r(e){var t,n=document.createElement("textarea");if(n.value=e,document.body.appendChild(n),n.focus(),a.A.iOS&&a.A.iOSVersion<13.4){var r=document.createRange();r.selectNodeContents(n);var i=window.getSelection();i.removeAllRanges(),i.addRange(r),n.setSelectionRange(0,999999)}else n.select();try{t=document.execCommand("copy")?Promise.resolve():Promise.reject()}catch(e){t=Promise.reject()}return document.body.removeChild(n),t}function i(e){return void 0===navigator.clipboard?r(e):navigator.clipboard.writeText(e).catch((function(){return r(e)}))}},55802:function(e,t,n){n.r(t),n.d(t,{getCommands:function(){return k},show:function(){return M}}),n(29305),n(32733),n(84701),n(2623),n(24776),n(14382),n(64771),n(76281),n(44962),n(86584),n(25352),n(10849),n(70389),n(36947),n(26437),n(52697),n(78557),n(90076),n(95021),n(99425),n(83994),n(93062),n(82367);var a=n(11444),r=n(71857),i=n(97339),o=n(75384),s=n(34789),l=n(27351),c=n(36300),d=n(5898),u=n(67430),m=n(62882),y=n(22622),p=n(70267),h=n(23648),f=n(39738),b=n(71866),v=n(82885);function I(){var e,t,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,a,r,i){var l=a&&a.prototype instanceof s?a:s,c=Object.create(l.prototype);return A(c,"_invoke",function(n,a,r){var i,s,l,c=0,d=r||[],u=!1,m={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,s=0,l=e,m.n=n,o}};function y(n,a){for(s=n,l=a,t=0;!u&&c&&!r&&t<d.length;t++){var r,i=d[t],y=m.p,p=i[2];n>3?(r=p===a)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=y&&((r=n<2&&y<i[1])?(s=0,m.v=a,m.n=i[1]):y<p&&(r=n<3||i[0]>a||a>p)&&(i[4]=n,i[5]=a,m.n=p,s=0))}if(r||n>1)return o;throw u=!0,a}return function(r,d,p){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&y(d,p),s=d,l=p;(t=s<2?e:l)||!u;){i||(s?s<3?(s>1&&(m.n=-1),y(s,l)):m.n=l:m.v=l);try{if(c=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(u=m.n<0)?l:n.call(a,m))!==o)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:u}}}(n,r,i),!0),c}var o={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var d=[][a]?t(t([][a]())):(A(t={},a,(function(){return this})),t),u=c.prototype=s.prototype=Object.create(d);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,A(e,r,"GeneratorFunction")),e.prototype=Object.create(u),e}return l.prototype=c,A(u,"constructor",c),A(c,"constructor",l),l.displayName="GeneratorFunction",A(c,r,"GeneratorFunction"),A(u),A(u,r,"Generator"),A(u,a,(function(){return this})),A(u,"toString",(function(){return"[object Generator]"})),(I=function(){return{w:i,m:m}})()}function A(e,t,n,a){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}A=function(e,t,n,a){if(t)r?r(e,t,{value:n,enumerable:!a,configurable:!a,writable:!a}):e[t]=n;else{var i=function(t,n){A(e,t,(function(e){return this._invoke(t,n,e)}))};i("next",0),i("throw",1),i("return",2)}},A(e,t,n,a)}function w(e,t,n,a,r,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(a,r)}function P(e){return function(){var t=this,n=arguments;return new Promise((function(a,r){var i=e.apply(t,n);function o(e){w(i,a,r,o,s,"next",e)}function s(e){w(i,a,r,o,s,"throw",e)}o(void 0)}))}}var T=[a.D.BoxSet,a.D.MusicAlbum,a.D.Season,a.D.Series];function g(e){switch(e){case a.D.Series:return d.Ay.translate("DeleteSeries");case a.D.Episode:return d.Ay.translate("DeleteEpisode");case a.D.Playlist:case a.D.BoxSet:return d.Ay.translate("Delete");default:return d.Ay.translate("DeleteMedia")}}function k(e){return S.apply(this,arguments)}function S(){return(S=P(I().m((function e(t){var n,r,o,l,u,m;return I().w((function(e){for(;;)switch(e.n){case 0:if(r=t.item,o=t.user,l=f.f.canPlay(r),u=[],l&&"Photo"!==r.MediaType&&(!1!==t.play&&u.push({name:d.Ay.translate("Play"),id:"resume",icon:"play_arrow"}),t.playAllFromHere&&"Program"!==r.Type&&"TvChannel"!==r.Type&&u.push({name:d.Ay.translate("PlayAllFromHere"),id:"playallfromhere",icon:"play_arrow"})),null!==f.f.getCurrentPlayer()&&(t.stopPlayback&&u.push({name:d.Ay.translate("StopPlayback"),id:"stopPlayback",icon:"stop"}),t.clearQueue&&u.push({name:d.Ay.translate("ClearQueue"),id:"clearQueue",icon:"clear_all"})),f.f.canQueue(r)&&(!1!==t.queue&&u.push({name:d.Ay.translate("AddToPlayQueue"),id:"queue",icon:"playlist_add"}),!1!==t.queue&&u.push({name:d.Ay.translate("PlayNext"),id:"queuenext",icon:"playlist_add"})),!r.IsFolder&&"MusicArtist"!==r.Type&&"MusicGenre"!==r.Type||"livetv"===r.CollectionType||!1===t.shuffle||u.push({name:d.Ay.translate("Shuffle"),id:"shuffle",icon:"shuffle"}),"Audio"!==r.MediaType&&"MusicAlbum"!==r.Type&&"MusicArtist"!==r.Type&&"MusicGenre"!==r.Type||!1===t.instantMix||h.Ay.isLocalItem(r)||u.push({name:d.Ay.translate("InstantMix"),id:"instantmix",icon:"explore"}),u.length&&u.push({divider:!0}),s.A.tv||(t.positionTo&&null!==c.Ay.parentWithClass(t.positionTo,"card")&&u.push({name:d.Ay.translate("Select"),id:"multiSelect",icon:"library_add_check"}),h.Ay.supportsAddingToCollection(r)&&(o.Policy.IsAdministrator||o.Policy.EnableCollectionManagement)&&u.push({name:d.Ay.translate("AddToCollection"),id:"addtocollection",icon:"playlist_add"}),h.Ay.supportsAddingToPlaylist(r)&&!1!==t.playlist&&u.push({name:d.Ay.translate("AddToPlaylist"),id:"addtoplaylist",icon:"playlist_add"})),"Timer"===r.Type&&o.Policy.EnableLiveTvManagement&&!1!==t.cancelTimer&&u.push({name:d.Ay.translate("CancelRecording"),id:"canceltimer",icon:"cancel"}),"Recording"===r.Type&&"InProgress"===r.Status&&o.Policy.EnableLiveTvManagement&&!1!==t.cancelTimer&&u.push({name:d.Ay.translate("CancelRecording"),id:"canceltimer",icon:"cancel"}),"SeriesTimer"===r.Type&&o.Policy.EnableLiveTvManagement&&!1!==t.cancelTimer&&u.push({name:d.Ay.translate("CancelSeries"),id:"cancelseriestimer",icon:"cancel"}),y.g.supports(i.Y.FileDownload)&&(o.Policy.EnableContentDownloading&&T.includes(r.Type)&&u.push({name:d.Ay.translate("DownloadAll"),id:"downloadall",icon:"file_download"}),r.CanDownload&&"Book"!==r.Type&&(u.push({name:d.Ay.translate("Download"),id:"download",icon:"file_download"}),u.push({name:d.Ay.translate("CopyStreamURL"),id:"copy-stream",icon:"content_copy"}))),r.CanDelete&&!1!==t.deleteItem&&u.push({name:g(r.Type),id:"delete",icon:"delete"}),u.length&&u.push({divider:!0}),r.Type!==a.D.Playlist){e.n=2;break}return e.n=1,(0,h.Hc)(o,r);case 1:e.v&&u.push({name:d.Ay.translate("Edit"),id:"editplaylist",icon:"edit"});case 2:return h.Ay.canEdit(o,r)&&!1!==t.edit&&"SeriesTimer"!==r.Type&&(m="Timer"===r.Type||"SeriesTimer"===r.Type?d.Ay.translate("Edit"):d.Ay.translate("EditMetadata"),u.push({name:m,id:"edit",icon:"edit"})),h.Ay.canEditImages(o,r)&&!1!==t.editImages&&u.push({name:d.Ay.translate("EditImages"),id:"editimages",icon:"image"}),h.Ay.canEditSubtitles(o,r)&&!1!==t.editSubtitles&&u.push({name:d.Ay.translate("EditSubtitles"),id:"editsubtitles",icon:"closed_caption"}),h.Ay.canEditLyrics(o,r)&&u.push({name:d.Ay.translate("EditLyrics"),id:"editlyrics",icon:"lyrics"}),!1!==t.identify&&h.Ay.canIdentify(o,r)&&u.push({name:d.Ay.translate("Identify"),id:"identify",icon:"edit"}),r.MediaSources&&!1!==t.moremediainfo&&u.push({name:d.Ay.translate("MoreMediaInfo"),id:"moremediainfo",icon:"info"}),"Program"===r.Type&&!1!==t.record&&(r.TimerId?u.push({name:d.Ay.translate("ManageRecording"),id:"record",icon:"fiber_manual_record"}):u.push({name:d.Ay.translate("Record"),id:"record",icon:"fiber_manual_record"})),h.Ay.canRefreshMetadata(r,o)&&u.push({name:d.Ay.translate("RefreshMetadata"),id:"refresh",icon:"refresh"}),r.PlaylistItemId&&t.playlistId&&t.canEditPlaylist&&u.push({name:d.Ay.translate("RemoveFromPlaylist"),id:"removefromplaylist",icon:"playlist_remove"}),r.PlaylistItemId&&t.playlistId&&r.PlaylistIndex>0&&u.push({name:d.Ay.translate("MoveToTop"),id:"movetotop",icon:"vertical_align_top"}),r.PlaylistItemId&&t.playlistId&&r.PlaylistIndex<r.PlaylistItemCount-1&&u.push({name:d.Ay.translate("MoveToBottom"),id:"movetobottom",icon:"vertical_align_bottom"}),t.collectionId&&u.push({name:d.Ay.translate("RemoveFromCollection"),id:"removefromcollection",icon:"playlist_remove"}),!s.A.tv&&!0===t.share&&h.Ay.canShare(r,o)&&u.push({name:d.Ay.translate("Share"),id:"share",icon:"share"}),!1!==t.openAlbum&&r.AlbumId&&"Photo"!==r.MediaType&&u.push({name:d.Ay.translate("ViewAlbum"),id:"album",icon:"album"}),!1!==t.openArtist&&null!==(n=r.AlbumArtists)&&void 0!==n&&n.length&&u.push({name:d.Ay.translate("ViewAlbumArtist"),id:"artist",icon:"person"}),r.HasLyrics&&u.push({name:d.Ay.translate("ViewLyrics"),id:"lyrics",icon:"lyrics"}),e.a(2,u)}}),e)})))).apply(this,arguments)}function C(e,t,n,a,r){return function(){e({command:t,updated:n,deleted:a,itemId:r})}}function D(e,t,i){var s=e.Id,m=e.ServerId,y=u.tF.getApiClient(m),h=(0,o.C)(y);return new Promise((function(o,u){switch(t){case"addtocollection":n.e(80999).then(n.bind(n,3380)).then((function(e){(new(0,e.default)).show({items:[s],serverId:m}).then(C(o,t,!0),C(o,t))}));break;case"addtoplaylist":Promise.all([n.e(45642),n.e(26711)]).then(n.bind(n,4330)).then((function(e){(new(0,e.default)).show({items:[s],serverId:m}).then(C(o,t,!0),C(o,t))}));break;case"download":n.e(23717).then(n.bind(n,23717)).then((function(n){var a=(0,r.Q)(h).getDownloadUrl({itemId:s});n.download([{url:a,item:e,itemId:s,serverId:m,title:e.Name,filename:e.Path.replace(/^.*[\\/]/,"")}]),C(C(o,t),t)()}));break;case"downloadall":var v=function(e){n.e(23717).then(n.bind(n,23717)).then((function(t){var n=e.filter((function(e){return e.CanDownload})).map((function(e){return{url:(0,r.Q)(h).getDownloadUrl({itemId:e.Id}),item:e,itemId:e.Id,serverId:m,title:e.Name,filename:e.Path.replace(/^.*[\\/]/,"")}}));t.download(n)}))},I=function(e){Promise.all(e.map((function(e){return y.getEpisodes(e.SeriesId,{seasonId:e.Id,userId:i.user.Id,Fields:"CanDownload,Path"})}))).then((function(e){v(e.map((function(e){return e.Items})).flat())}))};switch(e.Type){case a.D.BoxSet:case a.D.MusicAlbum:y.getItems(i.user.Id,{ParentId:e.Id,Fields:"CanDownload,Path"}).then((function(e){var t=e.Items;return v(t)}));break;case a.D.Season:I([e]);break;case a.D.Series:y.getSeasons(e.Id,{userId:i.user.Id,Fields:"ItemCounts"}).then((function(e){return I(e.Items)}))}C(C(o,t),t)();break;case"copy-stream":var A=(0,r.Q)(h).getDownloadUrl({itemId:s});(0,l.C)(A).then((function(){(0,b.A)(d.Ay.translate("CopyStreamURLSuccess"))})).catch((function(){prompt(d.Ay.translate("CopyStreamURL"),A)})),C(o,t)();break;case"editsubtitles":n.e(39345).then(n.bind(n,39345)).then((function(e){e.default.show(s,m).then(C(o,t,!0),C(o,t))}));break;case"editlyrics":Promise.all([n.e(45642),n.e(69729)]).then(n.bind(n,69729)).then((function(e){e.default.show(s,m).then(C(o,t,!0),C(o,t))}));break;case"edit":(function(e,t){return new Promise((function(a,r){var i=e.serverInfo().Id;"Timer"===t.Type?n.e(59801).then(n.bind(n,59801)).then((function(e){e.default.show(t.Id,i).then(a,r)})):"SeriesTimer"===t.Type?n.e(95062).then(n.bind(n,72681)).then((function(e){e.default.show(t.Id,i).then(a,r)})):Promise.all([n.e(45642),n.e(26855),n.e(86376)]).then(n.bind(n,26855)).then((function(e){e.default.show(t.Id,i).then(a,r)}))}))})(y,e).then(C(o,t,!0),C(o,t));break;case"editplaylist":Promise.all([n.e(45642),n.e(26711)]).then(n.bind(n,4330)).then((function(e){(new(0,e.default)).show({id:s,serverId:m}).then(C(o,t,!0),C(o,t))}));break;case"editimages":Promise.all([n.e(4350),n.e(40248)]).then(n.bind(n,4350)).then((function(e){e.show({itemId:s,serverId:m}).then(C(o,t,!0),C(o,t))}));break;case"identify":Promise.resolve().then(n.bind(n,92305)).then((function(e){e.show(s,m).then(C(o,t,!0),C(o,t))}));break;case"moremediainfo":n.e(20963).then(n.bind(n,20963)).then((function(e){e.show(s,m).then(C(o,t),C(o,t))}));break;case"multiSelect":n.e(35308).then(n.bind(n,35308)).then((function(e){(0,e.startMultiSelect)(c.Ay.parentWithClass(i.positionTo,"card"))}));break;case"refresh":!function(e,t){n.e(54623).then(n.bind(n,77004)).then((function(n){new(0,n.default)({itemIds:[t.Id],serverId:e.serverInfo().Id,mode:"CollectionFolder"===t.Type?"scan":null}).show()}))}(y,e),C(o,t)();break;case"open":p.appRouter.showItem(e),C(o,t)();break;case"play":E(e,!1),C(o,t)();break;case"resume":E(e,!0),C(o,t)();break;case"queue":E(e,!1,!0),C(o,t)();break;case"queuenext":E(e,!1,!0,!0),C(o,t)();break;case"stopPlayback":f.f.stop();break;case"clearQueue":f.f.clearQueue();break;case"record":Promise.all([n.e(10739),n.e(72044)]).then(n.bind(n,63834)).then((function(e){e.default.show(s,m).then(C(o,t,!0),C(o,t))}));break;case"shuffle":f.f.shuffle(e),C(o,t)();break;case"instantmix":f.f.instantMix(e),C(o,t)();break;case"delete":(function(e,t){return new Promise((function(e,a){n.e(46634).then(n.bind(n,46634)).then((function(n){n.deleteItem({item:t,navigate:!1}).then((function(){e(!0)}),a)}))}))})(0,e).then(C(o,t,!0,!0,s),C(o,t));break;case"share":navigator.share({title:e.Name,text:e.Overview,url:"".concat(y.serverAddress(),"/web/").concat(p.appRouter.getRouteUrl(e))});break;case"album":p.appRouter.showItem(e.AlbumId,e.ServerId),C(o,t)();break;case"artist":p.appRouter.showItem(e.AlbumArtists[0].Id,e.ServerId),C(o,t)();break;case"lyrics":i.isMobile?p.appRouter.show("lyrics"):p.appRouter.showItem(e.Id,e.ServerId),C(o,t)();break;case"playallfromhere":case"queueallfromhere":C(o,t)();break;case"removefromplaylist":y.ajax({url:y.getUrl("Playlists/"+i.playlistId+"/Items",{EntryIds:[e.PlaylistItemId].join(",")}),type:"DELETE"}).then((function(){C(o,t,!0)()}));break;case"movetotop":y.ajax({url:y.getUrl("Playlists/"+i.playlistId+"/Items/"+e.PlaylistItemId+"/Move/0"),type:"POST"}).then((function(){C(o,t,!0)()}));break;case"movetobottom":y.ajax({url:y.getUrl("Playlists/"+i.playlistId+"/Items/"+e.PlaylistItemId+"/Move/"+(e.PlaylistItemCount-1)),type:"POST"}).then((function(){C(o,t,!0)()}));break;case"removefromcollection":y.ajax({type:"DELETE",url:y.getUrl("Collections/"+i.collectionId+"/Items",{Ids:[e.Id].join(",")})}).then((function(){C(o,t,!0)()}));break;case"canceltimer":!function(e,t,a,r){n.e(78938).then(n.bind(n,78938)).then((function(e){var n=e.default,i=t.TimerId||t.Id;n.cancelTimerWithConfirmation(i,t.ServerId).then((function(){C(a,r,!0)()}))}))}(0,e,o,t);break;case"cancelseriestimer":!function(e,t,a,r){n.e(78938).then(n.bind(n,78938)).then((function(e){e.default.cancelSeriesTimerWithConfirmation(t.Id,t.ServerId).then((function(){C(a,r,!0)()}))}))}(0,e,o,t);break;default:u()}}))}function E(e,t,n,a){var r,i="play";n&&(i=a?"queueNext":"queue");var o=0;if(t&&null!==(r=e.UserData)&&void 0!==r&&r.PlaybackPositionTicks&&(o=e.UserData.PlaybackPositionTicks),"Program"===e.Type)f.f[i]({ids:[e.ChannelId],startPositionTicks:o,serverId:e.ServerId});else{var s="items-"+(e.IsFolder?e.Id:e.ParentId)+"-Folder",l=v.getSortValuesLegacy(s);f.f[i]({items:[e],startPositionTicks:o,queryOptions:{SortBy:l.sortBy,SortOrder:l.sortOrder}})}}function M(e){return _.apply(this,arguments)}function _(){return(_=P(I().m((function e(t){var n,a;return I().w((function(e){for(;;)switch(e.n){case 0:return e.n=1,k(t);case 1:if((n=e.v).length){e.n=2;break}throw new Error("No item commands present");case 2:return e.n=3,m.default.show({items:n,positionTo:t.positionTo,resolveOnClick:["share"]});case 3:return a=e.v,e.a(2,D(t.item,a,t))}}),e)})))).apply(this,arguments)}t.default={getCommands:k,show:M}}}]);