PageSourceSearch

https://touhoudb.com/assets/SongDetails-Chnp31C0.js

js touhoudb.com collected 2026-09-25 21:50:08 UTC 41,724 bytes, 1 lines download raw bytes

1var Ie=Object.defineProperty;var Pe=(i,e,r)=>e in i?Ie(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r;var n=(i,e,r)=>Pe(i,typeof e!="symbol"?e+"":e,r);import{as as W,aC as ke,aq as re,bp as ae,m as q,A as Ce,i as y,p as Ee,f as S,o as f,c3 as Ae,bi as oe,ay as Me,d as M,c4 as $e,al as A,k as Re,am as I,ae as T,j as t,a,aH as Fe,av as J,x as O,E as v,ao as V,R as b,F as u,at as Oe,s as x,an as se,ai as B,c5 as xe,q as D,ar as Le,C as R,ap as ve,ag as Y,aE as Ue,aj as _e,D as Se,b as U,c as Be,u as je,t as We,bh as le,aA as ze,h as qe,v as Ke,aB as Ge,bq as ce,S as He}from"./index-8plysmrn.js";import{N as de,B as Je,L as Qe}from"./Layout-C2_GUOk9.js";import{D as Ye,E as Xe}from"./EntryStatusMessage-GTsjRiJ-.js";import{R as Ze}from"./ReportEntryPopupKnockout-DeeYJ3Mr.js";import{E as ei}from"./EmbedPVPreview-C69nq7hQ.js";import{L as ii,D as ti}from"./LatestCommentsKnockout-BetXaw10.js";import{a as si,b as ni,T as ri,c as ai}from"./TagsEditStore-a479FDVx.js";import{S as oi}from"./SongHelper-Dg8YbD1H.js";import{A as N}from"./ArtistCategories-8QAIaZtm.js";import{J as w}from"./JQueryUIButton-rEh4ie0w.js";import{J as z}from"./JQueryUIDialog-Fu6f8Bh3.js";import{s as li}from"./ui-CWUurCG7.js";import{E as ci}from"./EditableCommentsStore-ClWUUxUE.js";import{a as di,E as hi}from"./EnglishTranslatedStringStore-D-QR1J81.js";import{R as gi}from"./ReportEntryStore-DapPaf6i.js";import{a as ui,A as F,S as H,E as pi,P as mi,L as yi}from"./SelfDescriptionStore-CJKz6K4j.js";import{J as _}from"./JQueryUITabs-MZRT0nsN.js";import{d as bi,b as fi}from"./EntryToolTip-ChElqfq7.js";import{E as wi,M as Vi}from"./MarkdownHelper-MuYQtcAA.js";import{U as Ri}from"./UniversalTimeLabel-CW6jm3f9.js";import{S as Q}from"./SongGrid-C1xLihWE.js";import{S as Te}from"./SongLink-C4_P0mI8.js";import{S as ee}from"./SongTypeLabel-3RVuSKej.js";import{T as Li}from"./TagLink-BgJw33Yk.js";import{B as vi}from"./BpmHelper-BFcrTRBt.js";import{W as Si}from"./WebLinkCategory-D8SmqWu8.js";import{U as Ti}from"./UserIconLink_UserForApiContract-z0W2dRch.js";import{S as he}from"./SongListFeaturedCategory-D-RNkTj_.js";import{I as Ni}from"./IconAndNameLinkKnockout-0GC-Nk9a.js";import{T as ge}from"./Trans-D43F5e_v.js";import{E as Di}from"./EditableComments-DL9cuYNB.js";import{u as Ii}from"./useLocationStateHandler-DU1fwmRO.js";import"./EntryLink-DlG-5V5Z.js";import"./NotificationIcon-B1BvXNO6.js";import"./TagAutoComplete-BmYP8_A4.js";import"./EntryAutoComplete-92k-oqqy.js";import"./JQueryUICheckbox-B5G-nwyS.js";import"./map-C1l46gJL.js";import"./useWillUnmount-Ctu0o8Dn.js";import"./FormatMarkdown-PkorK3fa.js";import"./Markdown-5fKx-mi3.js";import"./ArtistLink-CTPFnntb.js";import"./ArtistTypeLabel-CiDS_vBs.js";import"./useEventCallback-CAj94tAM.js";import"./QTipToolTip-3ReOZ9p7.js";import"./UrlHelper-Bme_q_7B.js";import"./EventCategory-CtpKpyKt.js";import"./ExternalLinksList-Ce6d6xRv.js";import"./UserLink-CACJVDMm.js";import"./MomentJsTimeAgo-uV5QInNO.js";import"./ServerSidePaging-myE06lbI.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};i.__faroBundleId_vocadb_frontend="1774823875286c67e3437a1"}catch{}})();const j=class j{};n(j,"relatedSiteUrlRegex",new RegExp(/^https?:\/\/((utaitedb\.net)|(vocadb\.net)|(touhoudb\.com))\/((Song\/Details)|S)\/\d+/,"i")),n(j,"isRelatedSite",e=>e?j.relatedSiteUrlRegex.test(e):!1);let ie=j;class Pi{constructor(e,r){n(this,"additionalNames");n(this,"albums");n(this,"alternateVersions");n(this,"animators");n(this,"artistString");n(this,"bands");n(this,"browsedAlbumId");n(this,"canEditPersonalDescription");n(this,"canRemoveTagUsages");n(this,"commentCount");n(this,"commentsLocked");n(this,"createDate");n(this,"cultureCodes");n(this,"deleted");n(this,"draft");n(this,"favoritedTimes");n(this,"hits");n(this,"id");n(this,"illustrators");n(this,"jsonModel");n(this,"latestComments");n(this,"length");n(this,"likedTimes");n(this,"listCount");n(this,"lyrics");n(this,"maxMilliBpm");n(this,"mergedTo");n(this,"minMilliBpm");n(this,"name");n(this,"notes");n(this,"originalPVs");n(this,"originalVersion");
1n(this,"otherArtists");n(this,"otherPVs");n(this,"performers");n(this,"personalDescriptionAuthor");n(this,"personalDescriptionText");n(this,"pools");n(this,"primaryPV");n(this,"producers");n(this,"publishDate");n(this,"ratingScore");n(this,"releaseEvent");n(this,"releaseEvents");n(this,"songType");n(this,"songTypeTag");n(this,"status");n(this,"subject");n(this,"suggestions");n(this,"tags");n(this,"userRating");n(this,"webLinks");var c;this.contract=e,this.additionalNames=e.additionalNames,this.albums=e.albums,this.alternateVersions=e.alternateVersions.filter(l=>l.songType!==W.Original),this.artistString=e.artistString,this.browsedAlbumId=(c=e.album)==null?void 0:c.id,this.canEditPersonalDescription=e.canEditPersonalDescription,this.canRemoveTagUsages=e.canRemoveTagUsages,this.commentCount=e.commentCount,this.commentsLocked=e.commentsLocked,this.createDate=e.createDate,this.cultureCodes=e.cultureCodes,this.deleted=e.deleted,this.draft=e.song.status===ke.Draft,this.favoritedTimes=e.song.favoritedTimes,this.hits=e.hits,this.id=e.song.id,this.latestComments=e.latestComments,this.length=e.song.lengthSeconds,this.likedTimes=e.likeCount,this.listCount=e.listCount,this.lyrics=e.lyricsFromParents,this.maxMilliBpm=e.maxMilliBpm,this.mergedTo=e.mergedTo,this.minMilliBpm=e.minMilliBpm,this.name=e.song.name,this.notes=e.notes,this.originalVersion=e.song.songType!==W.Original?e.originalVersion:void 0,this.personalDescriptionAuthor=e.personalDescriptionAuthor,this.personalDescriptionText=e.personalDescriptionText,this.pools=e.pools,this.publishDate=e.song.publishDate,this.ratingScore=e.song.ratingScore,this.releaseEvent=e.releaseEvent,this.releaseEvents=e.releaseEvents,this.songType=e.song.songType,this.songTypeTag=e.songTypeTag,this.status=e.song.status,this.suggestions=e.suggestions,this.tags=e.tags,this.userRating=e.userRating,this.webLinks=e.webLinks;const o=oi.getContentFocus(this.songType);this.animators=e.artists.filter(l=>l.categories.split(",").map(d=>d.trim()).includes(N.Animator)),this.bands=e.artists.filter(l=>l.categories.split(",").map(d=>d.trim()).includes(N.Band)),this.illustrators=o===re.Illustration?e.artists.filter(l=>l.categories.split(",").map(d=>d.trim()).includes(N.Illustrator)):void 0,this.otherArtists=e.artists.filter(l=>l.categories.split(",").map(d=>d.trim()).includes(N.Circle)||l.categories.split(",").map(d=>d.trim()).includes(N.Label)||l.categories.split(",").map(d=>d.trim()).includes(N.Other)||o!==re.Illustration&&l.categories.split(",").map(d=>d.trim()).includes(N.Illustrator)),this.performers=e.artists.filter(l=>l.categories.split(",").map(d=>d.trim()).includes(N.Vocalist)),this.producers=e.artists.filter(l=>l.categories.split(",").map(d=>d.trim()).includes(N.Producer));const s=e.artists.filter(l=>l.categories.split(",").map(d=>d.trim()).includes(N.Subject));this.subject=s.length>0?s:e.subjectsFromParents,this.originalPVs=e.pvs.filter(l=>l.pvType===ae.Original),this.otherPVs=e.pvs.filter(l=>l.pvType!==ae.Original),this.primaryPV=r,this.jsonModel=new ki(this,e.preferredLyrics,e.song.version)}}class ki{constructor(e,r,o){n(this,"commentsLocked");n(this,"id");n(this,"latestComments");n(this,"linkedPages");n(this,"originalVersion");n(this,"selectedLyricsId");n(this,"selectedPvId");n(this,"personalDescriptionAuthor");n(this,"personalDescriptionText");n(this,"songType");n(this,"tagUsages");n(this,"userRating");n(this,"version");var s;this.commentsLocked=e.commentsLocked,this.id=e.id,this.userRating=e.userRating,this.latestComments=e.latestComments,this.originalVersion=e.originalVersion,this.personalDescriptionAuthor=e.personalDescriptionAuthor,this.personalDescriptionText=e.personalDescriptionText,this.version=o,this.selectedLyricsId=(r==null?void 0:r.id)??0,this.selectedPvId=((s=e.primaryPV)==null?void 0:s.id)??0,this.songType=e.songType,this.tagUsages=e.tags,this.linkedPages=e.webLinks.map(c=>c.url).filter(ie.isRelatedSite)}}var Ne=(i=>(i.BrokenPV="BrokenPV",i.InvalidInfo="InvalidInfo",i.Duplicate="Duplicate",i.Inappropriate="Inappropriate",i.Other="Other",i.InvalidTag="InvalidTag",i))(Ne||{});const Ci=["BrokenPV","InvalidInfo","Other","InvalidTag"],Ei="http://json-schema.org/draft-07/schema#",Ai={albumId:{type:"number"},lyricsId:{type:"number"}},Mi="object",$i={$schema:Ei,properties:Ai,type:Mi};var Fi=Object.defineProperty,Oi=Object.getOwnPropertyDescriptor,X=(i,e,r,o)=>{for(var s=o>1?void 0:o?Oi(e,r):e,c=i.length-1,l;c>=0;c--)(l=i[c])&&(s=(o?l(e,r,s):l(s))||s);return o&&s&&Fi(e,r,s),s};const xi=[],Ui=new Ce({coerceTypes:!0}),_i=Ui.compile($i);class K{constructor(e,r,o){n(this,"albumId");n(this,"selectedLyrics");n(this,"selectedLyricsId");n(this,"validateLocationState",e=>_i(e));n(this,"pauseNotifications",!1);n(this,"updateResults",async e=>{if(this.pauseNotifications)return;this.pauseNotifications=!0;const r=await this.songRepo.getLyrics({lyricsId:this.selectedLyricsId,songVersion:this.songVersion});this.pauseNotifications=!1,y(()=>{this.selectedLyrics=r})});n(this,"onLocationStateChange",e=>{const r=Ee(xi,e.keys);this.updateResults(r)});this.songRepo=e,this.lyricsId=r,this.songVersion=o,q(this),this.selectedLyricsId=r}get locationState(){return{albumId:this.albumId,lyricsId:this.selectedLyricsId}}set locationState(e){this.albumId=e.albumId,this.selectedLyricsId=e.lyricsId||this.lyricsId}}X([f],K.prototype,"albumId",2);X([f],K.prototype,"selectedLyrics",2);X([f],K.prototype,"selectedLyricsId",2);X([S.struct],K.prototype,"locationState",1);var Bi=Object.defineProperty,ji=Object.getOwnPropertyDescriptor,g=(i,e,r,o)=>{for(var s=o>1?void 0:o?ji(e,r):e,c=i.length-1,l;c>=0;c--)(l=i[c])&&(s=(o?l(e,r,s):l(s))||s);return o&&s&&Bi(e,r,s),s};const ue=A[A.Favorite],pe=A[A.Like];class P{constructor(){n(this,"popupVisible",!1);n(this,"ratings",[]);q(this)}get favorites(){return this.ratings.filter(e=>!!e.user&&e.rating===ue).take(20).map(e=>e.user).sortBy(e=>e.name)}
1get favoritesCount(){return this.ratings.filter(e=>e.rating===ue).length}get likes(){return this.ratings.filter(e=>!!e.user&&e.rating===pe).take(20).map(e=>e.user).sortBy(e=>e.name)}get likesCount(){return this.ratings.filter(e=>e.rating===pe).length}get hiddenRatingsCount(){return this.ratings.filter(e=>!e.user).length}get showFavorites(){return!!this.favorites.length}get showLikes(){return!!this.likes.length}}g([f],P.prototype,"popupVisible",2);g([f],P.prototype,"ratings",2);g([S],P.prototype,"favorites",1);g([S],P.prototype,"favoritesCount",1);g([S],P.prototype,"likes",1);g([S],P.prototype,"likesCount",1);g([S],P.prototype,"hiddenRatingsCount",1);g([S],P.prototype,"showFavorites",1);g([S],P.prototype,"showLikes",1);class ne{constructor(e,r){n(this,"listsForSong",[]);n(this,"dialogVisible",!1);n(this,"show",()=>{this.songRepo.songListsForSong({songId:this.songId}).then(e=>y(()=>{this.listsForSong=e,this.dialogVisible=!0}))});this.songRepo=e,this.songId=r,q(this)}}g([f],ne.prototype,"listsForSong",2);g([f],ne.prototype,"dialogVisible",2);var L;const k=(L=class{constructor(e,r){n(this,"dialogVisible",!1);n(this,"featuredLists",[]);n(this,"newListName","");n(this,"notes","");n(this,"personalLists",[]);n(this,"selectedListId");n(this,"tabName",L.tabName_Personal);n(this,"addSongToList",()=>{if(!this.isValid)return Promise.reject();const e=this.tabName!==L.tabName_New&&this.selectedListId||0;return this.songRepo.addSongToList({listId:e,songId:this.songId,notes:this.notes,newListName:this.newListName}).then(()=>{y(()=>{this.notes="",this.dialogVisible=!1})})});n(this,"showSongLists",()=>{this.songRepo.songListsForUser({ignoreSongId:this.songId}).then(e=>{const r=e.filter(s=>s.featuredCategory==="Nothing"),o=e.filter(s=>s.featuredCategory!=="Nothing");y(()=>{this.personalLists=r,this.featuredLists=o,r.length?this.tabName=L.tabName_Personal:o.length?this.tabName=L.tabName_Featured:this.tabName=L.tabName_New,this.newListName="",this.selectedListId=this.songLists.length>0?this.songLists[0].id:void 0,this.dialogVisible=!0})})});this.songRepo=e,this.songId=r,q(this)}get isValid(){return!!this.selectedListId||this.newListName.length>0}get songLists(){return this.tabName===L.tabName_Personal?this.personalLists:this.featuredLists}},n(L,"tabName_Personal","Personal"),n(L,"tabName_Featured","Featured"),n(L,"tabName_New","New"),L);g([f],k.prototype,"dialogVisible",2);g([f],k.prototype,"featuredLists",2);g([f],k.prototype,"newListName",2);g([f],k.prototype,"notes",2);g([f],k.prototype,"personalLists",2);g([f],k.prototype,"selectedListId",2);g([f],k.prototype,"tabName",2);g([S],k.prototype,"isValid",1);g([S],k.prototype,"songLists",1);let E=k;class C{constructor(e,r,o,s,c,l,d,p,$){n(this,"allVersionsVisible",!1);n(this,"comments");n(this,"descriptionPv",null);n(this,"id");n(this,"maintenanceDialogVisible",!1);n(this,"originalVersion");n(this,"reportStore");n(this,"lyricsStore");n(this,"selectedPvId");n(this,"personalDescription");n(this,"description");n(this,"songInListsDialog");n(this,"songListDialog");n(this,"tagsEditStore");n(this,"tagUsages");n(this,"ratingsDialogStore",new P);n(this,"userRating");n(this,"getMatchedSite",e=>{const o=/(http(?:s)?:\/\/(?:(?:utaitedb\.net)|(?:vocadb\.net)|(?:touhoudb\.com))\/)(?:(?:Song)\/Details|(?:S))\/(\d+)/g.exec(e);if(!o||o.length<3)return;const s=o[1].replace("http://","https://"),c=parseInt(o[2]);return{siteUrl:s,id:c}});n(this,"getOriginal",e=>{if(!e||!e.length)return;const r=e[0],o=this.getMatchedSite(r);if(!o)return;const{siteUrl:s,id:c}=o;new $e(this.httpClient,s).getOneWithComponents({id:c,lang:this.values.languagePreference}).then(d=>{d.songType===W.Original&&y(()=>{this.originalVersion={entry:d,url:r,domain:s}})})});n(this,"getUsers",()=>{this.songRepo.getRatings({songId:this.id}).then(e=>y(()=>{this.ratingsDialogStore.ratings=e,this.ratingsDialogStore.popupVisible=!0}))});n(this,"showAllVersions",()=>{this.allVersionsVisible=!0});n(this,"showPvDescription",e=>{this.descriptionPv=e});n(this,"getRelated",()=>this.songRepo.getRelated({songId:this.id,lang:this.values.languagePreference,fields:oe.MainPicture}));this.values=e,this.httpClient=o,this.songRepo=s,q(this),this.id=p.id,this.userRating=new Ae(c,{id:p.id,vote:p.userRating}),this.comments=new ci(r,s,this.id,$,$,!1,p.latestComments,!0,p.commentsLocked),this.originalVersion={entry:p.originalVersion},this.reportStore=new gi((h,m)=>s.createReport({songId:this.id,reportType:h,notes:m,versionNumber:void 0})),this.personalDescription=new ui(e,p.personalDescriptionAuthor,p.personalDescriptionText,l,()=>s.getOneWithComponents({id:this.id,fields:[oe.Artists],lang:e.languagePreference}).then(h=>(h.artists??[]).filter(Me.isValidForPersonalDescription).map(De=>De.artist)),h=>s.updatePersonalDescription({songId:this.id,text:h.text,author:h.author.entry})),this.songInListsDialog=new ne(s,this.id),this.songListDialog=new E(s,this.id),this.lyricsStore=new K(s,p.selectedLyricsId,p.version),this.selectedPvId=p.selectedPvId,this.description=new di(d),this.tagsEditStore=new si({getTagSelections:()=>c.getSongTagSelections({songId:this.id}),saveTagSelections:h=>c.updateSongTags({songId:this.id,tags:h}).then(this.tagUsages.updateTagUsages)},M.Song,p.songType,()=>s.getTagSuggestions({songId:this.id})),this.tagUsages=new ni(p.tagUsages),p.songType!==W.Original&&!this.originalVersion.entry&&this.getOriginal(p.linkedPages)}get selectedLyrics(){return this.lyricsStore.selectedLyrics}get selectedLyricsId(){return this.lyricsStore.selectedLyricsId}set selectedLyricsId(e){this.lyricsStore.selectedLyricsId=e}}g([f],C.prototype,"allVersionsVisible",2);g([f],C.prototype,"descriptionPv",2);g([f],C.prototype,"maintenanceDialogVisible",2);g([f],C.prototype,"originalVersion",2);g([f],C.prototype,"selectedPvId",2);g([S],C.prototype,"selectedLyrics",1);g([S],C.prototype,"selectedLyricsId",1);g([Re],C.prototype,"showAllVersions",2);g([Re],C.prototype,"showPvDescription",2);const Wi=I(({songListsStore:i})=>{const{t:e}=T(["AjaxRes","ViewRes.Song"]);return t(z,{title:e("ViewRes.Song:Details.AddToList"),autoOpen:i.dialogVisible,width:300,buttons:[{text:e("ViewRes:Shared.Save"),click:async()=>{await i.addSongToList(),li(e("AjaxRes:Song.AddedToList"))}}],close:()=>y(()=>{i.dialogVisible=!1}),children:a("div",{className:"song-add-to-list-dialog",children:[a(Fe,{children:[i.personalLists.length>0&&t(J,{className:O("btn-small",i.tabName===E.tabName_Personal&&"active"),onClick:()=>y(()=>{i.tabName=E.tabName_Personal}),href:"#",children:e("ViewRes.Song:Details.ListsTabPersonal")}),i.featuredLists.length>0&&t(J,{className:O("btn-small",i.tabName===E.tabName_Featured&&"active"),onClick:()=>y(()=>{i.tabName=E.tabName_Featured}),href:"#",children:e("ViewRes.Song:Details.ListsTabFeatured")}),t(J,{className:O("btn-small",i.tabName===E.tabName_New&&"active"),onClick:()=>y(()=>{i.tabName=E.tabName_New}),href:"#",children:e("ViewRes.Song:Details.ListsTabNew")})]}),i.tabName===E.tabName_New?a("div",{children:[t("label",{children:e("ViewRes.Song:Details.NewListName")}
1),t("input",{type:"text",value:i.newListName,onChange:r=>y(()=>{i.newListName=r.target.value}),maxLength:200,className:"add-to-list-name"})]}):t("select",{value:i.selectedListId&&i.songLists.map(r=>r.id).includes(i.selectedListId)?i.selectedListId:void 0,onChange:r=>y(()=>{i.selectedListId=Number(r.target.value)}),size:6,className:"add-to-list-song-lists",children:i.songLists.map(r=>t("option",{value:r.id,children:r.name},r.id))}),t("label",{children:e("ViewRes.Song:Details.Notes")}),t("input",{type:"text",value:i.notes,onChange:r=>y(()=>{i.notes=r.target.value}),maxLength:200,className:"add-to-list-notes"})]})})}),me=({album:i})=>t(V,{to:`${v.details(M.Album,i.id)}`,title:i.additionalNames,className:"albumLink",children:i.name}),te=({album:i,tooltip:e=!1})=>e?t(bi,{id:i.id,withCover:!0,children:t(me,{album:i})}):t(me,{album:i}),ye=({song:i,extUrl:e,...r})=>t("a",{...r,href:e,className:"extLink",children:i.name}),zi=b.memo(({song:i,albumId:e,extUrl:r,tooltip:o=!1,toolTipDomain:s})=>r?o?t(fi,{id:i.id,foreignDomain:s,children:t(ye,{song:i,extUrl:r,target:"_blank",referrerPolicy:"same-origin"})}):t(ye,{song:i,extUrl:r,title:i.additionalNames}):t(Te,{song:i,albumId:e,tooltip:o})),qi=I(({songInListsStore:i})=>{const{t:e}=T(["ViewRes.Song","Resources"]),r=i.listsForSong.filter(s=>s.featuredCategory!==he.Nothing).groupBy(s=>s.featuredCategory),o=i.listsForSong.filter(s=>s.featuredCategory===he.Nothing);return a(z,{title:e("ViewRes.Song:Details.SongInLists"),autoOpen:i.dialogVisible,width:400,close:()=>y(()=>{i.dialogVisible=!1}),children:[Object.keys(r).map((s,c)=>a(b.Fragment,{children:[t("h4",{children:e(`Resources:SongListFeaturedCategoryNames.${s}`)}),r[s].map((l,d)=>t("div",{children:t(V,{to:`/L/${l.id}`,children:l.name},d)}))]},c)),o.length>0&&a(u,{children:[t("h4",{children:e("ViewRes.Song:Details.CustomLists")}),o.map((s,c)=>a("div",{children:[t(V,{to:`/L/${s.id}`,children:s.name})," (",t(Ti,{user:s.author})," )"]},c))]})]})}),be=I(({user:i})=>Oe().includes(i.id)?t(u,{}):t("li",{className:"link-item user-with-rating",children:t(Ni,{user:i})})),Ki=I(({ratingsStore:i})=>{const{t:e}=T(["ViewRes","ViewRes.Song"]);return a(u,{children:[i.showFavorites&&a("div",{children:[a("h4",{children:[e("ViewRes.Song:Details.FavoritedByTitle")," ",t("span",{children:e("ViewRes:EntryDetails.NumTotalParenthesis",{0:i.favoritesCount})})]}),t("ul",{className:"link-list",children:i.favorites.map((r,o)=>a(b.Fragment,{children:[o>0&&" ",t(be,{user:r})]},r.id))})]}),i.showLikes&&a("div",{className:"withMargin",children:[a("h4",{children:[e("ViewRes.Song:Details.LikedByTitle")," ",t("span",{children:e("ViewRes:EntryDetails.NumTotalParenthesis",{0:i.likesCount})})]}),t("ul",{className:"link-list",children:i.likes.map((r,o)=>a(b.Fragment,{children:[o>0&&" ",t(be,{user:r})]},r.id))})]}),i.hiddenRatingsCount>0&&t("h4",{className:"withMargin",children:`${i.hiddenRatingsCount} hidden ratings`})]})}),Gi=b.memo(({album:i})=>a(u,{children:[t(te,{album:i,tooltip:!0}),!i.releaseDate.isEmpty&&a(u,{children:[" ",a("small",{className:"muted",children:[" (",i.releaseDate.year,")"]})]})]})),fe=b.memo(({songs:i})=>t(u,{children:i.map(e=>a(b.Fragment,{children:[t(Te,{song:e,tooltip:!0}),e.lengthSeconds>0&&a(u,{children:[" ","(",Le.formatFromSeconds(e.lengthSeconds),")"]})," ",t(ee,{songType:e.songType}),t("br",{}),e.artistString,t("br",{})]},e.id))}
1)),we=b.memo(({song:i,icon:e,albumId:r})=>a(V,{to:`${v.details_song(i)}?${D.stringify({albumId:r})}`,className:"btn",title:i.additionalNames,children:[t("i",{className:O(e,"noMargin")})," ",t("span",{children:i.name})]})),Hi=I(({songDetailsStore:i,pv:e,showPVType:r})=>{const{t:o}=T(["Resources","ViewRes.Song"]),{playQueue:s}=Ue();return b.useLayoutEffect(()=>{var c;e.id===((c=s.currentItem)==null?void 0:c.pv.id)&&y(()=>{i.selectedPvId=e.id})},[i,e,s]),a(J,{className:O("pvLink",i.selectedPvId===e.id&&"active"),disabled:e.disabled,href:"#",id:`pv_${e.id}`,onClick:()=>y(()=>{i.selectedPvId=e.id}),title:e.publishDate&&e.author?`${o("ViewRes.Song:Details.PVDescription",{0:ve(e.publishDate).format("ll"),1:e.author})}${e.disabled?` ${o("ViewRes.Song:Details.PVUnavailable")}`:""}`:void 0,children:[t(_e,{service:e.service})," ",e.name||e.service,r&&a(u,{children:[" (",o(`Resources:PVTypeNames.${e.pvType}`),")"]})]})}),Ve=I(({songDetailsStore:i,pvs:e,showPVType:r})=>{const{t:o}=T(["ViewRes.Song"]);return t(u,{children:e.map(s=>a(b.Fragment,{children:[t(Hi,{songDetailsStore:i,pv:s,showPVType:r}),s.description&&a(u,{children:[" ",t("a",{href:"#",onClick:c=>{c.preventDefault(),i.showPvDescription(s)},title:o("ViewRes.Song:Details.ViewDescription"),children:t("img",{src:"/Content/draft.png",alt:o("ViewRes.Song:Details.ViewDescription"),style:{verticalAlign:"middle"}})})]}),s.service!==B.File&&s.service!==B.LocalFile&&a(u,{children:[" "," ",a("a",{href:s.url,onClick:c=>Y.trackOutboundLink(c.nativeEvent),target:"_blank",rel:"noreferrer",children:[t("i",{className:"icon-eye-open"})," ",o("ViewRes.Song:Details.ViewExternal")]})]}),s.service===B.NicoNicoDouga&&a(u,{children:[" ",a("a",{href:`http://nicodata.vocaloid.eu/?NicoUrl=${s.url}`,target:"_blank",rel:"noreferrer",children:[t("i",{className:"icon-info-sign"})," ",o("ViewRes.Song:Details.ViewInfo")]})]}),t("br",{})]},s.id))})}),Z=3,Ji=I(({model:i,songDetailsStore:e})=>{var d,p,$;const r=x(),{getCodeDescription:o}=se(),{t:s}=T(["ViewRes","ViewRes.Song"]),c=b.useMemo(()=>{if(i.contract.pvs.every(h=>h.service!==B.Youtube)){const h=xe.primaryPV(i.contract.pvs,B.NicoNicoDouga),m=encodeURIComponent(h&&h.name?h.name:`${i.artistString} ${i.name}`);return[...i.webLinks,{id:0,url:`https://www.youtube.com/results?search_query=${m}`,description:s("ViewRes.Song:Details.SearchYoutube"),category:Si.Other,disabled:!1}]}return i.webLinks},[i,s]),l=i.cultureCodes.length>0?i.cultureCodes:(d=i.lyrics.filter(h=>h.translationType==="Original").first())==null?void 0:d.cultureCodes;return a(G,{model:i,songDetailsStore:e,tab:"basicInfo",children:[t("table",{children:a("tbody",{children:[a("tr",{children:[t("td",{className:"entry-field-label-col",children:s("ViewRes:Shared.Name")}),a("td",{children:[i.name,t("br",{}),t("span",{className:"extraInfo",children:i.additionalNames})]})]}),i.performers.length>0&&a("tr",{children:[t("td",{children:i.songType!==W.Illustration?s("ViewRes.Song:Details.Vocalists"):s("ViewRes:EntryDetails.Subject")}),t("td",{className:"artistList",children:t(F,{artists:i.performers,showRoles:H.IfNotVocalist,showType:!0,tooltip:!0})})]}),i.subject&&i.subject.length>0&&a("tr",{children:[t("td",{children:s("ViewRes:EntryDetails.Subject")}),t("td",{className:"artistList",children:t(F,{artists:i.subject,tooltip:!0})})]}),i.producers.length>0&&a("tr",{children:[t("td",{children:s("ViewRes.Song:Details.Producers")}),t("td",{className:"artistList",children:t(F,{artists:i.producers,showRoles:i.producers.length>1?H.IfNotDefault:H.Never,tooltip:!0})})]}),i.illustrators&&i.illustrators.length>0&&a("tr",{children:[t("td",{children:"Illustrators"}),t("td",{className:"artistList",children:t(F,{artists:i.illustrators,tooltip:!0})})]}),i.bands.length>0&&a("tr",{children:[t("td",{children:s("ViewRes.Song:Details.Band")}),t("td",{className:"artistList",children:t(F,{artists:i.bands,tooltip:!0})})]}),i.animators.length>0&&a("tr",{children:[t("td",{children:s("ViewRes.Song:Details.Animators")}),t("td",{className:"artistList",children:t(F,{artists:i.animators,tooltip:!0})})]}),i.otherArtists.length>0&&a("tr",{children:[t("td",{children:s("ViewRes.Song:Details.OtherArtists")}
1),t("td",{className:"artistList",children:t(F,{artists:i.otherArtists,showRoles:H.IfNotDefault,tooltip:!0})})]}),a("tr",{children:[t("td",{children:s("ViewRes:Shared.Type")}),a("td",{children:[t(ee,{songType:i.songType})," ",i.songTypeTag?t(Li,{tag:i.songTypeTag,tooltip:!0,children:s(`VocaDb.Model.Resources.Songs:SongTypeNames.${i.songType}`)}):t("a",{href:`/Tag/DetailsByEntryType?${D.stringify({entryType:M.Song,subType:i.songType})}`,children:s(`VocaDb.Model.Resources.Songs:SongTypeNames.${i.songType}`)})]})]}),i.length>0&&a("tr",{children:[t("td",{children:s("ViewRes.Song:Details.Duration")}),t("td",{children:Le.formatFromSeconds(i.length)})]}),l&&a("tr",{children:[t("td",{children:s("ViewRes:EntryDetails.Languages")}),t("td",{children:l.map(h=>{var m;return((m=o(h))==null?void 0:m.englishName)??s("ViewRes.Song:Details.LyricsLanguageOther")}).join(", ")})]}),i.minMilliBpm&&a("tr",{children:[t("td",{children:s("ViewRes.Song:Details.Bpm")}),t("td",{children:vi.formatFromMilliBpm(i.minMilliBpm,i.maxMilliBpm)})]}),i.albums.length>0&&a("tr",{children:[t("td",{children:s("ViewRes:Shared.Albums")}),t("td",{id:"albumList",children:i.albums.map((h,m)=>a(b.Fragment,{children:[m>0&&", ",t(Gi,{album:h})]},m))})]}),a("tr",{children:[t("td",{children:s("ViewRes:Shared.Tags")}),a("td",{children:[e.tagUsages.tagUsages.length>0&&t("div",{className:"entry-tag-usages",children:t(ri,{tagListStore:e.tagUsages})}),a("div",{children:[t(w,{as:R,disabled:!r.canEditTagsForEntry({...i.contract.song,entryType:M.Song}),icons:{primary:"ui-icon-tag"},onClick:e.tagsEditStore.show,href:"#",children:s("ViewRes:EntryDetails.EditTags")}),i.canRemoveTagUsages&&a(u,{children:[" ",t(w,{as:V,to:`/Song/ManageTagUsages/${i.id}`,icons:{primary:"ui-icon-wrench"},children:s("ViewRes:EntryDetails.ManageTags")})]})]})]})]}),i.listCount>0&&a("tr",{children:[t("td",{children:s("ViewRes.Song:Details.PoolsAndLists")}),a("td",{children:[i.pools.map((h,m)=>a(b.Fragment,{children:[m>0&&", ",t(V,{to:v.details(M.SongList,h.id),children:h.name})]},h.id)),i.pools.length>0&&" - ",t(R,{id:"songInListsLink",onClick:e.songInListsDialog.show,href:"#",children:s("ViewRes.Song:Details.ViewAllLists",{0:i.listCount})})]})]}),i.originalPVs.length>0&&a("tr",{children:[t("td",{children:s("ViewRes.Song:Details.OriginalMedia")}),t("td",{children:t(Ve,{songDetailsStore:e,pvs:i.originalPVs,showPVType:!1})})]}),i.otherPVs.length>0&&a("tr",{children:[t("td",{children:s("ViewRes.Song:Details.OtherMedia")}),t("td",{children:t(Ve,{songDetailsStore:e,pvs:i.otherPVs,showPVType:!0})})]}),t(wi,{webLinks:c}),e.originalVersion.entry&&a("tr",{children:[t("td",{children:s("ViewRes.Song:Details.OriginalVersion")}),a("td",{children:[t(zi,{song:e.originalVersion.entry,tooltip:!0,extUrl:e.originalVersion.url,toolTipDomain:e.originalVersion.domain})," ",t(ee,{songType:e.originalVersion.entry.songType}),t("br",{}),t("span",{children:e.originalVersion.entry.artistString})]})]}),i.alternateVersions.length>0&&a("tr",{children:[t("td",{children:s("ViewRes.Song:Details.AlternateVersions")}),a("td",{children:[t(fe,{songs:i.alternateVersions.slice(0,Z)}),i.alternateVersions.length>Z&&(e.allVersionsVisible?t("div",{children:t(fe,{songs:i.alternateVersions.slice(Z)})}):a(R,{href:"#",onClick:e.showAllVersions,children:[s("ViewRes.Song:Details.ShowAllVersions")," (",i.alternateVersions.length,")"]}))]})]}),i.notes.original&&a("tr",{children:[t("td",{children:s("ViewRes.Song:Details.Notes")}),t("td",{className:"entry-description",children:t(hi,{englishTranslatedStringStore:e.description,string:i.notes})})]}),a("tr",{children:[t("td",{children:s("ViewRes:EntryDetails.Stats")}),a("td",{children:[a(R,{href:"#",id:"statsLink",onClick:e.getUsers,children:[s("ViewRes.Song:Details.Favorites",{0:i.favoritedTimes}),", ",s("ViewRes.Song:Details.Likes",{0:i.likedTimes}),","]})," ",s("ViewRes:EntryDetails.Hits",{0:i.hits})," ",s("ViewRes.Song:Details.TotalScore",{0:i.ratingScore})]})]}),i.releaseEvents.length>0&&a("tr",{children:[t("td",{children:s("ViewRes.Song:Details.ReleaseEvent")}),t("td",{children:i.releaseEvents.slice().sort((h,m)=>(h.date?new Date(h.date).getTime():1/0)-(m.date?new Date(m.date).getTime():1/0)).map((h,m)=>a("span",{children:[m!==0?", ":"",t(pi,{entryReleaseDate:i.publishDate,bold:m===0,event:h,tooltip:!0})]},m))})]}),i.publishDate&&a("tr",{children:[t("td",{children:s("ViewRes:EntryDetails.PublishDate")}),t("td",{children:ve.utc(i.publishDate).format("ll")})]}),a("tr",{children:[t("td",{children:s("ViewRes:EntryDetails.AdditionDate")}),t("td",{children:t(Ri,{dateTime:i.createDate})})]}),i.contract.albumSong&&a("tr",{children:[t("td",{children:s("ViewRes.Song:Details.Navigation")}),a("td",{children:[t("p",{children:i.contract.albumSong.discNumber>1?t(ge,{i18nKey:"ViewRes.Song:Details.TrackOnAlbumDisc",components:{0:i.contract.albumSong.trackNumber,1:i.contract.albumSong.discNumber,2:t(te,{album:i.contract.album,tooltip:!1})}}):t(ge,{i18nKey:"ViewRes.Song:Details.TrackOnAlbum",components:{0:i.contract.albumSong.trackNumber,1:t(te,{album:i.contract.album,tooltip:!1})}})}),i.contract.previousSong&&a(u,{children:[" ",t(we,{song:i.contract.previousSong.song,icon:"icon-fast-backward",albumId:(p=i.contract.album)==null?void 0:p.id})]}),i.contract.nextSong&&a(u,{children:[" ",t(we,{song:i.contract.nextSong.song,icon:"icon-fast-forward",albumId:($=i.contract.album)==null?void 0:$.id})]})]})]})]})}),i.suggestions.length>0&&a(u,{children:[t("h3",{className:"withMargin",children:s("ViewRes.Song:Details.SuggestionsTitle")}),t(Q,{songs:i.suggestions,columns:2,displayType:!0,displayPublishDate:!0}),t("p",{children:t(V,{to:`${v.details_song(i.contract.song)}/related`,children:s("ViewRes.Song:Details.SeeRelatedSongs")})})]}),(i.canEditPersonalDescription||i.personalDescriptionText)&&a(u,{children:[t("h3",{className:"withMargin helpTip",title:s("ViewRes:EntryDetails.PersonalDescriptionHelp"),children:s("ViewRes:EntryDetails.PersonalDescription")}),t(mi,{personalDescription:e.personalDescription,canEditPersonalDescription:i.canEditPersonalDescription})]}),t(ii,{editableCommentsStore:e.comments}),t("p",{children:t(V,{to:`${v.details_song(i.contract.song)}/discussion`,children:s("ViewRes:EntryDetails.ViewAllComments")})}),t(z,{title:s("ViewRes.Song:Details.SongRatings"),autoOpen:e.ratingsDialogStore.popupVisible,width:400,close:()=>y(()=>{e.ratingsDialogStore.popupVisible=!1}),children:t("div",{children:t(Ki,{ratingsStore:e.ratingsDialogStore})})}),t(qi,{songInListsStore:e.songInListsDialog}),e.descriptionPv&&t(z,{autoOpen:!0,title:e.descriptionPv.name||e.descriptionPv.service,width:400,close:()=>e.showPvDescription(null),children:t("p",{style:{whiteSpace:"pre-wrap"},children:e.descriptionPv.description})})]})}),Qi=I(({model:i,songDetailsStore:e})=>{const r=x();return b.useEffect(()=>{e.comments.initComments()},[e]),t(G,{model:i,songDetailsStore:e,tab:"discussion",children:t(Di,{editableCommentsStore:e.comments,allowCreateComment:r.canCreateComments&&(!e.comments.commentsLocked||r.canLockComments),well:!1,comments:e.comments.pageOfComments,commentsLocked:e.comments.commentsLocked,onToggleLock:e.comments.toggleCommentsLocked})})}),Yi=I(({model:i,songDetailsStore:e})=>{const{t:r}=T(["ViewRes.Song","VocaDb.Web.Resources.Domain.Globalization"]),{getCodeDescription:o}=se();return Ii(e.lyricsStore),a(G,{model:i,songDetailsStore:e,tab:"lyrics",children:[t("ul",{className:"nav nav-pills",children:i.lyrics.sortBy(s=>s.translationType).map(s=>t("li",{className:O(e.selectedLyricsId===s.id&&"active"),children:a(R,{href:`${v.details_song(i.contract.song)}/lyrics?${D.stringify({albumId:i.browsedAlbumId,lyricsId:s.id})}`,onClick:c=>{c.preventDefault(),y(()=>{e.selectedLyricsId=s.id})},children:[s.translationType==="Romanized"?"Romanized":s.cultureCodes?s.cultureCodes.map(c=>{var l;return c===""?r("ViewRes.Song:Details.LyricsLanguageOther"):(l=o(c))==null?void 0:l.nativeName}).join(", "):r("ViewRes.Song:Details.LyricsLanguageOther"),s.translationType==="Original"&&` (${r("VocaDb.Web.Resources.Domain.Globalization:TranslationTypeNames.Original")})`]})},s.id))}),e.selectedLyrics&&a("div",{children:[(e.selectedLyrics.source||e.selectedLyrics.url)&&a("p",{children:["(",r("ViewRes.Song:Details.LyricsFrom")," ",e.selectedLyrics.url?t("span",{children:t("a",{className:"extLink",href:e.selectedLyrics.url,onClick:s=>Y.trackOutboundLink(s.nativeEvent),children:e.selectedLyrics.source||e.selectedLyrics.url})}):t("span",{children:e.selectedLyrics.source}),")"]}),t("p",{className:"song-lyrics",children:e.selectedLyrics.value})]})]})}),Xi=({model:i,songDetailsStore:e})=>{const{t:r}=T(["ViewRes.Song"]),[o,s]=b.useState(void 0);return b.useEffect(()=>{e.getRelated().then(s)},[i,e]),t(G,{model:i,songDetailsStore:e,tab:"related",children:o!==void 0&&a(u,{children:[o.artistMatches.length>
10&&a(u,{children:[t("h3",{children:r("ViewRes.Song:Details.MatchingArtists")}),t(Q,{songs:o.artistMatches,columns:2})]}),o.likeMatches.length>0&&a(u,{children:[t("h3",{children:r("ViewRes.Song:Details.MatchingLikes")}),t(Q,{songs:o.likeMatches,columns:2})]}),o.tagMatches.length>0&&a(u,{children:[t("h3",{children:r("ViewRes.Song:Details.MatchingTags")}),t(Q,{songs:o.tagMatches,columns:2})]})]})})},Zi=({model:i,songDetailsStore:e})=>{const r=Se(),{t:o}=T(["ViewRes","ViewRes.Song"]),s=Y.mergeUrls(r.values.hostAddress,v.details_song(i.contract.song));return a(G,{model:i,songDetailsStore:e,tab:"share",children:[t("div",{children:a("label",{children:[o("ViewRes:EntryDetails.Social"),t("br",{}),t(yi,{title:i.name,url:s}),t("br",{}),t("br",{})]})}),a("div",{children:[o("ViewRes.Song:Details.Link"),t("br",{}),t("input",{type:"text",defaultValue:s,className:"input-large",onFocus:c=>c.target.select()})]}),a("div",{children:[t("a",{href:"http://daringfireball.net/projects/markdown/",children:"Markdown"}),t("br",{}),t("input",{type:"text",defaultValue:Vi.createMarkdownLink(s,i.name),className:"input-xxlarge",onFocus:c=>c.target.select()})]}),a("div",{children:[o("ViewRes.Song:Details.Embed"),t("br",{}),t("textarea",{className:"input-xxlarge",rows:3,defaultValue:`<iframe style="overflow: hidden;" src="${Y.mergeUrls(r.values.hostAddress,"/Ext/EmbedSong")}?songId=${i.id}&lang=${r.values.languagePreference}" height="400" width="570" frameborder="0" scrolling="no"></iframe>`})]})]})},G=b.memo(({model:i,songDetailsStore:e,tab:r,children:o})=>{const s=x(),{getCodeDescription:c}=se(),{t:l}=T(["ViewRes","ViewRes.Song","VocaDb.Web.Resources.Domain.Globalization"]),d=i.lyrics.sortBy(h=>h.translationType).filter(h=>!!h.cultureCodes&&h.cultureCodes.length>0||h.translationType==="Romanized").map(h=>{var m;return h.translationType!=="Romanized"?((m=c(h.cultureCodes[0]))==null?void 0:m.nativeName)??l("ViewRes.Song:Details.LyricsLanguageOther"):l("VocaDb.Web.Resources.Domain.Globalization:TranslationTypeNames.Romanized")}).take(3),p=d.length>0?i.lyrics.length-d.length:0,$=d.length>0?`(${d.join(", ")}${p>0?` ${l("ViewRes.Song:Details.LyricsPlusOthers",{0:p})}`:""})`:"";return a("div",{className:"js-cloak ui-tabs ui-widget ui-widget-content ui-corner-all",children:[a("ul",{className:"ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all",role:"tablist",children:[t(_,{active:r==="basicInfo",children:t(V,{to:`${v.details_song(i.contract.song)}?${D.stringify({albumId:i.browsedAlbumId})}`,children:l("ViewRes:EntryDetails.BasicInfoTab")})}),s.canViewLyrics&&i.lyrics.length>0&&t(_,{active:r==="lyrics",children:a(V,{to:`${v.details_song(i.contract.song)}/lyrics?${D.stringify({albumId:i.browsedAlbumId,lyricsId:e.selectedLyricsId})}`,children:[l("ViewRes.Song:Details.Lyrics")," ",$]})}),t(_,{active:r==="discussion",children:a(V,{to:`${v.details_song(i.contract.song)}/discussion?${D.stringify({albumId:i.browsedAlbumId})}`,children:[l("ViewRes:EntryDetails.DiscussionTab")," (",i.commentCount,")"]})}),t(_,{active:r==="related",children:t(V,{to:`${v.details_song(i.contract.song)}/related?${D.stringify({albumId:i.browsedAlbumId})}`,children:l("ViewRes.Song:Details.RelatedSongs")})}),t(_,{active:r==="share",children:t(V,{to:`${v.details_song(i.contract.song)}/share?${D.stringify({albumId:i.browsedAlbumId})}`,children:l("ViewRes.Song:Details.Share")})})]}),t("div",{className:"ui-tabs-panel ui-widget-content ui-corner-bottom",role:"tabpanel",children:o})]})}),et=({model:i,songDetailsStore:e})=>{const r=x();return a(Be,{children:[r.canViewLyrics&&t(U,{path:"lyrics",element:t(Yi,{model:i,songDetailsStore:e})}),t(U,{path:"discussion",element:t(Qi,{model:i,songDetailsStore:e})}),t(U,{path:"related",element:t(Xi,{model:i,songDetailsStore:e})}),t(U,{path:"share",element:t(Zi,{model:i,songDetailsStore:e})}),t(U,{path:"*",element:t(Ji,{model:i,songDetailsStore:e})})]})},it=I(({model:i,songDetailsStore:e})=>{const r=x(),{t:o}=T(["Resources","ViewRes","ViewRes.Song","VocaDb.Model.Resources.Songs","VocaDb.Web.Resources.Domain"]),s=`${i.name} - ${i.artistString}`,c=i.contract.pvs.filter(l=>l.id===e.selectedPvId)[0];return a(Qe,{pageTitle:s,ready:!0,title:i.name,subtitle:`${i.artistString} (${o(`VocaDb.Model.Resources.Songs:SongTypeNames.${i.songType}`)})`,parents:t(u,{children:t(Je.Item,{linkAs:V,linkProps:{to:`/Search?${D.stringify({searchType:He.Song})}`},children:o("ViewRes:Shared.Songs")})}),toolbar:a(u,{children:[(i.originalPVs.length>0||i.otherPVs.length>0)&&t("div",{id:"pvPlayer",className:"song-pv-player",children:c&&t(ei,{entry:{...i.contract.song,entryType:M.Song},pv:c,allowInline:!0})}),r.isLoggedIn?a(u,{children:[a("span",{children:[e.userRating.isRatingFavorite&&t("span",{className:"icon heartIcon",title:o(`Re
1sources:SongVoteRatingNames.${A[A.Favorite]}`)}),e.userRating.isRatingLike&&t("span",{className:"icon starIcon",title:o(`Resources:SongVoteRatingNames.${A[A.Like]}`)}),e.userRating.isRated?a(u,{children:[" ",t(w,{as:R,href:"#",onClick:e.userRating.setRating_nothing,icons:{primary:"ui-icon-close"},disabled:e.userRating.ratingInProgress,children:o("ViewRes.Song:Details.RemoveFromFavorites")})]}):a("span",{className:"js-ratingButtons",children:[t(w,{as:R,href:"#",onClick:e.userRating.setRating_like,icons:{primary:"ui-icon-plus"},disabled:e.userRating.ratingInProgress,children:o("ViewRes.Song:Details.Like")}),t(w,{as:R,href:"#",onClick:e.userRating.setRating_favorite,icons:{primary:"ui-icon-heart"},disabled:e.userRating.ratingInProgress,children:o("ViewRes.Song:Details.AddToFavorites")})]})]})," ",t(w,{as:R,href:"#",onClick:e.songListDialog.showSongLists,icons:{primary:"ui-icon-star"},id:"addToListLink",children:o("ViewRes.Song:Details.AddToCustomList")})]}):a(u,{children:[a("span",{className:"js-ratingButtons",children:[t(w,{as:R,href:"#",disabled:!0,icons:{primary:"ui-icon-plus"},children:o("ViewRes.Song:Details.Like")}),t(w,{as:R,href:"#",disabled:!0,icons:{primary:"ui-icon-heart"},children:o("ViewRes.Song:Details.AddToFavorites")})]})," ",t(w,{as:R,href:"#",disabled:!0,icons:{primary:"ui-icon-star"},children:o("ViewRes.Song:Details.AddToCustomList")})]})," ",t(w,{as:V,to:`/Song/Edit/${i.id}?${D.stringify({albumId:i.browsedAlbumId})}`,disabled:!r.canEdit({...i.contract.song,entryType:M.Song}),icons:{primary:"ui-icon-wrench"},children:o("ViewRes:Shared.Edit")})," ",t(w,{as:V,to:`/Song/Versions/${i.id}`,icons:{primary:"ui-icon-clock"},children:o("ViewRes:EntryDetails.ViewModifications")})," ",t(w,{as:R,href:"#",onClick:e.reportStore.show,icons:{primary:"ui-icon-alert"},children:o("ViewRes:EntryDetails.ReportAnError")}),r.canAccessManageMenu&&a(u,{children:[" ",t(w,{as:R,href:"#",onClick:()=>y(()=>{e.maintenanceDialogVisible=!0}),icons:{primary:"ui-icon-wrench"},children:"Maintenance actions"})]})," ",t(Xe,{status:i.status})]}),children:[i.deleted&&t(Ye,{mergedTo:i.mergedTo?{...i.mergedTo,entryType:M.Song}:void 0}),i.draft&&!i.deleted&&t(ti,{section:"glsongs"}),t(et,{model:i,songDetailsStore:e}),t(ai,{tagsEditStore:e.tagsEditStore}),t(Wi,{songListsStore:e.songListDialog}),t(Ze,{reportEntryStore:e.reportStore,reportTypes:Object.values(Ne).map(l=>({id:l,name:o(`VocaDb.Web.Resources.Domain:EntryReportTypeNames.${l}`),notesRequired:Ci.includes(l)}))}),t(z,{title:"Maintenance actions",autoOpen:e.maintenanceDialogVisible,width:400,close:()=>y(()=>{e.maintenanceDialogVisible=!1}),children:a("div",{children:[t("p",{children:t(w,{as:"a",href:`/Song/UpdateArtistString/${i.id}`,children:"Refresh artist string"})}),t("p",{children:t(w,{as:"a",href:`/Song/UpdateThumbUrl/${i.id}`,children:"Refresh thumbnail"})}),t("p",{children:t(w,{as:"a",href:`/Song/RefreshPVMetadatas/${i.id}`,children:"Refresh PV metadata"})})]})})]})}),es=()=>{const i=Se(),e=x(),[r,o]=b.useState(),{id:s}=je(),[c]=We(),l=c.get("albumId");return b.useEffect(()=>{de.start(),le.getDetails({id:Number(s),albumId:l?Number(l):void 0}).then(d=>{const p=new Pi(d,ze.primaryPV(d.pvs,i.values.loggedUser));o({model:p,songDetailsStore:new C(i.values,e,qe,le,Ke,Ge,(i.values.languagePreference===ce.English||i.values.languagePreference===ce.Romaji)&&!!p.notes.english,p.jsonModel,e.canDeleteComments)}),de.done()}).catch(d=>{throw d.response&&d.response.status===404&&(window.location.href="/Error/NotFound"),d})},[i,e,s,l]),r?t(it,{model:r.model,songDetailsStore:r.songDetailsStore}):t(u,{})};export{es as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.