@serifpersia/dango 3.5.0 → 3.5.2

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.
Files changed (97) hide show
  1. package/README.md +1 -15
  2. package/client/dist/assets/{AnimeCard-CpMObnqU.js → AnimeCard-BVnAhrys.js} +1 -1
  3. package/client/dist/assets/{AnimeInfo-DkDW8o1k.js → AnimeInfo-DYBLIXmE.js} +1 -1
  4. package/client/dist/assets/AnimeInfoPage-DnXV4EMC.js +2 -0
  5. package/client/dist/assets/{Asmr-B08Aimrk.js → Asmr-Dwlv-Af8.js} +2 -2
  6. package/client/dist/assets/{AsmrResetProgressModal-CZMbyJZz.js → AsmrResetProgressModal-CnF9ZTJQ.js} +1 -1
  7. package/client/dist/assets/{AvSyncCalibrator-VoOEtoX9.js → AvSyncCalibrator-Cr9n1euF.js} +1 -1
  8. package/client/dist/assets/Home-B_q2l74h.css +1 -0
  9. package/client/dist/assets/{Home-C3Vck_99.js → Home-CUZPz_wy.js} +1 -1
  10. package/client/dist/assets/Insights-hvaO1jbY.js +1 -0
  11. package/client/dist/assets/{LibraryListPage-CUzEUs5k.js → LibraryListPage-BeYz_I1y.js} +1 -1
  12. package/client/dist/assets/{ListeningList-CoeQ17lz.js → ListeningList-D-D-W7JK.js} +1 -1
  13. package/client/dist/assets/Manga-DqIR2B6F.js +1 -0
  14. package/client/dist/assets/{MangaInfoPage-wqYZN_sT.js → MangaInfoPage-CWqxWbb3.js} +1 -1
  15. package/client/dist/assets/{MangaReadPage-BbyExwBN.js → MangaReadPage-BlyJ-OdY.js} +1 -1
  16. package/client/dist/assets/{MangaResetProgressModal-Dg0xhJQI.js → MangaResetProgressModal-gvz9_X7z.js} +1 -1
  17. package/client/dist/assets/{Mature-ZKR5vMIv.js → Mature-B1Cuj67a.js} +1 -1
  18. package/client/dist/assets/MediaCard-GwFTnacn.js +1 -0
  19. package/client/dist/assets/Music-BEmRDuSo.js +1 -0
  20. package/client/dist/assets/{OptionListMenu-DcHg1QsF.js → OptionListMenu-Dlk9eHM7.js} +1 -1
  21. package/client/dist/assets/{Player-V9IueAzT.js → Player-khTFa_o1.js} +6 -6
  22. package/client/dist/assets/{PlayerSettings-BZtjBWWq.js → PlayerSettings-B16FnAO_.js} +1 -1
  23. package/client/dist/assets/QueueOptionsButton-DjBOibpt.js +1 -0
  24. package/client/dist/assets/{QueueRail-CO2ocUNx.js → QueueRail-DcLtEU46.js} +1 -1
  25. package/client/dist/assets/{Radio-CJ-ra4vb.js → Radio-rpaFuI72.js} +1 -1
  26. package/client/dist/assets/{ReadingList-CSvUUtZ3.js → ReadingList-DTnI5411.js} +1 -1
  27. package/client/dist/assets/{ResetProgressModal-5FOWMuqi.js → ResetProgressModal-Bcv92v7c.js} +1 -1
  28. package/client/dist/assets/{Search-q0GUdNMS.js → Search-DNxPl_On.js} +1 -1
  29. package/client/dist/assets/Settings-CQ-ykTG3.js +21 -0
  30. package/client/dist/assets/{Settings-AuFxQcJF.css → Settings-CwIWLSfY.css} +1 -1
  31. package/client/dist/assets/{SkeletonGrid-DY_7CXpX.js → SkeletonGrid-ZN-kS9re.js} +1 -1
  32. package/client/dist/assets/ToggleSwitch-BPil0d_k.css +1 -0
  33. package/client/dist/assets/ToggleSwitch-CN_ppEc9.js +1 -0
  34. package/client/dist/assets/{Trackers-Dn7P6AfI.js → Trackers-EN1_ol5G.js} +1 -1
  35. package/client/dist/assets/{Tv-BfaWoR72.js → Tv-C-4wd-BS.js} +4 -4
  36. package/client/dist/assets/{TvInfo-CgEVN57T.js → TvInfo-Mpzun3PF.js} +1 -1
  37. package/client/dist/assets/{TvPopup-B-vYyDQF.js → TvPopup-YYgg9-7r.js} +1 -1
  38. package/client/dist/assets/{TvSearch-CnnVkms6.js → TvSearch-CdL9EA-S.js} +1 -1
  39. package/client/dist/assets/{TvWatchlist-BLVF_row.js → TvWatchlist-DD6nRESU.js} +1 -1
  40. package/client/dist/assets/{Watchlist-wd9cCDOK.js → Watchlist-CD8UqukO.js} +1 -1
  41. package/client/dist/assets/{hls-Bej65gvf.js → hls-E94cMCjR.js} +1 -1
  42. package/client/dist/assets/index-CZW1But9.js +178 -0
  43. package/client/dist/assets/index-w_r2lTCe.css +1 -0
  44. package/client/dist/assets/{useAnimeInfoData-ZmMruFBq.js → useAnimeInfoData-C9tOyy6E.js} +1 -1
  45. package/client/dist/assets/{useAsmr-z-txLq1s.js → useAsmr-B4HAapZD.js} +1 -1
  46. package/client/dist/assets/{useAsmrPopup-DU55UhPN.js → useAsmrPopup-trIV7nUr.js} +1 -1
  47. package/client/dist/assets/{useMangaLibrary-D92WQbf5.js → useMangaLibrary-CZ2Gke8p.js} +1 -1
  48. package/client/dist/assets/{useMangaPopup-TJOA229J.js → useMangaPopup-80Daa4y-.js} +1 -1
  49. package/client/dist/assets/{useProviders-fmZrOyDC.js → useProviders-CqMq_6ue.js} +1 -1
  50. package/client/dist/assets/{useTv-CmfxzpS-.js → useTv-CHDhiKWu.js} +1 -1
  51. package/client/dist/assets/{useTvLibrary-0y9NZnsk.js → useTvLibrary-DWUGDtld.js} +1 -1
  52. package/client/dist/index.html +2 -2
  53. package/package.json +2 -2
  54. package/server/dist/app-hono.js +2 -10
  55. package/server/dist/config.js +0 -1
  56. package/server/dist/db/schema-anime.js +0 -4
  57. package/server/dist/db/schema-asmr.js +0 -12
  58. package/server/dist/db/schema-tv.js +0 -15
  59. package/server/dist/discord-gateway.js +0 -6
  60. package/server/dist/discord-rpc.js +0 -14
  61. package/server/dist/github-sync.js +1 -5
  62. package/server/dist/hono/proxy.js +19 -2
  63. package/server/dist/hono/tv.js +1 -1
  64. package/server/dist/hono/watchlist.js +8 -13
  65. package/server/dist/lib/anilist.js +2 -26
  66. package/server/dist/lib/anischedule.js +0 -3
  67. package/server/dist/lib/mal.js +0 -9
  68. package/server/dist/lib/{discord-roles-sync.service.js → recommendations.service.js} +0 -149
  69. package/server/dist/lib/tracker/anilist-tracker.js +0 -3
  70. package/server/dist/lib/tracker/sync.service.js +0 -1
  71. package/server/dist/providers/manga/manga.types.js +1 -7
  72. package/server/dist/repositories/mal-cache.repository.js +0 -3
  73. package/server/dist/server.js +0 -2
  74. package/server/dist/shipped-defaults.js +0 -1
  75. package/server/dist/sync.js +0 -1
  76. package/server/dist/trpc/errors.js +0 -6
  77. package/server/dist/trpc/index.js +0 -1
  78. package/server/dist/trpc/routers/discord.js +0 -4
  79. package/server/dist/trpc/routers/discovery.js +1 -5
  80. package/server/dist/trpc/routers/insights.js +1 -31
  81. package/server/dist/trpc/routers/settings.js +0 -10
  82. package/server/dist/trpc/routers/watchlist.js +3 -3
  83. package/server/package.json +1 -1
  84. package/client/dist/assets/AnimeInfoPage-l0wIHS7j.js +0 -2
  85. package/client/dist/assets/Home-B6bte0tw.css +0 -1
  86. package/client/dist/assets/Insights-nW34Wbg1.js +0 -1
  87. package/client/dist/assets/Manga-CeSb5K2w.js +0 -1
  88. package/client/dist/assets/Map-BtXwpBOC.js +0 -1
  89. package/client/dist/assets/Map-CXFqXmsZ.css +0 -1
  90. package/client/dist/assets/MediaCard-9NGAjN3E.js +0 -1
  91. package/client/dist/assets/Music-CljVJFCj.js +0 -1
  92. package/client/dist/assets/QueueOptionsButton-CzzisJ3N.js +0 -1
  93. package/client/dist/assets/Settings-CyT9Lyhz.js +0 -21
  94. package/client/dist/assets/index-Cc1Up_NI.css +0 -1
  95. package/client/dist/assets/index-Dk0ASzEz.js +0 -178
  96. package/server/dist/sync-config.js +0 -23
  97. package/server/dist/utils/machine-id.js +0 -39
