Files
pgsql-jellyfin/Jellyfin.Server/wwwroot/favorites.3a3a24865e3b5fc3d8f7.chunk.js
T
2026-07-08 13:13:46 -04:00

1 line
17 KiB
JavaScript

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4062,66884],{1177:function(e,t,r){r(84734),r(44962),r(78557),r(96054),r(90076),r(83994),r(82367),r(69177);var i=r(65210),n=r(22832),o=r(38490),s=r(39738),a=r(76542),l=r(46782),c=r(34789),u=r(36300),h=r(8566),d=r(9164),f=r(67430),m=r(10736),v=r(44797),y=Object.create(HTMLDivElement.prototype);function p(e){var t=this,r=t.multiSelect;!1!==(null==r?void 0:r.onContainerClick.call(t,e))&&n.Ay.onClick.call(t,e)}function b(e){return e.preventDefault(),e.stopPropagation(),!1}function T(e){var t=e.target,r=u.Ay.parentWithAttribute(t,"data-id");if(null!=r&&r.getAttribute("data-serverid"))return o.default.handleCommand("menu",{sourceElement:r}),e.preventDefault(),e.stopPropagation(),!1}function g(e,t,i){var n=this;Promise.all([r.e(45642),r.e(24468),r.e(66884)]).then(r.bind(r,24468)).then((function(e){e.onUserDataChanged(i,n)}));var o=A(n);-1===o.indexOf("markfavorite")&&-1===o.indexOf("markplayed")||n.notifyRefreshNeeded()}function A(e){var t=e.getAttribute("data-monitor");return t?t.split(","):[]}function S(e,t,i){var n=this;if(-1===A(n).indexOf("timers")){var o=i.ProgramId,s=i.Id;Promise.all([r.e(45642),r.e(24468),r.e(66884)]).then(r.bind(r,24468)).then((function(e){e.onTimerCreated(o,s,n)}))}else n.notifyRefreshNeeded()}function w(){-1!==A(this).indexOf("seriestimers")&&this.notifyRefreshNeeded()}function x(e,t,i){var n=this;-1===A(n).indexOf("timers")?Promise.all([r.e(45642),r.e(24468),r.e(66884)]).then(r.bind(r,24468)).then((function(e){e.onTimerCancelled(i.Id,n)})):n.notifyRefreshNeeded()}function C(e,t,i){var n=this;-1===A(n).indexOf("seriestimers")?Promise.all([r.e(45642),r.e(24468),r.e(66884)]).then(r.bind(r,24468)).then((function(e){e.onSeriesTimerCancelled(i.Id,n)})):n.notifyRefreshNeeded()}function P(e,t,r){var i=this,n=A(i);if(-1===n.indexOf("seriestimers")&&-1===n.indexOf("timers")){var o=r.ItemsAdded||[],s=r.ItemsRemoved||[];if(o.length||s.length){var a=i.getAttribute("data-parentid");if(a){var l=r.FoldersAddedTo||[],c=r.FoldersRemovedFrom||[],u=r.CollectionFolders||[];if(-1===l.indexOf(a)&&-1===c.indexOf(a)&&-1===u.indexOf(a))return}i.notifyRefreshNeeded()}}}function I(e,t){var r,i=this,n=t.state,o=A(i);if(n.NowPlayingItem&&"Video"===n.NowPlayingItem.MediaType){if(-1!==o.indexOf("videoplayback"))return void i.notifyRefreshNeeded(!0)}else if("Audio"===(null===(r=n.NowPlayingItem)||void 0===r?void 0:r.MediaType)&&-1!==o.indexOf("audioplayback"))return void i.notifyRefreshNeeded(!0)}function E(e,t,r,i){var n=r.bind(e);i=i||m.default,v.A.on(i,t,n),e["event_"+t]=n}function k(e,t,r){var i=e["event_"+t];i&&(r=r||m.default,v.A.off(r,t,i),e["event_"+t]=null)}function B(e,t){e.refreshInterval&&(clearInterval(e.refreshInterval),e.refreshInterval=null,t||(e.refreshIntervalEndTime=null))}function R(e,t){B(e),t||(t=parseInt(e.getAttribute("data-refreshinterval")||"0",10)),t&&(e.refreshInterval=setInterval(e.notifyRefreshNeeded.bind(e),t),e.refreshIntervalEndTime=(new Date).getTime()+t)}function L(e){var t=e.Items||e,r=this.parentContainer;r&&(t.length?r.classList.remove("hide"):r.classList.add("hide"));var i,n,o=document.activeElement;this.contains(o)&&(n=!0,i=o.getAttribute("data-id")),this.innerHTML=this.getItemsHtml(t),a.default.lazyChildren(this),n&&function(e,t){if(t){var r=e.querySelector('[data-id="'+t+'"]');if(r)try{return void d.A.focus(r)}catch(e){console.error(e)}}d.A.autoFocus(e)}(this,i),R(this),this.afterRefresh&&this.afterRefresh(e)}y.enableMultiSelect=function(e){var t=this.multiSelect;if(e){if(!t){var i=this;r.e(35308).then(r.bind(r,35308)).then((function(e){var t=e.default;i.multiSelect=new t({container:i,bindOnClick:!1})}))}}else t&&(t.destroy(),this.multiSelect=null)},y.enableDragReordering=function(e){var t=this.sortable;if(e){if(!t){var r=this;r.sortable=new i.Ay(r,{draggable:".listItem",handle:".listViewDragHandle",onEnd:function(e){return function(e,t){var r=e.item,i=e.newIndex,n=r.getAttribute("data-playlistitemid"),o=r.getAttribute("data-playlistid");if(o){var s=r.getAttribute("data-serverid"),a=f.tF.getApiClient(s);h.Ay.show(),a.ajax({url:a.getUrl("Playlists/"+o+"/Items/"+n+"/Move/"+i),type:"POST"}).then((function(){h.Ay.hide()}),(function(){h.Ay.hide(),t.refreshItems()}))}else{var l=e.oldIndex;r.dispatchEvent(new CustomEvent("itemdrop",{detail:{oldIndex:l,newIndex:i,playlistItemId:n},bubbles:!0,cancelable:!1}))}}(e,r)}})}}else t&&(t.destroy(),this.sortable=null)},y.createdCallback=function(){this.classList.add("itemsContainer")},y.attachedCallback=function(){this.addEventListener("click",p),c.A.touch?this.addEventListener("contextmenu",b):"false"!==this.getAttribute("data-contextmenu")&&this.addEventListener("contextmenu",T),(l.A.desktop||l.A.mobile&&"false"!==this.getAttribute("data-multiselect"))&&this.enableMultiSelect(!0),l.A.tv&&this.classList.add("itemsContainer-tv"),n.Ay.on(this,{click:!1}),E(this,"UserDataChanged",g),E(this,"TimerCreated",S),E(this,"SeriesTimerCreated",w),E(this,"TimerCancelled",x),E(this,"SeriesTimerCancelled",C),E(this,"LibraryChanged",P),E(this,"playbackstop",I,s.f),"true"===this.getAttribute("data-dragreorder")&&this.enableDragReordering(!0)},y.detachedCallback=function(){B(this),this.enableMultiSelect(!1),this.enableDragReordering(!1),this.removeEventListener("click",p),this.removeEventListener("contextmenu",T),this.removeEventListener("contextmenu",b),n.Ay.off(this,{click:!1}),k(this,"UserDataChanged"),k(this,"TimerCreated"),k(this,"SeriesTimerCreated"),k(this,"TimerCancelled"),k(this,"SeriesTimerCancelled"),k(this,"LibraryChanged"),k(this,"playbackstop",s.f),this.fetchData=null,this.getItemsHtml=null,this.parentContainer=null},y.pause=function(){B(this,!0),this.paused=!0},y.resume=function(e){this.paused=!1;var t=this.refreshIntervalEndTime;if(t){var r=t-(new Date).getTime();r>0&&!this.needsRefresh?R(this,r):(this.needsRefresh=!0,this.refreshIntervalEndTime=null)}return this.needsRefresh||null!=e&&e.refresh?this.refreshItems():Promise.resolve()},y.refreshItems=function(){return this.fetchData?this.paused?(this.needsRefresh=!0,Promise.resolve()):(this.needsRefresh=!1,this.fetchData().then(L.bind(this))):Promise.resolve()},y.notifyRefreshNeeded=function(e){if(this.paused)this.needsRefresh=!0;else{var t=this.refreshTimeout;t&&clearTimeout(t),!0===e?this.refreshItems():this.refreshTimeout=setTimeout(this.refreshItems.bind(this),1e4)}},document.registerElement("emby-itemscontainer",{prototype:y,extends:"div"})},41765:function(e,t,r){r(44962),r(78557),r(90076),r(83994),r(82367);var i=r(4113),n=r(36300),o=r(46782),s=r(38490),a=r(9164),l=r(34789),c=(r(69177),Object.create(HTMLDivElement.prototype));function u(e){var t=e.detail.command;"end"===t?(a.A.focusLast(this,"."+this.getAttribute("data-navcommands")),e.preventDefault(),e.stopPropagation()):"pageup"===t?(a.A.moveFocus(e.target,this,"."+this.getAttribute("data-navcommands"),-12),e.preventDefault(),e.stopPropagation()):"pagedown"===t&&(a.A.moveFocus(e.target,this,"."+this.getAttribute("data-navcommands"),12),e.preventDefault(),e.stopPropagation())}c.createdCallback=function(){this.classList.add("emby-scroller")},c.scrollToBeginning=function(){this.scroller&&this.scroller.slideTo(0,!0)},c.toStart=function(e,t){this.scroller&&this.scroller.toStart(e,t)},c.toCenter=function(e,t){this.scroller&&this.scroller.toCenter(e,t)},c.scrollToPosition=function(e,t){this.scroller&&this.scroller.slideTo(e,t)},c.getScrollPosition=function(){if(this.scroller)return this.scroller.getScrollPosition()},c.getScrollSize=function(){if(this.scroller)return this.scroller.getScrollSize()},c.getScrollEventName=function(){if(this.scroller)return this.scroller.getScrollEventName()},c.getScrollSlider=function(){if(this.scroller)return this.scroller.getScrollSlider()},c.addScrollEventListener=function(e,t){this.scroller&&n.Ay.addEventListener(this.scroller.getScrollFrame(),this.scroller.getScrollEventName(),e,t)},c.removeScrollEventListener=function(e,t){this.scroller&&n.Ay.removeEventListener(this.scroller.getScrollFrame(),this.scroller.getScrollEventName(),e,t)},c.attachedCallback=function(){this.getAttribute("data-navcommands")&&s.default.on(this,u);var e="false"!==this.getAttribute("data-horizontal"),t=this.querySelector(".scrollSlider");e&&(t.style["white-space"]="nowrap");var c,h,d=o.A.desktop&&e&&"false"!==this.getAttribute("data-scrollbuttons"),f={horizontal:e,mouseDragging:1,mouseWheel:"false"!==this.getAttribute("data-mousewheel"),touchDragging:1,slidee:t,scrollBy:200,speed:e?270:240,elasticBounds:1,dragHandle:1,autoImmediate:!0,skipSlideToWhenVisible:"true"===this.getAttribute("data-skipfocuswhenvisible"),dispatchScrollEvent:d||"true"===this.getAttribute("data-scrollevent"),hideScrollbar:d||"true"===this.getAttribute("data-hidescrollbar"),allowNativeSmoothScroll:"true"===this.getAttribute("data-allownativesmoothscroll")&&!d,allowNativeScroll:!d,forceHideScrollbars:d,requireAnimation:d&&l.A.edge};this.scroller=new i.A(this,f),this.scroller.init(),this.scroller.reload(),o.A.tv&&this.getAttribute("data-centerfocus")&&(c=this.scroller,n.Ay.addEventListener(this,"focus",(function(e){var t=a.A.focusableParent(e.target);t&&c.toCenter(t)}),{capture:!0,passive:!0})),d&&(h=this,r.e(49275).then(r.bind(r,49275)).then((function(){h.insertAdjacentHTML("beforebegin",'<div is="emby-scrollbuttons" class="emby-scrollbuttons padded-right"></div>')})))},c.pause=function(){var e=this.headroom;e&&e.pause()},c.resume=function(){var e=this.headroom;e&&e.resume()},c.detachedCallback=function(){this.getAttribute("data-navcommands")&&s.default.off(this,u);var e=this.headroom;e&&(e.destroy(),this.headroom=null);var t=this.scroller;t&&(t.destroy(),this.scroller=null)},document.registerElement("emby-scroller",{prototype:c,extends:"div"})},53857:function(e,t,r){r.r(t),r(29305),r(32733),r(84701),r(81678),r(69892),r(44962),r(89336),r(4754),r(94),r(36947),r(78557),r(90076),r(95021),r(73687),r(83994),r(23630),r(82367);var i=r(11444),n=r(77612),o=r(24468),s=r(9164),a=r(46782),l=r(70267),c=r(36300),u=r(5898),h=r(67430),d=r(76942);function f(e){return f="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},f(e)}function m(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,v(i.key),i)}}function v(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function y(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 p(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)?p(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var i=0,n=function(){};return{s:n,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},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 o,s=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function b(e){return function(){var t=this.apiClient,r={SortBy:[n.B.SeriesSortName,n.B.SortName].join(","),SortOrder:"Ascending",Filters:"IsFavorite",Recursive:!0,Fields:"PrimaryImageAspectRatio",CollapseBoxSetItems:!1,ExcludeLocationTypes:"Virtual",EnableTotalRecordCount:!1,Limit:20},i=t.getCurrentUserId();return"MusicArtist"===e.types?t.getArtists(i,r):"Person"===e.types?t.getPeople(i,r):(r.IncludeItemTypes=e.types,t.getItems(i,r))}}function T(e,t){return l.appRouter.getRouteUrl("list",{serverId:t,itemTypes:e.types,isFavorite:!0})}function g(e){return function(t){var r=this.apiClient.serverId(),i=a.A.tv?[{name:u.Ay.translate("All"),id:"more",icon:"favorite",routeUrl:T(e,r)}]:null,n=0;return e.showTitle&&n++,e.showYear&&n++,e.showParentTitle&&n++,o.default.getCardsHtml({items:t,preferThumb:e.preferThumb,shape:e.shape,centerText:e.centerText&&!0,overlayText:!1!==e.overlayText,showTitle:e.showTitle,showYear:e.showYear,showParentTitle:e.showParentTitle,scalable:!0,coverImage:e.coverImage,overlayPlayButton:e.overlayPlayButton,overlayMoreButton:e.overlayMoreButton&&!0,action:e.action,allowBottomPadding:!1,cardLayout:!1,leadingButtons:i,lines:n})}}r(1177),r(41765);var A=function(){return e=function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.view=t,this.params=r,this.apiClient=h.tF.currentApiClient(),this.sectionsContainer=t.querySelector(".sections"),function(e,t,r){var n,o=[{name:"Movies",types:"Movie",shape:(0,d.xK)(!0),showTitle:!0,showYear:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"Shows",types:"Series",shape:(0,d.xK)(!0),showTitle:!0,showYear:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"HeaderSeasons",types:i.D.Season,shape:(0,d.xK)(!0),showTitle:!0,showParentTitle:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"Episodes",types:"Episode",shape:(0,d.UI)(!0),preferThumb:!1,showTitle:!0,showParentTitle:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"HeaderVideos",types:"Video",shape:(0,d.UI)(!0),preferThumb:!0,showTitle:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"MusicVideos",types:"MusicVideo",shape:(0,d.UI)(!0),preferThumb:!0,showTitle:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"Collections",types:"BoxSet",shape:(0,d.xK)(!0),showTitle:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"Playlists",types:"Playlist",shape:(0,d.zP)(!0),preferThumb:!1,showTitle:!0,overlayText:!1,showParentTitle:!1,centerText:!0,overlayPlayButton:!0,coverImage:!0},{name:"People",types:"Person",shape:(0,d.xK)(!0),preferThumb:!1,showTitle:!0,overlayText:!1,showParentTitle:!1,centerText:!0,overlayPlayButton:!0,coverImage:!0},{name:"Artists",types:"MusicArtist",shape:(0,d.zP)(!0),preferThumb:!1,showTitle:!0,overlayText:!1,showParentTitle:!1,centerText:!0,overlayPlayButton:!0,coverImage:!0},{name:"Albums",types:"MusicAlbum",shape:(0,d.zP)(!0),preferThumb:!1,showTitle:!0,overlayText:!1,showParentTitle:!0,centerText:!0,overlayPlayButton:!0,coverImage:!0},{name:"Songs",types:"Audio",shape:(0,d.zP)(!0),preferThumb:!1,showTitle:!0,overlayText:!1,showParentTitle:!0,centerText:!0,overlayMoreButton:!0,action:"instantmix",coverImage:!0},{name:"Books",types:"Book",shape:(0,d.xK)(!0),showTitle:!0,showYear:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"Channels",types:"LiveTVChannel",shape:(0,d.UI)(!0),showTitle:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"HeaderPhotoAlbums",types:"PhotoAlbum",shape:(0,d.UI)(!0),showTitle:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"Photos",types:"Photo",shape:(0,d.UI)(!0),showTitle:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0}],s="",l=y(o);try{for(l.s();!(n=l.n()).done;){var h=n.value,f="verticalSection";h.showTitle||(f+=" verticalSection-extrabottompadding"),s+='<div class="'+f+' hide">',s+='<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">',a.A.tv?s+='<h2 class="sectionTitle sectionTitle-cards">'+u.Ay.translate(h.name)+"</h2>":(s+='<a is="emby-linkbutton" href="'+T(h,r.serverId())+'" class="more button-flat button-flat-mini sectionTitleTextButton">',s+='<h2 class="sectionTitle sectionTitle-cards">',s+=u.Ay.translate(h.name),s+="</h2>",s+='<span class="material-icons chevron_right" aria-hidden="true"></span>',s+="</a>"),s+="</div>",s+='<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-centerfocus="true"><div is="emby-itemscontainer" class="itemsContainer scrollSlider focuscontainer-x" data-monitor="markfavorite"></div></div>',s+="</div>"}}catch(e){l.e(e)}finally{l.f()}t.innerHTML=s,window.CustomElements.upgradeSubtree(t);for(var m=t.querySelectorAll(".itemsContainer"),v=0,p=m.length;v<p;v++){var A=m[v];A.fetchData=b(o[v]).bind(e),A.getItemsHtml=g(o[v]).bind(e),A.parentContainer=c.Ay.parentWithClass(A,"verticalSection")}}(this,this.sectionsContainer,this.apiClient)},t=[{key:"onResume",value:function(e){var t,r=[],i=this.view,n=y(this.sectionsContainer.querySelectorAll(".itemsContainer"));try{for(n.s();!(t=n.n()).done;){var o=t.value;r.push(o.resume(e))}}catch(e){n.e(e)}finally{n.f()}Promise.all(r).then((function(){e.autoFocus&&s.A.autoFocus(i)}))}},{key:"onPause",value:function(){this.sectionsContainer&&Array.from(this.sectionsContainer.querySelectorAll(".itemsContainer")).forEach((function(e){e.pause()}))}},{key:"destroy",value:function(){this.view=null,this.params=null,this.apiClient=null;var e,t=y(this.sectionsContainer.querySelectorAll(".itemsContainer"));try{for(t.s();!(e=t.n()).done;){var r=e.value;r.fetchData=null,r.getItemsHtml=null,r.parentContainer=null}}catch(e){t.e(e)}finally{t.f()}this.sectionsContainer=null}}],t&&m(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();t.default=A}}]);