@@ -1,21 +0,0 @@
1
- import{d as r,A as V,h as A,u as e,q as ae,S as te,T as Le,p as xe,a as Pe,g as pe,_ as Ae}from"./vendor-core-DfaOB3Rn.js";import{d as Oe,t as b,B as I,M as F,j as ve,h as Ue,T as H,z as ye,F as oe,G as Me,H as Ee,u as $e,e as Ge,I as Fe,y as fe,A as Ke,J as He,K as Be,V as ze,L as qe,N as je,O as We}from"./index-Dk0ASzEz.js";import{u as ue}from"./vendor-query-BBT5_sHx.js";import{I as W}from"./vendor-icons-DrybRNxP.js";const ce={"title-preference-container":"_title-preference-container_sdqgs_1","toggle-button":"_toggle-button_sdqgs_21","toggle-label":"_toggle-label_sdqgs_51"},le=["name","nativeName","englishName"],de={name:"Default (Romaji)",nativeName:"Native",englishName:"English"},Ve=()=>{const{titlePreference:t,setTitlePreference:s,loading:i}=Oe(),[c,h]=r(de[t]),[d,_]=r(!1),m=V(null);A(()=>{i||h(de[t])},[t,i]);const a=async()=>{if(d)return;_(!0);const f=(le.indexOf(t)+1)%le.length,p=le[f],l=de[p];m.current&&(m.current.style.transform="translateX(-100%)",m.current.style.opacity="0"),setTimeout(async()=>{h(l),s(p),m.current&&(m.current.style.transition="none",m.current.style.transform="translateX(100%)",m.current.style.opacity="0",m.current.offsetWidth,m.current.style.transition="transform 0.3s ease-out, opacity 0.3s ease-out",m.current.style.transform="translateX(0)",m.current.style.opacity="1");try{await b.settings.set.mutate({key:"titlePreference",value:p})}catch(T){console.error("Error saving title preference:",T)}finally{_(!1)}},300)};return i?e("p",{children:"Loading title preference..."}):e("div",{className:ce["title-preference-container"],children:[e("h4",{children:"Anime Title Display Preference"}),e("button",{onClick:a,className:ce["toggle-button"],disabled:d,children:e("span",{ref:m,className:ce["toggle-label"],children:c})})]})},Ye="_settingsHeader_14a5d_1",Je="_pageTitle_14a5d_6",Qe="_pageSubtitle_14a5d_14",Xe="_settingsLayout_14a5d_20",Ze="_sidebar_14a5d_27",et="_sidebarIndicator_14a5d_35",tt="_sidebarItem_14a5d_50",at="_active_14a5d_72",nt="_mainContent_14a5d_80",st="_tabContent_14a5d_85",rt="_sectionCard_14a5d_103",it="_settingItem_14a5d_127",ot="_settingRow_14a5d_132",ct="_controls_14a5d_145",lt="_status_14a5d_151",g={settingsHeader:Ye,pageTitle:Je,pageSubtitle:Qe,settingsLayout:Xe,sidebar:Ze,sidebarIndicator:et,sidebarItem:tt,active:at,mainContent:nt,tabContent:st,sectionCard:rt,settingItem:it,settingRow:ot,controls:ct,status:lt},dt="_sectionCard_wt900_12",ut="_title_wt900_22",ht="_signIn_wt900_29",gt="_userInfo_wt900_36",mt="_warning_wt900_58",pt="_formGroup_wt900_65",yt="_label_wt900_69",ft="_inputWrapper_wt900_79",wt="_input_wt900_79",vt="_select_wt900_103",bt="_actions_wt900_140",_t="_hr_wt900_148",y={sectionCard:dt,title:ut,signIn:ht,userInfo:gt,warning:mt,formGroup:pt,label:yt,inputWrapper:ft,input:wt,select:vt,actions:bt,hr:_t},kt=()=>{const[t,s]=r(!0),[i,c]=r(!1),[h,d]=r(!1),[_,m]=r(null),[a,u]=r({status:"idle"}),[f,p]=r(!1),[l,T]=r(""),[w,C]=r(!1),x=V(null),[L,D]=r({show:!1,message:"",type:"info"}),O=()=>{x.current&&(window.clearInterval(x.current),x.current=null)},N=ae(S=>{d(S.authenticated),m(S.user||S.device.user||null),u(S.device),p(!!S.hasCustomClientId)},[]),R=ae(async()=>{const S=await b.auth.githubStatus.query();N(S)},[N]),M=async()=>{try{const S=await b.auth.githubPoll.query();u(S),S.status==="success"?(O(),await R(),D({show:!0,message:"GitHub authentication complete. Sync has been initialized.",type:"success"})):S.status==="error"&&(O(),D({show:!0,message:S.error||"GitHub authentication failed.",type:"error"}))}catch{O(),D({show:!0,message:"Failed to poll GitHub authentication status.",type:"error"})}},v=(S=5)=>{O(),x.current=window.setInterval(M,Math.max(S,5)*1e3)};A(()=>(R().catch(()=>{D({show:!0,message:"Failed to load GitHub sync status.",type:"error"})}).finally(()=>s(!1)),O),[R]);const k=async()=>{c(!0);try{const S=await b.auth.githubStart.mutate();u(S),v(S.verification?.interval)}catch(S){D({show:!0,message:S instanceof Error?S.message:"Failed to start GitHub authentication.",type:"error"})}finally{c(!1)}},U=async()=>{try{await b.auth.githubLogout.mutate(),d(!1),m(null),u({status:"idle"}),D({show:!0,message:"Signed out of GitHub sync.",type:"success"})}catch{D({show:!0,message:"Failed to sign out of GitHub.",type:"error"})}},E=async()=>{C(!0);try{await b.auth.saveGithubAuth.mutate({clientId:l}),T(""),await R(),D({show:!0,message:"Custom GitHub auth saved.",type:"success"})}catch{D({show:!0,message:"Failed to save override.",type:"error"})}finally{C(!1)}},z=async()=>{C(!0);try{await b.auth.saveGithubAuth.mutate({clientId:""}),T(""),await R(),D({show:!0,message:"Custom auth cleared. Using dango defaults.",type:"success"})}catch{D({show:!0,message:"Failed to clear override.",type:"error"})}finally{C(!1)}};return t?e("div",{style:{color:"var(--text-secondary)",padding:"1.5rem"},children:"Loading..."}):e("div",{className:y.sectionCard,children:[e("h3",{className:y.title,children:"GitHub Cloud Sync"}),e("p",{className:y.signIn,children:"Sync local data through a private GitHub repository named dango-sync-data."}),h&&_?e("div",{className:y.userInfo,children:[e("p",{children:["Signed in as: ",e("strong",{children:_.name||_.login})]}),e(I,{variant:"danger",onClick:U,children:"Sign Out"})]}):e("div",{className:y.signIn,children:e(I,{onClick:k,disabled:i||a.status==="pending",children:i||a.status==="pending"?"Waiting for GitHub...":"Sign in with GitHub"})}),a.status==="pending"&&a.verification&&e(te,{children:[e("hr",{className:y.hr}),e("div",{className:y.formGroup,children:[e("label",{className:y.label,children:"Verification URL"}),e("div",{className:y.inputWrapper,children:[e("input",{className:y.input,value:a.verification.verification_uri,readOnly:!0}),e(I,{onClick:()=>{const S=a.verification?.verification_uri;S&&/^https?:\/\//i.test(S)&&window.open(S,"_blank","noopener,noreferrer")},children:"Open"})]})]}),e("div",{className:y.formGroup,children:[e("label",{className:y.label,children:"Device Code"}),e("input",{className:y.input,value:a.verification.user_code,readOnly:!0})]})]}),a.status==="error"&&e("p",{className:y.warning,children:a.error}),e("details",{style:{marginTop:"1rem",fontSize:"var(--font-size-sm)"},children:[e("summary",{style:{cursor:"pointer",color:"var(--text-secondary)"},children:["Advanced: use your own auth ",f?"(override active)":""]}),e("div",{className:y.formGroup,style:{marginTop:"0.75rem"},children:[e("label",{className:y.label,children:"Client ID (optional)"}),e("input",{className:y.input,value:l,onChange:S=>T(S.currentTarget.value),placeholder:"Your GitHub OAuth app ID"})]}),e("div",{className:y.actions,children:[e(I,{onClick:E,disabled:w,children:"Save override"}),e(I,{variant:"secondary",onClick:z,disabled:w,children:"Use dango defaults"})]})]}),e(F,{isOpen:L.show,onClose:()=>D(S=>({...S,show:!1})),width:"sm",children:[e(F.Body,{children:e("p",{children:L.message})}),e(F.Actions,{children:e(I,{onClick:()=>D(S=>({...S,show:!1})),children:"OK"})})]})]})},St=()=>{const[t,s]=r(!0),[i,c]=r(null),[h,d]=r(!1),[_,m]=r(!1),[a,u]=r(""),[f,p]=r(""),[l,T]=r(""),[w,C]=r(!1),[x,L]=r({show:!1,message:"",type:"info"}),D=async()=>{try{const k=await b.auth.user.query();c(k?.email?k:null)}catch{c(null)}},O=async()=>{try{const[k,U]=await Promise.all([b.auth.configStatus.query(),b.auth.googleAuth.query()]);d(!!k.hasConfig),m(!!(U.hasCustomWorkerUrl||U.hasCustomClientId||U.hasClientSecret))}catch(k){console.error("Failed to fetch config status",k)}};A(()=>{(async()=>{s(!0),await Promise.all([D(),O()]);try{new URLSearchParams(window.location.search).get("google_auth")==="success"&&(await D(),window.history.replaceState(null,"",window.location.pathname))}catch{}s(!1)})();const U=E=>{E.origin===window.location.origin&&typeof E.data=="object"&&E.data!==null&&E.data.type==="GOOGLE_AUTH_SUCCESS"&&(c(E.data.user),window.location.reload())};return window.addEventListener("message",U),()=>window.removeEventListener("message",U)},[]);const N=async()=>{try{const k=await b.auth.googleLogin.mutate();if(k.authenticated){window.location.reload();return}if(k.url){if(typeof window.DangoBridge<"u"){window.location.href=k.url;return}const E=600,z=700,S=window.innerWidth/2-E/2,ne=window.innerHeight/2-z/2;window.open(k.url,"GoogleAuth",`width=${E},height=${z},top=${ne},left=${S}`)}else throw new Error("Auth URL not available")}catch{L({show:!0,message:"Authentication failed. Ensure server is configured correctly.",type:"error"})}},R=async()=>{try{await b.auth.logout.mutate(),c(null),L({show:!0,message:"Successfully signed out.",type:"success"}),window.location.reload()}catch(k){console.error("Sign out failed",k),L({show:!0,message:"Failed to sign out.",type:"error"})}},M=async()=>{C(!0);try{await b.auth.saveGoogleAuth.mutate({workerUrl:a,clientId:f,clientSecret:l}),u(""),p(""),T(""),await O(),L({show:!0,message:"Custom auth saved. Restart may be required.",type:"success"})}catch{L({show:!0,message:"Failed to save override.",type:"error"})}finally{C(!1)}},v=async()=>{C(!0);try{await b.auth.saveGoogleAuth.mutate({workerUrl:"",clientId:"",clientSecret:""}),u(""),p(""),T(""),await O(),L({show:!0,message:"Custom auth cleared. Using dango defaults.",type:"success"})}catch{L({show:!0,message:"Failed to clear override.",type:"error"})}finally{C(!1)}};return t?e("div",{style:{color:"var(--text-secondary)",padding:"1.5rem"},children:"Loading..."}):e("div",{className:y.sectionCard,children:[e("h3",{className:y.title,children:"Google Drive Sync"}),i?e("div",{className:y.userInfo,children:[e("p",{children:["Signed in as: ",e("strong",{children:i.name})," (",i.email,")"]}),e(I,{variant:"danger",onClick:R,children:"Sign Out"})]}):e("div",{className:y.signIn,children:[e("p",{children:"Sign in with your Google account to enable synchronization features."}),e(I,{onClick:N,disabled:!h,children:"Sign in with Google"}),!h&&e("p",{className:y.warning,children:"Google sync is not configured on the server."})]}),e("details",{style:{marginTop:"1rem",fontSize:"var(--font-size-sm)"},children:[e("summary",{style:{cursor:"pointer",color:"var(--text-secondary)"},children:["Advanced: use your own auth ",_?"(override active)":""]}),e("div",{className:y.formGroup,style:{marginTop:"0.75rem"},children:[e("label",{className:y.label,children:"Worker URL (optional)"}),e("input",{className:y.input,value:a,onChange:k=>u(k.currentTarget.value),placeholder:"https://your-worker.workers.dev"})]}),e("div",{className:y.formGroup,children:[e("label",{className:y.label,children:"Client ID (optional)"}),e("input",{className:y.input,value:f,onChange:k=>p(k.currentTarget.value),placeholder:"Your Google OAuth client ID"})]}),e("div",{className:y.formGroup,children:[e("label",{className:y.label,children:"Client Secret (optional)"}),e("input",{type:"password",className:y.input,value:l,onChange:k=>T(k.currentTarget.value),placeholder:"Your Google OAuth secret"})]}),e("div",{className:y.actions,children:[e(I,{onClick:M,disabled:w,children:"Save override"}),e(I,{variant:"secondary",onClick:v,disabled:w,children:"Use dango defaults"})]})]}),e(F,{isOpen:x.show,onClose:()=>L(k=>({...k,show:!1})),width:"sm",children:[e(F.Body,{children:e("p",{children:x.message})}),e(F.Actions,{children:e(I,{onClick:()=>L(k=>({...k,show:!1})),children:"OK"})})]})]})},Ct="_sectionCard_1pqo4_1",Nt="_settingItem_1pqo4_26",Tt="_settingRow_1pqo4_31",Rt="_modalOverlay_1pqo4_38",Dt="_modal_1pqo4_38",It="_modalActions_1pqo4_73",Lt="_modalSecondary_1pqo4_79",xt="_modalPrimary_1pqo4_89",G={sectionCard:Ct,settingItem:Nt,settingRow:Tt,modalOverlay:Rt,modal:Dt,modalActions:It,modalSecondary:Lt,modalPrimary:xt},Pt={anime:{heading:"Watchlist Preferences",blurb:"Customize your experience when managing your watchlist and series entries.",skipKey:"skipRemoveConfirmation",ignoreKey:"ignoreAdultContent",listOnlyKey:"cwWatchlistOnly",skipLabel:"Skip confirmation when removing from watchlist",ignoreLabel:"Hide adult content from continue watching",listOnlyLabel:"Only show continue watching for shows in watchlist",listNoun:"watchlist",continueNoun:"continue watching",adultCountUrl:"/api/continue-watching/adult-count",purgeUrl:"/api/continue-watching/purge-adult",purgeDoneText:t=>`Removed ${t??0} entries from continue watching`,invalidateKeys:[["allContinueWatching"]]},manga:{heading:"Reading List Preferences",blurb:"Customize your experience when managing your reading list and manga entries.",skipKey:"mangaSkipRemoveConfirmation",ignoreKey:"mangaIgnoreAdultContent",listOnlyKey:"mangaCwWatchlistOnly",skipLabel:"Skip confirmation when removing from reading list",ignoreLabel:"Hide adult content from continue reading",listOnlyLabel:"Only show continue reading for manga in reading list",listNoun:"reading list",continueNoun:"continue reading",adultCountUrl:"/api/manga/continue-reading/adult-count",purgeUrl:"/api/manga/continue-reading/purge-adult",purgeDoneText:t=>`Removed ${t??0} entries from continue reading`,invalidateKeys:[["manga-continue-reading"]]},tv:{heading:"TV Watchlist Preferences",blurb:"Customize your experience when managing your TV watchlist and series entries.",skipKey:"tvSkipRemoveConfirmation",ignoreKey:"tvIgnoreAdultContent",listOnlyKey:"tvCwWatchlistOnly",skipLabel:"Skip confirmation when removing from TV watchlist",ignoreLabel:"Hide adult content from continue watching",listOnlyLabel:"Only show continue watching for shows in TV watchlist",listNoun:"TV watchlist",continueNoun:"continue watching",adultCountUrl:"/api/tv/continue-watching/adult-count",purgeUrl:"/api/tv/continue-watching/purge-adult",purgeDoneText:t=>`Removed ${t??0} entries from continue watching`,invalidateKeys:[["tv-continue-watching"]]},asmr:{heading:"Listening List Preferences",blurb:"Customize your experience when managing your listening list and work entries.",skipKey:"asmrSkipRemoveConfirmation",ignoreKey:"asmrIgnoreAdultContent",listOnlyKey:"asmrCwWatchlistOnly",skipLabel:"Skip confirmation when removing from listening list",ignoreLabel:"Hide adult content from continue listening",listOnlyLabel:"Only show continue listening for works in listening list",listNoun:"listening list",continueNoun:"continue listening",adultCountUrl:"/api/asmr/continue-listening/adult-count",purgeUrl:"/api/asmr/continue-listening/purge-adult",purgeDoneText:t=>`Removed ${t??0} entries from continue listening`,invalidateKeys:[["asmr-continue-listening"]]}},At=(t,s)=>{if(t==null)return s;const i=String(t);return i==="true"||i==="1"?!0:i==="false"||i==="0"?!1:s},we=(t,s,i)=>{const[c,h]=r(s),[d,_]=r(!1),m=ue();return A(()=>{(async()=>{try{const f=await b.settings.getByKey.query({key:t});h(At(f.value,s))}catch(f){console.error("Failed to fetch setting",f)}})()},[t,s]),{value:c,setValue:h,isUpdating:d,toggle:async()=>{if(d)return;_(!0);const u=!c;h(u);try{await b.settings.set.mutate({key:t,value:u});for(const f of i)m.invalidateQueries({queryKey:f})}catch(f){console.error("Error saving setting:",f),h(!u)}finally{_(!1)}}}},Ot=()=>{const{contentType:t}=ve(),s=Pt[t],[i,c]=r(!1),[h,d]=r(!0),[_,m]=r(!1),a=we(s.ignoreKey,!0,s.invalidateKeys),u=we(s.listOnlyKey,!1,s.invalidateKeys),[f,p]=r(null),[l,T]=r(!1),w=ue(),C=Ue();A(()=>{d(!0),(async()=>{try{const R=await b.settings.getByKey.query({key:s.skipKey});String(R.value)==="true"||String(R.value)==="1"?c(!0):c(!1)}catch(R){console.error("Failed to fetch setting",R)}finally{d(!1)}})()},[s.skipKey]);const x=async()=>{if(_)return;m(!0);const N=!i;c(N);try{await b.settings.set.mutate({key:s.skipKey,value:N})}catch(R){console.error("Error saving setting:",R),c(!N)}finally{m(!1)}},L=async()=>{if(!a.isUpdating){if(a.value)try{let N;if(t==="anime"?N=(await b.continueWatching.adultCount.query()).count:t==="manga"?N=(await b.mangaProgress.adultCount.query()).count:t==="asmr"?N=(await b.asmrProgress.adultCount.query()).count:N=(await b.tvProgress.adultCount.query()).count,typeof N=="number"&&N>0){p(N);return}}catch(N){console.error("Failed to fetch adult count",N)}a.toggle()}},D=()=>{p(null),a.toggle()},O=async()=>{if(!l){T(!0);try{let N;t==="anime"?N=(await b.continueWatching.purgeAdult.mutate()).removed:t==="manga"?N=(await b.mangaProgress.purgeAdult.mutate()).removed:t==="asmr"?N=(await b.asmrProgress.purgeAdult.mutate()).removed:N=(await b.tvProgress.purgeAdult.mutate()).removed,ye.success(s.purgeDoneText(N??0));for(const R of s.invalidateKeys)w.invalidateQueries({queryKey:R});t==="anime"&&w.invalidateQueries(C.continueWatching.pathFilter()),t==="manga"&&w.invalidateQueries(C.mangaProgress.pathFilter()),t==="asmr"&&w.invalidateQueries(C.asmrProgress.pathFilter()),t==="tv"&&w.invalidateQueries(C.tvProgress.pathFilter())}catch(N){console.error("Failed to purge adult entries",N),ye.error("Failed to remove adult entries")}finally{T(!1),p(null)}a.toggle()}};return h?e("div",{children:"Loading settings..."}):e("div",{className:G.sectionCard,children:[e("h3",{children:s.heading}),e("p",{children:s.blurb}),e("div",{className:G.settingItem,children:e("div",{className:G.settingRow,children:[e("label",{htmlFor:"skip-confirmation-toggle",children:s.skipLabel}),e(H,{isChecked:i,onChange:x,id:"skip-confirmation-toggle",disabled:_})]})}),e("div",{className:G.settingItem,children:e("div",{className:G.settingRow,children:[e("label",{htmlFor:"ignore-adult-toggle",children:s.ignoreLabel}),e(H,{isChecked:a.value,onChange:L,id:"ignore-adult-toggle",disabled:a.isUpdating})]})}),e("div",{className:G.settingItem,children:e("div",{className:G.settingRow,children:[e("label",{htmlFor:"cw-watchlist-only-toggle",children:s.listOnlyLabel}),e(H,{isChecked:u.value,onChange:u.toggle,id:"cw-watchlist-only-toggle",disabled:u.isUpdating})]})}),f!==null&&e("div",{className:G.modalOverlay,onClick:()=>p(null),children:e("div",{className:G.modal,onClick:N=>N.stopPropagation(),children:[e("h4",{children:"Show adult entries?"}),e("p",{children:[f," adult ",f===1?"entry":"entries"," not in your"," ",s.listNoun," ",f===1?"is":"are"," currently hidden from"," ",s.continueNoun,". You can purge ",f===1?"it":"them"," from the database instead of showing ",f===1?"it":"them","."]}),e("div",{className:G.modalActions,children:[e("button",{type:"button",className:G.modalSecondary,onClick:D,disabled:l,children:"Show them"}),e("button",{type:"button",className:G.modalPrimary,onClick:O,disabled:l,children:l?"Purging...":`Purge ${f}`})]})]})})]})},Ut="_sectionCard_jkggs_1",Mt="_statsGrid_jkggs_26",Et="_statCard_jkggs_33",$t="_statLabel_jkggs_43",Gt="_statValue_jkggs_51",Ft="_statMeta_jkggs_57",Kt="_statusBanner_jkggs_63",Ht="_statusSuccess_jkggs_74",Bt="_statusUpdating_jkggs_80",zt="_statusError_jkggs_86",qt="_sha_jkggs_92",jt="_settingItem_jkggs_99",Wt="_settingRow_jkggs_104",Vt="_settingTitle_jkggs_111",Yt="_settingSubtitle_jkggs_117",Jt="_actionsRow_jkggs_124",P={sectionCard:Ut,statsGrid:Mt,statCard:Et,statLabel:$t,statValue:Gt,statMeta:Ft,statusBanner:Kt,statusSuccess:Ht,statusUpdating:Bt,statusError:zt,sha:qt,settingItem:jt,settingRow:Wt,settingTitle:Vt,settingSubtitle:Yt,actionsRow:Jt},Qt=()=>{const[t,s]=r(null),[i,c]=r(!0),[h,d]=r(!1),[_,m]=r(!1),a=V(null),u=async()=>{try{const w=await b.settings.offlineDbInfo.query();return s(w),w}catch(w){console.error("Failed to fetch offline DB info:",w)}finally{c(!1)}return null};A(()=>(u(),()=>{a.current&&window.clearInterval(a.current)}),[]),A(()=>{t?.isRefreshing?a.current||(a.current=window.setInterval(async()=>{const w=await u();w&&!w.isRefreshing&&a.current&&(window.clearInterval(a.current),a.current=null)},2e3)):a.current&&(window.clearInterval(a.current),a.current=null)},[t?.isRefreshing]);const f=async()=>{if(!t||h)return;const w=!t.autoUpdateEnabled;d(!0),s({...t,autoUpdateEnabled:w});try{await b.settings.setOfflineDbAutoUpdate.mutate({enabled:w})}catch(C){console.error("Failed to update auto update setting:",C),s({...t,autoUpdateEnabled:!w})}finally{d(!1)}},p=async()=>{if(!(t?.isRefreshing||_)){m(!0);try{await b.settings.triggerOfflineDbUpdate.mutate(),s(w=>w?{...w,isRefreshing:!0,lastStatus:"updating",lastMessage:"Downloading database..."}:null)}catch(w){console.error("Failed to trigger offline DB update:",w)}finally{m(!1)}}},l=w=>{if(!w)return"Never";try{return new Date(w).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch{return w}},T=t?.isRefreshing||_;return e("div",{className:P.sectionCard,children:[e("h3",{children:"Offline Metadata Database"}),e("p",{children:"Local MAL to AniList ID map used for instant imports and metadata enrichment without hitting rate-limited APIs. Updates automatically every Saturday in the background."}),e("div",{className:P.statsGrid,children:[e("div",{className:P.statCard,children:[e("span",{className:P.statLabel,children:"MAL Mapped"}),e("span",{className:P.statValue,children:i?"—":(t?.totalMalMapped??0).toLocaleString()})]}),e("div",{className:P.statCard,children:[e("span",{className:P.statLabel,children:"Release"}),e("span",{className:P.statMeta,children:i?"—":t?.releaseTag??"Never"})]}),e("div",{className:P.statCard,children:[e("span",{className:P.statLabel,children:"Last Checked"}),e("span",{className:P.statMeta,children:i?"—":l(t?.lastCheckedAt??null)})]}),e("div",{className:P.statCard,children:[e("span",{className:P.statLabel,children:"Last Updated"}),e("span",{className:P.statMeta,children:i?"—":l(t?.lastUpdatedAt??null)})]})]}),t?.lastMessage&&e("div",{className:`${P.statusBanner} ${t.lastStatus==="failed"?P.statusError:t.lastStatus==="updating"?P.statusUpdating:P.statusSuccess}`,children:[e("span",{children:t.lastMessage}),t.contentSha256&&e("span",{className:P.sha,children:["sha:",t.contentSha256.slice(0,12)]})]}),e("div",{className:P.settingItem,children:e("div",{className:P.settingRow,children:[e("div",{children:[e("span",{className:P.settingTitle,children:"Weekly Automatic Updates (Saturdays)"}),e("div",{className:P.settingSubtitle,children:"Download and index new database releases in the background. Catches up on startup if the server was offline."})]}),e(H,{id:"offline-db-auto-update-toggle",isChecked:t?t.autoUpdateEnabled:!0,onChange:f,disabled:i||h})]})}),e("div",{className:P.actionsRow,children:e(I,{onClick:p,disabled:i||T,children:T?"Updating Database...":"Update Offline Database Now"})})]})},Xt="_sectionCard_1g4qx_1",Zt="_dangerCard_1g4qx_26",ea="_status_1g4qx_34",ta="_warningText_1g4qx_40",aa="_ackLabel_1g4qx_44",ee={sectionCard:Xt,dangerCard:Zt,status:ea,warningText:ta,ackLabel:aa},na=()=>{const t=ue(),[s,i]=r(!1),[c,h]=r(!1),[d,_]=r(!1),[m,a]=r(""),u=()=>{h(!1),a(""),i(!0)},f=()=>{d||(i(!1),h(!1))},p=async()=>{if(!(!c||d)){_(!0),a("");try{const l=await fetch("/api/database/clear",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({confirm:!0})}),T=await l.json();if(!l.ok)throw new Error(T.error||"Failed to clear database");const w=T.deleted,C=T.deletedManga,x=T.deletedTv,L=T.deletedAsmr,D=Object.values(w).reduce((M,v)=>M+(v||0),0)+Object.values(C??{}).reduce((M,v)=>M+(v||0),0)+Object.values(x??{}).reduce((M,v)=>M+(v||0),0)+Object.values(L??{}).reduce((M,v)=>M+(v||0),0),O=(C?.manga_library??0)+(C?.manga_progress??0),N=(x?.tv_library??0)+(x?.tv_progress??0),R=(L?.asmr_library??0)+(L?.asmr_progress??0);a(`Library cleared — ${w.watchlist??0} watchlist entries, ${O} manga rows, ${N} TV rows, ${R} ASMR rows and ${D} total rows removed.`),t.invalidateQueries({queryKey:["watchlist"]}),t.invalidateQueries({queryKey:["allContinueWatching"]}),t.invalidateQueries({queryKey:["manga-library"]}),t.invalidateQueries({queryKey:["manga-continue-reading"]}),t.invalidateQueries({queryKey:["tv-library"]}),t.invalidateQueries({queryKey:["tv-continue-watching"]}),t.invalidateQueries({queryKey:["asmr-library"]}),t.invalidateQueries({queryKey:["asmr-continue-listening"]}),i(!1)}catch(l){a(l.message)}finally{_(!1),h(!1)}}};return e("div",{className:`${ee.sectionCard} ${ee.dangerCard}`,children:[e("h3",{children:"Danger Zone"}),e("p",{children:"Permanently delete your library (watchlist, watched episodes, queue, cached show metadata, manga reading list and reading progress, TV watchlist and watch progress, ASMR listening list and listening progress) to start fresh. Your settings, sync state and the offline metadata cache are preserved."}),e(I,{variant:"danger",onClick:u,children:"Clear Library Data"}),m&&e("p",{className:ee.status,children:m}),e(F,{isOpen:s,onClose:f,title:"Clear library data?",width:"sm",children:[e(F.Body,{children:[e("p",{className:ee.warningText,children:"This permanently deletes everything in your library. It acts on the active database (dev or prod, per server config) and cannot be undone. Settings, sync state and the offline metadata cache are kept."}),e("label",{className:ee.ackLabel,children:[e("input",{type:"checkbox",checked:c,onChange:l=>h(l.target.checked),disabled:d}),e("span",{children:"I understand this permanently deletes my library"})]})]}),e(F.Actions,{children:[e(I,{variant:"secondary",onClick:f,disabled:d,children:"Cancel"}),e(I,{variant:"danger",onClick:p,disabled:!c||d,children:d?"Clearing...":"Yes, delete everything"})]})]})]})},sa=()=>{const[t,s]=r(""),[i,c]=r([]),[h,d]=r(null),[_,m]=r(!0),[a,u]=r({show:!1,message:"",type:"info"}),f=async()=>{try{m(!0);const T=await(await fetch("/api/auth/settings/rclone")).json();s(T.remote||""),c(T.availableRemotes||[]),d(T.activeRemote||null)}catch(l){console.error("Failed to fetch Rclone settings",l)}finally{m(!1)}};A(()=>{f()},[]);const p=async()=>{try{if((await fetch("/api/auth/settings/rclone",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({remote:t})})).ok)u({show:!0,message:"Rclone configuration saved successfully. You must restart the server for these changes to take effect.",type:"success"}),f();else throw new Error("Failed to save")}catch{u({show:!0,message:"Failed to save Rclone configuration.",type:"error"})}};return _?e("div",{style:{color:"var(--text-secondary)",padding:"1.5rem"},children:"Loading..."}):e("div",{className:y.sectionCard,children:[e("h3",{className:y.title,children:"Rclone Cloud Sync"}),e("p",{className:y.signIn,children:"Configure which Rclone remote to use for database synchronization."}),h?e("div",{className:y.userInfo,children:e("p",{children:["Current Active Remote: ",e("strong",{children:h})]})}):e("p",{className:y.warning,style:{marginBottom:"1.5rem"},children:"Rclone sync is not currently active. Ensure rclone is installed and a remote is configured."}),e("div",{className:y.formGroup,children:[e("label",{className:y.label,children:"Remote Name"}),e("div",{className:y.inputWrapper,children:e("select",{className:y.select,value:t,onChange:l=>s(l.target.value),children:[e("option",{value:"",children:"(Disabled / None)"}),i.map(l=>e("option",{value:l,children:l},l)),t&&!i.includes(t)&&e("option",{value:t,children:[t," (Manual)"]})]})}),e("p",{className:y.warning,style:{marginTop:"12px"},children:[e("strong",{children:"Note:"})," You can choose which provider is active using the selector at the top of the page."]})]}),e("div",{className:y.actions,children:e(I,{onClick:p,children:"Save Rclone Settings"})}),e(F,{isOpen:a.show,onClose:()=>u(l=>({...l,show:!1})),width:"sm",children:[e(F.Body,{children:e("p",{children:a.message})}),e(F.Actions,{children:e(I,{onClick:()=>u(l=>({...l,show:!1})),children:"OK"})})]})]})},ra=()=>{const[t,s]=r(null),[i,c]=r(!0),h=async()=>{try{const u=await(await fetch("/api/auth/settings/sync")).json();s(u)}catch(a){console.error("Failed to fetch sync settings",a)}finally{c(!1)}};A(()=>{h()},[]);const d=async a=>{const u=a.target.value;try{const f=await fetch("/api/auth/settings/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:u})});if(f.ok){const p=await f.json();s(l=>l?{...l,activeProvider:p.activeProvider}:null),await h(),oe.success(`Sync provider updated to ${u==="default"?"Default Order":u}`)}else oe.error("Failed to update sync provider")}catch{oe.error("Error updating sync provider")}};if(i||!t)return null;const _=[{value:"default",label:"Default (Priority Based)"}];t.authenticatedProviders.github&&_.push({value:"github",label:"GitHub"}),t.authenticatedProviders.google&&_.push({value:"google",label:"Google Drive"}),t.authenticatedProviders.rclone&&_.push({value:"rclone",label:"Rclone"}),_.push({value:"none",label:"None (Local Only)"});const m=a=>a==="none"?"Local Only (No Sync)":a==="google"?"Google Drive":a==="github"?"GitHub":a==="rclone"?"Rclone":a;return e("div",{className:g.sectionCard,children:[e("h3",{children:"Active Sync Provider"}),e("p",{children:'Choose which provider to use for synchronization. "Default" uses the first available provider you are logged into.'}),e("div",{style:{marginBottom:"1.5rem",padding:"0.75rem",background:"rgba(255, 255, 255, 0.03)",borderRadius:"var(--radius-md)",borderLeft:"4px solid var(--accent)",fontSize:"var(--font-size-sm)"},children:["Current Status:"," ",e("strong",{style:{color:"var(--accent-light)",textTransform:"capitalize"},children:m(t.actualActiveProvider)})]}),e("div",{className:g.settingRow,children:[e("label",{htmlFor:"sync-provider-select",children:"Selected Preference"}),e("select",{id:"sync-provider-select",value:t.activeProvider,onChange:d,style:{padding:"0.5rem",borderRadius:"var(--radius-md)",background:"rgba(255, 255, 255, 0.05)",color:"var(--text-primary)",border:"1px solid var(--glass-border)",fontSize:"var(--font-size-sm)",minWidth:"220px",outline:"none",cursor:"pointer"},children:_.map(a=>e("option",{value:a.value,children:a.label},a.value))})]})]})};function ia(){return"javascript:"+encodeURIComponent(`(function(){
2
- if(!/(^|\\.)discord\\.com$/.test(location.hostname)){alert('Dango: use this bookmarklet while on discord.com');return}
3
- var t=null;
4
- try{
5
- window.webpackChunkdiscord_app.push([[Symbol()],{},function(req){
6
- if(!req.c)return;
7
- var ms=Object.values(req.c);
8
- for(var i=0;i<ms.length;i++){var m=ms[i];
9
- try{
10
- if(!m.exports||m.exports===window)continue;
11
- if(typeof m.exports.getToken==='function'){var x=m.exports.getToken();if(x){t=x;return}}
12
- for(var k in m.exports){try{var ex=m.exports[k];if(ex&&typeof ex.getToken==='function'&&ex[Symbol.toStringTag]!=='IntlMessagesProxy'){var y=ex.getToken();if(y){t=y;return}}}catch(e1){}}
13
- }catch(e2){}}
14
- }]);
15
- window.webpackChunkdiscord_app.pop();
16
- }catch(e3){}
17
- if(!t){alert('Dango: could not grab your token. Make sure you are logged in to Discord in this tab, then run the bookmarklet again.');return}
18
- function copyFallback(){var a=document.createElement('textarea');a.value=t;a.style.position='fixed';a.style.opacity='0';document.body.appendChild(a);a.select();try{document.execCommand('copy')}catch(e4){}document.body.removeChild(a)}
19
- var done=function(){window.close();setTimeout(function(){if(!window.closed){alert('Dango: token copied to clipboard! Could not close this tab, so just close it, go back to Dango Settings, paste the token and press Save.')}},250)};
20
- if(navigator.clipboard&&navigator.clipboard.writeText){navigator.clipboard.writeText(t).then(done,function(){copyFallback();done()})}else{copyFallback();done()}
21
- })()`)}const oa=()=>{const t=Le(ia,[]);return e("div",{style:{marginTop:"0.9rem",paddingTop:"0.9rem",borderTop:"1px dashed var(--border-color)"},children:[e("h4",{style:{margin:"0 0 0.35rem",fontSize:"0.95rem"},children:"Grab the token automatically (bookmarklet)"}),e("p",{style:{margin:"0 0 0.6rem",fontSize:"0.85rem",color:"var(--text-secondary)"},children:"Set this up once and you never have to dig through DevTools: the bookmarklet copies your Discord token to the clipboard and closes the Discord tab — then you just paste it above and press Save."}),e("ol",{style:{margin:"0 0 0.75rem",paddingLeft:"1.25rem",fontSize:"0.85rem",color:"var(--text-secondary)",display:"grid",gap:"0.3rem"},children:[e("li",{children:["Drag the ",e("strong",{style:{color:"var(--text-primary)"},children:"Dango Token Grabber"})," ","button below onto your bookmarks bar (press ",e("kbd",{children:"Ctrl"}),"+",e("kbd",{children:"Shift"}),"+",e("kbd",{children:"B"})," ","first if the bar is hidden)."]}),e("li",{children:["Click ",e("strong",{style:{color:"var(--text-primary)"},children:"Open Discord"})," and log in (skip this if you are already logged in)."]}),e("li",{children:["On the Discord tab, click the"," ",e("strong",{style:{color:"var(--text-primary)"},children:"Dango Token Grabber"})," bookmark. The token lands in your clipboard and the tab closes on its own — come back here, paste it above and press ",e("strong",{children:"Save"}),"."]})]}),e("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center",flexWrap:"wrap"},children:[e("a",{href:t,onClick:c=>{c.preventDefault(),alert("Drag this button onto your bookmarks bar instead of clicking it, then click it while you are on discord.com.")},title:"Drag me to your bookmarks bar",draggable:!0,style:{display:"inline-flex",alignItems:"center",padding:"0.4rem 0.8rem",borderRadius:"999px",border:"1px dashed var(--accent)",background:"var(--bg-secondary)",color:"var(--text-primary)",fontSize:"0.85rem",textDecoration:"none",cursor:"grab",userSelect:"none"},children:[e(W,{name:"bookmark",style:{marginRight:"0.45rem",color:"var(--accent)"}}),"Dango Token Grabber"]}),e("a",{className:"btn btn-secondary btn-sm",href:"https://discord.com/channels/@me",target:"_blank",rel:"noopener noreferrer",children:"Open Discord"}),e(I,{variant:"ghost",size:"sm",onClick:async()=>{try{await navigator.clipboard.writeText(t),alert('Bookmarklet code copied. Create a new bookmark on your bookmarks bar, name it "Dango Token" and paste the code as its URL.')}catch{alert(`Could not copy automatically. Right-click the "Dango Token Grabber" button and choose "Copy link address" instead, then paste that into a new bookmark's URL.`)}},children:"Copy code"})]}),e("p",{style:{margin:"0.5rem 0 0",fontSize:"0.75rem",color:"var(--text-tertiary)"},children:`"Copy code" is a fallback for browsers that won't drag bookmarklets: create any bookmark, then paste the copied code as its URL.`})]})},ca="_sectionCard_1ag4p_1",la="_settingItem_1ag4p_25",da="_field_1ag4p_30",ua="_input_1ag4p_43",ha="_actions_1ag4p_63",ga="_status_1ag4p_69",B={sectionCard:ca,settingItem:la,field:da,input:ua,actions:ha,status:ga},ma=()=>{const[t,s]=r(!1),[i,c]=r(""),[h,d]=r(""),[_,m]=r(!0),[a,u]=r(!1),[f,p]=r("");A(()=>{(async()=>{try{const L=await(await fetch("/api/auth/app-status")).json();s(L.hasPassword)}catch{console.error("Failed to fetch LAN auth status")}finally{m(!1)}})()},[]);const l=async()=>{if(p(""),i!==h){p("Passwords do not match");return}if(i.length<4){p("Password must be at least 4 characters");return}u(!0);try{const C=await fetch("/api/auth/app-setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:i})}),x=await C.json();if(!C.ok){p(x.error||"Failed to update password");return}s(x.hasPassword),c(""),d(""),p(x.hasPassword?"Password set successfully":"Password removed")}catch{p("Network error")}finally{u(!1)}},T=async()=>{u(!0);try{const C=await fetch("/api/auth/app-setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:""})}),x=await C.json();if(!C.ok){p(x.error||"Failed to remove password");return}s(!1),c(""),d(""),p("Password removed")}catch{p("Network error")}finally{u(!1)}},w=async()=>{u(!0);try{await fetch("/api/auth/app-logout",{method:"POST"}),p("Logged out"),window.location.reload()}catch{p("Logout failed")}finally{u(!1)}};return _?e("div",{className:B.sectionCard,children:e("p",{children:"Loading..."})}):e("div",{className:B.sectionCard,children:[e("h3",{children:"LAN Lock"}),e("p",{children:"Require a password to access this instance from any device, including this one. Sessions persist across server restarts until logout or password change."}),e("div",{className:B.settingItem,children:[e("div",{className:B.field,children:[e("label",{htmlFor:"lan-password",children:"New Password"}),e("input",{id:"lan-password",type:"password",value:i,onChange:C=>c(C.target.value),placeholder:t?"Leave empty to keep current password":"Enter a password...",className:B.input})]}),e("div",{className:B.field,children:[e("label",{htmlFor:"lan-confirm-password",children:"Confirm Password"}),e("input",{id:"lan-confirm-password",type:"password",value:h,onChange:C=>d(C.target.value),placeholder:"Confirm password...",className:B.input})]}),e("div",{className:B.actions,children:[e(I,{variant:"primary",onClick:l,loading:a,disabled:a,children:t?"Update Password":"Set Password"}),t&&e(I,{variant:"danger",onClick:w,loading:a,disabled:a,children:"Logout"}),t&&e(I,{variant:"secondary",onClick:T,loading:a,disabled:a,children:"Remove Password"})]}),f&&e("p",{className:B.status,children:f})]})]})},pa=()=>{const{theme:t,setTheme:s,loading:i}=Me();return e("div",{children:[e("h4",{style:{margin:"0 0 0.25rem",fontSize:"1rem"},children:"Palette"}),e("p",{style:{margin:"0 0 0.75rem",fontSize:"0.85rem",color:"var(--text-secondary)"},children:"Taro is the default. Pick a palette that suits you."}),e("div",{role:"radiogroup","aria-label":"Palette",style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:"0.6rem"},children:Ee.map(c=>{const h=t===c.id;return e("button",{role:"radio","aria-checked":h,disabled:i,onClick:()=>s(c.id),style:{display:"flex",gap:"0.6rem",alignItems:"center",textAlign:"left",padding:"0.65rem 0.75rem",borderRadius:"10px",cursor:"pointer",background:h?"var(--accent-subtle)":"var(--bg-tertiary)",border:h?"1px solid var(--accent)":"1px solid var(--border-primary)",color:"var(--text-primary)"},children:[e("span",{"aria-hidden":!0,style:{width:26,height:26,borderRadius:"50%",flex:"none",background:c.swatch,border:"1px solid rgba(0,0,0,0.35)"}}),e("span",{style:{minWidth:0},children:[e("span",{style:{display:"block",fontSize:"0.85rem",fontWeight:700},children:c.label}),e("span",{style:{display:"block",fontSize:"0.75rem",color:"var(--text-secondary)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:c.blurb})]})]},c.id)})})]})},ya="_card_13wyw_1",fa="_cardHeader_13wyw_9",wa="_discordBadge_13wyw_16",va="_cardTitle_13wyw_27",ba="_cardSub_13wyw_34",_a="_description_13wyw_40",ka="_divider_13wyw_47",Sa="_statsRow_13wyw_54",Ca="_statBox_13wyw_61",Na="_statValue_13wyw_71",Ta="_statLabel_13wyw_78",Ra="_rolePreview_13wyw_86",Da="_badge_13wyw_93",Ia="_badgeRank_13wyw_100",La="_badgeDere_13wyw_106",xa="_progressSection_13wyw_112",Pa="_progressLabel_13wyw_116",Aa="_progressTrack_13wyw_124",Oa="_progressFill_13wyw_132",Ua="_tierList_13wyw_139",Ma="_dereSection_13wyw_147",Ea="_sectionHeading_13wyw_152",$a="_dereGrid_13wyw_161",Ga="_dereCard_13wyw_167",Fa="_dereCardActive_13wyw_178",Ka="_dereName_13wyw_184",Ha="_dereGenre_13wyw_194",Ba="_actions_13wyw_199",za="_btnPrimary_13wyw_205",qa="_btnSecondary_13wyw_234",ja="_statusMsg_13wyw_257",Wa="_statusSuccess_13wyw_264",Va="_statusError_13wyw_270",Ya="_statusInfo_13wyw_276",Ja="_userRow_13wyw_283",Qa="_avatar_13wyw_294",Xa="_avatarPlaceholder_13wyw_302",Za="_userName_13wyw_314",en="_userId_13wyw_320",tn="_notice_13wyw_325",an="_shareList_13wyw_332",nn="_btnUnlink_13wyw_340",o={card:ya,cardHeader:fa,discordBadge:wa,cardTitle:va,cardSub:ba,description:_a,divider:ka,statsRow:Sa,statBox:Ca,statValue:Na,statLabel:Ta,rolePreview:Ra,badge:Da,badgeRank:Ia,badgeDere:La,progressSection:xa,progressLabel:Pa,progressTrack:Aa,progressFill:Oa,tierList:Ua,dereSection:Ma,sectionHeading:Ea,dereGrid:$a,dereCard:Ga,dereCardActive:Fa,dereName:Ka,dereGenre:Ha,actions:Ba,btnPrimary:za,btnSecondary:qa,statusMsg:ja,statusSuccess:Wa,statusError:Va,statusInfo:Ya,userRow:Ja,avatar:Qa,avatarPlaceholder:Xa,userName:Za,userId:en,notice:tn,shareList:an,btnUnlink:nn},q=[{label:"F-Rank",hours:0},{label:"E-Rank",hours:5},{label:"D-Rank",hours:20},{label:"C-Rank",hours:50},{label:"B-Rank",hours:100},{label:"A-Rank",hours:200},{label:"S-Rank",hours:400}],be={fantasy:"Kamidere",action:"Kamidere",isekai:"Kamidere",magic:"Kamidere","super power":"Megadere",adventure:"Himedere","martial arts":"Himedere",family:"Himedere",comedy:"Bakadere",shounen:"Bakadere",parody:"Bakadere",sports:"Undere",music:"Deredere",romance:"Deredere",ecchi:"Deredere",harem:"Deredere",drama:"Dandere","slice of life":"Dandere",yuri:"Dandere","school life":"Dandere","high school":"Tsundere",school:"Tsundere",military:"Tsundere",shoujo:"Tsundere",seinen:"Kuudere","sci-fi":"Kuudere","science fiction":"Kuudere",mystery:"Kuudere",mecha:"Kuudere",josei:"Kuudere",psychological:"Yandere",horror:"Yandere",thriller:"Sadodere",supernatural:"Dorodere",demons:"Dorodere",game:"Oujidere",historical:"Kanedere"};function sn(t){return be[(t||"").toLowerCase().trim()]||"Tsundere"}function rn(t){const s=new Set;for(const i of t){const c=be[i.toLowerCase().trim()];c&&s.add(c)}return[...s]}const on=[{name:"Tsundere",genres:"Romance, School, Shoujo, Military, High School"},{name:"Yandere",genres:"Psychological, Horror"},{name:"Kuudere",genres:"Seinen, Sci-Fi, Mystery, Mecha, Josei"},{name:"Dandere",genres:"Drama, Slice of Life, Yuri, School Life"},{name:"Deredere",genres:"Romance, Ecchi, Harem, Music"},{name:"Bakadere",genres:"Comedy, Shounen, Parody"},{name:"Kamidere",genres:"Fantasy, Action, Isekai, Magic"},{name:"Dorodere",genres:"Supernatural, Demons"},{name:"Himedere",genres:"Adventure, Martial Arts, Family"},{name:"Sadodere",genres:"Thriller"},{name:"Undere",genres:"Sports"},{name:"Megadere",genres:"Super Power"},{name:"Oujidere",genres:"Game"},{name:"Kanedere",genres:"Historical"}];function cn(t){return t>=400?"S-Rank":t>=200?"A-Rank":t>=100?"B-Rank":t>=50?"C-Rank":t>=20?"D-Rank":t>=5?"E-Rank":"F-Rank"}function ln(t){const s=[...q].reverse().findIndex(u=>t>=u.hours),i=s===-1?0:q.length-1-s,c=q[i].label,h=i<q.length-1?q[i+1]:null;if(!h)return{pct:100,current:c,next:"MAX",nextHours:0};const d=q[i].hours,_=q.length-1,m=(t-d)/(h.hours-d);return{pct:Math.min(100,(i+m)/_*100),current:c,next:h.label,nextHours:h.hours-t}}const re="dango_discord_user";function dn({workerUrl:t}){const[s,i]=r(()=>{try{const v=localStorage.getItem(re);if(v)return JSON.parse(v)}catch{}try{const k=new URLSearchParams(window.location.search).get("discord_user");if(k)return JSON.parse(k)}catch{}return null}),[c,h]=r(null),[d,_]=r(!1),[m,a]=r(null),[u,f]=r(()=>!s);A(()=>{const v=new URLSearchParams(window.location.search),k=v.get("discord_user");if(k){try{const U=JSON.parse(k);U&&U.id&&(i(U),f(!1),localStorage.setItem(re,JSON.stringify(U)),b.insights.setDiscordUser.mutate({user:U}).catch(()=>{}))}catch{}v.delete("discord_user"),window.history.replaceState(null,"",window.location.pathname+(v.toString()?`?${v.toString()}`:""))}},[]);const p=ae(async()=>{if(s){f(!1);return}try{const v=await b.insights.discordUser.query();v.user&&(i(v.user),localStorage.setItem(re,JSON.stringify(v.user)))}catch{}finally{f(!1)}},[s]),l=ae(async()=>{try{const v=await b.insights.discordSyncStats.query();h(v)}catch{}},[]);A(()=>{p(),l()},[p,l]);const T=()=>{localStorage.removeItem(re),i(null),a(null),b.insights.setDiscordUser.mutate({user:null}).catch(()=>{})},w=async()=>{if(!(!s||!c)){_(!0),a(null);try{const v=await b.insights.discordSyncNow.mutate();v.success?a({type:"success",text:`✅ ${v.message}`}):a({type:"error",text:`❌ ${v.error||v.message||"Sync failed"}`})}catch{a({type:"error",text:"❌ Network error — check your connection"})}finally{_(!1)}}},C=c?Math.round(c.totalSeconds/3600):0,x=cn(C),L=c?sn(c.topGenre):"—",D=c?.dere||(c?.genres?rn(c.genres):[L]),{pct:O,next:N,nextHours:R}=ln(C),M=s?.avatar?`https://cdn.discordapp.com/avatars/${s.id}/${s.avatar}.${s.avatar.startsWith("a_")?"gif":"png"}?size=80`:null;return e(te,{children:[e("div",{className:o.card,children:[e("div",{className:o.cardHeader,children:[e("div",{className:o.discordBadge,children:e("svg",{width:"20",height:"15",viewBox:"0 0 71 55",fill:"white","aria-hidden":"true",children:e("path",{d:"M60.1 4.9A58.5 58.5 0 0 0 45.5.3a.22.22 0 0 0-.23.11 40.8 40.8 0 0 0-1.8 3.7 54 54 0 0 0-16.2 0 37.5 37.5 0 0 0-1.83-3.7.23.23 0 0 0-.23-.11A58.3 58.3 0 0 0 10.9 4.9a.2.2 0 0 0-.1.08C1.58 18.73-1 32.23.31 45.55a.24.24 0 0 0 .09.17 58.8 58.8 0 0 0 17.7 8.95.23.23 0 0 0 .25-.08 42 42 0 0 0 3.61-5.88.22.22 0 0 0-.12-.31 38.7 38.7 0 0 1-5.53-2.64.23.23 0 0 1-.02-.37 29 29 0 0 0 1.1-.86.22.22 0 0 1 .23-.03c11.6 5.3 24.14 5.3 35.6 0a.22.22 0 0 1 .23.03c.36.3.73.58 1.1.86a.23.23 0 0 1-.02.37 36.4 36.4 0 0 1-5.53 2.64.22.22 0 0 0-.12.31 47.1 47.1 0 0 0 3.61 5.88.22.22 0 0 0 .25.08 58.6 58.6 0 0 0 17.72-8.95.23.23 0 0 0 .09-.16c1.47-15.27-2.47-28.65-10.46-40.47a.18.18 0 0 0-.09-.09ZM23.73 37.55c-3.49 0-6.37-3.21-6.37-7.15s2.82-7.15 6.37-7.15c3.58 0 6.42 3.24 6.37 7.15 0 3.94-2.82 7.15-6.37 7.15Zm23.54 0c-3.49 0-6.37-3.21-6.37-7.15s2.82-7.15 6.37-7.15c3.58 0 6.42 3.24 6.37 7.15 0 3.94-2.79 7.15-6.37 7.15Z"})})}),e("div",{children:[e("p",{className:o.cardTitle,children:"Discord Account"}),e("p",{className:o.cardSub,children:"Link your Discord to earn community roles"})]})]}),u?e("p",{className:o.notice,children:"Loading…"}):s?e(te,{children:[e("div",{className:o.userRow,children:[M?e("img",{className:o.avatar,src:M,alt:s.username}):e("div",{className:o.avatarPlaceholder,children:"👤"}),e("div",{children:[e("p",{className:o.userName,children:s.username}),e("p",{className:o.userId,children:["ID: ",s.id]})]}),e("button",{className:o.btnUnlink,onClick:T,title:"Disconnect your Discord account",children:"Disconnect"})]}),e("p",{className:o.notice,children:"The following data is shared with the Dango community service to assign roles:"}),e("ul",{className:o.shareList,children:[e("li",{children:"Total watch time (hours)"}),e("li",{children:"Top 3 watched genres"}),e("li",{children:"Discord user ID + username"})]})]}):e(te,{children:[e("p",{className:o.description,children:"Sign in with Discord (OAuth) to link your account. Only your public username and ID are stored — no email or DMs."}),e("div",{className:o.actions,children:[e("button",{className:o.btnPrimary,onClick:()=>{const v=encodeURIComponent(window.location.origin+"/settings?tab=community"),k=`${t}/auth/login?return_to=${v}`;window.location.href=k},children:"Login with Discord"}),e("a",{className:o.btnSecondary,href:"https://discord.gg/2FTSPXCsvn",target:"_blank",rel:"noopener noreferrer",children:"Join Server"})]})]})]}),e("div",{className:o.card,children:[e("div",{className:o.cardHeader,children:e("div",{children:[e("p",{className:o.cardTitle,children:"Your Roles"}),e("p",{className:o.cardSub,children:"Based on your current Dango watch history"})]})}),c?e(te,{children:[e("div",{className:o.statsRow,children:[e("div",{className:o.statBox,children:[e("span",{className:o.statValue,children:[C,"h"]}),e("span",{className:o.statLabel,children:"Watch Time"})]}),e("div",{className:o.statBox,children:[e("span",{className:o.statValue,children:c.topGenre||"—"}),e("span",{className:o.statLabel,children:"Top Genre"})]})]}),e("div",{className:o.rolePreview,children:[e("span",{className:`${o.badge} ${o.badgeRank}`,children:x}),e("span",{className:`${o.badge} ${o.badgeDere}`,children:L})]}),e("div",{className:o.progressSection,children:[e("div",{className:o.progressLabel,children:[e("span",{children:["Progress to ",N]}),e("span",{children:N==="MAX"?"MAX":`${R}h remaining`})]}),e("div",{className:o.progressTrack,children:e("div",{className:o.progressFill,style:{width:`${O}%`}})}),e("div",{className:o.tierList,children:[e("span",{children:"0h (F)"}),e("span",{children:"5h (E)"}),e("span",{children:"20h (D)"}),e("span",{children:"50h (C)"}),e("span",{children:"100h (B)"}),e("span",{children:"200h (A)"}),e("span",{children:"400h (S)"})]})]}),e("div",{className:o.dereSection,children:[e("p",{className:o.sectionHeading,children:"Personality Archetypes"}),e("div",{className:o.dereGrid,children:on.map(v=>{const k=D.includes(v.name);return e("div",{className:`${o.dereCard} ${k?o.dereCardActive:""}`,children:[e("span",{className:o.dereName,children:v.name}),e("span",{className:o.dereGenre,children:v.genres})]},v.name)})})]}),e("hr",{className:o.divider}),e("div",{className:o.actions,children:[e("button",{className:o.btnPrimary,onClick:w,disabled:!s||d,id:"discord-roles-sync-btn",children:d?"Syncing…":"Sync Roles"}),!s&&e("span",{style:{fontSize:"0.78rem",color:"var(--text-tertiary)",alignSelf:"center"},children:"Login first to sync"})]}),m&&e("p",{className:`${o.statusMsg} ${m.type==="success"?o.statusSuccess:m.type==="error"?o.statusError:o.statusInfo}`,children:m.text})]}):e("p",{className:o.notice,children:"No watch data yet — start watching to earn roles!"})]}),e("div",{className:o.card,children:[e("div",{className:o.cardHeader,children:e("div",{children:[e("p",{className:o.cardTitle,children:"Dango Discord Server"}),e("p",{className:o.cardSub,children:"Community, announcements and support"})]})}),e("div",{className:o.actions,children:e("a",{className:o.btnPrimary,href:"https://discord.gg/2FTSPXCsvn",target:"_blank",rel:"noopener noreferrer",children:"Join the Server"})})]})]})}function un({variant:t="info",children:s,className:i=""}){return e("div",{className:`alert alert-${t} ${i}`,children:s})}const hn={anime:"Watchlist",manga:"Reading List",tv:"TV Watchlist",asmr:"Listening List"},fn=()=>{const[t,s]=xe(),i=Pe(),{contentType:c}=ve(),h=t.get("tab"),[d,_]=r(h&&["general","sync","watchlist","database","community"].includes(h)?h:"general"),[m,a]=r(""),u=V(null),f=V(null),p=V(new Map),[l,T]=r({top:0,height:0,left:0,width:0}),{lowEndMode:w,setLowEndMode:C}=$e(),{hasConsent:x,revoke:L}=Ge(),[D,O]=r(""),[N,R]=r(localStorage.getItem("telemetry_enabled")!=="false"),[M,v]=r(localStorage.getItem("installation_id")||"");A(()=>{b.settings.installationId.query().then(n=>{n.id&&(v(n.id),localStorage.setItem("installation_id",n.id))}).catch(()=>{})},[]),A(()=>{b.discord.rolesConfig.query().then(n=>{n.workerUrl&&O(n.workerUrl)}).catch(()=>{})},[]);const[k,U]=r(Fe),[E,z]=r(!0),{data:S}=fe("discordRPCEnabled"),ne=Ke(),[_e,he]=r(!0),{data:Y}=fe("discordRPCHideMature"),[ge,se]=r(""),[J,ie]=r(null);A(()=>{b.discord.gatewayStatus.query().then(n=>{ie(n),n.masked&&n.masked!=="none"&&se(n.masked)}).catch(()=>{})},[]),A(()=>{S!==void 0&&z(S==="true"||S===!0||S===null)},[S]),A(()=>{Y!==void 0&&he(Y==="true"||Y===!0||Y===null)},[Y]);const ke=n=>{z(n),ne.mutate({key:"discordRPCEnabled",value:String(n)})},Se=n=>{he(n),ne.mutate({key:"discordRPCHideMature",value:String(n)})},Ce=n=>{R(n),localStorage.setItem("telemetry_enabled",String(n)),n?je():We()},Ne=n=>{U(n),localStorage.setItem(ze,String(n)),window.dispatchEvent(new CustomEvent(qe))};pe.useEffect(()=>{document.title="Settings - dango"},[]),pe.useEffect(()=>{const n=t.get("tab");n&&["general","sync","watchlist","database","community"].includes(n)&&_(n)},[t]);const Q=n=>{_(n),s(n==="general"?{}:{tab:n})},X=ae(()=>{const n=p.current.get(d),$=f.current;if(n&&$){const j=$.getBoundingClientRect(),K=n.getBoundingClientRect(),Z=window.matchMedia("(max-width: 900px)").matches;T(Z?{top:K.top-j.top,height:K.height,left:K.left-j.left,width:K.width}:{top:K.top-j.top,height:K.height,left:0,width:0})}},[d]);Ae(()=>{X()},[d,X]),A(()=>{const n=()=>X();window.addEventListener("resize",n);let $=!1;return document.fonts?.ready&&document.fonts.ready.then(()=>{$||X()}),()=>{$=!0,window.removeEventListener("resize",n)}},[d,X]);const Te=()=>{a("Exporting databases...");const n=window.DangoBridge;if(n?.downloadFile){n.downloadFile("/api/backup-db","dango-backup.json"),setTimeout(()=>{a("Databases exported successfully!")},1500);return}const $=document.createElement("a");$.href="/api/backup-db",$.download="dango-backup.json",document.body.appendChild($),$.click(),$.remove(),setTimeout(()=>{a("Databases exported successfully!")},1500)},Re=async n=>{const $=n.target.files?.[0];if(!$)return;a("Importing databases...");const j=new FormData;j.append("dbfile",$);try{const K=await fetch("/api/restore-db",{method:"POST",body:j}),Z=await K.json();if(K.ok){const me=Array.isArray(Z.restored)?Z.restored.join(", "):null;a(me?`Databases imported successfully (${me})!`:"Database imported successfully!"),setTimeout(()=>window.location.reload(),2e3)}else a(`Import failed: ${Z.error}`)}catch{a("Import failed: An unexpected error occurred.")}finally{n.target.value=""}},De=()=>{u.current?.click()},Ie=()=>{switch(d){case"general":return e("div",{className:g.tabContent,children:e("div",{className:g.sectionCard,children:[e("h3",{children:"Appearance & Preferences"}),e("p",{children:"Configure how titles are displayed and other general preferences."}),e("div",{className:g.settingItem,children:e(Ve,{})}),e("div",{className:g.settingItem,style:{marginTop:"1.5rem"},children:e(pa,{})}),e("div",{className:g.settingItem,style:{marginTop:"1.5rem"},children:e("div",{className:g.settingRow,children:[e("div",{style:{minWidth:0},children:[e("h4",{style:{margin:0,fontSize:"1rem"},children:"Low End Mode"}),e("p",{style:{margin:"0.25rem 0 0",fontSize:"0.85rem",color:"var(--text-secondary)"},children:"Disables animations and heavy visual effects for better performance on older hardware."})]}),e(H,{isChecked:w,onChange:n=>C(n.target.checked),id:"low-end-mode"})]})}),e("div",{className:g.settingItem,style:{marginTop:"1.5rem"},children:e("div",{className:g.settingRow,children:[e("div",{style:{minWidth:0},children:[e("h4",{style:{margin:0,fontSize:"1rem"},children:"Virtual Keyboard"}),e("p",{style:{margin:"0.25rem 0 0",fontSize:"0.85rem",color:"var(--text-secondary)"},children:"Shows an on-screen keyboard when text search fields are focused."})]}),e(H,{isChecked:k,onChange:n=>Ne(n.target.checked),id:"virtual-keyboard-enabled"})]})}),e("div",{className:g.settingItem,style:{marginTop:"1.5rem"},children:e("div",{className:g.settingRow,children:[e("div",{style:{minWidth:0},children:[e("h4",{style:{margin:0,fontSize:"1rem"},children:"Discord Rich Presence"}),e("p",{style:{margin:"0.25rem 0 0",fontSize:"0.85rem",color:"var(--text-secondary)"},children:"Show your current anime and watch progress on your Discord profile status."})]}),e(H,{isChecked:E,onChange:n=>ke(n.target.checked),id:"discord-rpc-enabled"})]})}),e("div",{style:{marginTop:"2rem"},children:e(ma,{})}),E&&e("div",{className:g.settingItem,style:{marginTop:"1rem"},children:e("div",{className:g.settingRow,children:[e("div",{style:{minWidth:0},children:[e("h4",{style:{margin:0,fontSize:"1rem"},children:"Hide Mature Content"}),e("p",{style:{margin:"0.25rem 0 0",fontSize:"0.85rem",color:"var(--text-secondary)"},children:"Hide mature content (18+) from Discord Rich Presence."})]}),e(H,{isChecked:_e,onChange:n=>Se(n.target.checked),id:"discord-hide-mature"})]})}),e("div",{className:g.settingItem,style:{marginTop:"1.5rem",background:"var(--bg-tertiary)",padding:"1rem",borderRadius:"8px",border:"1px solid var(--border-color)"},children:[e("div",{className:g.settingRow,children:e("div",{style:{minWidth:0},children:[e("h4",{style:{margin:0,fontSize:"1rem"},children:"Discord Mobile Presence (Gateway)"}),e("p",{style:{margin:"0.25rem 0 0.75rem",fontSize:"0.85rem",color:"var(--text-secondary)"},children:"Paste your Discord authentication token to enable presence on mobile devices. If no token is saved, the default desktop Rich Presence is used. The token is stored locally in your configuration and never shared."})]})}),e(un,{variant:"warning",style:{marginTop:"1.25rem",paddingTop:"1.25rem"},children:[e("strong",{children:"Use at your own risk."})," This feature uses the Discord Gateway API with your user token, which violates Discord's Terms of Service. Discord may detect this usage and take action against your account, including phone number locks, temporary suspensions, or permanent bans. While the risk is generally low, it is not zero. Only use this if you understand and accept the risks."]}),e("div",{style:{marginTop:"0.75rem",display:"flex",gap:"0.5rem",alignItems:"center",flexWrap:"wrap"},children:[e("input",{type:"password",value:ge,onChange:n=>se(n.target.value),placeholder:"Paste Discord token here...",style:{flex:"1 1 200px",padding:"0.5rem",borderRadius:"4px",border:"1px solid var(--border-color)",background:"var(--bg-primary)",color:"var(--text-primary)",fontFamily:"monospace",minWidth:0}}),e(I,{variant:"primary",size:"sm",onClick:async()=>{try{const n=await b.discord.gatewaySave.mutate({token:ge});ie({hasToken:!0,masked:n.masked,enabled:!0}),se(n.masked)}catch(n){alert(n instanceof Error?n.message:"Failed to save token")}},children:"Save"}),e(I,{variant:"secondary",size:"sm",onClick:async()=>{await b.discord.gatewayRemove.mutate().catch(()=>{}),se(""),ie({hasToken:!1,masked:null,enabled:!1})},children:"Remove"})]}),J&&e("p",{style:{marginTop:"0.5rem",fontSize:"0.8rem",color:J.hasToken?"green":"var(--text-secondary)"},children:["Status:"," ",J.hasToken?`Token saved (${J.masked})`:"No token saved",J.enabled?" - Gateway active":""]}),e(oa,{})]}),e("div",{className:g.settingItem,style:{marginTop:"1.5rem"},children:[e("div",{className:g.settingRow,children:[e("div",{style:{minWidth:0},children:[e("h4",{style:{margin:0,fontSize:"1rem"},children:"Telemetry Tracking"}),e("p",{style:{margin:"0.25rem 0 0",fontSize:"0.85rem",color:"var(--text-secondary)"},children:"Share anonymous installation data to help track active users. Collected: Browser type and OS (e.g. 'Chrome on Windows'), App Version, First Seen/Last Seen timestamps, and timezone (e.g. 'Europe/Berlin'). No other personal information or usage habits are collected."})]}),e(H,{isChecked:N,onChange:n=>Ce(n.target.checked),id:"telemetry-enabled"})]}),N&&e("div",{style:{marginTop:"0.75rem",fontSize:"0.8rem",color:"var(--text-secondary)"},children:[e("p",{style:{margin:"0 0 0.5rem 0",fontWeight:"bold"},children:"Data currently being shared:"}),e("div",{style:{background:"var(--bg-tertiary)",padding:"0.5rem",borderRadius:"4px",wordBreak:"break-all",fontFamily:"monospace"},children:[e("p",{style:{margin:"0"},children:[e("strong",{children:"ID:"})," ",M||"Loading..."]}),e("p",{style:{margin:"0"},children:[e("strong",{children:"Version:"})," ",He.version]}),e("p",{style:{margin:"0"},children:[e("strong",{children:"Browser:"})," ",Be()]}),e("p",{style:{margin:"0"},children:[e("strong",{children:"Timezone:"})," ",Intl.DateTimeFormat().resolvedOptions().timeZone]})]})]}),e("div",{style:{marginTop:"1rem"},children:e(I,{variant:"secondary",size:"sm",onClick:()=>i("/map"),children:"View User Map"})})]}),x&&e("div",{className:g.settingItem,style:{marginTop:"1.5rem"},children:e("div",{className:g.settingRow,children:[e("div",{style:{minWidth:0},children:[e("h4",{style:{margin:0,fontSize:"1rem"},children:"Mature Content"}),e("p",{style:{margin:"0.25rem 0 0",fontSize:"0.85rem",color:"var(--text-secondary)"},children:"You have previously agreed to view 18+ content. Toggle this off to re-enable the blur gate and filtering."})]}),e(H,{isChecked:!0,onChange:n=>{n.target.checked||(L(),window.location.reload())},id:"mature-content-enabled"})]})})]})});case"sync":return e("div",{className:g.tabContent,children:[e(ra,{}),e(kt,{}),e(St,{}),e(sa,{})]});case"watchlist":return e("div",{className:g.tabContent,children:e(Ot,{})});case"database":return e("div",{className:g.tabContent,children:[e("div",{className:g.sectionCard,children:[e("h3",{children:"Database Management"}),e("p",{children:"Download a backup of all databases (anime, manga, TV and ASMR) or restore from a backup file. Legacy single-file anime (.db) backups can still be restored."}),e("div",{className:g.controls,children:[e(I,{onClick:Te,children:"Backup Database"}),e(I,{variant:"secondary",onClick:De,children:"Restore Database"})]}),e("input",{type:"file",ref:u,onChange:Re,style:{position:"absolute",width:1,height:1,opacity:0,overflow:"hidden"},accept:".json,.db,application/octet-stream"}),m&&e("p",{className:g.status,children:m})]}),e(Qt,{}),e(na,{})]});case"community":return e("div",{className:g.tabContent,children:D?e(dn,{workerUrl:D}):e("div",{className:g.sectionCard,children:[e("h3",{children:"Discord Community Roles"}),e("p",{children:"Discord Roles integration is not configured on this instance."})]})});default:return null}};return e("div",{className:"page-container",children:[e("div",{className:g.settingsHeader,children:[e("h1",{className:g.pageTitle,children:"Settings"}),e("p",{className:g.pageSubtitle,children:"Manage your preferences and data synchronization"})]}),e("div",{className:g.settingsLayout,children:[e("aside",{className:g.sidebar,ref:f,children:[e("div",{className:g.sidebarIndicator,style:{top:l.top,height:l.height,left:l.left,...l.width?{width:l.width}:{}}}),e("button",{ref:n=>{n&&p.current.set("general",n)},className:`${g.sidebarItem} ${d==="general"?g.active:""}`,onClick:()=>Q("general"),children:[e(W,{name:"cog"})," ",e("span",{children:"General"})]}),e("button",{ref:n=>{n&&p.current.set("sync",n)},className:`${g.sidebarItem} ${d==="sync"?g.active:""}`,onClick:()=>Q("sync"),children:[e(W,{name:"cloud"})," ",e("span",{children:"Synchronization"})]}),e("button",{ref:n=>{n&&p.current.set("watchlist",n)},className:`${g.sidebarItem} ${d==="watchlist"?g.active:""}`,onClick:()=>Q("watchlist"),children:[e(W,{name:"list"})," ",e("span",{children:hn[c]})]}),e("button",{ref:n=>{n&&p.current.set("database",n)},className:`${g.sidebarItem} ${d==="database"?g.active:""}`,onClick:()=>Q("database"),children:[e(W,{name:"database"})," ",e("span",{children:"Database"})]}),D&&e("button",{ref:n=>{n&&p.current.set("community",n)},className:`${g.sidebarItem} ${d==="community"?g.active:""}`,onClick:()=>Q("community"),children:[e(W,{name:"discord"})," ",e("span",{children:"Community"})]})]}),e("main",{className:g.mainContent,children:e("div",{className:g.tabContent,children:Ie()},d)})]})]})};export{fn as default};
@@ -1 +0,0 @@
1
- ._container_z68uz_1{position:relative;display:flex;align-items:center}._bellBtn_z68uz_7{background:#00000026;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:none;color:var(--text-primary);font-size:1.25rem;cursor:pointer;padding:var(--space-2);display:flex;align-items:center;justify-content:center;transition:transform var(--transition-fast),background var(--transition-fast);position:relative;width:50px;height:50px;border-radius:50%}._bellBtn_z68uz_7:hover{background:#00000040;border-color:#ffffff59;transform:scale(1.05)}._bellBtn_z68uz_7:focus-visible{outline:none;box-shadow:var(--shadow-focus)}@media(max-width:848px){._bellBtn_z68uz_7{width:36px;height:36px;font-size:1.05rem;padding:var(--space-1)}}@media(max-width:480px){._bellBtn_z68uz_7{width:36px;height:36px;font-size:.95rem}}._badge_z68uz_56{position:absolute;top:6px;right:6px;background-color:var(--color-danger);color:#fff;font-size:.62rem;font-weight:700;min-width:18px;height:18px;padding:0 4px;border-radius:50%;display:flex;align-items:center;justify-content:center;text-align:center;border:none;pointer-events:none;animation:_bounce_z68uz_1 .5s ease-out;line-height:1}@keyframes _bounce_z68uz_1{0%,20%,50%,80%,to{transform:translateY(0)}40%{transform:translateY(-5px)}60%{transform:translateY(-3px)}}._dropdown_z68uz_96{position:absolute;top:calc(100% + var(--space-2));right:0;width:320px;max-height:480px;background:var(--glass-bg);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--border-secondary);border-radius:var(--radius-md);box-shadow:var(--shadow-xl);z-index:var(--z-header);overflow:hidden;display:flex;flex-direction:column;animation:_slideIn_z68uz_1 .3s ease}@keyframes _slideIn_z68uz_1{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}._dropdownHeader_z68uz_127{padding:var(--space-4);display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--border-primary)}._dropdownHeader_z68uz_127 h4{margin:0;font-size:1rem;color:var(--text-primary)}._clearAllBtn_z68uz_141{background:none;border:none;color:var(--primary-color);font-size:var(--font-size-xs);cursor:pointer;padding:var(--space-1) var(--space-2);border-radius:var(--radius-sm);transition:background var(--transition-fast)}._clearAllBtn_z68uz_141:hover{background:#ffffff0d}._discoveryStatusRow_z68uz_156{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-4);font-size:.72rem;color:var(--text-muted);background:#ffffff08;border-bottom:1px solid var(--border-primary)}._statusDot_z68uz_167{width:8px;height:8px;border-radius:50%;flex-shrink:0}._statusDotRunning_z68uz_174{background:var(--accent);animation:_statusPulse_z68uz_1 1.2s ease-in-out infinite}._statusDotOk_z68uz_179{background:var(--color-success)}._statusDotInfo_z68uz_183{background:var(--color-info)}._statusDotError_z68uz_187{background:var(--color-danger)}._statusDotIdle_z68uz_191{background:var(--text-muted)}@keyframes _statusPulse_z68uz_1{0%,to{opacity:1}50%{opacity:.35}}._list_z68uz_205{overflow-y:auto;flex:1}._list_z68uz_205::-webkit-scrollbar{width:4px}._list_z68uz_205::-webkit-scrollbar-thumb{background:var(--border-secondary);border-radius:2px}._item_z68uz_219{display:flex;align-items:center;padding:var(--space-3) var(--space-4);gap:var(--space-3);text-decoration:none;transition:background var(--transition-fast);border-bottom:1px solid var(--border-primary);position:relative}._item_z68uz_219:hover{background:#ffffff0d}._thumbnail_z68uz_234{width:48px;height:64px;border-radius:var(--radius-sm);object-fit:cover;flex-shrink:0;box-shadow:0 2px 8px #0000004d}._itemInfo_z68uz_243{flex:1;min-width:0}._itemTitle_z68uz_248{display:block;font-size:.85rem;font-weight:600;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:var(--space-1)}._itemMeta_z68uz_259{display:inline-block;font-size:.7rem;background:var(--accent);color:var(--accent-text);padding:1px 6px;border-radius:var(--radius-sm);font-weight:600}._systemItemMeta_z68uz_269{display:inline-block;font-size:.7rem;background:#ffffff1a;color:var(--text-secondary);padding:1px 6px;border-radius:var(--radius-sm);font-weight:500;border:none;cursor:pointer;transition:background var(--transition-fast)}._systemItemMeta_z68uz_269:hover{background:#ffffff2e}._removeItem_z68uz_286{background:none;border:none;color:var(--text-muted);font-size:var(--font-size-xs);cursor:pointer;padding:var(--space-2);display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity var(--transition-fast),color var(--transition-fast)}._item_z68uz_219:hover ._removeItem_z68uz_286{opacity:1}@media(hover:none),(pointer:coarse){._removeItem_z68uz_286{opacity:1}}._removeItem_z68uz_286:hover{color:var(--color-danger)}._queueItem_z68uz_316:hover{color:var(--color-success)}._emptyState_z68uz_320{padding:var(--space-10) var(--space-4);text-align:center;color:var(--text-muted);font-size:.9rem}@media(max-width:768px){._dropdown_z68uz_96{position:fixed;top:var(--header-height, 60px);left:0;right:0;width:100%;max-height:calc(100vh - var(--header-height, 60px));border-radius:0 0 var(--radius-md) var(--radius-md)}._bellBtn_z68uz_7{width:36px;height:36px;font-size:1rem}._removeItem_z68uz_286{padding:var(--space-2);min-width:36px;min-height:36px}._badge_z68uz_56{top:5px;right:6px;font-size:.58rem;min-width:16px;height:16px;padding:0 3px}}@media(max-width:480px){._bellBtn_z68uz_7{width:38px;height:38px;font-size:1.1rem}}.skeleton{position:relative;overflow:hidden;background-color:var(--bg-tertiary);border-radius:var(--radius-sm)}.skeleton:after{position:absolute;inset:0;transform:translate(-100%);background-image:linear-gradient(90deg,#fff0 0,#ffffff0d 20%,#ffffff1f 60%,#fff0);animation:shimmer 1.8s infinite ease-in-out;content:""}.skeleton-text{border-radius:var(--radius-sm);height:1em}.skeleton-circular{border-radius:50%}.skeleton-rectangular{border-radius:var(--radius-md)}.skeleton-card{display:flex;flex-direction:column;background:var(--bg-secondary);border:1px solid var(--border-primary);border-radius:var(--radius-lg);overflow:hidden}@keyframes shimmer{to{transform:translate(100%)}}._header_1elij_1{height:var(--header-height);--logo-height: 60px;background:transparent;border-bottom:1px solid transparent;position:fixed;top:var(--vv-top, 0px);left:0;right:0;z-index:var(--z-header);display:flex;align-items:center;justify-content:center;transition:transform var(--transition-slow),background-color var(--transition-base),border-color var(--transition-base),box-shadow var(--transition-base)}._header_1elij_1._hidden_1elij_21{transform:translateY(-100%)}._header_1elij_1._scrolled_1elij_25{background-color:#0c0c0fd1;border-bottom:1px solid rgba(255,255,255,.08);box-shadow:0 8px 32px #00000073}._logo_1elij_31{display:flex;align-items:center;justify-content:center;padding:8px;border-radius:var(--radius-md);transition:opacity var(--transition-base)}._logo_1elij_31:hover{opacity:.8}._headerInner_1elij_44{width:100%;max-width:var(--max-width);margin:0 auto;padding:0 var(--space-8);display:flex;align-items:center;justify-content:space-between}._leftSection_1elij_54{display:flex;align-items:center;gap:var(--space-6)}._desktopNav_1elij_60{display:flex;align-items:center;gap:var(--space-1);margin-left:var(--space-2)}._navLink_1elij_67{color:var(--text-secondary);font-weight:500;font-size:var(--font-size-sm);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);text-decoration:none;transition:all var(--transition-fast);position:relative}._navLink_1elij_67:hover{color:var(--text-primary);background:#ffffff0f}._navLinkActive_1elij_83{color:#fff;font-weight:600;background:#ffffff1a}._navLinkActive_1elij_83:after{content:"";position:absolute;bottom:-4px;left:50%;transform:translate(-50%);width:16px;height:2px;background:var(--accent);border-radius:var(--radius-full);box-shadow:0 0 8px var(--accent-glow)}._rightSection_1elij_102{display:flex;align-items:center;gap:var(--space-3)}._searchWrapper_1elij_108{display:flex;align-items:center;gap:8px}._searchInput_1elij_114{width:0;opacity:0;padding:0;border:none;background:transparent;color:var(--text-primary);font-size:var(--font-size-sm);font-family:inherit;height:42px;transition:all var(--transition-base);pointer-events:none;outline:none}._searchInput_1elij_114::placeholder{color:#ffffffb3}._searchWrapper_1elij_108:focus-within ._searchInput_1elij_114{width:200px;opacity:1;padding:0 var(--space-3);pointer-events:auto;background:#00000059;border:1px solid rgba(255,255,255,.35);border-radius:var(--radius-full);color:#fff}._searchButton_1elij_144{background:#00000026;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:none;color:var(--text-primary);padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;pointer-events:auto;width:50px;height:50px;border-radius:50%;transition:all var(--transition-base);flex-shrink:0}._searchButton_1elij_144:hover{background:#00000040;border-color:#ffffff59}._searchIcon_1elij_168{font-size:1rem;color:#fff;transition:all var(--transition-base)}._searchButton_1elij_144:hover ._searchIcon_1elij_168{color:var(--accent)}._profileBtn_1elij_178{width:50px;height:50px;border-radius:50%;overflow:hidden;border:none;cursor:pointer;transition:all var(--transition-base);display:flex;align-items:center;justify-content:center;flex-shrink:0;background:#00000026;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:var(--text-primary)}._profileBtn_1elij_178:hover{border-color:#ffffff59;transform:translateY(-2px);background:#00000040}._profileBtn_1elij_178:active{transform:scale(.95)}._profileBtn_1elij_178 svg{color:var(--text-primary);font-size:1.1rem}._profileImg_1elij_211{width:100%;height:100%;object-fit:cover}._hamburgerBtn_1elij_217{background:#00000026;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:none;color:var(--text-primary);font-size:1.25rem;padding:var(--space-2);border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all var(--transition-base);height:50px;width:50px;flex-shrink:0}._hamburgerBtn_1elij_217:hover{background:#00000040;border-color:#ffffff59}._hamburgerBtn_1elij_217:active{transform:scale(.95)}._mobileSearchBar_1elij_245{display:none}@media(max-width:1024px){._searchInput_1elij_114{display:none}._searchWrapper_1elij_108:focus-within ._searchInput_1elij_114{display:none}._mobileSearchBar_1elij_245{display:block;position:absolute;top:100%;left:0;right:0;background:#0c0c0fe6;padding:var(--space-2) var(--space-3);animation:_slideDown_1elij_1 .2s ease;transition:transform var(--transition-base),opacity var(--transition-base)}._mobileSearchBarHidden_1elij_272{transform:translateY(-100%);opacity:0;pointer-events:none}@keyframes _slideDown_1elij_1{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}._mobileSearchInner_1elij_289{display:flex;align-items:center;background:#ffffff14;border:none;border-radius:var(--radius-full);padding:0 var(--space-4);height:40px}._mobileSearchInner_1elij_289:focus-within{border:none;outline:none;box-shadow:0 0 0 2px var(--accent)}._mobileSearchIcon_1elij_305{color:#ffffff80;font-size:.85rem;flex-shrink:0;margin-right:var(--space-2)}._mobileSearchInput_1elij_312{flex:1;background:transparent;border:none;outline:none;color:var(--text-primary);font-size:var(--font-size-sm);font-family:inherit;height:100%}._mobileSearchInput_1elij_312::placeholder{color:#ffffff80}._mobileSearchInput_1elij_312:focus,input._mobileSearchInput_1elij_312:focus,._mobileSearchInput_1elij_312:focus-visible,input._mobileSearchInput_1elij_312:focus-visible{outline:none!important;box-shadow:none!important;border:none}}@media(max-width:848px){._header_1elij_1{height:64px;padding:0 var(--space-3);--logo-height: 44px}._headerInner_1elij_44{padding:0;max-width:none}._leftSection_1elij_54{gap:var(--space-1);min-width:0}._hamburgerBtn_1elij_217{height:36px;width:36px;font-size:.9rem}._logo_1elij_31{padding:2px;min-width:0}._searchButton_1elij_144{width:36px;height:36px}._rightSection_1elij_102{gap:2px}._profileBtn_1elij_178{width:36px;height:36px}}@media(max-width:900px){._desktopNav_1elij_60{display:none}}@media(max-width:480px){._rightSection_1elij_102{gap:4px}._hamburgerBtn_1elij_217{height:38px;width:38px;font-size:1rem}._logo_1elij_31{padding:2px;min-width:0}._searchButton_1elij_144,._profileBtn_1elij_178{width:38px;height:38px}}._sidebar_153jc_1{position:fixed;top:0;left:0;width:280px;max-width:85vw;height:100%;transition:transform var(--transition-normal);z-index:var(--z-sidebar);padding:var(--space-8) var(--space-6);display:flex;flex-direction:column;overflow-y:auto;transform:translate(-100%);background-color:#0a0a0cf2;color:var(--text-primary);border-right:1px solid var(--border-primary)}._sidebar_153jc_1._open_153jc_20{transform:translate(0);box-shadow:20px 0 60px #00000080}._sidebarHeader_153jc_25{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--space-10);position:relative}._closeBtn_153jc_33{position:absolute;top:0;right:0;background:none;border:none;font-size:1.25rem;line-height:1;cursor:pointer;color:var(--text-tertiary);transition:color var(--transition-base);display:flex;align-items:center;justify-content:center;padding:var(--space-1);width:32px;height:32px;border-radius:var(--radius-sm)}._closeBtn_153jc_33:hover{color:var(--text-primary)}._logo_153jc_57{display:flex;align-items:center;text-decoration:none;--logo-height: 50px;transition:opacity var(--transition-base)}._logo_153jc_57:hover{opacity:.8}._navSection_153jc_69{display:flex;flex-direction:column;gap:var(--space-1)}._navLink_153jc_75{display:flex;align-items:center;gap:var(--space-4);padding:var(--space-3) var(--space-4);border-radius:var(--radius-md);text-decoration:none;transition:all var(--transition-base);color:var(--text-secondary);font-weight:var(--font-weight-medium);font-size:var(--font-size-base);border-left:2px solid transparent;margin-left:var(--space-2)}._navLink_153jc_75 svg{font-size:1rem;width:20px;text-align:center;flex-shrink:0;transition:color var(--transition-base)}._navLink_153jc_75:hover{background-color:#ffffff0a;color:var(--text-primary);border-left-color:#ffffff26}._navLink_153jc_75:hover svg{color:var(--text-primary)}._navLink_153jc_75._active_153jc_108{background-color:color-mix(in srgb,var(--accent) 10%,transparent);color:var(--accent-light);border-left-color:var(--accent)}._navLink_153jc_75._active_153jc_108 svg{color:var(--accent)}._overlay_153jc_118{position:fixed;inset:0;background-color:#0009;z-index:calc(var(--z-sidebar) - 1);animation:_fadeIn_153jc_1 .3s ease-out}@keyframes _fadeIn_153jc_1{0%{opacity:0}to{opacity:1}}._versionInfo_153jc_138{margin-top:auto;padding-top:var(--space-8);font-size:1rem;color:var(--text-secondary);text-align:left;display:flex;align-items:center;gap:var(--space-2)}._versionInfo_153jc_138:before{content:"";display:block;width:5px;height:5px;border-radius:50%;background-color:var(--color-success)}@media(max-width:768px){._sidebar_153jc_1{width:260px;padding:var(--space-6) var(--space-4)}._sidebarHeader_153jc_25{margin-bottom:var(--space-8)}._logo_153jc_57{--logo-height: 48px}._navLink_153jc_75{padding:var(--space-3) var(--space-3)}}._footer_1p5nb_1{width:100%;position:relative;padding:0 var(--space-8) var(--space-8);overflow:visible;border-top:1px solid rgba(255,255,255,.08);margin-top:auto;background:linear-gradient(180deg,#0a0a0c99,#050507f2);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);color:var(--text-tertiary);font-size:var(--font-size-sm)}._footerInner_1p5nb_15{width:100%;max-width:var(--max-width);margin:0 auto;display:grid;grid-template-columns:1fr auto;align-items:start;gap:var(--space-12);padding-bottom:var(--space-8);border-bottom:1px solid rgba(255,255,255,.06)}._brandSection_1p5nb_27{grid-column:1;display:flex;flex-direction:column;align-items:flex-start;text-align:left;max-width:320px;position:relative;padding-top:0;margin-top:-60px}._logoRow_1p5nb_39{display:flex;align-items:center;gap:14px}._mascotContainer_1p5nb_45{position:absolute;top:-90px;left:0;line-height:0;flex-shrink:0}._mascot_1p5nb_45{height:160px;width:auto;display:block}._logoText_1p5nb_59{height:105px;width:auto;display:block}._brandMeta_1p5nb_65{display:flex;align-items:center;justify-content:flex-start;gap:var(--space-2);flex-wrap:wrap;margin-top:10px}._brandTagline_1p5nb_74{color:var(--text-secondary);font-size:.88rem;line-height:1.5;margin:0}._statusPill_1p5nb_81{display:inline-flex;align-items:center;gap:var(--space-2);padding:4px 12px;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:var(--radius-full);font-size:.78rem;color:var(--text-secondary);width:fit-content}._statusDot_1p5nb_94{width:7px;height:7px;border-radius:50%;background:var(--color-success);box-shadow:0 0 8px var(--color-success)}._linksGrid_1p5nb_102{grid-column:2;display:flex;gap:var(--space-8);justify-content:flex-end;padding-top:var(--space-8)}._linkColumn_1p5nb_110{display:flex;flex-direction:column;gap:var(--space-2)}._columnTitle_1p5nb_116{color:var(--text-primary);font-size:.9rem;font-weight:700;margin:0 0 var(--space-2);text-transform:uppercase;letter-spacing:.05em}._footer_1p5nb_1 a{color:var(--text-secondary);text-decoration:none;font-weight:500;font-size:.88rem;transition:all var(--transition-fast);display:inline-flex;align-items:center}._footer_1p5nb_1 a:hover{color:var(--accent);transform:translate(2px)}._bottomBar_1p5nb_140{position:relative;width:100%;max-width:var(--max-width);margin:var(--space-6) auto 0;display:flex;align-items:center;justify-content:center}._copyright_1p5nb_150{margin:0;color:var(--text-muted);font-size:.85rem;display:flex;align-items:center;justify-content:center;gap:4px;text-align:center}._brand_1p5nb_27{color:var(--accent);font-weight:700}._heartIcon_1p5nb_166{color:var(--color-danger);margin:0 2px}._backToTop_1p5nb_171{position:absolute;right:0;display:inline-flex;align-items:center;gap:var(--space-2);padding:6px 14px;background:#ffffff0d;border:1px solid rgba(255,255,255,.12);border-radius:var(--radius-full);color:var(--text-secondary);font-size:.8rem;font-weight:600;cursor:pointer;transition:all var(--transition-base)}._backToTop_1p5nb_171:hover{background:#ffffff1f;color:#fff;border-color:var(--accent);transform:translateY(-2px)}@media(max-width:768px){._footer_1p5nb_1{padding:0 var(--space-4) var(--space-6)}._footerInner_1p5nb_15{grid-template-columns:1fr;gap:var(--space-5);align-items:center;justify-items:center}._brandSection_1p5nb_27{grid-column:1;align-items:center;text-align:center;padding-top:0;justify-content:center;margin-top:-40px}._mascotContainer_1p5nb_45{position:absolute;top:-60px;left:50%;transform:translate(-50%)}._logoRow_1p5nb_39{flex-direction:column;align-items:center;gap:6px}._mascot_1p5nb_45{height:120px}._logoText_1p5nb_59{height:84px}._brandMeta_1p5nb_65{flex-direction:column;align-items:center;gap:var(--space-1);justify-content:center;margin-top:6px}._linksGrid_1p5nb_102{grid-column:1;display:grid;grid-template-columns:repeat(2,1fr);gap:var(--space-4);text-align:center}._linkColumn_1p5nb_110{align-items:center;gap:var(--space-1)}._columnTitle_1p5nb_116{margin:0 0 var(--space-1);font-size:.78rem}._footer_1p5nb_1 a{font-size:.82rem}._bottomBar_1p5nb_140{flex-direction:column;gap:var(--space-3);text-align:center}._copyright_1p5nb_150{font-size:.78rem}._backToTop_1p5nb_171{position:static}}._overlay_1juub_1{position:fixed;inset:0;background-color:#0009;z-index:var(--z-modal);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);animation:_fadeIn_1juub_1 .2s ease-out}._content_1juub_11{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:calc(var(--z-modal) + 1);background-color:var(--bg-secondary);padding:var(--space-6);border-radius:var(--radius-lg);width:100%;max-width:min(500px,calc(100vw - 2 * var(--space-4)));max-height:calc(100vh - 2 * var(--space-4));overflow-y:auto;box-shadow:var(--shadow-xl);border:1px solid var(--border-primary);animation:_modalIn_1juub_1 .2s var(--ease-smooth)}._sm_1juub_29{max-width:min(400px,calc(100vw - 2 * var(--space-4)))}._md_1juub_33{max-width:min(500px,calc(100vw - 2 * var(--space-4)))}._lg_1juub_37{max-width:min(700px,calc(100vw - 2 * var(--space-4)))}._title_1juub_41{margin:0 0 var(--space-4);font-size:var(--font-size-xl);font-weight:var(--font-weight-bold);color:var(--text-primary)}._body_1juub_48{color:var(--text-secondary)}._footer_1juub_52{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--space-3);margin-top:var(--space-6);padding-top:var(--space-4);border-top:1px solid var(--border-primary)}._footer_1juub_52>*{flex:0 1 auto;min-width:0;max-width:100%}@media(max-width:480px){._content_1juub_11{padding:var(--space-4)}._footer_1juub_52{flex-direction:column;align-items:stretch;justify-content:flex-start}._footer_1juub_52>*{flex:1 1 auto;width:100%}}@keyframes _fadeIn_1juub_1{0%{opacity:0}to{opacity:1}}@keyframes _modalIn_1juub_1{0%{opacity:0;transform:translate(-50%,-50%) scale(.95)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}._switch_1f1gi_1{position:relative;display:inline-block;width:48px;height:24px;flex-shrink:0}._switch_1f1gi_1 input{opacity:0;width:0;height:0}._slider_1f1gi_15{position:absolute;cursor:pointer;inset:0;background-color:#ffffff1a;border:1px solid var(--border-primary);transition:var(--transition-base);border-radius:24px}._slider_1f1gi_15:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:2px;background-color:var(--text-secondary);transition:var(--transition-base);border-radius:50%;box-shadow:var(--shadow-sm)}input:checked+._slider_1f1gi_15{background-color:color-mix(in srgb,var(--accent) 20%,transparent);border-color:var(--accent)}input:checked+._slider_1f1gi_15:before{transform:translate(22px);background-color:var(--accent);box-shadow:0 0 10px var(--accent-glow)}input:focus+._slider_1f1gi_15{box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 20%,transparent)}._container_1hh92_1{display:flex;flex-direction:column;gap:1rem;color:var(--text-primary)}._description_1hh92_8{margin:0;line-height:1.5;color:var(--text-secondary)}._dataList_1hh92_14{background:var(--bg-tertiary);border-radius:6px;padding:.75rem 1rem}._dataTitle_1hh92_20{margin:0 0 .5rem;font-weight:600;font-size:.9rem}._dataList_1hh92_14 ul{margin:0;padding-left:1.25rem;display:flex;flex-direction:column;gap:.25rem}._dataList_1hh92_14 li{font-size:.85rem;color:var(--text-secondary)}._toggleRow_1hh92_39{display:flex;align-items:center;justify-content:space-between;gap:1rem}._toggleLabel_1hh92_46{font-size:.95rem}._actions_1hh92_50{display:flex;justify-content:flex-end}._okButton_1hh92_55{background:var(--accent);color:var(--accent-text);border:none;border-radius:6px;padding:.5rem 1.5rem;font-size:.95rem;cursor:pointer;font-weight:500;transition:opacity .15s}._okButton_1hh92_55:hover{opacity:.9}._previewToggle_1hh92_71{display:flex;align-items:center;justify-content:space-between;gap:.5rem;width:100%;background:none;border:none;color:var(--text-secondary);font-size:.85rem;cursor:pointer;padding:0}._previewToggle_1hh92_71:hover{color:var(--text-primary)}._chevron_1hh92_89{font-size:.7rem;transition:transform .2s}._chevronOpen_1hh92_94{transform:rotate(180deg)}._previewBox_1hh92_98{background:var(--bg-tertiary);border-radius:6px;padding:.75rem 1rem;display:flex;flex-direction:column;gap:.4rem}._previewItem_1hh92_107{display:flex;gap:.5rem;font-size:.85rem;font-family:monospace}._previewKey_1hh92_114{color:var(--text-secondary)}._previewVal_1hh92_118{color:var(--text-primary)}._promoWrapper_1vfnt_1{position:fixed;right:0;top:50%;transform:translateY(-50%) translate(110%);z-index:1200;transition:transform .45s cubic-bezier(.34,1.28,.64,1);pointer-events:none}._promoWrapper_1vfnt_1._visible_1vfnt_11{transform:translateY(-50%) translate(0);pointer-events:all}._panel_1vfnt_16{background:linear-gradient(145deg,var(--bg-elevated) 0%,var(--bg-primary) 100%);border:1px solid var(--border-accent);border-right:none;border-radius:16px 0 0 16px;padding:20px 18px 20px 20px;width:280px;box-shadow:-8px 0 40px #0009,-2px 0 12px var(--accent-glow);position:relative}._closeBtn_1vfnt_29{position:absolute;top:10px;right:10px;background:#ffffff0f;border:none;color:var(--text-tertiary);width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:14px;transition:background .2s,color .2s;line-height:1}._closeBtn_1vfnt_29:hover{background:#ffffff1f;color:var(--text-primary)}._header_1vfnt_55{display:flex;align-items:center;gap:10px;margin-bottom:12px}._discordIcon_1vfnt_62{width:36px;height:36px;background:var(--accent);border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0}._headerText_1vfnt_74 h4{margin:0;font-size:.9rem;font-weight:700;color:var(--text-primary);line-height:1.2}._headerText_1vfnt_74 p{margin:2px 0 0;font-size:.72rem;color:var(--accent);font-weight:600}._body_1vfnt_89{font-size:.8rem;color:var(--text-secondary);line-height:1.5;margin-bottom:14px}._rolePreview_1vfnt_96{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}._badge_1vfnt_103{padding:3px 10px;border-radius:20px;font-size:.72rem;font-weight:700;letter-spacing:.02em}._badgeRank_1vfnt_111{background:var(--accent-subtle);color:var(--accent-light);border:1px solid var(--border-accent)}._badgeDere_1vfnt_117{background:var(--bg-tertiary);color:var(--text-secondary);border:1px solid var(--border-secondary)}._actions_1vfnt_123{display:flex;flex-direction:column;gap:7px}._btnJoin_1vfnt_129{background:var(--accent);color:var(--accent-text);border:none;border-radius:8px;padding:9px 12px;font-size:.82rem;font-weight:700;cursor:pointer;transition:background .2s,transform .15s;display:flex;align-items:center;justify-content:center;gap:6px;text-decoration:none;width:100%;box-sizing:border-box}._btnJoin_1vfnt_129:hover{background:var(--accent-light);transform:translateY(-1px)}._btnSettings_1vfnt_155{background:#ffffff0f;color:var(--text-secondary);border:1px solid rgba(255,255,255,.08);border-radius:8px;padding:8px 12px;font-size:.78rem;font-weight:600;cursor:pointer;transition:background .2s,color .2s;display:flex;align-items:center;justify-content:center;gap:6px;width:100%;box-sizing:border-box}._btnSettings_1vfnt_155:hover{background:#ffffff1a;color:var(--text-primary)}._skipLink_1vfnt_180{display:block;width:100%;text-align:center;margin-top:8px;font-size:.72rem;color:var(--text-tertiary);cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .2s;background:none;border:none;padding:0;font-family:inherit}._skipLink_1vfnt_180:hover{color:var(--text-secondary)}._hint_1vfnt_200{font-size:.7rem;color:var(--text-tertiary);text-align:center;margin-top:10px;line-height:1.4}._container_e96gf_1{display:flex;flex-direction:column;gap:1rem;color:var(--text-primary);max-width:400px}._field_e96gf_9{display:flex;flex-direction:column;gap:.5rem}._field_e96gf_9 label{font-size:.9rem;opacity:.8}._textarea_e96gf_20{background:var(--bg-secondary);border:1px solid var(--border-primary);color:var(--text-primary);padding:.5rem;border-radius:4px;resize:vertical;font-family:inherit}._textarea_e96gf_20:hover{border-color:var(--border-secondary)}._textarea_e96gf_20:focus{outline:none;border-color:var(--accent);box-shadow:var(--shadow-input-focus)}._input_e96gf_40{background:var(--bg-secondary);border:1px solid var(--border-primary);color:var(--text-primary);padding:.6rem;border-radius:4px}._input_e96gf_40:hover{border-color:var(--border-secondary)}._input_e96gf_40:focus{outline:none;border-color:var(--accent);box-shadow:var(--shadow-input-focus)}._button_e96gf_58{background:var(--accent);color:var(--text-primary);border:none;padding:.7rem;border-radius:4px;cursor:pointer;font-weight:600;transition:opacity .2s}._button_e96gf_58:hover{opacity:.9}._button_e96gf_58:disabled{opacity:.5;cursor:not-allowed}._secondaryButton_e96gf_78{background:transparent;border:1px solid var(--border-primary);color:var(--text-primary);padding:.7rem;border-radius:4px;cursor:pointer;transition:background .2s,border-color .2s}._secondaryButton_e96gf_78:hover{background:#ffffff0d;border-color:var(--border-secondary)}._actions_e96gf_95{display:flex;gap:.5rem}._actions_e96gf_95 ._button_e96gf_58{flex:1}._hint_e96gf_104{background:var(--bg-secondary);border:1px solid var(--border-primary);border-radius:4px;padding:.6rem;font-size:.85rem;line-height:1.5}._hint_e96gf_104 ._actions_e96gf_95{margin-top:.6rem}._link_e96gf_117{color:var(--accent);text-decoration:underline;font-weight:600}._link_e96gf_117:hover{opacity:.85}.top-progress-bar{position:fixed;top:0;left:0;right:0;height:3px;z-index:9999;overflow:hidden;pointer-events:none;background:transparent}.top-progress-bar:after{content:"";position:absolute;top:0;bottom:0;left:0;width:40%;border-radius:0 3px 3px 0;background:linear-gradient(90deg,transparent,var(--accent),var(--accent-light),transparent);animation:top-progress-slide 1.1s infinite ease-in-out}@keyframes top-progress-slide{0%{transform:translate(-100%)}to{transform:translate(280%)}}@media(prefers-reduced-motion:reduce){.top-progress-bar:after{animation:none;width:100%;border-radius:0}}._container_88bss_1{display:flex;flex-direction:column;gap:1rem;color:var(--text-primary)}._field_88bss_8{display:flex;flex-direction:column;gap:.5rem}._field_88bss_8 label{font-size:.9rem;opacity:.8}._input_88bss_19{background:var(--bg-secondary);border:1px solid var(--border-primary);color:var(--text-primary);padding:.6rem;border-radius:4px}._input_88bss_19:hover{border-color:var(--border-secondary)}._input_88bss_19:focus{outline:none;border-color:var(--accent);box-shadow:var(--shadow-input-focus)}._actions_88bss_37{display:flex;gap:.5rem;justify-content:flex-end}.btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);border-radius:var(--radius-md);font-weight:var(--font-weight-medium);cursor:pointer;border:none;outline:none;font-family:inherit;position:relative;white-space:nowrap;font-size:var(--font-size-base);background:transparent;color:var(--text-primary);padding:var(--space-3) var(--space-6);min-height:44px;transition:background-color .15s ease,color .15s ease,transform .1s ease}.btn:disabled{opacity:.5;cursor:not-allowed}.btn:focus-visible{outline:2px solid var(--accent-light);outline-offset:2px}.btn-primary{background:linear-gradient(135deg,var(--accent) 0%,var(--accent-dark) 100%);color:var(--accent-text);box-shadow:0 4px 12px var(--accent-glow)}.btn-primary:hover:not(:disabled){background:linear-gradient(135deg,var(--accent-light) 0%,var(--accent) 100%);transform:translateY(-1px);box-shadow:0 6px 16px var(--accent-glow)}.btn-primary:active:not(:disabled){transform:translateY(0)}.btn-secondary{background:#ffffff14;border:1px solid var(--border-secondary);color:var(--text-primary)}.btn-secondary:hover:not(:disabled){background:#ffffff1f;border-color:#ffffff40}.btn-ghost{background:transparent;color:var(--text-secondary)}.btn-ghost:hover:not(:disabled){background:#ffffff14;color:var(--text-primary)}.btn-danger{background:var(--color-danger);color:var(--color-danger-text)}.btn-danger:hover:not(:disabled){background:var(--color-danger-dark)}.btn-sm{min-height:36px;padding:var(--space-2) var(--space-4);font-size:var(--font-size-sm);border-radius:var(--radius-sm)}.btn-lg{min-height:52px;padding:var(--space-4) var(--space-8);font-size:var(--font-size-md);border-radius:var(--radius-lg)}.btn-block{width:100%}.btn-loading{color:transparent;pointer-events:none}.btn-spinner{position:absolute;width:16px;height:16px;border:2px solid rgba(128,128,128,.35);border-top-color:var(--accent-text);border-radius:50%;animation:spin .6s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}:root{--accent: #6d5dfc;--accent-light: #897cff;--accent-lighter: #b3a8ff;--accent-dark: #5646db;--accent-text: #ffffff;--accent-subtle: rgba(109, 93, 252, .12);--accent-glow: rgba(109, 93, 252, .18);--accent-h: 245;--accent-s: 96%;--accent-l: 68%;--color-danger: #ef4444;--color-error: var(--color-danger);--color-danger-dark: #dc2626;--color-danger-text: #ffffff;--color-success: #10b981;--color-success-text: #ffffff;--color-warning: #f59e0b;--color-warning-text: #17171c;--color-info: #3b82f6;--color-info-text: #ffffff;--badge-info-bg: var(--accent);--badge-info-text: var(--accent-text);--secondary-h: 180;--secondary-s: 85%;--secondary-l: 50%;--accent-blue: hsl(var(--secondary-h), var(--secondary-s), var(--secondary-l));--accent-blue-light: hsl(var(--secondary-h), var(--secondary-s), 70%);--bg-main: #0c0d12;--bg-primary: #13151d;--bg-secondary: #13151d;--bg-tertiary: #191c27;--bg-elevated: #202433;--primary-color: var(--accent);--header-bg: rgba(12, 13, 18, .85);--text-primary: #ffffff;--text-secondary: #b4b4bd;--text-tertiary: #8f8f98;--text-muted: #b4b4bd;--border-primary: rgba(255, 255, 255, .08);--border-secondary: rgba(255, 255, 255, .12);--border-accent: hsla(var(--accent-h), var(--accent-s), var(--accent-l), .3);--border: var(--border-primary);--card-radius: var(--radius-lg);--border-light: var(--border-secondary);--danger-color: var(--color-danger);--shadow-input-focus: 0 0 0 2px var(--accent-subtle);--shadow-focus: 0 0 0 2px var(--accent-subtle);--glass-bg: rgba(20, 20, 22, .95);--glass-border: var(--border-primary);--glass-highlight: rgba(255, 255, 255, .05);--glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, .36);--bg-hover: rgba(255, 255, 255, .08);--bg-hover-strong: rgba(255, 255, 255, .1);--bg-overlay: rgba(0, 0, 0, .55);--bg-overlay-strong: rgba(0, 0, 0, .6);--bg-overlay-heavy: rgba(0, 0, 0, .7);--bg-scrim: rgba(10, 10, 12, .55);--bg-scrim-strong: rgba(10, 10, 12, .8);--bg-dark: #0a0a0c;--bg-black: #000000;--border-strong: rgba(255, 255, 255, .14);--track-bg: rgba(255, 255, 255, .1);--track-buffered: rgba(255, 255, 255, .25);--shimmer-highlight: rgba(255, 255, 255, .07);--bg-selected: rgba(255, 255, 255, .06);--shadow-scrim: 0 4px 16px rgba(0, 0, 0, .45);--shadow-panel: 0 12px 32px rgba(0, 0, 0, .5);--color-danger-bg: rgba(153, 42, 42, .9);--font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--font-size-2xs: .4375rem;--font-size-xs: .75rem;--font-size-sm: .875rem;--font-size-base: 1rem;--font-size-md: 1.125rem;--font-size-lg: 1.5rem;--font-size-xl: 1.875rem;--font-weight-normal: 400;--font-weight-medium: 500;--font-weight-semibold: 600;--font-weight-bold: 700;--line-height-tight: 1.25;--line-height-normal: 1.5;--line-height-relaxed: 1.75;--space-px: 1px;--space-2px: 2px;--space-1: .25rem;--space-1-5: .375rem;--space-2: .5rem;--space-2-5: .625rem;--space-3: .75rem;--space-4: 1rem;--space-5: 1.25rem;--space-6: 1.5rem;--space-8: 2rem;--space-10: 2.5rem;--space-12: 3rem;--space-16: 4rem;--size-22: 22px;--size-42: 42px;--size-44: 44px;--size-48: 48px;--size-34: 34px;--size-36: 36px;--size-140: 140px;--size-180: 180px;--size-220: 220px;--size-250: 250px;--size-440: 440px;--size-480: 480px;--size-720: 720px;--size-84: 84px;--size-52: 52px;--size-90: 90px;--size-240: 240px;--size-320: 320px;--size-420: 420px;--size-900: 900px;--layout-asmr-max-width: 1400px;--layout-page-offset: 120px;--layout-player-mobile: 175px;--radius-xs: 6px;--radius-sm: 8px;--radius-md: 12px;--radius-lg: 20px;--radius-xl: 28px;--radius-full: 9999px;--shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);--shadow-md: 0 4px 12px rgba(0, 0, 0, .4);--shadow-lg: 0 12px 32px -4px rgba(0, 0, 0, .6);--shadow-active: 0 0 0 1px var(--border-accent), 0 8px 24px -4px rgba(0, 0, 0, .5);--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, .4), 0 10px 10px -5px rgba(0, 0, 0, .2);--shadow-thumb: 0 0 5px rgba(0, 0, 0, .5);--blur-sm: 4px;--blur-md: 6px;--blur-lg: 12px;--z-base: 1;--z-dropdown: 100;--z-sticky: 200;--z-drawer: 300;--z-sidebar: 500;--z-header: 400;--z-modal: 600;--z-popover: 700;--z-toast: 800;--z-overlay: 900;--header-height: 80px;--max-width: 1600px;--sidebar-width: 280px;--ease-spring: cubic-bezier(.175, .885, .32, 1.275);--ease-smooth: cubic-bezier(.4, 0, .2, 1);--ease-emphasized: cubic-bezier(.32, .72, 0, 1);--transition-fast: .2s var(--ease-smooth);--transition-base: .3s var(--ease-smooth);--transition-normal: .4s var(--ease-smooth);--transition-slow: .5s var(--ease-smooth);--transition-emphasized: .42s var(--ease-emphasized);--transition-quick: .09s var(--ease-smooth);--duration-shimmer: 1.6s;--duration-spin: .9s;--focus-ring-color: var(--accent-light);--focus-ring-glow: 0 0 0 3px rgba(109, 93, 252, .35);--focus-scale: scale(1.05)}@media(min-width:1920px){:root{--font-size-base: 1.125rem;--max-width: 2000px}}html[data-theme=mochi]{--accent: #e3e1ee;--accent-light: #f4f3fa;--accent-lighter: #ffffff;--accent-dark: #b3b1c6;--accent-text: #17171c;--accent-subtle: rgba(227, 225, 238, .12);--accent-glow: rgba(227, 225, 238, 0);--accent-h: 248;--accent-s: 18%;--accent-l: 89%;--bg-main: #131316;--bg-primary: #1b1b1f;--bg-secondary: #1b1b1f;--bg-tertiary: #232329;--bg-elevated: #2b2b32;--header-bg: rgba(19, 19, 22, .88);--text-primary: #f2f2f5;--text-secondary: #a9a9b3;--text-tertiary: #85858f;--text-muted: #a9a9b3;--border-primary: #2c2c33;--border-secondary: #3a3a43;--glass-bg: rgba(27, 27, 31, .96);--badge-info-bg: var(--accent);--badge-info-text: var(--accent-text);--shadow-sm: none;--shadow-md: none;--shadow-lg: none;--shadow-active: 0 0 0 1px var(--border-secondary);--shadow-xl: none;--focus-ring-color: var(--accent);--focus-ring-glow: 0 0 0 3px rgba(227, 225, 238, .25)}html[data-theme=sakura]{--accent: #d9a3d9;--accent-light: #eccbec;--accent-lighter: #f9e8f9;--accent-dark: #a978a9;--accent-text: #fff;--accent-subtle: rgba(217, 163, 217, .12);--accent-glow: rgba(217, 163, 217, 0);--accent-h: 300;--accent-s: 45%;--accent-l: 74%;--bg-main: #141116;--bg-primary: #1c171e;--bg-secondary: #1c171e;--bg-tertiary: #241e26;--bg-elevated: #2e262f;--header-bg: rgba(20, 17, 22, .88);--text-primary: #f3eaf3;--text-secondary: #b3a3b5;--text-tertiary: #8d7c8f;--text-muted: #b3a3b5;--border-primary: #322a34;--border-secondary: #403640;--glass-bg: rgba(28, 23, 30, .96);--badge-info-bg: var(--accent-dark);--badge-info-text: #ffffff;--shadow-sm: none;--shadow-md: none;--shadow-lg: none;--shadow-active: 0 0 0 1px var(--border-secondary);--shadow-xl: none;--focus-ring-color: var(--accent);--focus-ring-glow: 0 0 0 3px rgba(217, 163, 217, .25)}*,*:before,*:after{box-sizing:border-box}html{scroll-behavior:smooth;color-scheme:dark;scrollbar-gutter:stable;overflow-x:hidden;overflow-x:clip;max-width:100%;-webkit-text-size-adjust:100%;text-size-adjust:100%}html:has(:fullscreen),html:has(:-webkit-full-screen){scrollbar-gutter:auto}body{margin:0;padding:0;font-family:var(--font-family);background:var(--bg-main);color:var(--text-primary);line-height:var(--line-height-normal);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;overflow-x:hidden;overflow-x:clip;max-width:100%;color-scheme:dark}html,body,.app-container,.posterWrapper,.dot,.genreTag{--darkreader-inline-bgcolor: none !important;--darkreader-inline-bgimage: none !important;--darkreader-inline-bordercolor: none !important;--darkreader-inline-color: none !important;background-color:transparent}body{overflow-x:hidden;overflow-x:clip}body:before{display:none!important}h1,h2,h3,h4,h5,h6{margin:0;font-weight:var(--font-weight-semibold);letter-spacing:-.02em}a{color:inherit;text-decoration:none}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--focus-ring-color)!important;outline-offset:3px!important;box-shadow:var(--focus-ring-glow)!important;transition:outline-offset var(--transition-fast),transform var(--transition-fast)}a:focus:not(:focus-visible),button:focus:not(:focus-visible),input:focus:not(:focus-visible),select:focus:not(:focus-visible),[tabindex]:focus:not(:focus-visible){outline:none!important;box-shadow:none!important}a,button,input,select,textarea,[tabindex]{-webkit-tap-highlight-color:transparent}@media(min-width:1200px){a:focus-visible,button:focus-visible{transform:var(--focus-scale)}}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--bg-elevated);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--text-tertiary)}.text-gradient{background:linear-gradient(135deg,#fff,#a5a5a5);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.text-gradient-accent{background:linear-gradient(135deg,var(--accent-light) 0%,var(--accent) 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.app-container{display:flex;flex-direction:column;min-height:100vh}main{flex:1;width:100%;max-width:var(--max-width);margin:0 auto;padding:0 var(--space-8) var(--space-16);position:relative;z-index:1}.main-content{padding-top:var(--header-height)}@media(max-width:1024px){.main-content{padding-top:calc(var(--header-height) + 52px)}}@media(max-width:848px){main{padding:0 var(--space-4) var(--space-12)}.main-content{padding-top:116px}}.section-title{font-size:1.75rem;font-weight:800;margin-bottom:var(--space-8);color:var(--text-primary);letter-spacing:-.02em;line-height:1}.section-eyebrow{display:flex;align-items:center;gap:8px;font-size:.72rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-light);margin:0;line-height:1.4}.section-eyebrow:before{content:"";width:14px;height:3px;border-radius:999px;background:linear-gradient(90deg,var(--accent) 0%,var(--accent-dark) 100%);box-shadow:0 0 8px var(--accent-glow);flex:none}.title-stack{display:flex;flex-direction:column;gap:4px;min-width:0;justify-content:center}html[data-theme=mochi] .section-eyebrow,html[data-theme=sakura] .section-eyebrow{color:var(--accent)}@media(max-width:768px){.section-title{font-size:1.5rem;margin-bottom:var(--space-6)}}.grid-container{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:var(--space-6);width:100%}@media(max-width:1024px){.grid-container{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:var(--space-4)}}@media(max-width:768px){.grid-container{grid-template-columns:repeat(3,1fr);gap:var(--space-2)}}@media(max-width:480px){.grid-container{grid-template-columns:repeat(3,1fr);gap:8px}}footer{text-align:center;padding:var(--space-12);color:var(--text-muted);border-top:1px solid var(--border-primary);margin-top:var(--space-16);background:var(--bg-secondary)}footer a{color:var(--accent);text-decoration:none;font-weight:var(--font-weight-medium);transition:color var(--transition-fast)}footer a:hover{color:var(--accent-light);text-shadow:0 0 8px var(--accent-glow)}select{appearance:none;-webkit-appearance:none;cursor:pointer;background-color:var(--bg-tertiary)!important;border-color:var(--border-primary)!important}select:hover{background-color:var(--bg-tertiary)!important;border-color:var(--border-secondary)!important}select:focus{background-color:var(--bg-tertiary)!important;border-color:var(--accent)!important;outline:none}select:active{background-color:var(--bg-tertiary)!important}body.low-end{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol!important;--transition-fast: 0s !important;--transition-base: 0s !important;--transition-normal: 0s !important;--transition-slow: 0s !important;scroll-behavior:auto!important}body.low-end,body.low-end *{transition:none!important;animation:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;box-shadow:none!important;text-shadow:none!important}body.low-end:before{display:none!important}body.low-end .text-gradient,body.low-end .text-gradient-accent{background:none!important;-webkit-background-clip:initial!important;-webkit-text-fill-color:initial!important;color:var(--text-primary)!important}body.low-end .text-gradient-accent{color:var(--accent)!important}body.low-end [class*=banner],body.low-end [class*=bannerContainer],body.low-end [class*=bannerOverlay],body.low-end [class*=heroSection]{background-image:none!important;background-color:var(--bg-main)!important;min-height:auto!important}body.low-end [class*=infoGlass]{background:var(--bg-secondary)!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;border:1px solid var(--border-primary)!important;box-shadow:none!important}.skeleton{position:relative;overflow:hidden;background-color:var(--bg-tertiary)}.skeleton:after{content:"";position:absolute;inset:0;transform:translate(-100%);background-image:linear-gradient(90deg,#fff0 0,#ffffff0d 20%,#ffffff1f 60%,#fff0);animation:skeleton-wave 1.8s infinite ease-in-out}@keyframes skeleton-wave{to{transform:translate(100%)}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}