@serifpersia/dango 4.0.1 → 4.0.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.
- package/README.md +1 -1
- package/client/dist/assets/{AnimeCard-DpZ4X9XD.js → AnimeCard-B-3qrNhu.js} +1 -1
- package/client/dist/assets/AnimeInfo-DXoNbSao.js +1 -0
- package/client/dist/assets/{AnimeInfoPage-CsDJS_8b.js → AnimeInfoPage-CRWoCwXo.js} +2 -2
- package/client/dist/assets/{Asmr-BdCT1sg3.js → Asmr-z6PNn8Ld.js} +1 -1
- package/client/dist/assets/{AsmrPopup-CNqixGCf.js → AsmrPopup-Cc-aIYXd.js} +1 -1
- package/client/dist/assets/{AsmrResetProgressModal-BOXFH3f2.js → AsmrResetProgressModal-D4Mp_-lx.js} +1 -1
- package/client/dist/assets/Home-9ZTaG1WX.js +1 -0
- package/client/dist/assets/Insights-Bf92STPA.js +1 -0
- package/client/dist/assets/{LibraryListPage-CIILJZTu.js → LibraryListPage-CNjzasIi.js} +1 -1
- package/client/dist/assets/{ListeningList-oMw31vdT.js → ListeningList-1mBIfxxH.js} +1 -1
- package/client/dist/assets/{Manga-CFSwxy0V.js → Manga-B3_TdzgY.js} +1 -1
- package/client/dist/assets/MangaInfoPage-DnDwJDWC.js +1 -0
- package/client/dist/assets/{MangaReadPage-Bk_RFHao.js → MangaReadPage-Cq4NYq31.js} +1 -1
- package/client/dist/assets/{MangaResetProgressModal-CVPwJSlW.js → MangaResetProgressModal-DaZmK9CX.js} +1 -1
- package/client/dist/assets/{Mature-BqODUa8k.js → Mature-CbQWqjUS.js} +1 -1
- package/client/dist/assets/{MatureConsentModal-BoSwjOI5.js → MatureConsentModal-CEoZ_OA0.js} +1 -1
- package/client/dist/assets/MediaCard-B-TmXdgl.js +1 -0
- package/client/dist/assets/{OptionListMenu-COsyoLhE.js → OptionListMenu-ArbsAjlv.js} +1 -1
- package/client/dist/assets/{Player-Ctxb19Xq.js → Player-4wh-a_ee.js} +2 -2
- package/client/dist/assets/{PlayerProvider-BpHzod7D.js → PlayerProvider-CbamWD19.js} +1 -1
- package/client/dist/assets/{PlayerSettings-BN8IC5it.js → PlayerSettings-DehU56D4.js} +1 -1
- package/client/dist/assets/{QueueOptionsButton-BubxC3vl.js → QueueOptionsButton-DqoDQST5.js} +1 -1
- package/client/dist/assets/QueueRail-ClrcV9LL.js +1 -0
- package/client/dist/assets/{ReadingList-CXQy4sxe.js → ReadingList-Cy1BKzJs.js} +1 -1
- package/client/dist/assets/{ResetProgressModal-tI6IHvmP.js → ResetProgressModal-BdcBPlC1.js} +1 -1
- package/client/dist/assets/{Search-B9v2KFw9.js → Search-5PvZ8pAC.js} +1 -1
- package/client/dist/assets/Settings-O0oOrEUd.js +21 -0
- package/client/dist/assets/{SkeletonGrid-U0v5ZOMU.js → SkeletonGrid-DqN0laN_.js} +1 -1
- package/client/dist/assets/{Trackers-BApb11Vz.js → Trackers-DxBWYwss.js} +2 -2
- package/client/dist/assets/{Tv-B23iWxt-.js → Tv-Ox6p6iEx.js} +3 -3
- package/client/dist/assets/TvInfo-DjPQ7BZn.js +1 -0
- package/client/dist/assets/{TvPopup-B_BBkSA6.js → TvPopup-CCTQiS84.js} +1 -1
- package/client/dist/assets/{TvSearch-B6DALvV9.js → TvSearch-Baig87wj.js} +1 -1
- package/client/dist/assets/{TvWatchlist-DRms0v9m.js → TvWatchlist-D-yxvaKC.js} +1 -1
- package/client/dist/assets/{VirtualKeyboard-BLXSHA6_.js → VirtualKeyboard-Bf7wvuX3.js} +1 -1
- package/client/dist/assets/{WatchAlong-DqiBYW8W.js → WatchAlong-D9NsqbWz.js} +1 -1
- package/client/dist/assets/{WatchAlongPanel-CDbbTIqv.js → WatchAlongPanel-DRsYyjM7.js} +1 -1
- package/client/dist/assets/{Watchlist-B8NP7imi.js → Watchlist-oYAx_dFL.js} +1 -1
- package/client/dist/assets/{index-BHWOY-pi.js → index-CPhXtUuw.js} +4 -4
- package/client/dist/assets/{libraryInvalidation-D8h84CFM.js → libraryInvalidation-hcASRQHn.js} +1 -1
- package/client/dist/assets/{playbackCompletion-Cq6Pbug7.js → playbackCompletion-D1Gm0GbH.js} +1 -1
- package/client/dist/assets/{useAnimeInfoData-DhoidxrL.js → useAnimeInfoData-BsFz9uiF.js} +1 -1
- package/client/dist/assets/{useMangaLibrary-Bogr8MQ7.js → useMangaLibrary-DbvnlYV9.js} +1 -1
- package/client/dist/assets/{useMangaPopup-BV_Jk_2y.js → useMangaPopup-2lqmdmS5.js} +1 -1
- package/client/dist/assets/{useProviders-CbFHcVVq.js → useProviders-BgAgACS8.js} +1 -1
- package/client/dist/assets/{useTv-DBYyKAM6.js → useTv-OX_q_uaI.js} +1 -1
- package/client/dist/assets/{useTvLibrary-D2tKj7cP.js → useTvLibrary-DaLHYFID.js} +1 -1
- package/client/dist/assets/useWatchAlongPlayer-B7Yj2s3s.js +10 -0
- package/client/dist/index.html +1 -1
- package/package.json +2 -2
- package/server/dist/server.js +1 -1
- package/server/package.json +1 -1
- package/client/dist/assets/AnimeInfo-CnBDIp7R.js +0 -1
- package/client/dist/assets/Home-D-SVz5cA.js +0 -1
- package/client/dist/assets/Insights-DybhDzpO.js +0 -1
- package/client/dist/assets/MangaInfoPage-DhbrQs6K.js +0 -1
- package/client/dist/assets/MediaCard-BbqpD03k.js +0 -1
- package/client/dist/assets/QueueRail-CUsYeL0A.js +0 -1
- package/client/dist/assets/Settings-C0Zb4_G5.js +0 -21
- package/client/dist/assets/TvInfo-DEWBzt0W.js +0 -1
- package/client/dist/assets/useWatchAlongPlayer-BmHRwl6J.js +0 -10
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as M,h as U,T as d,u as e,L as T}from"./vendor-core-DfaOB3Rn.js";import{b as $,u as z,a as G}from"./vendor-query-BBT5_sHx.js";import{q as m,t as u,aq as j,e as J,d as X,J as f,f as P}from"./index-BHWOY-pi.js";import{I as c}from"./vendor-icons-C1Pj_eSX.js";const Z="_header_45wm0_1",ee="_fadeIn_45wm0_1",ae="_personaBadge_45wm0_9",te="_personaInfo_45wm0_32",se="_personaLabel_45wm0_37",ne="_personaValue_45wm0_46",re="_statsGrid_45wm0_52",oe="_slideUpIn_45wm0_1",ce="_statCard_45wm0_62",le="_statIcon_45wm0_71",ie="_statInfo_45wm0_82",de="_statValue_45wm0_87",me="_statLabel_45wm0_96",he="_wideSection_45wm0_104",_e="_sectionHeader_45wm0_113",pe="_yearSelect_45wm0_128",ue="_heatmapLayout_45wm0_157",ge="_dayLabels_45wm0_164",we="_heatmapWrapper_45wm0_176",Ne="_heatmapMonthLabels_45wm0_182",ve="_heatmapGrid_45wm0_193",ye="_heatBox_45wm0_201",fe="_hiddenBox_45wm0_210",be="_level0_45wm0_221",Ce="_level1_45wm0_224",Se="_level2_45wm0_228",ke="_level3_45wm0_232",Be="_level4_45wm0_236",Le="_heatmapFooter_45wm0_241",Ie="_heatLegend_45wm0_248",De="_chartsContainer_45wm0_258",xe="_chartWrapper_45wm0_268",Re="_hourlyChart_45wm0_285",Me="_hourlyBarContainer_45wm0_293",Te="_hourlyBar_45wm0_293",$e="_hourlyLabel_45wm0_319",Ge="_chartSubtext_45wm0_326",Pe="_popScale_45wm0_339",We="_popTrack_45wm0_343",Oe="_popThumb_45wm0_351",qe="_popLabels_45wm0_363",Fe="_popDescription_45wm0_373",Ae="_seasonalChart_45wm0_386",Ve="_seasonalBarContainer_45wm0_394",He="_seasonalBar_45wm0_394",Ye="_seasonalLabel_45wm0_416",Ee="_genreList_45wm0_424",Ke="_genreRow_45wm0_431",Qe="_genreInfo_45wm0_437",Ue="_genreName_45wm0_444",ze="_genreCount_45wm0_451",je="_genreBarBg_45wm0_458",Je="_genreBar_45wm0_458",Xe="_warningSection_45wm0_471",Ze="_warningHeader_45wm0_477",ea="_droppedGrid_45wm0_493",aa="_droppedCard_45wm0_498",ta="_droppedName_45wm0_507",sa="_droppedDate_45wm0_514",na="_genreGrid_45wm0_561",ra="_genreCard_45wm0_579",oa="_rankBadge_45wm0_585",ca="_rankNumber_45wm0_598",la="_genreTitle_45wm0_604",ia="_genreStats_45wm0_612",da="_posterRow_45wm0_620",ma="_miniPoster_45wm0_627",ha="_genreCardSkeleton_45wm0_641",_a="_pulse_45wm0_1",pa="_skeletonRank_45wm0_647",ua="_skeletonTitle_45wm0_661",ga="_skeletonStats_45wm0_674",wa="_skeletonPosters_45wm0_686",Na="_recSection_45wm0_717",va="_recHeader_45wm0_721",ya="_recSubtext_45wm0_736",fa="_recControls_45wm0_742",ba="_recControlBtn_45wm0_748",Ca="_recPosterButton_45wm0_776",Sa="_recAddBtn_45wm0_777",ka="_recGrid_45wm0_787",Ba="_recEmpty_45wm0_793",La="_recCard_45wm0_801",Ia="_recCover_45wm0_819",Da="_recInfo_45wm0_827",xa="_recTitle_45wm0_834",Ra="_recMatch_45wm0_845",Ma="_recMeta_45wm0_851",Ta="_recWhy_45wm0_856",$a="_recNote_45wm0_865",Ga="_loading_45wm0_900",Pa="_error_45wm0_906",a={header:Z,fadeIn:ee,personaBadge:ae,personaInfo:te,personaLabel:se,personaValue:ne,statsGrid:re,slideUpIn:oe,statCard:ce,statIcon:le,statInfo:ie,statValue:de,statLabel:me,wideSection:he,sectionHeader:_e,yearSelect:pe,heatmapLayout:ue,dayLabels:ge,heatmapWrapper:we,heatmapMonthLabels:Ne,heatmapGrid:ve,heatBox:ye,hiddenBox:fe,level0:be,level1:Ce,level2:Se,level3:ke,level4:Be,heatmapFooter:Le,heatLegend:Ie,chartsContainer:De,chartWrapper:xe,hourlyChart:Re,hourlyBarContainer:Me,hourlyBar:Te,hourlyLabel:$e,chartSubtext:Ge,popScale:Pe,popTrack:We,popThumb:Oe,popLabels:qe,popDescription:Fe,seasonalChart:Ae,seasonalBarContainer:Ve,seasonalBar:He,seasonalLabel:Ye,genreList:Ee,genreRow:Ke,genreInfo:Qe,genreName:Ue,genreCount:ze,genreBarBg:je,genreBar:Je,warningSection:Xe,warningHeader:Ze,droppedGrid:ea,droppedCard:aa,droppedName:ta,droppedDate:sa,genreGrid:na,genreCard:ra,rankBadge:oa,rankNumber:ca,genreTitle:la,genreStats:ia,posterRow:da,miniPoster:ma,genreCardSkeleton:ha,pulse:_a,skeletonRank:pa,skeletonTitle:ua,skeletonStats:ga,skeletonPosters:wa,recSection:Na,recHeader:va,recSubtext:ya,recControls:fa,recControlBtn:ba,recPosterButton:Ca,recAddBtn:Sa,recGrid:ka,recEmpty:Ba,recCard:La,recCover:Ia,recInfo:Da,recTitle:xa,recMatch:Ra,recMeta:Ma,recWhy:Ta,recNote:$a,loading:Ga,error:Pa},Aa=()=>{const[b,C]=M(0);U(()=>{document.title="Insights - dango"},[]);const{data:n,isLoading:W,isError:O}=$({queryKey:[m.insights],queryFn:async()=>await u.insights.summary.query()}),{data:q,isLoading:S}=j(),{hasConsent:F}=J(),{titlePreference:A}=X(),g=z(),{data:w,isLoading:k,isFetching:B,isError:N}=$({queryKey:[m.insightsRecommendations],queryFn:async()=>await u.insights.recommendations.query(),staleTime:300*1e3,retry:1}),v=G({mutationFn:()=>u.insights.recommendations.query({refresh:!0}),onSuccess:t=>{g.setQueryData([m.insightsRecommendations],t),C(0)},onError:()=>f.error("Could not refresh recommendations")}),L=G({mutationFn:async t=>{await u.watchlist.add.mutate({id:String(t.id),name:t.title,thumbnail:t.cover||"",status:"Plan to Watch",type:t.format})},onSuccess:()=>{g.invalidateQueries({queryKey:[m.watchlist]}),g.invalidateQueries({queryKey:[m.insightsRecommendations]}),f.success("Added to Plan to Watch")},onError:()=>f.error("Could not add to watchlist")}),l=d(()=>[...w?.candidates||[]].sort((t,s)=>s.matchPct-t.matchPct),[w]),y=d(()=>{if(!l.length)return[];const t=b%l.length;return[...l,...l].slice(t,t+Math.min(6,l.length))},[l,b]),I=t=>{const s=t.name||t.englishName||t.nativeName||"";switch(A){case"nativeName":return t.nativeName||s;case"englishName":return t.englishName||s;default:return s}},[h,V]=M(new Date().getFullYear()),H=d(()=>{if(!n?.activityGrid)return[new Date().getFullYear()];const t=new Set(n.activityGrid.map(s=>parseInt(s.day.split("-")[0])));return t.add(new Date().getFullYear()),Array.from(t).sort((s,r)=>r-s)},[n]),D=d(()=>{if(!n?.activityGrid)return[];const t=new Map(n.activityGrid.map(p=>[p.day,p.count])),s=[],r=new Date(h,0,1),i=new Date(h,11,31),_=r.getDay(),o=new Date(r);for(o.setDate(o.getDate()-_);(o<=i||o.getDay()!==0)&&!(o>i&&o.getDay()===0);){const p=o.getFullYear(),K=String(o.getMonth()+1).padStart(2,"0"),Q=String(o.getDate()).padStart(2,"0"),x=`${p}-${K}-${Q}`,R=o<r||o>i;s.push({date:x,count:R?0:t.get(x)||0,month:o.getMonth(),isOutOfRange:R}),o.setDate(o.getDate()+1)}return s},[n,h]),Y=d(()=>n?.seasonality?.length?Math.max(...n.seasonality.map(t=>t.seconds),1):0,[n]),E=d(()=>n?.hourlyDist?.length?Math.max(...n.hourlyDist.map(t=>t.count),1):0,[n]);return W||S?e("div",{className:a.loading,children:"Analyzing your anime lifestyle..."}):O?e("div",{className:a.error,children:"Could not load insights. Data might be syncing."}):n?e("div",{className:"page-container",children:[e("div",{className:a.header,children:[e("div",{className:"title-stack",children:[e("div",{className:"section-eyebrow",children:"Your viewing habits"}),e("h2",{className:"section-title",children:"Watch Insights"})]}),e("div",{className:a.personaBadge,children:[e(c,{name:"user-astronaut"}),e("div",{className:a.personaInfo,children:[e("span",{className:a.personaLabel,children:"Your Persona"}),e("span",{className:a.personaValue,children:n.persona})]})]})]}),e("div",{className:a.statsGrid,children:[e("div",{className:a.statCard,children:[e("div",{className:a.statIcon,style:{background:"rgba(138, 79, 255, 0.2)",color:"var(--accent)"},children:e(c,{name:"clock"})}),e("div",{className:a.statInfo,children:[e("span",{className:a.statValue,children:[n.totalHours,"h"]}),e("span",{className:a.statLabel,children:"Watch Time"})]})]}),e("div",{className:a.statCard,children:[e("div",{className:a.statIcon,style:{background:"rgba(167, 139, 250, 0.2)",color:"#a78bfa"},children:e(c,{name:"bookmark"})}),e("div",{className:a.statInfo,children:[e("span",{className:a.statValue,children:n.totalAnime}),e("span",{className:a.statLabel,children:"Total Anime"})]})]}),e("div",{className:a.statCard,children:[e("div",{className:a.statIcon,style:{background:"rgba(34, 197, 94, 0.2)",color:"#22c55e"},children:e(c,{name:"check-circle"})}),e("div",{className:a.statInfo,children:[e("span",{className:a.statValue,children:n.totalEpisodes}),e("span",{className:a.statLabel,children:"Episodes Watched"})]})]}),e("div",{className:a.statCard,children:[e("div",{className:a.statIcon,style:{background:"rgba(34, 197, 94, 0.2)",color:"#22c55e"},children:e(c,{name:"check-circle"})}),e("div",{className:a.statInfo,children:[e("span",{className:a.statValue,children:[n.completionRate,"%"]}),e("span",{className:a.statLabel,children:"Completion Rate"})]})]}),e("div",{className:a.statCard,children:[e("div",{className:a.statIcon,style:{background:"rgba(45, 212, 191, 0.2)",color:"#2dd4bf"},children:e(c,{name:"tv"})}),e("div",{className:a.statInfo,children:[e("span",{className:a.statValue,children:n.completedAnime}),e("span",{className:a.statLabel,children:"Completed Shows"})]})]}),e("div",{className:a.statCard,children:[e("div",{className:a.statIcon,style:{background:"rgba(239, 68, 68, 0.2)",color:"#ef4444"},children:e(c,{name:"fire"})}),e("div",{className:a.statInfo,children:[e("span",{className:a.statValue,children:n.bingeFactor}),e("span",{className:a.statLabel,children:"Max Daily Binge"})]})]}),e("div",{className:a.statCard,children:[e("div",{className:a.statIcon,style:{background:"rgba(59, 130, 246, 0.2)",color:"#3b82f6"},children:e(c,{name:"history"})}),e("div",{className:a.statInfo,children:[e("span",{className:a.statValue,children:[n.avgSessionMinutes,"m"]}),e("span",{className:a.statLabel,children:"Avg. Session"})]})]}),e("div",{className:a.statCard,children:[e("div",{className:a.statIcon,style:{background:"rgba(251, 191, 36, 0.2)",color:"#fbbf24"},children:e(c,{name:"layer-group"})}),e("div",{className:a.statInfo,children:[e("span",{className:a.statValue,children:[n.avgCompletionDays,"d"]}),e("span",{className:a.statLabel,children:"Avg. Speed"})]})]})]}),e("div",{className:a.wideSection,children:[e("div",{className:a.sectionHeader,children:[e("h3",{children:"Activity"}),e("select",{className:a.yearSelect,value:h,onChange:t=>V(Number(t.currentTarget.value)),children:H.map(t=>e("option",{value:t,children:t},t))})]}),e("div",{className:a.heatmapLayout,children:[e("div",{className:a.dayLabels,children:[e("span",{style:{gridRow:2},children:"Mon"}),e("span",{style:{gridRow:4},children:"Wed"}),e("span",{style:{gridRow:6},children:"Fri"})]}),e("div",{className:a.heatmapWrapper,children:[e("div",{className:a.heatmapMonthLabels,children:(()=>{const t=[];let s=-1;return D.forEach((r,i)=>{if(r.month!==s&&!r.isOutOfRange){const _=Math.floor(i/7)+1;_>(t.length>0?t[t.length-1].props.style?.gridColumn+2:-1)&&(t.push(e("span",{style:{gridColumn:_,whiteSpace:"nowrap"},children:new Date(0,r.month).toLocaleString("default",{month:"short"})},i)),s=r.month)}}),t})()}),e("div",{className:a.heatmapGrid,children:D.map((t,s)=>{let r=0;return t.count>0&&!t.isOutOfRange&&(r=1),t.count>2&&!t.isOutOfRange&&(r=2),t.count>5&&!t.isOutOfRange&&(r=3),t.count>10&&!t.isOutOfRange&&(r=4),e("div",{className:`${a.heatBox} ${a[`level${r}`]} ${t.isOutOfRange?a.hiddenBox:""}`,title:t.isOutOfRange?"":`${t.count} episodes on ${t.date}`},s)})}),e("div",{className:a.heatmapFooter,children:e("div",{className:a.heatLegend,children:[e("span",{children:"Less"}),e("div",{className:`${a.heatBox} ${a.level0}`}),e("div",{className:`${a.heatBox} ${a.level1}`}),e("div",{className:`${a.heatBox} ${a.level2}`}),e("div",{className:`${a.heatBox} ${a.level3}`}),e("div",{className:`${a.heatBox} ${a.level4}`}),e("span",{children:"More"})]})})]})]})]}),e("div",{className:a.chartsContainer,children:[e("div",{className:a.chartWrapper,children:[e("h3",{children:"Time Distribution (24h)"}),e("div",{className:a.hourlyChart,children:n.hourlyDist?.map((t,s)=>e("div",{className:a.hourlyBarContainer,children:[e("div",{className:a.hourlyBar,style:{height:`${t.count/E*100||2}%`,width:"100%",maxWidth:"12px"},title:`${t.count} watches at ${t.hour}:00`}),e("span",{className:a.hourlyLabel,style:{visibility:s%4===0?"visible":"hidden"},children:t.hour})]},s))}),e("div",{className:a.chartSubtext,children:(()=>{if(!n.hourlyDist?.length)return"Watch more to see your peak hours!";const t=parseInt([...n.hourlyDist].sort((s,r)=>r.count-s.count)[0].hour);return t>=6&&t<19?"You prefer daytime watching ☀️":"You're a confirmed Night Owl 🦉"})()})]}),e("div",{className:a.chartWrapper,children:[e("h3",{children:"Popularity Bias"}),e("div",{className:a.popScale,children:[e("div",{className:a.popTrack,children:e("div",{className:a.popThumb,style:{left:`${Math.max(0,Math.min(100,100-n.popularityScore*10))}%`}})}),e("div",{className:a.popLabels,children:[e("span",{children:"Mainstream"}),e("span",{children:"Underground"})]})]}),e("p",{className:a.popDescription,children:["Your taste score is ",e("strong",{children:[n.popularityScore,"/10"]}),".",n.popularityScore>=5?" You follow the big hits!":" You're a connoisseur of the obscure!"]})]}),e("div",{className:a.chartWrapper,children:[e("h3",{children:"Monthly Activity"}),e("div",{className:a.seasonalChart,children:n.seasonality?.map((t,s)=>e("div",{className:a.seasonalBarContainer,children:[e("div",{className:a.seasonalBar,style:{height:`${t.seconds/Y*100||5}%`,width:"100%",maxWidth:"24px"},title:`${Math.round(t.seconds/3600)}h in ${new Date(0,s).toLocaleString("default",{month:"long"})}`}),e("span",{className:a.seasonalLabel,children:new Date(0,s).toLocaleString("default",{month:"short"})})]},s))})]})]}),e("div",{className:a.genreGrid,children:S?Array.from({length:4}).map((t,s)=>e("div",{className:a.genreCardSkeleton,children:[e("div",{className:a.skeletonRank}),e("div",{className:a.skeletonTitle}),e("div",{className:a.skeletonStats}),e("div",{className:a.skeletonPosters})]},s)):q?.filter(t=>F||t.name.toLowerCase()!=="hentai").map(t=>e("div",{className:a.genreCard,children:[e("div",{className:a.rankBadge,children:e("span",{className:a.rankNumber,children:t.rank})}),e("h3",{className:a.genreTitle,children:t.name}),e("div",{className:a.genreStats,children:[e("span",{children:[t.count," episodes"]}),e("span",{children:t.meanScore>0?`${t.meanScore.toFixed(1)} avg score`:"-"}),e("span",{children:t.timeWatched})]}),e("div",{className:a.posterRow,children:t.topShows.map(s=>e("img",{src:P(s.thumbnail),alt:I(s),className:a.miniPoster,title:I(s),loading:"lazy",decoding:"async"},s.id))})]},t.name))}),(y.length>0||k||N||w)&&e("div",{className:a.recSection,children:[e("div",{className:a.recHeader,children:[e("div",{children:[e("h3",{children:"Recommended For You"}),e("p",{className:a.recSubtext,children:"Based on your completed shows and genre taste"})]}),e("div",{className:a.recControls,children:[l.length>6&&e("button",{className:a.recControlBtn,onClick:()=>C(t=>(t+6)%l.length),children:"Different picks"}),e("button",{className:a.recControlBtn,onClick:()=>v.mutate(),disabled:B||v.isPending,children:[e(c,{name:"sync-alt"}),B||v.isPending?"Refreshing…":"Refresh"]})]})]}),N||!k&&y.length===0?e("p",{className:a.recEmpty,children:N?"Recommendations could not load. Try refreshing.":"No new recommendations yet. Keep watching or try again later."}):e("div",{className:a.recGrid,children:y.map(t=>e("div",{className:a.recCard,children:[t.cover&&e(T,{to:`/anime/${t.id}`,className:a.recPosterButton,"aria-label":`View ${t.title}`,children:e("img",{src:P(t.cover),alt:"",className:a.recCover,loading:"lazy",decoding:"async"})}),e("div",{className:a.recInfo,children:[e(T,{to:`/anime/${t.id}`,className:a.recTitle,children:t.title}),e("span",{className:a.recMatch,children:[t.matchPct,"% taste match"]}),e("span",{className:a.recMeta,children:[t.year,t.format,t.episodes?`${t.episodes}ep`:null].filter(Boolean).join(" · ")}),e("span",{className:a.recWhy,children:["Shares ",t.sharedGenres.join(", "),t.exemplars.length>0&&` - like ${t.exemplars.join(", ")}`]}),t.kind==="continue"&&e("span",{className:a.recNote,children:"Continue - you watched the earlier part."}),t.kind==="sequel"&&t.prequelTitle&&e("span",{className:a.recNote,children:['Sequel - start with "',t.prequelTitle,'" first.']}),e("button",{className:a.recAddBtn,onClick:()=>L.mutate(t),disabled:L.isPending,children:[e(c,{name:"plus"})," Plan to Watch"]})]})]},t.id))})]}),n.droppedShows?.length>0&&e("div",{className:a.warningSection,children:[e("div",{className:a.warningHeader,children:[e(c,{name:"exclamation-triangle"}),e("h3",{children:"Dusty Watchlist (Inactive 90+ days)"})]}),e("div",{className:a.droppedGrid,children:n.droppedShows.map(t=>e("div",{className:a.droppedCard,children:[e("span",{className:a.droppedName,children:t.name}),e("span",{className:a.droppedDate,children:["Last watched: ",new Date(t.lastActivity).toLocaleDateString()]})]},t.id))})]})]}):null};export{Aa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as e,a as Q,d as z,S as E,o as O,p as G,T as $,h as Y}from"./vendor-core-DfaOB3Rn.js";import{I as x}from"./vendor-icons-C1Pj_eSX.js";import{a8 as H,m as D,af as U,B as M,e as J,ag as K,d as V}from"./index-BHWOY-pi.js";import{E as X}from"./ErrorMessage-hMt90aG4.js";import{s as r}from"./Manga.module-depGEacJ.js";import{c as Z,d as j,e as ee,m as A,f as te,g as ae,r as re,h as ne,j as se,p as ie,k as oe,M as le}from"./useMangaLibrary-Bogr8MQ7.js";import{p as ce}from"./page.module-C1MlZzf3.js";import"./vendor-query-BBT5_sHx.js";import"./libraryInvalidation-D8h84CFM.js";const de=({detail:a,altTitle:c,onBack:k,onOpenChapter:v,bookmarkButton:n,statusSelect:g,primaryAction:b,progressByChapter:d})=>{const h=[a.type,a.status,a.year?String(a.year):"",a.author?`by ${a.author}`:""].filter(Boolean);return e("div",{children:[e("button",{className:r.backBtn,onClick:k,children:[e(x,{name:"chevron-left",size:12})," Back to browse"]}),e("div",{className:r.detail,children:[a.cover&&e(H,{className:r.detailCover,src:D(a.provider,a.cover),alt:a.title,decoding:"async",draggable:!1}),e("div",{className:r.detailInfo,children:[e("h2",{className:r.detailTitle,children:a.title}),c&&e("p",{className:r.detailAltTitle,children:["Also known as: ",c]}),h.length>0&&e("div",{className:r.detailMeta,children:h.map(t=>e("span",{className:r.badge,children:t},t))}),a.genres&&a.genres.length>0&&e("div",{className:r.detailMeta,children:a.genres.map(t=>e("span",{className:r.badge,children:t},t))}),a.description&&e("p",{className:r.detailDesc,children:a.description}),(n||g||b)&&e("div",{className:r.detailActions,children:[b,n,g]})]})]}),e("h3",{className:r.detailTitle,style:{fontSize:"1rem"},children:["Chapters (",a.chapters.length,")"]}),a.chapters.length===0?e("p",{className:r.statusMsg,children:"No chapters found for this title on this provider."}):e("div",{className:r.chapterList,children:a.chapters.map(t=>{const o=d?.get(t.id),p=!!o&&o.pageCount>0&&o.page>=o.pageCount;return e("button",{className:`${r.chapterRow} ${p?r.chapterDone:""}`,onClick:()=>v(t),title:t.externalUrl?"External only - opens on source site":void 0,children:[e("span",{children:["Ch. ",t.number,t.title?` - ${t.title}`:""]}),e("span",{className:r.chapterMeta,children:[o&&o.pageCount>0?p?"read":`p. ${o.page}/${o.pageCount}`:"",t.group,t.externalUrl?"external":""].filter(Boolean).join(" · ")})]},t.id)})})]})},pe=({libId:a,anilistId:c})=>{const k=Q(),v=Z(a),n=v.data?.item,[g,b]=z(null),[d,h]=z(null),t=g??n?.title??"",o=U({provider:"mangadex",query:t,page:1,sort:"",status:"",type:"",rating:"safe",mature:!1},!!t),p=U({provider:"mangapill",query:t,page:1,sort:"",status:"",type:"",rating:"safe",mature:!1},!!t),S=j(),y=ee(),I=async s=>{const u=A(s.provider,s.id);h(u);try{await S.mutateAsync({provider:s.provider,mangaId:s.id,title:s.title,cover:s.cover,altTitle:s.altTitle,contentRating:s.contentRating,silent:!0}),await y.mutateAsync({id:u,anilistId:c}),k(`/manga/${s.provider}/${encodeURIComponent(s.id)}`)}catch{return}finally{h(null)}},C=(s,u,T)=>e("div",{style:{marginTop:"12px"},children:[e("div",{style:{fontWeight:600,textTransform:"capitalize",marginBottom:"6px"},children:s}),T?e("div",{style:{color:"var(--text-tertiary)",fontSize:"0.85rem"},children:"Searching…"}):!u||u.length===0?e("div",{style:{color:"var(--text-tertiary)",fontSize:"0.85rem"},children:"No matches."}):u.slice(0,6).map(l=>{const B=A(l.provider,l.id),N=d===B;return e("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"6px 0",borderTop:"1px solid var(--border, #223)"},children:[l.cover&&e("img",{src:D(l.provider,l.cover),alt:"",loading:"lazy",style:{width:"34px",height:"48px",objectFit:"cover",borderRadius:"4px"}}),e("div",{style:{flex:1,minWidth:0},children:[e("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l.title}),l.latestChapter&&e("div",{style:{color:"var(--text-tertiary)",fontSize:"0.75rem"},children:l.latestChapter})]}),e(M,{onClick:()=>I(l),disabled:N,children:[e(x,{name:"external-link-alt",size:12})," ",N?"Linking…":"Link"]})]},B)})]});return e("div",{children:[e("button",{onClick:()=>k("/manga"),style:{background:"none",border:"none",color:"var(--accent)",cursor:"pointer",marginBottom:"12px"},children:[e(x,{name:"chevron-left",size:12})," Back to browse"]}),v.isLoading?e("div",{style:{color:"var(--text-tertiary)"},children:"Loading library entry…"}):n?e(E,{children:[e("div",{style:{display:"flex",gap:"12px",alignItems:"center"},children:[n.cover&&e("img",{src:n.cover,alt:"",style:{width:"64px",height:"90px",objectFit:"cover",borderRadius:"6px"}}),e("div",{children:[e("h2",{style:{margin:"0 0 4px"},children:n.title}),e("div",{style:{color:"var(--text-tertiary)",fontSize:"0.85rem"},children:["Tracked on AniList",n.lastChapterNumber?` · Ch. ${n.lastChapterNumber}`:"",n.status?` · ${n.status}`:""]})]})]}),e("p",{style:{color:"var(--text-tertiary)",fontSize:"0.85rem",marginTop:"12px"},children:"AniList doesn't host chapters. Search your providers below and link the matching manga - your AniList status and chapter progress will sync to it from now on."}),e("div",{style:{display:"flex",gap:"8px",marginTop:"8px"},children:e("input",{type:"text",value:g??n.title,onChange:s=>b(s.currentTarget.value),placeholder:"Search providers…",style:{flex:1,padding:"8px 10px",borderRadius:"6px",border:"1px solid var(--border, #223)",background:"var(--bg-secondary, transparent)",color:"inherit"}})}),C("mangadex",o.data?.items,o.isLoading),C("mangapill",p.data?.items,p.isLoading)]}):e("div",{style:{color:"var(--text-tertiary)"},children:"This AniList entry is no longer in your library."})]})};function xe(){const{provider:a="",id:c=""}=O(),[k]=G(),v=Q(),{hasConsent:n}=J(),g=k.get("rating")||"safe",b=n?g:"safe",d=a&&c?A(a,c):void 0,h=K(a||null,c||null,b,n),t=h.data,o=te(d),p=ae(d),{titlePreference:S}=V(),y=$(()=>t&&{...t,title:re(t,S)},[t,S]),I=j(),C=ne(),s=se();Y(()=>{y&&(document.title=`${y.title} - dango`)},[y]);const u=$(()=>{const i=new Map;for(const m of p.data?.progress??[])i.set(m.chapterId,m);return i},[p.data]),T=a.toLowerCase()==="anilist"&&/^\d+$/.test(c)?parseInt(c,10):null,l=o.data?.inLibrary??!1,B=o.data?.status??"Reading",N=$(()=>(t?.chapters??[]).filter(i=>!i.externalUrl),[t]),f=$(()=>{if(!t)return null;const i=[...p.data?.progress??[]].sort((m,L)=>L.updatedAt-m.updatedAt);for(const m of i){const L=t.chapters.find(w=>w.id===m.chapterId);if(L&&!L.externalUrl)return L;const P=ie(m.chapterId);if(P!=null){const w=oe(t.chapters,P);if(w&&!w.externalUrl)return w}}return N[0]??null},[t,p.data,N]),F=f?u.get(f.id):void 0,W=(p.data?.progress?.length??0)>0,_=f&&(F||W)?`Continue Ch. ${f?.number}`:"Start Reading",R=i=>{if(i.externalUrl){window.open(i.externalUrl,"_blank","noopener,noreferrer");return}const m=new URLSearchParams;m.set("chapter",i.id),n&&g!=="safe"&&m.set("rating",g),v(`/manga/${a}/${encodeURIComponent(c)}/read?${m.toString()}`)},q=()=>{!t||!d||(l?C.mutate(d):I.mutate({provider:a,mangaId:c,title:t.title,cover:t.cover,author:t.author,altTitle:t.altTitle,contentRating:t.contentRating}))};return e("div",{className:ce.page,children:h.isLoading?e("div",{"aria-hidden":!0,children:[e("div",{className:`${r.skeletonThumb} ${r.shimmer}`,style:{maxWidth:"12rem"}}),e("div",{className:`${r.skeletonLine} ${r.shimmer}`,style:{width:"40%"}}),e("div",{className:`${r.skeletonLine} ${r.shimmer}`,style:{width:"70%"}})]}):h.isError||!t||!y?T!=null&&d?e(pe,{libId:d,anilistId:T}):e(E,{children:[e("button",{className:r.backBtn,onClick:()=>v("/manga"),children:[e(x,{name:"chevron-left",size:12})," Back to browse"]}),e(X,{message:"Failed to load this title. Please try again."})]}):e(de,{detail:y,altTitle:t.altTitle!==y.title?t.altTitle:void 0,onBack:()=>v("/manga"),onOpenChapter:R,progressByChapter:u,primaryAction:f?e(M,{onClick:()=>f&&R(f),children:[e(x,{name:"book",size:13})," ",_]}):void 0,bookmarkButton:e(M,{variant:l?"secondary":"primary",onClick:q,disabled:I.isPending||C.isPending,children:[e(x,{name:"bookmark",size:13})," ",l?"Bookmarked":"Bookmark"]}),statusSelect:l?e("select",{className:r.detailSelect,value:B,onChange:i=>d&&s.mutate({id:d,status:i.currentTarget.value}),"aria-label":"Reading status",children:le.map(i=>e("option",{value:i,children:i},i))}):void 0})})}export{xe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as $,A as k,h as U,T as Re,u as e,g as x,S as H,$ as Ie,L as W,q as P,N as ze,a as ke}from"./vendor-core-DfaOB3Rn.js";import{I as N}from"./vendor-icons-C1Pj_eSX.js";import{a8 as $e,t as Se,d as Le,u as De,e as xe,f as Oe}from"./index-BHWOY-pi.js";import{a as Ae,b as je,f as Fe,s as Ue}from"./vendor-ui-3qrARCPr.js";import{u as ae}from"./useIsMobile-Dvx1uJ82.js";import{M as We}from"./MatureConsentModal-BoSwjOI5.js";const Ve="_pagination_zelsc_1",Ge="_pageBtn_zelsc_7",Xe="_pageInfo_zelsc_38",Ye="_pagePicker_zelsc_48",He="_dropdown_zelsc_52",Ke="_flipDown_zelsc_68",qe="_jumpRow_zelsc_73",Je="_jumpInput_zelsc_79",Qe="_jumpGo_zelsc_90",Ze="_optionList_zelsc_105",en="_optionBtn_zelsc_113",nn="_current_zelsc_132",w={pagination:Ve,pageBtn:Ge,pageInfo:Xe,pagePicker:Ye,dropdown:He,flipDown:Ke,jumpRow:qe,jumpInput:Je,jumpGo:Qe,optionList:Ze,optionBtn:en,current:nn},Bt=({page:n,totalPages:c,canGoNext:l,onChange:d,isLoading:h=!1,variant:f="compact"})=>{const[s,y]=$(!1),[b,_]=$(""),[v,B]=$(0),[C,R]=$(!1),T=k(null),u=k(null),g=k(null);U(()=>{if(!s)return;const r=m=>{T.current&&!T.current.contains(m.target)&&y(!1)},t=m=>{m.key==="Escape"&&y(!1)};return document.addEventListener("pointerdown",r),document.addEventListener("keydown",t),()=>{document.removeEventListener("pointerdown",r),document.removeEventListener("keydown",t)}},[s]),U(()=>{if(!s)return;B(0),R(!1);const r=requestAnimationFrame(()=>{const t=g.current?.getBoundingClientRect(),m=u.current?.getBoundingClientRect();if(!t)return;let M=0;t.right>window.innerWidth-8?M=window.innerWidth-8-t.right:t.left<8&&(M=8-t.left),B(Math.round(M)),m&&m.top<t.height+24&&R(!0)});return()=>cancelAnimationFrame(r)},[s]);const a=c,S=Re(()=>{if(a!==void 0){if(a<=100)return Array.from({length:a},(m,M)=>M+1);const t=new Set([1,a]);for(let m=n-10;m<=n+10;m++)m>=1&&m<=a&&t.add(m);return[...t].sort((m,M)=>m-M)}const r=l?n+1:n;return Array.from({length:r},(t,m)=>m+1)},[a,n,l]),E=r=>{const t=a!==void 0?Math.min(Math.max(1,r),a):Math.max(1,r);y(!1),_(""),t!==n&&d(t)},L=()=>{const r=parseInt(b,10);Number.isNaN(r)||E(r)},D=h||(a!==void 0?n>=a:!l);return e("div",{className:w.pagination,ref:T,children:[e("button",{className:w.pageBtn,onClick:()=>d(n-1),disabled:n<=1||h,"aria-label":"Previous page",children:[e(N,{name:"chevron-left",size:14}),f==="labeled"&&e("span",{children:"Previous"})]}),e("div",{className:w.pagePicker,ref:u,children:[e("button",{className:w.pageBtn,onClick:()=>{_(""),y(r=>!r)},disabled:h,"aria-label":"Jump to page","aria-expanded":s,children:e("span",{className:w.pageInfo,children:["Page ",e("strong",{children:n}),a!==void 0&&` of ${a}`]})}),s&&e("div",{ref:g,className:`${w.dropdown} ${C?w.flipDown:""}`,style:v!==0?{marginLeft:v}:void 0,children:[e("div",{className:w.jumpRow,children:[e("input",{className:w.jumpInput,type:"number",inputMode:"numeric",min:1,max:a,value:b,placeholder:"Page #",onChange:r=>_(r.currentTarget.value),onKeyDown:r=>{r.key==="Enter"&&L()}}),e("button",{className:w.jumpGo,onClick:L,children:"Go"})]}),e("div",{className:w.optionList,children:S.map(r=>e("button",{className:`${w.optionBtn} ${r===n?w.current:""}`,onClick:()=>E(r),disabled:r===n,children:r},r))})]})]}),e("button",{className:w.pageBtn,onClick:()=>d(n+1),disabled:D,"aria-label":"Next page",children:[f==="labeled"&&e("span",{children:"Next"}),e(N,{name:"chevron-right",size:14})]})]})},tn="_popupPortal_1d6yy_1",on="_popupContent_1d6yy_6",sn="_popupBackdrop_1d6yy_31",rn="_mobile_1d6yy_38",an="_header_1d6yy_62",cn="_title_1d6yy_67",ln="_altTitle_1d6yy_78",dn="_cover_1d6yy_87",un="_body_1d6yy_97",pn="_metaRow_1d6yy_104",_n="_metaItem_1d6yy_111",mn="_scoreIcon_1d6yy_117",fn="_synopsis_1d6yy_121",hn="_genres_1d6yy_143",gn="_genre_1d6yy_143",yn="_footer_1d6yy_158",vn="_primaryAction_1d6yy_167",Bn="_watchBtn_1d6yy_171",bn="_secondaryActions_1d6yy_194",wn="_watchlistBtn_1d6yy_199",Nn="_detailsBtn_1d6yy_200",Cn="_active_1d6yy_226",Pn="_loading_1d6yy_237",Mn="_spinner_1d6yy_247",i={popupPortal:tn,popupContent:on,popupBackdrop:sn,mobile:rn,header:an,title:cn,altTitle:ln,cover:dn,body:un,metaRow:pn,metaItem:_n,scoreIcon:mn,synopsis:fn,genres:hn,genre:gn,footer:yn,primaryAction:vn,watchBtn:Bn,secondaryActions:bn,watchlistBtn:wn,detailsBtn:Nn,active:Cn,loading:Pn,spinner:Mn},Tn=({anchorRect:n,onMouseEnter:c,onMouseLeave:l,onRequestClose:d,children:h})=>{const f=ae(),s=x.useMemo(()=>({getBoundingClientRect:()=>n}),[n]),{refs:y,floatingStyles:b}=Ae({placement:"right-start",middleware:[Fe({fallbackAxisSideDirection:"start"}),Ue({padding:20})],whileElementsMounted:je});x.useEffect(()=>{y.setPositionReference(s)},[y,s]),x.useEffect(()=>{if(!f)return;const v=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=v}},[f]);const _=e(H,{children:[f&&e("div",{className:i.popupBackdrop,onClick:()=>d?.()}),e("div",{ref:f?void 0:y.setFloating,className:`${i.popupPortal} ${f?i.mobile:""}`,style:f?void 0:b,onMouseEnter:c,onMouseLeave:l,children:e("div",{className:i.popupContent,children:h})})]});return Ie(_,document.body)},bt=({anchorRect:n,title:c,subtitle:l,cover:d,loading:h,error:f,meta:s=[],genres:y=[],synopsis:b,primaryAction:_,secondaryAction:v,bookmarked:B,bookmarkLabel:C="Watchlist",onToggleBookmark:R,extraActions:T,onMouseEnter:u,onMouseLeave:g,onRequestClose:a})=>{const S=k(!1),E=()=>{S.current=!0,u()},L=()=>{S.current=!1,g()},D=t=>{!t&&!S.current&&g()},r=!!_||!!v||!!T;return e(Tn,{anchorRect:n,onMouseEnter:E,onMouseLeave:L,onRequestClose:a,children:h?e("div",{className:i.loading,children:[e("div",{className:i.spinner}),e("span",{children:"Fetching details..."})]}):f?e("div",{className:i.loading,children:f}):e(H,{children:[c&&e("div",{className:i.header,children:[d&&e($e,{src:d,alt:c,loading:"lazy",decoding:"async",className:i.cover}),e("div",{className:i.title,children:c}),l&&e("div",{className:i.altTitle,children:l})]}),e("div",{className:i.body,children:[s.length>0&&e("div",{className:i.metaRow,children:s.map((t,m)=>e("div",{className:i.metaItem,children:[t.icon&&e(N,{name:t.icon,className:t.accent?i.scoreIcon:void 0,size:14}),e("span",{children:t.label})]},`${t.label}-${m}`))}),y.length>0&&e("div",{className:i.genres,children:y.map(t=>e("span",{className:i.genre,children:t},t))}),b&&e("div",{className:i.synopsis,children:b})]}),r&&e("div",{className:i.footer,children:[_&&e("div",{className:i.primaryAction,children:_.disabled?e("span",{className:i.watchBtn,"aria-disabled":"true",style:{opacity:.5,pointerEvents:"none"},children:[e(N,{name:_.icon??"play",size:14}),_.label]}):e(W,{to:_.to,className:i.watchBtn,onClick:a,children:[e(N,{name:_.icon??"play",size:14}),_.label]})}),e("div",{className:i.secondaryActions,children:[e("button",{className:`${i.watchlistBtn} ${B?i.active:""}`,onClick:t=>{t.preventDefault(),t.stopPropagation(),R()},children:[B?e(N,{name:"check",size:12}):e(N,{name:"plus",size:12}),e("span",{children:B?"Remove":C})]}),T?.(D),v&&e(W,{to:v.to,className:i.detailsBtn,onClick:a,children:[v.icon&&e(N,{name:v.icon,size:12}),e("span",{children:v.label})]})]})]})]})})},En=n=>!n||n.trim()===""?!0:n.includes("placeholder");function Rn(n,c){const[l,d]=$(c);return U(()=>{d(c)},[c]),U(()=>{if(!En(c)||!n)return;let h=!1;return Se.data.showMeta.query({id:n}).then(f=>{const s=f?.thumbnail;!h&&s&&s.trim()!==""&&!s.includes("placeholder")&&d(s)}).catch(()=>{}),()=>{h=!0}},[n,c]),{thumbnail:l}}const In="_cardWrapper_riden_1",zn="_card_riden_1",kn="_cardButton_riden_34",$n="_hoverOverlay_riden_61",Sn="_matureOverlay_riden_96",Ln="_posterContainer_riden_106",Dn="_horizontal_riden_115",xn="_posterImg_riden_119",On="_blurred_riden_131",An="_flat_riden_154",jn="_loaded_riden_158",Fn="_progressSection_riden_167",Un="_titleSection_riden_174",Wn="_title_riden_174",Vn="_titleText_riden_196",Gn="_badge_riden_208",Xn="_typeBadge_riden_219 _badge_riden_208",Yn="_epBadge_riden_228 _badge_riden_208",Hn="_airTime_riden_237",Kn="_adultBadge_riden_244 _badge_riden_208",qn="_gated_riden_257",Jn="_notAiredBadge_riden_263 _badge_riden_208",Qn="_metaRow_riden_278",Zn="_metaItem_riden_289",et="_progressContainer_riden_306",nt="_progressBar_riden_314",tt="_timestamp_riden_322",ot="_removeBtn_riden_327",st="_infoBtn_riden_328",rt="_mobileBadges_riden_379",at="_mobileBadgeBase_riden_386",it="_mobileType_riden_394 _mobileBadgeBase_riden_386",ct="_mobileEp_riden_401 _mobileBadgeBase_riden_386",lt="_lowEnd_riden_471",o={cardWrapper:In,card:zn,cardButton:kn,hoverOverlay:$n,matureOverlay:Sn,posterContainer:Ln,horizontal:Dn,posterImg:xn,blurred:On,flat:An,loaded:jn,progressSection:Fn,titleSection:Un,title:Wn,titleText:Vn,badge:Gn,typeBadge:Xn,epBadge:Yn,airTime:Hn,adultBadge:Kn,gated:qn,notAiredBadge:Jn,metaRow:Qn,metaItem:Zn,progressContainer:et,progressBar:nt,timestamp:tt,removeBtn:ot,infoBtn:st,mobileBadges:rt,mobileBadgeBase:at,mobileType:it,mobileEp:ct,lowEnd:lt},dt=500,re=20,ut=300;function pt(n){const c=k(null),l=k(null),d=k(!1),h=k({x:0,y:0}),f=k(null),s=P(()=>{l.current&&(clearTimeout(l.current),l.current=null)},[]),y=P(()=>{c.current&&(clearTimeout(c.current),c.current=null)},[]),b=P(u=>{c.current&&clearTimeout(c.current),c.current=setTimeout(u,ut)},[]),_=P((u,g=!1)=>{d.current=g,n(u,g)},[n]),v=P((u,g)=>{if(g||u.pointerType==="mouse")return;f.current=u.pointerType,d.current=!1,h.current={x:u.clientX,y:u.clientY};const a=u.currentTarget.getBoundingClientRect();s(),l.current=setTimeout(()=>{l.current=null,_(a,!0)},dt)},[s,_]),B=P(u=>{if(!l.current)return;const g=Math.abs(u.clientX-h.current.x),a=Math.abs(u.clientY-h.current.y);(g>re||a>re)&&s()},[s]),C=P(()=>{s(),f.current=null},[s]),R=P((u,g)=>{u.preventDefault(),u.stopPropagation(),f.current==="touch"?l.current&&(clearTimeout(l.current),l.current=null,_(u.currentTarget.getBoundingClientRect(),!0)):!g&&!d.current&&_(u.currentTarget.getBoundingClientRect())},[_]),T=P(()=>d.current?(d.current=!1,!0):!1,[]);return{longPressFiredRef:d,cancelLongPress:s,clearPopupTimeout:y,schedulePopupClose:b,openViaHold:_,handlePointerDown:v,handlePointerMove:B,handlePointerUpOrCancel:C,handleContextMenu:R,consumeLongPressClick:T}}const Y={elements:{poster:{typeBadge:!0,chapterBadge:!0,adultBadge:!0},info:{title:!0,mobileBadges:!0,progress:!0,meta:!0}}},wt=ze(({item:n,linkTo:c,hoverIcon:l,progress:d,showProgress:h=!1,metaRow:f,display:s,layout:y="vertical",onRemove:b,showRemoveButton:_,showInfoButton:v=!1,onOpenDetails:B,renderPopup:C,onPopupHoverIntent:R,rawThumbnail:T,enrichedId:u})=>{const g=ke(),a=ae(),{titlePreference:S}=Le(),{lowEndMode:E}=De(),[L,D]=$(!1),[r,t]=$(!1),{thumbnail:m}=Rn(u,n.thumbnail),[M,K]=$(!1),[q,J]=$(null),Q=p=>{J(p),K(!0)},V=P(()=>{K(!1),J(null)},[]),I=pt(p=>{if(B){B(p);return}C&&Q(p)}),G=P(()=>{I.schedulePopupClose(V)},[I,V]),Z=I.clearPopupTimeout,ie=p=>{if(a)return;const se=p.currentTarget.getBoundingClientRect();if(B){B(se);return}C&&Q(se)},ce=()=>{C&&G()},le=()=>{Z()},de=()=>{C&&G()},ue=p=>{I.handlePointerDown(p,z)},pe=p=>{I.handlePointerMove(p)},ee=()=>{I.handlePointerUpOrCancel()},_e=p=>{if(B){p.preventDefault(),p.stopPropagation(),B(p.currentTarget.getBoundingClientRect());return}if(C){I.handleContextMenu(p,z);return}I.handleContextMenu(p,z)},ne={...s,elements:{...Y.elements,...s?.elements||{},poster:{...Y.elements?.poster,...s?.elements?.poster||{}},info:{...Y.elements?.info,...s?.elements?.info||{}}}},O=n[S]||n.title,A=ne.elements?.poster,j=ne.elements?.info,me=(A?.typeBadge??!0)&&!!n.typeBadge,fe=(A?.chapterBadge??!0)&&!!n.chapterBadge,he=_??A?.removeButton??!!b,ge=A?.adultBadge??!0,ye=j?.mobileBadges??!0,ve=j?.progress??!0,Be=j?.meta??!0,be=h&&!!d&&d.percent>0,te=!!n.isAdult,{hasConsent:we,grant:Ne}=xe(),[Ce,X]=x.useState(!1),F=x.useRef(null),Pe=()=>{Ne(),X(!1),F.current&&(g(F.current),F.current=null)},z=te&&!we,oe=p=>{if(I.consumeLongPressClick()){p.preventDefault(),p.stopPropagation();return}z&&(p.preventDefault(),p.stopPropagation(),F.current=c,X(!0))},Me=l==="book"?e(N,{name:"book",size:28}):l==="play"?e(N,{name:"play",size:28}):l==="info"?e(N,{name:"info-circle",size:28}):e(N,{name:"info-circle",size:28}),Te=P(p=>{p.preventDefault(),p.stopPropagation(),b&&b(n.id)},[b,n.id]),Ee=T?m??n.thumbnail:Oe(m,E?100:150,E?150:200);return e("div",{className:`${o.cardWrapper} ${E?o.lowEnd:""}`,onMouseEnter:()=>{t(!0),R?.(!0),M&&Z()},onMouseLeave:()=>{t(!1),R?.(!1),M&&G()},children:[e(W,{to:c,className:`${o.card} ${o[y]} ${z?o.cardButton:""}`,onClick:oe,onContextMenu:_e,onPointerDown:ue,onPointerMove:pe,onPointerUp:ee,onPointerCancel:ee,children:e("div",{className:o.posterContainer,children:[z&&e("div",{className:`${o.matureOverlay} ${E?o.flat:""}`}),e("img",{src:Ee,alt:O,className:`${o.posterImg} ${L?o.loaded:""} ${z&&!E?o.blurred:""}`,loading:"lazy",decoding:"async",onLoad:()=>D(!0)}),!a&&e(H,{children:[me&&e("div",{className:o.typeBadge,children:n.typeBadge}),fe&&e("div",{className:o.epBadge,children:[n.chapterBadge,n.airMeta&&e("span",{className:o.airTime,children:n.airMeta})]})]}),ge&&te&&e("div",{className:`${o.adultBadge} ${z?o.gated:""}`,children:"18+"}),n.notAired&&e("div",{className:o.notAiredBadge,children:"NOT AIRED"}),!a&&r&&e("div",{className:o.hoverOverlay,children:Me})]})}),ve&&h&&be&&d&&e("div",{className:o.progressSection,children:[e("div",{className:o.progressContainer,children:e("div",{className:o.progressBar,style:{width:`${d.percent}%`}})}),e("div",{className:o.timestamp,children:d.label})]}),e(W,{to:c,className:o.titleSection,onClick:oe,"aria-label":O,children:[a&&ye&&e("div",{className:o.mobileBadges,children:[!!n.typeBadge&&e("span",{className:o.mobileType,children:n.typeBadge}),n.chapterBadge&&e("span",{className:o.mobileEp,children:n.chapterBadge})]}),j?.title!==!1&&e("div",{className:o.title,title:O,children:e("span",{className:o.titleText,children:O})}),Be&&f&&e("div",{className:o.metaRow,children:f})]}),Ce&&e(We,{isOpen:!0,showResetHint:!0,onClose:()=>X(!1),onGrant:Pe}),he&&e("button",{className:o.removeBtn,onClick:Te,"aria-label":"Remove",children:e(N,{name:"times",size:10})}),v&&!a&&!z&&e("button",{className:o.infoBtn,onMouseEnter:ie,onMouseLeave:ce,"aria-label":"Info",children:e(N,{name:"info",size:11})}),C&&M&&q?C(q,{close:V,onMouseEnter:le,onMouseLeave:de}):null]})});export{wt as M,Bt as P,bt as a,o as m,i as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as s,u as n,a as X}from"./vendor-core-DfaOB3Rn.js";import{I as D}from"./vendor-icons-C1Pj_eSX.js";import{d as Y,f as L}from"./index-BHWOY-pi.js";const z="_section_5peha_1",F="_header_5peha_10",O="_headerToggle_5peha_20",j="_headerActions_5peha_34",J="_title_5peha_40",K="_badge_5peha_50",V="_clearBtn_5peha_65",W="_nextBtn_5peha_83",Z="_list_5peha_101",ee="_item_5peha_115",ne="_active_5peha_135",te="_dragging_5peha_143",re="_dragHandle_5peha_150",ae="_thumbnail_5peha_168",oe="_meta_5peha_176",ce="_name_5peha_183",se="_episode_5peha_205",ie="_iconBtn_5peha_211",le="_metaGap_5peha_257",r={section:z,header:F,headerToggle:O,headerActions:j,title:J,badge:K,clearBtn:V,nextBtn:W,list:Z,item:ee,active:ne,dragging:te,dragHandle:re,thumbnail:ae,meta:oe,name:ce,episode:se,iconBtn:ie,metaGap:le},ue=({item:a,isActive:w,index:g,onRemove:v,onTouchPointerDown:x,onTouchPointerMove:B,onTouchPointerUp:I,onTouchPointerCancel:y,shouldIgnoreClick:_,onDragStart:R,onDragEnter:f,onDragEnd:c,isDragging:b})=>{const o=X(),{titlePreference:i}=Y(),l=a[i]||a.name||"Unknown show";return n("div",{"data-queue-index":g,className:`${r.item} ${w?r.active:""} ${b?r.dragging:""}`,draggable:!0,onDragStart:R,onDragEnter:f,onDragOver:u=>u.preventDefault(),onDragEnd:c,onPointerDown:u=>x(g,u),onPointerMove:B,onPointerUp:I,onPointerCancel:y,children:[n("button",{className:r.dragHandle,type:"button","aria-label":"Drag queue item",children:n(D,{name:"bars"})}),n("img",{className:r.thumbnail,src:L(a.thumbnail||"",72,96),alt:l,loading:"lazy",decoding:"async",onError:u=>{u.currentTarget.src="/placeholder.svg"}}),n("div",{className:r.meta,children:[n("button",{className:r.name,type:"button",onClick:()=>{_()||o(`/watch/${a.showId}/${a.episodeNumber}`)},children:l}),n("div",{className:r.episode,children:["Episode ",a.episodeNumber]})]}),n("button",{className:r.iconBtn,type:"button",onClick:()=>{_()||v(a)},"aria-label":`Remove ${l} episode ${a.episodeNumber} from queue`,children:n(D,{name:"times"})})]})},me=({title:a="Queue",eyebrow:w,items:g,currentShowId:v,currentEpisode:x,onRemove:B,onReorder:I,onNextQueue:y,onClear:_,showClearAll:R=!1,defaultExpanded:f=!0})=>{const[c,b]=s.useState([]),[o,i]=s.useState(null),[l,u]=s.useState(f),N=s.useRef(null),T=s.useRef(null),d=s.useRef(null),h=s.useRef(!1),C=s.useRef(!1);s.useEffect(()=>{b(g)},[g]),s.useEffect(()=>{u(f)},[f]);const $=e=>{i(e)},k=e=>{if(o===null||o===e)return;const t=[...c],p=t[o];t.splice(o,1),t.splice(e,0,p),i(e),b(t)},A=()=>{o!==null&&I(c.map(e=>({id:e.id,showId:e.showId,episodeNumber:e.episodeNumber}))),i(null)},E=(e=!1)=>{d.current!==null&&(window.clearTimeout(d.current),d.current=null),e&&h.current&&(I(c.map(t=>({id:t.id,showId:t.showId,episodeNumber:t.episodeNumber}))),C.current=!0,window.setTimeout(()=>{C.current=!1},0)),N.current=null,T.current=null,h.current=!1,i(null)},Q=(e,t)=>{if(t.pointerType==="mouse")return;const p=t.currentTarget,m=t.pointerId;N.current=t.pointerId,T.current={x:t.clientX,y:t.clientY},d.current!==null&&window.clearTimeout(d.current),d.current=window.setTimeout(()=>{h.current=!0,i(e);try{p.setPointerCapture(m)}catch{}},220)},S=e=>{if(e.pointerType==="mouse"||N.current!==e.pointerId)return;if(!h.current&&T.current){const H=Math.abs(e.clientX-T.current.x),G=Math.abs(e.clientY-T.current.y);(H>8||G>8)&&E(!1);return}if(!h.current)return;e.preventDefault();const p=document.elementFromPoint(e.clientX,e.clientY)?.closest?.("[data-queue-index]"),m=p?Number(p.dataset.queueIndex):NaN;if(Number.isNaN(m)||o===null||m===o)return;const P=[...c],U=P[o];P.splice(o,1),P.splice(m,0,U),i(m),b(P)},q=e=>{e.pointerType!=="mouse"&&N.current===e.pointerId&&E(h.current)},M=e=>{e.pointerType!=="mouse"&&N.current===e.pointerId&&E(!1)};return c.length===0?null:n("section",{className:r.section,children:[n("div",{className:r.header,children:[n("button",{className:r.headerToggle,type:"button",onClick:()=>u(e=>!e),"aria-expanded":l,"aria-label":l?`Collapse ${a}`:`Expand ${a}`,children:[n("span",{className:r.title,children:[n("span",{className:"title-stack",children:[w&&n("div",{className:"section-eyebrow",children:w}),n("span",{children:a})]}),n("span",{className:r.badge,children:c.length})]}),l?n(D,{name:"chevron-up"}):n(D,{name:"chevron-down"})]}),R&&_&&n("div",{className:r.headerActions,children:[y&&c.length>1&&n("button",{className:r.nextBtn,type:"button",onClick:y,children:"Next"}),n("button",{className:r.clearBtn,type:"button",onClick:_,children:"Clear All"})]})]}),l&&n("div",{className:r.list,children:c.map((e,t)=>n(ue,{item:e,isActive:e.showId===v&&e.episodeNumber===x,index:t,onRemove:B,onTouchPointerDown:Q,onTouchPointerMove:S,onTouchPointerUp:q,onTouchPointerCancel:M,shouldIgnoreClick:()=>C.current,onDragStart:()=>$(t),onDragEnter:()=>k(t),onDragEnd:A,isDragging:o===t},e.id))})]})};export{me as Q,r as s};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import{d as r,u as e,S as le,A as X,h as z,q as pe,T as qe,p as ze,g as be,_ as Ke}from"./vendor-core-DfaOB3Rn.js";import{b as fe,u as ee}from"./vendor-query-BBT5_sHx.js";import{R as Z,S as Q,U as K,V as Ce,B as C,W as Ue,Q as E,d as Ee,L as Te,t as k,v as Fe,o as $e,J as ke,X as J,q as H,Y as Se,Z as We,_ as He,u as Be,e as je,$ as Qe,K as de,p as Ve,a0 as Ye,a1 as Je}from"./index-BHWOY-pi.js";import{I as j}from"./vendor-icons-C1Pj_eSX.js";import{T as F}from"./ToggleSwitch-CN_ppEc9.js";import{l as Xe,s as Ze}from"./playbackCompletion-Cq6Pbug7.js";import{M as et}from"./MatureConsentModal-BoSwjOI5.js";const tt="_sectionCard_1vuib_1",at="_dangerCard_1vuib_20",nt="_settingRow_1vuib_31",_={sectionCard:tt,dangerCard:at,settingRow:nt};function rt(){const{data:t}=fe(Z),{data:s}=fe({queryKey:["profiles"],queryFn:()=>Q("/api/profiles/status"),enabled:!!t?.owner}),c=ee(),[p,d]=r(null),[y,S]=r(""),[h,o]=r(""),[a,g]=r(""),[v,m]=r(""),[x,l]=r(""),[f,T]=r(!1),[I,G]=r(null),[P,w]=r(null),[L,A]=r(""),M=async i=>{T(!0),l("");try{await Q("/api/profiles/update",{method:"POST",body:JSON.stringify(i)}),await c.invalidateQueries({queryKey:Z.queryKey}),S(""),o(""),l("Profile saved")}catch(R){l(R.message)}finally{T(!1)}};return t?e("section",{className:_.sectionCard,children:[e("h3",{children:"Your profile"}),e("p",{children:"Keep using this profile, rename it, or add another person with their own library and connections."}),e("div",{className:K.avatarRow,children:[e(Ce,{image:t.image,name:t.name}),e("label",{className:K.uploadButton,children:[e(j,{name:"upload"}),e("span",{children:"Upload image"}),e("input",{className:K.fileInput,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif",disabled:f,onChange:async i=>{const R=i.currentTarget.files?.[0];if(i.currentTarget.value="",!R)return;if(R.size>2*1024*1024){l("Image must be smaller than 2 MB");return}const D=new FileReader;D.onerror=()=>l("Could not read image"),D.onload=()=>{M({avatar:D.result})},D.readAsDataURL(R)}})]}),t.avatar&&e(C,{variant:"secondary",disabled:f,onClick:()=>M({avatar:null}),children:"Clear uploaded image"})]}),e("p",{children:"Your uploaded image takes priority, followed by your active cloud account image, then the default user icon."}),e("form",{className:K.form,onSubmit:i=>{i.preventDefault(),M({name:p??t.name})},children:[e("label",{className:K.field,children:["Profile name",e("input",{value:p??t.name,maxLength:60,required:!0,onChange:i=>d(i.currentTarget.value)})]}),e(C,{type:"submit",disabled:f,children:"Save name"})]}),e("form",{className:K.form,onSubmit:i=>{i.preventDefault(),M({password:y,currentPassword:h})},children:[t.protected&&e("label",{className:K.field,children:["Current password",e("input",{type:"password",autoComplete:"current-password",value:h,required:!0,maxLength:256,onChange:i=>o(i.currentTarget.value)})]}),e("label",{className:K.field,children:[t.protected?"New password (empty removes protection)":"Protect this profile",e("input",{type:"password",autoComplete:"new-password",value:y,minLength:8,maxLength:256,onChange:i=>S(i.currentTarget.value)})]}),e(C,{type:"submit",disabled:f,children:"Save password"})]}),e(C,{variant:"secondary",disabled:f,onClick:async()=>{T(!0);try{await Q("/api/profiles/logout",{method:"POST"}),Ue()}catch(i){l(i.message),T(!1)}},children:"Switch profile / sign out"}),t.owner&&e("form",{className:K.form,onSubmit:async i=>{i.preventDefault(),T(!0),l("");try{await Q("/api/profiles/create",{method:"POST",body:JSON.stringify({name:a,password:v})}),g(""),m(""),await c.invalidateQueries({queryKey:["profiles"]}),l("Profile created. Sign out to switch to it.")}catch(R){l(R.message)}finally{T(!1)}},children:[e("h3",{children:"Add another profile"}),e("p",{children:"Protect your owner profile first. New profiles start empty and do not inherit your accounts. A profile without a password is accessible to anyone who passes the LAN lock."}),e("label",{className:K.field,children:["Name",e("input",{required:!0,maxLength:60,value:a,onChange:i=>g(i.currentTarget.value)})]}),e("label",{className:K.field,children:["Password (optional)",e("input",{type:"password",autoComplete:"new-password",minLength:8,maxLength:256,value:v,onChange:i=>m(i.currentTarget.value)})]}),e(C,{type:"submit",disabled:f||!t.protected,children:"Create profile"})]}),t.owner&&s?.profiles.some(i=>!i.owner)&&e(le,{children:[e("h3",{children:"Other profiles"}),e("ul",{className:K.profileList,children:s.profiles.filter(i=>!i.owner).map(i=>e("li",{children:[e("span",{className:K.smallAvatar,children:e(Ce,{image:i.avatar??i.cloudAvatar,name:i.name})}),e("span",{className:K.profileName,children:i.name}),e(C,{variant:"secondary",size:"sm",disabled:f,onClick:()=>{l(""),A(""),w(i)},children:"Reset password"}),e(C,{variant:"danger",size:"sm",disabled:f,onClick:()=>{l(""),G(i)},children:"Delete"})]},i.id))})]}),e(E,{isOpen:!!P,onClose:f?void 0:()=>w(null),title:"Reset password",width:"sm",footer:e(le,{children:[e(C,{variant:"secondary",disabled:f,onClick:()=>w(null),children:"Cancel"}),e(C,{loading:f,onClick:async()=>{if(P){T(!0),l("");try{await Q("/api/profiles/reset-password",{method:"POST",body:JSON.stringify({id:P.id,password:L})}),await c.invalidateQueries({queryKey:["profiles"]}),w(null),A(""),l("Password updated. The profile has been signed out.")}catch(i){l(i.message)}finally{T(!1)}}},children:"Save password"})]}),children:[e("p",{children:["Set a new password for ",e("strong",{children:P?.name}),". They will be signed out and must use the new password next time."]}),e("label",{className:K.field,children:["New password",e("input",{type:"password",autoComplete:"new-password",minLength:8,maxLength:256,placeholder:"Leave empty to remove their password",value:L,onChange:i=>A(i.currentTarget.value)})]})]}),e(E,{isOpen:!!I,onClose:f?void 0:()=>G(null),title:"Delete profile?",width:"sm",footer:e(le,{children:[e(C,{variant:"secondary",disabled:f,onClick:()=>G(null),children:"Cancel"}),e(C,{variant:"danger",loading:f,onClick:async()=>{if(I){T(!0);try{await Q("/api/profiles/delete",{method:"POST",body:JSON.stringify({id:I.id,confirm:!0})}),await c.invalidateQueries({queryKey:["profiles"]}),G(null),l("Profile deleted. Local files will be removed when Dango restarts.")}catch(i){l(i.message),G(null)}finally{T(!1)}}},children:"Delete profile"})]}),children:[e("p",{children:["Delete ",e("strong",{children:I?.name}),"? This signs them out immediately. Their local libraries, settings and connections will be removed when Dango next restarts."]}),e("p",{children:"Cloud backups and tracker lists will stay intact. Export any library you want to keep before deleting."})]}),x&&e("p",{role:"status",children:x})]}):null}const ue={"title-preference-container":"_title-preference-container_sdqgs_1","toggle-button":"_toggle-button_sdqgs_21","toggle-label":"_toggle-label_sdqgs_51"},he=["name","nativeName","englishName"],ge={name:"Default (Romaji)",nativeName:"Native",englishName:"English"},st=()=>{const{titlePreference:t,setTitlePreference:s,loading:c}=Ee(),p=Te(),[d,y]=r(ge[t]),[S,h]=r(!1),o=X(null);z(()=>{c||y(ge[t])},[t,c]);const a=async()=>{if(S)return;h(!0);const v=(he.indexOf(t)+1)%he.length,m=he[v],x=ge[m];o.current&&(o.current.style.transform="translateX(-100%)",o.current.style.opacity="0"),setTimeout(async()=>{y(x),s(m),o.current&&(o.current.style.transition="none",o.current.style.transform="translateX(100%)",o.current.style.opacity="0",o.current.offsetWidth,o.current.style.transition="transform 0.3s ease-out, opacity 0.3s ease-out",o.current.style.transform="translateX(0)",o.current.style.opacity="1");try{await p.mutateAsync({key:"titlePreference",value:m})}catch(l){console.error("Error saving title preference:",l)}finally{h(!1)}},300)};return c?e("p",{children:"Loading title preference..."}):e("div",{className:ue["title-preference-container"],children:[e("h4",{children:"Anime Title Display Preference"}),e("button",{onClick:a,className:ue["toggle-button"],disabled:S,children:e("span",{ref:o,className:ue["toggle-label"],children:d})})]})},it="_settingsHeader_gfwoa_1",ot="_pageTitle_gfwoa_6",lt="_pageSubtitle_gfwoa_14",ct="_settingsLayout_gfwoa_20",dt="_sidebar_gfwoa_27",ut="_sidebarIndicator_gfwoa_35",ht="_sidebarItem_gfwoa_50",gt="_active_gfwoa_72",mt="_mainContent_gfwoa_80",pt="_tabContent_gfwoa_85",ft="_settingItem_gfwoa_103",yt="_shortcutContainer_gfwoa_108",vt="_shortcutGroup_gfwoa_115",wt="_shortcutGroupTitle_gfwoa_121",bt="_shortcutGrid_gfwoa_130",Ct="_shortcutCard_gfwoa_136",kt="_controls_gfwoa_170",St="_status_gfwoa_176",u={settingsHeader:it,pageTitle:ot,pageSubtitle:lt,settingsLayout:ct,sidebar:dt,sidebarIndicator:ut,sidebarItem:ht,active:gt,mainContent:mt,tabContent:pt,settingItem:ft,shortcutContainer:yt,shortcutGroup:vt,shortcutGroupTitle:wt,shortcutGrid:bt,shortcutCard:Ct,controls:kt,status:St},Nt="_title_tm30b_11",_t="_signIn_tm30b_18",Tt="_userInfo_tm30b_25",Pt="_warning_tm30b_47",It="_formGroup_tm30b_54",Lt="_label_tm30b_58",xt="_inputWrapper_tm30b_68",Rt="_input_tm30b_68",Dt="_select_tm30b_92",Ot="_actions_tm30b_109",At="_hr_tm30b_117",b={title:Nt,signIn:_t,userInfo:Tt,warning:Pt,formGroup:It,label:Lt,inputWrapper:xt,input:Rt,select:Dt,actions:Ot,hr:At},Mt=()=>{const t=ee(),[s,c]=r(!0),[p,d]=r(!1),[y,S]=r(!1),[h,o]=r(null),[a,g]=r({status:"idle"}),[v,m]=r(!1),[x,l]=r(""),[f,T]=r(!1),I=X(null),[G,P]=r({show:!1,message:"",type:"info"}),w=()=>{I.current&&(window.clearInterval(I.current),I.current=null)},L=pe(N=>{S(N.authenticated),o(N.user||N.device.user||null),g(N.device),m(!!N.hasCustomClientId)},[]),A=pe(async()=>{const N=await k.auth.githubStatus.query();L(N)},[L]),M=async()=>{try{const N=await k.auth.githubPoll.query();g(N),N.status==="success"?(w(),await t.invalidateQueries({queryKey:Z.queryKey}),await A(),P({show:!0,message:"GitHub authentication complete. Sync has been initialized.",type:"success"})):N.status==="error"&&(w(),P({show:!0,message:N.error||"GitHub authentication failed.",type:"error"}))}catch{w(),P({show:!0,message:"Failed to poll GitHub authentication status.",type:"error"})}},i=(N=5)=>{w(),I.current=window.setInterval(M,Math.max(N,5)*1e3)};z(()=>(A().catch(()=>{P({show:!0,message:"Failed to load GitHub sync status.",type:"error"})}).finally(()=>c(!1)),w),[A]);const R=async()=>{d(!0);try{const N=await k.auth.githubStart.mutate();g(N),i(N.verification?.interval)}catch(N){P({show:!0,message:N instanceof Error?N.message:"Failed to start GitHub authentication.",type:"error"})}finally{d(!1)}},D=async()=>{try{await k.auth.githubLogout.mutate(),await t.invalidateQueries({queryKey:Z.queryKey}),S(!1),o(null),g({status:"idle"}),P({show:!0,message:"Signed out of GitHub sync.",type:"success"})}catch{P({show:!0,message:"Failed to sign out of GitHub.",type:"error"})}},W=async()=>{T(!0);try{await k.auth.saveGithubAuth.mutate({clientId:x}),l(""),await A(),P({show:!0,message:"Custom GitHub auth saved.",type:"success"})}catch{P({show:!0,message:"Failed to save override.",type:"error"})}finally{T(!1)}},te=async()=>{T(!0);try{await k.auth.saveGithubAuth.mutate({clientId:""}),l(""),await A(),P({show:!0,message:"Custom auth cleared. Using dango defaults.",type:"success"})}catch{P({show:!0,message:"Failed to clear override.",type:"error"})}finally{T(!1)}};return s?e("div",{style:{color:"var(--text-secondary)",padding:"1.5rem"},children:"Loading..."}):e("div",{className:_.sectionCard,children:[e("h3",{className:b.title,children:"GitHub Cloud Sync"}),e("p",{className:b.signIn,children:"Sync local data through a private GitHub repository named dango-sync-data."}),y&&h?e("div",{className:b.userInfo,children:[e("p",{children:["Signed in as: ",e("strong",{children:h.name||h.login})]}),e(C,{variant:"danger",onClick:D,children:"Sign Out"})]}):e("div",{className:b.signIn,children:e(C,{onClick:R,disabled:p||a.status==="pending",children:p||a.status==="pending"?"Waiting for GitHub...":"Sign in with GitHub"})}),a.status==="pending"&&a.verification&&e(le,{children:[e("hr",{className:b.hr}),e("div",{className:b.formGroup,children:[e("label",{className:b.label,children:"Verification URL"}),e("div",{className:b.inputWrapper,children:[e("input",{className:b.input,value:a.verification.verification_uri,readOnly:!0}),e(C,{onClick:()=>{const N=a.verification?.verification_uri;N&&/^https?:\/\//i.test(N)&&window.open(N,"_blank","noopener,noreferrer")},children:"Open"})]})]}),e("div",{className:b.formGroup,children:[e("label",{className:b.label,children:"Device Code"}),e("input",{className:b.input,value:a.verification.user_code,readOnly:!0})]})]}),a.status==="error"&&e("p",{className:b.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 ",v?"(override active)":""]}),e("div",{className:b.formGroup,style:{marginTop:"0.75rem"},children:[e("label",{className:b.label,children:"Client ID (optional)"}),e("input",{className:b.input,value:x,onChange:N=>l(N.currentTarget.value),placeholder:"Your GitHub OAuth app ID"})]}),e("div",{className:b.actions,children:[e(C,{onClick:W,disabled:f,children:"Save override"}),e(C,{variant:"secondary",onClick:te,disabled:f,children:"Use dango defaults"})]})]}),e(E,{isOpen:G.show,onClose:()=>P(N=>({...N,show:!1})),width:"sm",children:[e(E.Body,{children:e("p",{children:G.message})}),e(E.Actions,{children:e(C,{onClick:()=>P(N=>({...N,show:!1})),children:"OK"})})]})]})},Gt=()=>{const[t,s]=r(!0),[c,p]=r(null),[d,y]=r(!1),[S,h]=r(!1),[o,a]=r(""),[g,v]=r(""),[m,x]=r(""),[l,f]=r(!1),[T,I]=r({show:!1,message:"",type:"info"}),G=async()=>{try{const R=await k.auth.user.query();p(R?.email?R:null)}catch{p(null)}},P=async()=>{try{const[i,R]=await Promise.all([k.auth.configStatus.query(),k.auth.googleAuth.query()]);y(!!i.hasConfig),h(!!(R.hasCustomWorkerUrl||R.hasCustomClientId||R.hasClientSecret))}catch(i){console.error("Failed to fetch config status",i)}};z(()=>{(async()=>{s(!0),await Promise.all([G(),P()]);try{new URLSearchParams(window.location.search).get("google_auth")==="success"&&(await G(),window.history.replaceState(null,"",window.location.pathname))}catch{}s(!1)})();const R=D=>{D.origin===window.location.origin&&typeof D.data=="object"&&D.data!==null&&D.data.type==="GOOGLE_AUTH_SUCCESS"&&(p(D.data.user),window.location.reload())};return window.addEventListener("message",R),()=>window.removeEventListener("message",R)},[]);const w=async()=>{try{const i=await k.auth.googleLogin.mutate();if(i.authenticated){window.location.reload();return}if(i.url){if(typeof window.DangoBridge<"u"){window.location.href=i.url;return}const D=600,W=700,te=window.innerWidth/2-D/2,N=window.innerHeight/2-W/2;window.open(i.url,"GoogleAuth",`width=${D},height=${W},top=${N},left=${te}`)}else throw new Error("Auth URL not available")}catch{I({show:!0,message:"Authentication failed. Ensure server is configured correctly.",type:"error"})}},L=async()=>{try{await k.auth.logout.mutate(),p(null),I({show:!0,message:"Successfully signed out.",type:"success"}),window.location.reload()}catch(i){console.error("Sign out failed",i),I({show:!0,message:"Failed to sign out.",type:"error"})}},A=async()=>{f(!0);try{await k.auth.saveGoogleAuth.mutate({workerUrl:o,clientId:g,clientSecret:m}),a(""),v(""),x(""),await P(),I({show:!0,message:"Custom auth saved. Restart may be required.",type:"success"})}catch{I({show:!0,message:"Failed to save override.",type:"error"})}finally{f(!1)}},M=async()=>{f(!0);try{await k.auth.saveGoogleAuth.mutate({workerUrl:"",clientId:"",clientSecret:""}),a(""),v(""),x(""),await P(),I({show:!0,message:"Custom auth cleared. Using dango defaults.",type:"success"})}catch{I({show:!0,message:"Failed to clear override.",type:"error"})}finally{f(!1)}};return t?e("div",{style:{color:"var(--text-secondary)",padding:"1.5rem"},children:"Loading..."}):e("div",{className:_.sectionCard,children:[e("h3",{className:b.title,children:"Google Drive Sync"}),c?e("div",{className:b.userInfo,children:[e("p",{children:["Signed in as: ",e("strong",{children:c.name})," (",c.email,")"]}),e(C,{variant:"danger",onClick:L,children:"Sign Out"})]}):e("div",{className:b.signIn,children:[e("p",{children:"Sign in with your Google account to enable synchronization features."}),e(C,{onClick:w,disabled:!d,children:"Sign in with Google"}),!d&&e("p",{className:b.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 ",S?"(override active)":""]}),e("div",{className:b.formGroup,style:{marginTop:"0.75rem"},children:[e("label",{className:b.label,children:"Worker URL (optional)"}),e("input",{className:b.input,value:o,onChange:i=>a(i.currentTarget.value),placeholder:"https://your-worker.workers.dev"})]}),e("div",{className:b.formGroup,children:[e("label",{className:b.label,children:"Client ID (optional)"}),e("input",{className:b.input,value:g,onChange:i=>v(i.currentTarget.value),placeholder:"Your Google OAuth client ID"})]}),e("div",{className:b.formGroup,children:[e("label",{className:b.label,children:"Client Secret (optional)"}),e("input",{type:"password",className:b.input,value:m,onChange:i=>x(i.currentTarget.value),placeholder:"Your Google OAuth secret"})]}),e("div",{className:b.actions,children:[e(C,{onClick:A,disabled:l,children:"Save override"}),e(C,{variant:"secondary",onClick:M,disabled:l,children:"Use dango defaults"})]})]}),e(E,{isOpen:T.show,onClose:()=>I(i=>({...i,show:!1})),width:"sm",children:[e(E.Body,{children:e("p",{children:T.message})}),e(E.Actions,{children:e(C,{onClick:()=>I(i=>({...i,show:!1})),children:"OK"})})]})]})},qt="_settingItem_3qq0n_1",zt="_modalOverlay_3qq0n_6",Kt="_modal_3qq0n_6",Ut="_modalActions_3qq0n_41",Et="_modalSecondary_3qq0n_47",Ft="_modalPrimary_3qq0n_57",B={settingItem:qt,modalOverlay:zt,modal:Kt,modalActions:Ut,modalSecondary:Et,modalPrimary:Ft},$t={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"]]}},Wt=(t,s)=>{if(t==null)return s;const c=String(t);return c==="true"||c==="1"?!0:c==="false"||c==="0"?!1:s},Ne=(t,s,c)=>{const[p,d]=r(s),[y,S]=r(!1),h=ee();return z(()=>{(async()=>{try{const g=await k.settings.getByKey.query({key:t});d(Wt(g.value,s))}catch(g){console.error("Failed to fetch setting",g)}})()},[t,s]),{value:p,setValue:d,isUpdating:y,toggle:async()=>{if(y)return;S(!0);const a=!p;d(a);try{await k.settings.set.mutate({key:t,value:a});for(const g of c)h.invalidateQueries({queryKey:g})}catch(g){console.error("Error saving setting:",g),d(!a)}finally{S(!1)}}}},Ht=()=>{const{contentType:t}=Fe(),s=$t[t],[c,p]=r(!1),[d,y]=r(!0),[S,h]=r(!1),o=Ne(s.ignoreKey,!0,s.invalidateKeys),a=Ne(s.listOnlyKey,!1,s.invalidateKeys),[g,v]=r(null),[m,x]=r(!1),l=ee(),f=$e();z(()=>{y(!0),(async()=>{try{const L=await k.settings.getByKey.query({key:s.skipKey});String(L.value)==="true"||String(L.value)==="1"?p(!0):p(!1)}catch(L){console.error("Failed to fetch setting",L)}finally{y(!1)}})()},[s.skipKey]);const T=async()=>{if(S)return;h(!0);const w=!c;p(w);try{await k.settings.set.mutate({key:s.skipKey,value:w})}catch(L){console.error("Error saving setting:",L),p(!w)}finally{h(!1)}},I=async()=>{if(!o.isUpdating){if(o.value)try{let w;if(t==="anime"?w=(await k.continueWatching.adultCount.query()).count:t==="manga"?w=(await k.mangaProgress.adultCount.query()).count:t==="asmr"?w=(await k.asmrProgress.adultCount.query()).count:w=(await k.tvProgress.adultCount.query()).count,typeof w=="number"&&w>0){v(w);return}}catch(w){console.error("Failed to fetch adult count",w)}o.toggle()}},G=()=>{v(null),o.toggle()},P=async()=>{if(!m){x(!0);try{let w;t==="anime"?w=(await k.continueWatching.purgeAdult.mutate()).removed:t==="manga"?w=(await k.mangaProgress.purgeAdult.mutate()).removed:t==="asmr"?w=(await k.asmrProgress.purgeAdult.mutate()).removed:w=(await k.tvProgress.purgeAdult.mutate()).removed,ke.success(s.purgeDoneText(w??0));for(const L of s.invalidateKeys)l.invalidateQueries({queryKey:L});t==="anime"&&l.invalidateQueries(f.continueWatching.pathFilter()),t==="manga"&&l.invalidateQueries(f.mangaProgress.pathFilter()),t==="asmr"&&l.invalidateQueries(f.asmrProgress.pathFilter()),t==="tv"&&l.invalidateQueries(f.tvProgress.pathFilter())}catch(w){console.error("Failed to purge adult entries",w),ke.error("Failed to remove adult entries")}finally{x(!1),v(null)}o.toggle()}};return d?e("div",{children:"Loading settings..."}):e("div",{className:_.sectionCard,children:[e("h3",{children:s.heading}),e("p",{children:s.blurb}),e("div",{className:B.settingItem,children:e("div",{className:_.settingRow,children:[e("label",{htmlFor:"skip-confirmation-toggle",children:s.skipLabel}),e(F,{isChecked:c,onChange:T,id:"skip-confirmation-toggle",disabled:S})]})}),e("div",{className:B.settingItem,children:e("div",{className:_.settingRow,children:[e("label",{htmlFor:"ignore-adult-toggle",children:s.ignoreLabel}),e(F,{isChecked:o.value,onChange:I,id:"ignore-adult-toggle",disabled:o.isUpdating})]})}),e("div",{className:B.settingItem,children:e("div",{className:_.settingRow,children:[e("label",{htmlFor:"cw-watchlist-only-toggle",children:s.listOnlyLabel}),e(F,{isChecked:a.value,onChange:a.toggle,id:"cw-watchlist-only-toggle",disabled:a.isUpdating})]})}),g!==null&&e("div",{className:B.modalOverlay,onClick:()=>v(null),children:e("div",{className:B.modal,onClick:w=>w.stopPropagation(),children:[e("h4",{children:"Show adult entries?"}),e("p",{children:[g," adult ",g===1?"entry":"entries"," not in your"," ",s.listNoun," ",g===1?"is":"are"," currently hidden from"," ",s.continueNoun,". You can purge ",g===1?"it":"them"," from the database instead of showing ",g===1?"it":"them","."]}),e("div",{className:B.modalActions,children:[e("button",{type:"button",className:B.modalSecondary,onClick:G,disabled:m,children:"Show them"}),e("button",{type:"button",className:B.modalPrimary,onClick:P,disabled:m,children:m?"Purging...":`Purge ${g}`})]})]})})]})},Bt="_statsGrid_o4nf0_1",jt="_statCard_o4nf0_8",Qt="_statLabel_o4nf0_18",Vt="_statValue_o4nf0_26",Yt="_statMeta_o4nf0_32",Jt="_statusBanner_o4nf0_38",Xt="_statusSuccess_o4nf0_49",Zt="_statusUpdating_o4nf0_55",ea="_statusError_o4nf0_61",ta="_sha_o4nf0_67",aa="_settingItem_o4nf0_74",na="_settingTitle_o4nf0_79",ra="_settingSubtitle_o4nf0_85",sa="_actionsRow_o4nf0_92",O={statsGrid:Bt,statCard:jt,statLabel:Qt,statValue:Vt,statMeta:Yt,statusBanner:Jt,statusSuccess:Xt,statusUpdating:Zt,statusError:ea,sha:ta,settingItem:aa,settingTitle:na,settingSubtitle:ra,actionsRow:sa},ia=()=>{const[t,s]=r(null),[c,p]=r(!0),[d,y]=r(!1),[S,h]=r(!1),o=X(null),a=async()=>{try{const l=await k.settings.offlineDbInfo.query();return s(l),l}catch(l){console.error("Failed to fetch offline DB info:",l)}finally{p(!1)}return null};z(()=>(a(),()=>{o.current&&window.clearInterval(o.current)}),[]),z(()=>{t?.isRefreshing?o.current||(o.current=window.setInterval(async()=>{const l=await a();l&&!l.isRefreshing&&o.current&&(window.clearInterval(o.current),o.current=null)},2e3)):o.current&&(window.clearInterval(o.current),o.current=null)},[t?.isRefreshing]);const g=async()=>{if(!t||d)return;const l=!t.autoUpdateEnabled;y(!0),s({...t,autoUpdateEnabled:l});try{await k.settings.setOfflineDbAutoUpdate.mutate({enabled:l})}catch(f){console.error("Failed to update auto update setting:",f),s({...t,autoUpdateEnabled:!l})}finally{y(!1)}},v=async()=>{if(!(t?.isRefreshing||S)){h(!0);try{await k.settings.triggerOfflineDbUpdate.mutate(),s(l=>l?{...l,isRefreshing:!0,lastStatus:"updating",lastMessage:"Downloading database..."}:null)}catch(l){console.error("Failed to trigger offline DB update:",l)}finally{h(!1)}}},m=l=>{if(!l)return"Never";try{return new Date(l).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch{return l}},x=t?.isRefreshing||S;return e("div",{className:_.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:O.statsGrid,children:[e("div",{className:O.statCard,children:[e("span",{className:O.statLabel,children:"MAL Mapped"}),e("span",{className:O.statValue,children:c?"-":(t?.totalMalMapped??0).toLocaleString()})]}),e("div",{className:O.statCard,children:[e("span",{className:O.statLabel,children:"Release"}),e("span",{className:O.statMeta,children:c?"-":t?.releaseTag??"Never"})]}),e("div",{className:O.statCard,children:[e("span",{className:O.statLabel,children:"Last Checked"}),e("span",{className:O.statMeta,children:c?"-":m(t?.lastCheckedAt??null)})]}),e("div",{className:O.statCard,children:[e("span",{className:O.statLabel,children:"Last Updated"}),e("span",{className:O.statMeta,children:c?"-":m(t?.lastUpdatedAt??null)})]})]}),t?.lastMessage&&e("div",{className:`${O.statusBanner} ${t.lastStatus==="failed"?O.statusError:t.lastStatus==="updating"?O.statusUpdating:O.statusSuccess}`,children:[e("span",{children:t.lastMessage}),t.contentSha256&&e("span",{className:O.sha,children:["sha:",t.contentSha256.slice(0,12)]})]}),e("div",{className:O.settingItem,children:e("div",{className:_.settingRow,children:[e("div",{children:[e("span",{className:O.settingTitle,children:"Weekly Automatic Updates (Saturdays)"}),e("div",{className:O.settingSubtitle,children:"Download and index new database releases in the background. Catches up on startup if the server was offline."})]}),e(F,{id:"offline-db-auto-update-toggle",isChecked:t?t.autoUpdateEnabled:!0,onChange:g,disabled:c||d})]})}),e("div",{className:O.actionsRow,children:e(C,{onClick:v,disabled:c||x,children:x?"Updating Database...":"Update Offline Database Now"})})]})},oa="_status_1wbo0_1",la="_warningText_1wbo0_7",ca="_ackLabel_1wbo0_11",me={status:oa,warningText:la,ackLabel:ca},da=()=>{const t=ee(),[s,c]=r(!1),[p,d]=r(!1),[y,S]=r(!1),[h,o]=r(""),a=()=>{d(!1),o(""),c(!0)},g=()=>{y||(c(!1),d(!1))},v=async()=>{if(!(!p||y)){S(!0),o("");try{const m=await J("/api/database/clear",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({confirm:!0})}),x=await m.json();if(!m.ok)throw new Error(x.error||"Failed to clear database");const l=x.deleted,f=x.deletedManga,T=x.deletedTv,I=x.deletedAsmr,G=Object.values(l).reduce((A,M)=>A+(M||0),0)+Object.values(f??{}).reduce((A,M)=>A+(M||0),0)+Object.values(T??{}).reduce((A,M)=>A+(M||0),0)+Object.values(I??{}).reduce((A,M)=>A+(M||0),0),P=(f?.manga_library??0)+(f?.manga_progress??0),w=(T?.tv_library??0)+(T?.tv_progress??0),L=(I?.asmr_library??0)+(I?.asmr_progress??0);o(`Library cleared - ${l.watchlist??0} watchlist entries, ${P} manga rows, ${w} TV rows, ${L} ASMR rows and ${G} total rows removed.`),t.invalidateQueries({queryKey:[H.watchlist]}),t.invalidateQueries({queryKey:[H.continueWatching]}),t.invalidateQueries({queryKey:[H.mangaLibrary]}),t.invalidateQueries({queryKey:[H.mangaContinueReading]}),t.invalidateQueries({queryKey:[H.tvLibrary]}),t.invalidateQueries({queryKey:[H.tvContinueWatching]}),t.invalidateQueries({queryKey:[H.asmrLibrary]}),t.invalidateQueries({queryKey:[H.asmrContinueListening]}),c(!1)}catch(m){o(m.message)}finally{S(!1),d(!1)}}};return e("div",{className:`${_.sectionCard} ${_.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(C,{variant:"danger",onClick:a,children:"Clear Library Data"}),h&&e("p",{className:me.status,children:h}),e(E,{isOpen:s,onClose:g,title:"Clear library data?",width:"sm",children:[e(E.Body,{children:[e("p",{className:me.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:me.ackLabel,children:[e("input",{type:"checkbox",checked:p,onChange:m=>d(m.currentTarget.checked),disabled:y}),e("span",{children:"I understand this permanently deletes my library"})]})]}),e(E.Actions,{children:[e(C,{variant:"secondary",onClick:g,disabled:y,children:"Cancel"}),e(C,{variant:"danger",onClick:v,disabled:!p||y,children:y?"Clearing...":"Yes, delete everything"})]})]})]})},ua=()=>{const[t,s]=r(""),[c,p]=r([]),[d,y]=r(null),[S,h]=r(!0),[o,a]=r({show:!1,message:"",type:"info"}),g=async()=>{try{h(!0);const m=await k.auth.rcloneSettings.query();s(m.remote||""),p(m.availableRemotes||[]),y(m.activeRemote||null)}catch(m){console.error("Failed to fetch Rclone settings",m)}finally{h(!1)}};z(()=>{g()},[]);const v=async()=>{try{await k.auth.saveRclone.mutate({remote:t}),a({show:!0,message:"Rclone configuration saved successfully. You must restart the server for these changes to take effect.",type:"success"}),g()}catch{a({show:!0,message:"Failed to save Rclone configuration.",type:"error"})}};return S?e("div",{style:{color:"var(--text-secondary)",padding:"1.5rem"},children:"Loading..."}):e("div",{className:_.sectionCard,children:[e("h3",{className:b.title,children:"Rclone Cloud Sync"}),e("p",{className:b.signIn,children:"Configure which Rclone remote to use for database synchronization."}),d?e("div",{className:b.userInfo,children:e("p",{children:["Current Active Remote: ",e("strong",{children:d})]})}):e("p",{className:b.warning,style:{marginBottom:"1.5rem"},children:"Rclone sync is not currently active. Ensure rclone is installed and a remote is configured."}),e("div",{className:b.formGroup,children:[e("label",{className:b.label,children:"Remote Name"}),e("div",{className:b.inputWrapper,children:e("select",{className:b.select,value:t,onChange:m=>s(m.currentTarget.value),children:[e("option",{value:"",children:"(Disabled / None)"}),c.map(m=>e("option",{value:m,children:m},m)),t&&!c.includes(t)&&e("option",{value:t,children:[t," (Manual)"]})]})}),e("p",{className:b.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:b.actions,children:e(C,{onClick:v,children:"Save Rclone Settings"})}),e(E,{isOpen:o.show,onClose:()=>a(m=>({...m,show:!1})),width:"sm",children:[e(E.Body,{children:e("p",{children:o.message})}),e(E.Actions,{children:e(C,{onClick:()=>a(m=>({...m,show:!1})),children:"OK"})})]})]})},ha=()=>{const t=ee(),[s,c]=r(null),[p,d]=r(!0),y=async()=>{try{const a=await k.auth.syncSettings.query();c(a)}catch(a){console.error("Failed to fetch sync settings",a)}finally{d(!1)}};z(()=>{y()},[]);const S=async a=>{const g=a.currentTarget.value;try{const v=await k.auth.saveSyncProvider.mutate({provider:g});c(m=>m?{...m,activeProvider:v.activeProvider}:null),await y(),await t.invalidateQueries({queryKey:Z.queryKey}),Se.success(`Sync provider updated to ${g==="default"?"Default Order":g}`)}catch{Se.error("Failed to update sync provider")}};if(p||!s)return null;const h=[{value:"default",label:"Default (Priority Based)"}];s.authenticatedProviders.github&&h.push({value:"github",label:"GitHub"}),s.authenticatedProviders.google&&h.push({value:"google",label:"Google Drive"}),s.authenticatedProviders.rclone&&h.push({value:"rclone",label:"Rclone"}),h.push({value:"none",label:"None (Local Only)"});const o=a=>a==="none"?"Local Only (No Sync)":a==="google"?"Google Drive":a==="github"?"GitHub":a==="rclone"?"Rclone":a;return e("div",{className:_.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:o(s.actualActiveProvider)})]}),e("div",{className:_.settingRow,children:[e("label",{htmlFor:"sync-provider-select",children:"Selected Preference"}),e("select",{id:"sync-provider-select",value:s.activeProvider,onChange:S,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:h.map(a=>e("option",{value:a.value,children:a.label},a.value))})]})]})};function ga(){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 ma=()=>{const t=qe(ga,[]);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:p=>{p.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(j,{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(C,{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.`})]})},pa="_settingItem_68mz3_1",fa="_field_68mz3_6",ya="_input_68mz3_19",va="_actions_68mz3_39",wa="_status_68mz3_45",q={settingItem:pa,field:fa,input:ya,actions:va,status:wa},ba=()=>{const[t,s]=r(!1),[c,p]=r(""),[d,y]=r(""),[S,h]=r(!0),[o,a]=r(!1),[g,v]=r("");z(()=>{(async()=>{try{const I=await(await J("/api/auth/app-status")).json();s(I.hasPassword)}catch{console.error("Failed to fetch LAN auth status")}finally{h(!1)}})()},[]);const m=async()=>{if(v(""),c!==d){v("Passwords do not match");return}if(c.length<4){v("Password must be at least 4 characters");return}a(!0);try{const f=await J("/api/auth/app-setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:c})}),T=await f.json();if(!f.ok){v(T.error||"Failed to update password");return}s(T.hasPassword),p(""),y(""),v(T.hasPassword?"Password set successfully":"Password removed")}catch{v("Network error")}finally{a(!1)}},x=async()=>{a(!0);try{const f=await J("/api/auth/app-setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:""})}),T=await f.json();if(!f.ok){v(T.error||"Failed to remove password");return}s(!1),p(""),y(""),v("Password removed")}catch{v("Network error")}finally{a(!1)}},l=async()=>{a(!0);try{await J("/api/auth/app-logout",{method:"POST"}),v("Logged out"),window.location.reload()}catch{v("Logout failed")}finally{a(!1)}};return S?e("div",{className:_.sectionCard,children:e("p",{children:"Loading..."})}):e("div",{className:_.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:q.settingItem,children:[e("div",{className:q.field,children:[e("label",{htmlFor:"lan-password",children:"New Password"}),e("input",{id:"lan-password",type:"password",value:c,onChange:f=>p(f.currentTarget.value),placeholder:t?"Leave empty to keep current password":"Enter a password...",className:q.input})]}),e("div",{className:q.field,children:[e("label",{htmlFor:"lan-confirm-password",children:"Confirm Password"}),e("input",{id:"lan-confirm-password",type:"password",value:d,onChange:f=>y(f.currentTarget.value),placeholder:"Confirm password...",className:q.input})]}),e("div",{className:q.actions,children:[e(C,{variant:"primary",onClick:m,loading:o,disabled:o,children:t?"Update Password":"Set Password"}),t&&e(C,{variant:"danger",onClick:l,loading:o,disabled:o,children:"Logout"}),t&&e(C,{variant:"secondary",onClick:x,loading:o,disabled:o,children:"Remove Password"})]}),g&&e("p",{className:q.status,children:g})]})]})},Ca=()=>{const[t,s]=r(""),[c,p]=r(!0),[d,y]=r(!1),[S,h]=r("");z(()=>{Q("/api/auth/app-status").then(a=>s(String(a.port??3e3))).catch(()=>h("Failed to load current port")).finally(()=>p(!1))},[]);const o=async()=>{const a=Number(t);if(!Number.isInteger(a)||a<1||a>65535){h("Enter a port between 1 and 65535");return}y(!0),h("");try{await k.auth.setServerPort.mutate({port:a}),h(`Saved. Restart dango, then open http://localhost:${a} - this overrides the PORT environment variable.`)}catch(g){h(g.message)}finally{y(!1)}};return c?e("div",{className:_.sectionCard,children:e("p",{children:"Loading..."})}):e("div",{className:_.sectionCard,children:[e("h3",{children:"Server Port"}),e("p",{children:"Port the backend listens on. Takes effect after a restart. Google and AniList sign-in need the matching redirect URI registered with the provider."}),e("div",{className:q.settingItem,children:[e("div",{className:q.field,children:[e("label",{htmlFor:"server-port",children:"Port"}),e("input",{id:"server-port",type:"number",min:1,max:65535,value:t,onChange:a=>s(a.currentTarget.value),className:q.input})]}),e("div",{className:q.actions,children:e(C,{variant:"primary",onClick:o,loading:d,disabled:d,children:"Save Port"})}),S&&e("p",{className:q.status,children:S})]})]})},ka=()=>{const[t,s]=r(""),[c,p]=r(!0),[d,y]=r(!1),[S,h]=r("");z(()=>{k.auth.allowedOrigins.query().then(a=>s(a.origins.join(", "))).catch(()=>h("Failed to load allowed origins")).finally(()=>p(!1))},[]);const o=async()=>{y(!0),h("");try{const a=await k.auth.setAllowedOrigins.mutate({origins:t});s(a.origins.join(", ")),h("Saved.")}catch(a){h(a.message)}finally{y(!1)}};return c?e("div",{className:_.sectionCard,children:e("p",{children:"Loading..."})}):e("div",{className:_.sectionCard,children:[e("h3",{children:"Allowed Origins"}),e("p",{children:["Extra browser origins allowed to call the API, comma-separated. Include the scheme (e.g."," ",e("code",{children:"https://example.com"}),"). Same-origin access and reverse proxies that forward X-Forwarded-Host/X-Forwarded-Proto work automatically."]}),e("div",{className:q.settingItem,children:[e("div",{className:q.field,children:[e("label",{htmlFor:"allowed-origins",children:"Origins"}),e("input",{id:"allowed-origins",value:t,onChange:a=>s(a.currentTarget.value),className:q.input,placeholder:"https://example.com"})]}),e("div",{className:q.actions,children:e(C,{variant:"primary",onClick:o,loading:d,disabled:d,children:"Save Origins"})}),S&&e("p",{className:q.status,children:S})]})]})},Sa=()=>{const{theme:t,setTheme:s,loading:c}=We();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:He.map(p=>{const d=t===p.id;return e("button",{role:"radio","aria-checked":d,disabled:c,onClick:()=>s(p.id),style:{display:"flex",gap:"0.6rem",alignItems:"center",textAlign:"left",padding:"0.65rem 0.75rem",borderRadius:"10px",cursor:"pointer",background:d?"var(--accent-subtle)":"var(--bg-tertiary)",border:d?"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:p.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:p.label}),e("span",{style:{display:"block",fontSize:"0.75rem",color:"var(--text-secondary)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:p.blurb})]})]},p.id)})})]})};function Na({variant:t="info",children:s,className:c=""}){return e("div",{className:`alert alert-${t} ${c}`,children:s})}const _a=["profile","appearance","presence","server","sync","watchlist"],Ta={general:"profile",database:"sync"},_e=t=>t?_a.includes(t)?t:Ta[t]??null:null,Aa=()=>{const{data:t}=fe(Z),[s,c]=ze(),p=_e(s.get("tab")),[d,y]=r(p??"profile"),[S,h]=r(""),o=X(null),a=X(null),g=X(new Map),[v,m]=r({top:0,height:0,left:0,width:0}),{lowEndMode:x,setLowEndMode:l}=Be(),{hasConsent:f,grant:T,revoke:I}=je(),[G,P]=r(!1),[w,L]=r(Qe),[A,M]=r(Xe),[i,R]=r(!0),{data:D}=de("discordRPCEnabled"),W=Te(),[te,N]=r(!1),{data:ie}=de("frozenMode"),[Pe,ye]=r(!0),{data:ae}=de("discordRPCHideMature"),[ve,oe]=r(""),[ne,ce]=r(null);z(()=>{t?.owner&&k.discord.gatewayStatus.query().then(n=>{ce(n),n.masked&&n.masked!=="none"&&oe(n.masked)}).catch(()=>{})},[t?.owner]),z(()=>{D!==void 0&&R(D==="true"||D===!0||D===null)},[D]),z(()=>{ae!==void 0&&ye(ae==="true"||ae===!0||ae===null)},[ae]);const Ie=n=>{R(n),W.mutate({key:"discordRPCEnabled",value:String(n)})};z(()=>{ie!==void 0&&N(ie==="true"||ie===!0)},[ie]);const Le=n=>{N(n),W.mutate({key:"frozenMode",value:String(n)})},xe=n=>{ye(n),W.mutate({key:"discordRPCHideMature",value:String(n)})},Re=n=>{L(n),Ve.setItem(Ye,String(n)),window.dispatchEvent(new CustomEvent(Je))},De=n=>{M(n),Ze(n)};be.useEffect(()=>{document.title="Settings - dango"},[]),be.useEffect(()=>{const n=_e(s.get("tab"));n&&y(n)},[s]);const V=n=>{y(n),c(n==="profile"?{}:{tab:n})},re=pe(()=>{const n=g.current.get(d),U=a.current;if(n&&U){const Y=U.getBoundingClientRect(),$=n.getBoundingClientRect(),se=window.matchMedia("(max-width: 900px)").matches;m(se?{top:$.top-Y.top,height:$.height,left:$.left-Y.left,width:$.width}:{top:$.top-Y.top,height:$.height,left:0,width:0})}},[d]);Ke(()=>{re()},[d,re]),z(()=>{const n=()=>re();window.addEventListener("resize",n);let U=!1;return document.fonts?.ready&&document.fonts.ready.then(()=>{U||re()}),()=>{U=!0,window.removeEventListener("resize",n)}},[d,re]);const Oe=()=>{h("Exporting databases...");const n=window.DangoBridge;if(n?.downloadFile){n.downloadFile("/api/backup-db","dango-backup.json"),setTimeout(()=>{h("Databases exported successfully!")},1500);return}const U=document.createElement("a");U.href="/api/backup-db",U.download="dango-backup.json",document.body.appendChild(U),U.click(),U.remove(),setTimeout(()=>{h("Databases exported successfully!")},1500)},Ae=async n=>{const U=n.currentTarget.files?.[0];if(!U)return;h("Importing databases...");const Y=new FormData;Y.append("dbfile",U);try{const $=await J("/api/restore-db",{method:"POST",body:Y}),se=await $.json();if($.ok){const we=Array.isArray(se.restored)?se.restored.join(", "):null;h(we?`Databases imported successfully (${we})!`:"Database imported successfully!"),setTimeout(()=>window.location.reload(),2e3)}else h(`Import failed: ${se.error}`)}catch{h("Import failed: An unexpected error occurred.")}finally{n.currentTarget.value=""}},Me=()=>{o.current?.click()},Ge=()=>{switch(d){case"profile":return e("div",{className:u.tabContent,children:[e(rt,{}),e("div",{className:_.sectionCard,children:[e("h3",{children:"Mature Content"}),e("p",{children:"Allow mature content intended for adults 18 and older. Turning this off restores filtering and blur gates."}),e("div",{className:u.settingItem,style:{marginTop:"1.5rem"},children:e("div",{className:_.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:"Allow mature content intended for adults 18 and older. Turning this off restores filtering and blur gates."})]}),e(F,{isChecked:f,onChange:n=>{n.currentTarget.checked?P(!0):(I(),window.location.reload())},id:"mature-content-enabled"})]})})]})]});case"appearance":return e("div",{className:u.tabContent,children:[e("div",{className:_.sectionCard,children:[e("h3",{children:"Appearance & Preferences"}),e("p",{children:"Configure how titles are displayed and other general preferences."}),e("div",{className:u.settingItem,children:e(st,{})}),e("div",{className:u.settingItem,style:{marginTop:"1.5rem"},children:e(Sa,{})}),e("div",{className:u.settingItem,style:{marginTop:"1.5rem"},children:e("div",{className:_.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(F,{isChecked:x,onChange:n=>l(n.currentTarget.checked),id:"low-end-mode"})]})}),e("div",{className:u.settingItem,style:{marginTop:"1.5rem"},children:e("div",{className:_.settingRow,children:[e("div",{style:{minWidth:0},children:[e("h4",{style:{margin:0,fontSize:"1rem"},children:"Watched Episode Overlay"}),e("p",{style:{margin:"0.25rem 0 0",fontSize:"0.85rem",color:"var(--text-secondary)"},children:"Shows watched and completed episodes as an overlay on the player. Turn this off to use a popup instead."})]}),e(F,{isChecked:A,onChange:n=>De(n.currentTarget.checked),id:"watched-overlay-enabled"})]})}),e("div",{className:u.settingItem,style:{marginTop:"1.5rem"},children:e("div",{className:_.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(F,{isChecked:w,onChange:n=>Re(n.currentTarget.checked),id:"virtual-keyboard-enabled"})]})})]}),e("section",{className:_.sectionCard,children:[e("h3",{children:"Keyboard Shortcuts"}),e("p",{children:"Use S or Ctrl+K to focus search anywhere, or use player keys while watching."}),e("div",{className:u.shortcutContainer,children:[e("div",{className:u.shortcutGroup,children:[e("h4",{className:u.shortcutGroupTitle,children:"Search"}),e("div",{className:u.shortcutGrid,children:[e("div",{className:u.shortcutCard,children:[e("kbd",{children:"S"}),e("span",{children:"Focus search"})]}),e("div",{className:u.shortcutCard,children:[e("kbd",{children:"Ctrl + K / ⌘ + K"}),e("span",{children:"Focus search"})]})]})]}),e("div",{className:u.shortcutGroup,children:[e("h4",{className:u.shortcutGroupTitle,children:"Player"}),e("div",{className:u.shortcutGrid,children:[e("div",{className:u.shortcutCard,children:[e("kbd",{children:"Space / K"}),e("span",{children:"Play / pause"})]}),e("div",{className:u.shortcutCard,children:[e("kbd",{children:"J / L · ← / →"}),e("span",{children:"Seek back / fwd"})]}),e("div",{className:u.shortcutCard,children:[e("kbd",{children:"↑ / ↓"}),e("span",{children:"Adjust volume"})]}),e("div",{className:u.shortcutCard,children:[e("kbd",{children:"M / F"}),e("span",{children:"Mute / fullscreen"})]}),e("div",{className:u.shortcutCard,children:[e("kbd",{children:"N / P"}),e("span",{children:"Next / prev episode"})]}),e("div",{className:u.shortcutCard,children:[e("kbd",{children:"T"}),e("span",{children:"Theater mode"})]})]})]})]})]})]});case"presence":return e("div",{className:u.tabContent,children:e("div",{className:_.sectionCard,children:[e("h3",{children:"Discord Presence"}),e("p",{children:"Control what Dango shares on Discord."}),t?.owner&&e("div",{className:u.settingItem,style:{marginTop:"1.5rem"},children:e("div",{className:_.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(F,{isChecked:i,onChange:n=>Ie(n.currentTarget.checked),id:"discord-rpc-enabled"})]})}),t?.owner&&i&&e("div",{className:u.settingItem,style:{marginTop:"1rem"},children:e("div",{className:_.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(F,{isChecked:Pe,onChange:n=>xe(n.currentTarget.checked),id:"discord-hide-mature"})]})}),t?.owner&&e("div",{className:u.settingItem,style:{marginTop:"1.5rem",background:"var(--bg-tertiary)",padding:"1rem",borderRadius:"8px",border:"1px solid var(--border-color)"},children:[e("div",{className:_.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(Na,{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:ve,onChange:n=>oe(n.currentTarget.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(C,{variant:"primary",size:"sm",onClick:async()=>{try{const n=await k.discord.gatewaySave.mutate({token:ve});ce({hasToken:!0,masked:n.masked,enabled:!0}),oe(n.masked)}catch(n){alert(n instanceof Error?n.message:"Failed to save token")}},children:"Save"}),e(C,{variant:"secondary",size:"sm",onClick:async()=>{await k.discord.gatewayRemove.mutate().catch(()=>{}),oe(""),ce({hasToken:!1,masked:null,enabled:!1})},children:"Remove"})]}),ne&&e("p",{style:{marginTop:"0.5rem",fontSize:"0.8rem",color:ne.hasToken?"green":"var(--text-secondary)"},children:["Status:"," ",ne.hasToken?`Token saved (${ne.masked})`:"No token saved",ne.enabled?" - Gateway active":""]}),t?.owner&&e(ma,{})]})]})});case"server":return e("div",{className:u.tabContent,children:[t?.owner&&e(ba,{}),t?.owner&&e(Ca,{}),t?.owner&&e(ka,{}),e(da,{})]});case"sync":return e("div",{className:u.tabContent,children:[e(ha,{}),e(Mt,{}),e(Gt,{}),t?.owner&&e(ua,{}),e("div",{className:_.sectionCard,children:[e("h3",{children:"Frozen Mode"}),e("p",{children:"When on, nothing is saved or synced."}),e("div",{className:u.settingItem,style:{marginTop:"1.5rem"},children:e("div",{className:_.settingRow,children:[e("div",{style:{minWidth:0},children:[e("h4",{style:{margin:0,fontSize:"1rem"},children:"Frozen Mode"}),e("p",{style:{margin:"0.25rem 0 0",fontSize:"0.85rem",color:"var(--text-secondary)"},children:"When on, nothing is saved or synced: no watchlist, progress, resume, or settings changes, and no cloud sync (GitHub/Google/rclone) or tracker push. Useful for experimentation and private sessions."})]}),e(F,{isChecked:te,onChange:n=>Le(n.currentTarget.checked),id:"frozen-mode"})]})})]}),e("div",{className:_.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:u.controls,children:[e(C,{onClick:Oe,children:"Backup Database"}),e(C,{variant:"secondary",onClick:Me,children:"Restore Database"})]}),e("input",{type:"file",ref:o,onChange:Ae,style:{position:"absolute",width:1,height:1,opacity:0,overflow:"hidden"},accept:".json,.db,application/octet-stream"}),S&&e("p",{className:u.status,children:S})]}),t?.owner&&e(ia,{})]});case"watchlist":return e("div",{className:u.tabContent,children:e(Ht,{})});default:return null}};return e("div",{className:"page-container",children:[e("div",{className:u.settingsHeader,children:[e("h1",{className:u.pageTitle,children:"Settings"}),e("p",{className:u.pageSubtitle,children:"Manage your preferences and data synchronization"})]}),e("div",{className:u.settingsLayout,children:[e("aside",{className:u.sidebar,ref:a,children:[e("div",{className:u.sidebarIndicator,style:{top:v.top,height:v.height,left:v.left,...v.width?{width:v.width}:{}}}),e("button",{ref:n=>{n&&g.current.set("profile",n)},className:`${u.sidebarItem} ${d==="profile"?u.active:""}`,onClick:()=>V("profile"),children:[e(j,{name:"user-astronaut"})," ",e("span",{children:"Profile"})]}),e("button",{ref:n=>{n&&g.current.set("appearance",n)},className:`${u.sidebarItem} ${d==="appearance"?u.active:""}`,onClick:()=>V("appearance"),children:[e(j,{name:"image"})," ",e("span",{children:"Appearance"})]}),e("button",{ref:n=>{n&&g.current.set("presence",n)},className:`${u.sidebarItem} ${d==="presence"?u.active:""}`,onClick:()=>V("presence"),children:[e(j,{name:"discord"})," ",e("span",{children:"Presence"})]}),e("button",{ref:n=>{n&&g.current.set("server",n)},className:`${u.sidebarItem} ${d==="server"?u.active:""}`,onClick:()=>V("server"),children:[e(j,{name:"server"})," ",e("span",{children:"Server"})]}),e("button",{ref:n=>{n&&g.current.set("sync",n)},className:`${u.sidebarItem} ${d==="sync"?u.active:""}`,onClick:()=>V("sync"),children:[e(j,{name:"cloud"})," ",e("span",{children:"Sync & Data"})]}),e("button",{ref:n=>{n&&g.current.set("watchlist",n)},className:`${u.sidebarItem} ${d==="watchlist"?u.active:""}`,onClick:()=>V("watchlist"),children:[e(j,{name:"list"})," ",e("span",{children:"Lists"})]})]}),e("main",{className:u.mainContent,children:e("div",{className:u.tabContent,children:Ge()},d)})]}),e(et,{isOpen:G,onClose:()=>P(!1),onGrant:()=>{T(),P(!1)},scope:"section"})]})};export{Aa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as R,a as q,p as E,d as c,h as C,T,u as e,g as F}from"./vendor-core-DfaOB3Rn.js";import{I as a}from"./vendor-icons-C1Pj_eSX.js";import{aj as j,e as U,ak as H,t as J,B as w,a8 as K,i as I}from"./index-BHWOY-pi.js";import{c as Q,d as X}from"./useTvLibrary-D2tKj7cP.js";import"./vendor-query-BBT5_sHx.js";import"./libraryInvalidation-D8h84CFM.js";const Y="_container_198yg_1",Z="_heroSection_198yg_11",ee="_bannerContainer_198yg_17",ne="_banner_198yg_17",te="_bannerOverlay_198yg_37",se="_heroContent_198yg_49",ae="_posterContainer_198yg_62",oe="_poster_198yg_62",ie="_infoGlass_198yg_86",re="_title_198yg_100",le="_quickMeta_198yg_110",ce="_metaItem_198yg_118",de="_iconStar_198yg_126",_e="_iconTv_198yg_130",me="_iconType_198yg_134",he="_genres_198yg_139",ge="_genre_198yg_139",ve="_metaRow_198yg_156",pe="_metaValue_198yg_164",ue="_metaDivider_198yg_168",ye="_synopsisSection_198yg_173",ke="_sectionTitleSmall_198yg_179",be="_synopsis_198yg_173",Ne="_actions_198yg_196",Se="_watchBtn_198yg_202",fe="_watchlistBtn_198yg_226",Ce="_active_198yg_250",Te="_seasonPickerLabel_198yg_256",we="_seasonSelect_198yg_267",Ie="_detailsToggleBtn_198yg_286",Be="_expandedContent_198yg_304",De="_detailGrid_198yg_309",Me="_detailItem_198yg_315",Le="_imdbLink_198yg_333",Pe="_heroSkeleton_198yg_343",$e="_skeletonBanner_198yg_347",Ge="_skeletonContent_198yg_354",xe="_skeletonPoster_198yg_365",Oe="_skeletonInfo_198yg_373",Ae="_skeletonTitle_198yg_380",Ve="_skeletonMeta_198yg_388",We="_skeletonDesc_198yg_396",ze="_skeletonActions_198yg_404",Re="_errorState_198yg_413",qe="_matureOverlay_198yg_434",Ee="_matureContent_198yg_444",n={container:Y,heroSection:Z,bannerContainer:ee,banner:ne,bannerOverlay:te,heroContent:se,posterContainer:ae,poster:oe,infoGlass:ie,title:re,quickMeta:le,metaItem:ce,iconStar:de,iconTv:_e,iconType:me,genres:he,genre:ge,metaRow:ve,metaValue:pe,metaDivider:ue,synopsisSection:ye,sectionTitleSmall:ke,synopsis:be,actions:Ne,watchBtn:Se,watchlistBtn:fe,active:Ce,seasonPickerLabel:Te,seasonSelect:we,detailsToggleBtn:Ie,expandedContent:Be,detailGrid:De,detailItem:Me,imdbLink:Le,heroSkeleton:Pe,skeletonBanner:$e,skeletonContent:Ge,skeletonPoster:xe,skeletonInfo:Oe,skeletonTitle:Ae,skeletonMeta:Ve,skeletonDesc:We,skeletonActions:ze,errorState:Re,matureOverlay:qe,matureContent:Ee};function Qe(){const{id:o}=R(),d=q(),[B]=E(),i=j(B.get("type")),{hasConsent:D}=U(),[t,M]=c(null),[L,m]=c(!0),[u,y]=c(""),[_,P]=c(!1),[h,$]=c(1),G=H(i,o??""),x=Number(o),{data:O}=Q(t?G:void 0),g=!!O?.inLibrary,{toggle:A}=X();C(()=>{o&&(m(!0),y(""),J.tv.details.query({type:i,id:String(o)}).then(s=>{const r={id:s.id,title:s.title||"",overview:s.overview||"",vote_average:s.vote_average,year:s.year,poster:s.poster,backdrop:s.backdrop,imdb_id:s.imdb_id||void 0,adult:s.adult,seasons:s.seasons?.map(z=>({...z,name:""})),number_of_seasons:s.number_of_seasons,number_of_episodes:s.number_of_episodes,status:s.status,first_air_date:s.first_air_date,last_air_date:s.last_air_date};M(r),m(!1)}).catch(s=>{y(s.message),m(!1)}))},[o,i]),C(()=>{document.title=t?.title?`${t.title} - dango`:"TV & Movies - dango"},[t?.title]);const V=()=>{!o||!t||d(l?I(i,o):I(i,o,h,1))},W=()=>{t&&A({tmdbId:x,mediaType:i,title:t.title,poster:t.poster,year:t.year,adult:t.adult})},l=i==="movie",v=!l,k=t?.backdrop?`https://image.tmdb.org/t/p/w1280${t.backdrop}`:"",b=t?.poster?`https://image.tmdb.org/t/p/w500${t.poster}`:"",N=T(()=>t?.genres?t.genres.map(s=>s.name).slice(0,5):[],[t?.genres]),S=T(()=>t?.seasons?[...t.seasons].sort((s,r)=>s.season_number-r.season_number):[],[t?.seasons]),p=[t?.year,t?.status,v&&t?.number_of_seasons?`${t.number_of_seasons} Season${t.number_of_seasons>1?"s":""}`:null,v&&t?.number_of_episodes?`${t.number_of_episodes} Episodes`:null].filter(Boolean);if(L)return e("div",{className:n.container,children:e("div",{className:n.heroSkeleton,children:[e("div",{className:n.skeletonBanner}),e("div",{className:n.skeletonContent,children:[e("div",{className:n.skeletonPoster}),e("div",{className:n.skeletonInfo,children:[e("div",{className:n.skeletonTitle}),e("div",{className:n.skeletonMeta}),e("div",{className:n.skeletonDesc}),e("div",{className:n.skeletonActions})]})]})]})});if(u||!t)return e("div",{className:n.container,children:e("div",{className:n.errorState,children:[e(a,{name:"exclamation-triangle",size:48}),e("h2",{children:"Failed to load details"}),e("p",{children:u||"Something went wrong"}),e(w,{onClick:()=>d(-1),children:"Go Back"})]})});const f=t.adult&&!D;return e("div",{className:n.container,style:f?{filter:"blur(14px)",pointerEvents:"none",userSelect:"none"}:void 0,children:[e("div",{className:n.heroSection,children:[e("div",{className:n.bannerContainer,children:[k&&e("div",{className:n.banner,style:{backgroundImage:`url(${k})`}}),e("div",{className:n.bannerOverlay})]}),e("div",{className:n.heroContent,children:[e("div",{className:n.posterContainer,children:b&&e(K,{src:b,alt:t.title,className:n.poster,decoding:"async"})}),e("div",{className:n.infoGlass,children:[e("div",{children:[e("h1",{className:n.title,children:t.title}),e("div",{className:n.quickMeta,children:[t.vote_average!=null&&t.vote_average>0&&e("div",{className:n.metaItem,children:[e(a,{name:"star",className:n.iconStar}),e("span",{children:Number(t.vote_average).toFixed(1)})]}),e("div",{className:n.metaItem,children:[e(a,{name:"tv",className:n.iconTv}),e("span",{children:l?"Movie":"TV Show"})]}),t.vote_count!=null&&e("div",{className:n.metaItem,children:[e(a,{name:"users",className:n.iconType}),e("span",{children:[t.vote_count.toLocaleString()," votes"]})]})]}),N.length>0&&e("div",{className:n.genres,children:N.map(s=>e("span",{className:n.genre,children:s},s))})]}),p.length>0&&e("div",{className:n.metaRow,children:p.map((s,r)=>e(F.Fragment,{children:[e("span",{className:n.metaValue,children:s}),r<p.length-1&&e("span",{className:n.metaDivider,children:"·"})]},r))}),t.overview&&e("div",{className:n.synopsisSection,children:[e("h2",{className:n.sectionTitleSmall,children:"Synopsis"}),e("p",{className:n.synopsis,children:t.overview})]}),e("div",{className:n.actions,children:[e("button",{className:n.watchBtn,onClick:V,children:[e(a,{name:"play",size:14}),l?"Watch Now":`Start S${h}`]}),e("button",{className:`${n.watchlistBtn} ${g?n.active:""}`,onClick:W,children:[g?e(a,{name:"check",size:14}):e(a,{name:"plus",size:14}),g?"In Watchlist":"Add to Watchlist"]})]}),v&&S.length>1&&e("label",{className:n.seasonPickerLabel,children:[e("span",{children:"Season"}),e("select",{value:h,onChange:s=>$(parseInt(s.currentTarget.value,10)||1),className:n.seasonSelect,children:S.map(s=>e("option",{value:s.season_number,children:[s.season_number===0?"Specials":`Season ${s.season_number}`," (",s.episode_count," Episodes)"]},s.season_number))})]}),e("button",{className:n.detailsToggleBtn,onClick:()=>P(!_),children:[_?e(a,{name:"chevron-up"}):e(a,{name:"chevron-down"}),_?"Hide Details":"Show Details"]}),_&&e("div",{className:n.expandedContent,children:e("div",{className:n.detailGrid,children:[t.first_air_date&&e("div",{className:n.detailItem,children:[e("strong",{children:l?"Release Date":"First Air Date"}),e("span",{children:t.first_air_date})]}),t.last_air_date&&e("div",{className:n.detailItem,children:[e("strong",{children:"Last Air Date"}),e("span",{children:t.last_air_date})]}),t.networks&&t.networks.length>0&&e("div",{className:n.detailItem,children:[e("strong",{children:"Networks"}),e("span",{children:t.networks.map(s=>s.name).join(", ")})]}),t.created_by&&t.created_by.length>0&&e("div",{className:n.detailItem,children:[e("strong",{children:"Created By"}),e("span",{children:t.created_by.map(s=>s.name).join(", ")})]}),t.episode_run_time&&t.episode_run_time.length>0&&e("div",{className:n.detailItem,children:[e("strong",{children:"Episode Runtime"}),e("span",{children:[t.episode_run_time[0]," min"]})]}),t.imdb_id&&e("div",{className:n.detailItem,children:[e("strong",{children:"IMDb"}),e("a",{href:`https://www.imdb.com/title/${t.imdb_id}`,target:"_blank",rel:"noopener noreferrer",className:n.imdbLink,children:"View on IMDb"})]})]})})]})]})]}),f&&e("div",{className:n.matureOverlay,children:e("div",{className:n.matureContent,children:[e(a,{name:"exclamation-triangle",size:48}),e("h2",{children:"Content Warning"}),e("p",{children:"This content may contain mature themes."}),e(w,{onClick:()=>d("/"),children:"Go Back"})]})})]})}export{Qe as default};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{u as t,A as C,q as A,h as F,d as P,T as te,$ as ct}from"./vendor-core-DfaOB3Rn.js";import{p as M,al as lt,Q as He,B as X,a3 as se,o as dt,am as Re,q as U,ac as ut,t as pt,h as ft,a6 as ht,an as Fe,ao as mt}from"./index-BHWOY-pi.js";import{I as j}from"./vendor-icons-C1Pj_eSX.js";import{S as De,a as gt,s as G,f as ze,m as yt,h as _t,d as bt,k as vt,u as St,n as ie}from"./PlayerProvider-BpHzod7D.js";import{u as wt}from"./vendor-query-BBT5_sHx.js";import{i as ce,d as Ct}from"./playbackCompletion-Cq6Pbug7.js";const kt="_controls_1ne4g_1",xt="_titleContainer_1ne4g_9",Tt="_scheduleInfo_1ne4g_15",Lt="_status_1ne4g_23",Nt="_nextEpisode_1ne4g_35",Pt="_watchlistBtn_1ne4g_45",Bt="_inList_1ne4g_73",At="_queueBtn_1ne4g_84",Et="_queueActive_1ne4g_96",$t="_modeToggleBtn_1ne4g_102",It="_modeToggleActive_1ne4g_109",Mt="_markWatchedBtn_1ne4g_130",Rt="_markWatchedDone_1ne4g_144",Ft="_streamPanel_1ne4g_155",Dt="_desktopEpisodeActions_1ne4g_169",Ot="_sourceLoader_1ne4g_175",qt="_episodeActions_1ne4g_188",Ht="_mobileEpisodeActions_1ne4g_202",zt="_episodeNavBtn_1ne4g_206",Wt="_primary_1ne4g_235",Vt="_secondary_1ne4g_245",Kt="_episodePickerBtn_1ne4g_249",Ut="_queueCountdown_1ne4g_253",Qt="_speedBoostBadge_1ne4g_268",Gt="_videoContainer_1ne4g_299",jt="_loadingOverlay_1ne4g_312",Yt="_loadingDots_1ne4g_326",Xt="_dot_1ne4g_331",Jt="_bounce_1ne4g_1",Zt="_bufferingOverlay_1ne4g_348",en="_bufferingSpinner_1ne4g_357",tn="_spin_1ne4g_459",nn="_videoIframe_1ne4g_381",rn="_videoElementHidden_1ne4g_404",sn="_upscalerCanvas_1ne4g_409",an="_upscalerActive_1ne4g_422",on="_upscalerStatusBadge_1ne4g_426",cn="_subtitleOverlay_1ne4g_441",ln="_spinner_1ne4g_459",dn="_errorOverlay_1ne4g_526",un="_retryButton_1ne4g_536",pn="_detailsToggleBtn_1ne4g_549",fn="_descriptionSection_1ne4g_572",hn="_synopsisFlat_1ne4g_580",mn="_fullscreenActive_1ne4g_614",gn="_errorSubtext_1ne4g_657",yn="_watchedOverlay_1ne4g_680",_n="_watchedTitle_1ne4g_702",bn="_watchedSubtext_1ne4g_708",vn="_watchedActions_1ne4g_714",Sn="_watchedActionsCentered_1ne4g_732",es={controls:kt,titleContainer:xt,scheduleInfo:Tt,status:Lt,nextEpisode:Nt,watchlistBtn:Pt,inList:Bt,queueBtn:At,queueActive:Et,modeToggleBtn:$t,modeToggleActive:It,markWatchedBtn:Mt,markWatchedDone:Rt,streamPanel:Ft,desktopEpisodeActions:Dt,sourceLoader:Ot,episodeActions:qt,mobileEpisodeActions:Ht,episodeNavBtn:zt,primary:Wt,secondary:Vt,episodePickerBtn:Kt,queueCountdown:Ut,speedBoostBadge:Qt,videoContainer:Gt,loadingOverlay:jt,loadingDots:Yt,dot:Xt,bounce:Jt,bufferingOverlay:Zt,bufferingSpinner:en,spin:tn,videoIframe:nn,videoElementHidden:rn,upscalerCanvas:sn,upscalerActive:an,upscalerStatusBadge:on,subtitleOverlay:cn,spinner:ln,errorOverlay:dn,retryButton:un,detailsToggleBtn:pn,descriptionSection:fn,synopsisFlat:hn,fullscreenActive:mn,errorSubtext:gn,watchedOverlay:yn,watchedTitle:_n,watchedSubtext:bn,watchedActions:vn,watchedActionsCentered:Sn},wn="_playerPageLayout_1rxx0_1",Cn="_noSidebar_1rxx0_15",kn="_episodeSidebar_1rxx0_19",xn="_playerMain_1rxx0_32",Tn="_videoPlayerWrapper_1rxx0_40",Ln="_playerInfoHeader_1rxx0_56",Nn="_playerAnimeCard_1rxx0_62",Pn="_playerInfoContainer_1rxx0_74",Bn="_infoColumns_1rxx0_104",An="_videoTitleSection_1rxx0_134",En="_theaterMode_1rxx0_308",ts={playerPageLayout:wn,noSidebar:Cn,episodeSidebar:kn,playerMain:xn,videoPlayerWrapper:Tn,playerInfoHeader:Ln,playerAnimeCard:Nn,playerInfoContainer:Pn,infoColumns:Bn,videoTitleSection:An,theaterMode:En},$n={fontSize:"subtitleFontSize",position:"subtitlePosition",bgOpacity:"subtitleBgOpacity",bgColor:"subtitleBgColor",textColor:"subtitleTextColor",edge:"subtitleEdge",bold:"subtitleBold"},Q={fontSize:1.8,position:0,bgOpacity:.5,bgColor:"#000000",textColor:"#ffffff",edge:"shadow",bold:!1},fe=(e,n,s)=>Math.max(n,Math.min(s,e)),he=e=>typeof e=="string"&&/^#[0-9a-fA-F]{6}$/.test(e),le=(e,n,s,o)=>{try{const r=M.getItem(e);if(r===null)return n;const c=parseFloat(r);return Number.isFinite(c)?fe(c,s,o):n}catch{return n}};function In(){let e=Q.edge,n=Q.bgColor,s=Q.textColor,o=Q.bold;try{const r=M.getItem("subtitleEdge");(r==="shadow"||r==="outline"||r==="none")&&(e=r);const c=M.getItem("subtitleBgColor");he(c)&&(n=c);const i=M.getItem("subtitleTextColor");he(i)&&(s=i);const d=M.getItem("subtitleBold");d!==null&&(o=d==="true")}catch{}return{fontSize:le("subtitleFontSize",Q.fontSize,.5,10),position:le("subtitlePosition",Q.position,0,100),bgOpacity:le("subtitleBgOpacity",Q.bgOpacity,0,1),bgColor:n,textColor:s,edge:e,bold:o}}function We(e,n){const s=`rgba(0, 0, 0, ${fe(n,0,1)})`;if(!he(e))return s;const o=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),c=parseInt(e.slice(5,7),16);return`rgba(${o}, ${r}, ${c}, ${fe(n,0,1)})`}function Ve(e,n){return e==="none"?n<=0?"0 1px 3px rgba(0, 0, 0, 0.9)":"none":e==="outline"?["-1px 0 0 black","1px 0 0 black","0 -1px 0 black","0 1px 0 black","-1px -1px 0 black","1px -1px 0 black","-1px 1px 0 black","1px 1px 0 black","0 0 6px rgba(0, 0, 0, 0.9)"].join(", "):"0 0 4px black, 0 1px 2px rgba(0, 0, 0, 0.8)"}function ns(e){return`
|
|
2
|
-
video::cue {
|
|
3
|
-
font-size: ${e.fontSize}rem !important;
|
|
4
|
-
color: ${e.textColor} !important;
|
|
5
|
-
background-color: ${We(e.bgColor,e.bgOpacity)} !important;
|
|
6
|
-
font-weight: ${e.bold?"bold":"normal"} !important;
|
|
7
|
-
text-shadow: ${Ve(e.edge,e.bgOpacity)} !important;
|
|
8
|
-
}
|
|
9
|
-
`}function rs(e){return[`font-size: ${e.fontSize}rem`,`color: ${e.textColor}`,`background-color: ${We(e.bgColor,e.bgOpacity)}`,`font-weight: ${e.bold?"700":"400"}`,`text-shadow: ${Ve(e.edge,e.bgOpacity)}`,"padding: 0.2em 0.5em","border-radius: 0.25em","text-align: center","position: absolute","left: 50%","transform: translateX(-50%)","max-width: 92%","white-space: pre-wrap","overflow-wrap: break-word","line-height: 1.4"].join(`;
|
|
10
|
-
`)+";"}const Mn=new Set(["b","i","u","strong","em"]);function ss(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/<(\/?)([a-zA-Z]+)>/g,(s,o,r)=>Mn.has(r.toLowerCase())?`<${o}${r.toLowerCase()}>`:s)}function as(e){return e.replace(/<[^>]*>/g,"")}const os=["#ffffff","#ffff00","#7CFC00","#00e5ff","#ff9ff3","#ffa502"],is=["#000000","#1e272e","#2f3542","#3d0c02","#0c3d2e","#ffffff"];function cs(e,n){const s=Number.isFinite(e)?e*16:Q.fontSize*16;return!Number.isFinite(n)||n<=0?s/16:Math.min(s,Math.max(13,n*.07))/16}function ls(e){const n=Math.abs(e/1e3).toFixed(1);return e>0?`+${n}s`:e<0?`-${n}s`:"0.0s"}function ds(e,n){const s=e.clientWidth||0,o=e.clientHeight||0,r=e.videoWidth>0&&e.videoHeight>0?e.videoWidth/e.videoHeight:0;let c=o;r>0&&s>0&&o>0&&(c=s/o>r?o:s/r);const i=Math.max(0,(o-c)/2),d=Math.max(0,Math.min(100,Number(n)||0))/100*c;return i+d}const us=({isOpen:e,onClose:n,title:s,heading:o,message:r,children:c})=>t(He,{isOpen:e,onClose:n,title:s,width:"sm",children:t("div",{style:{padding:"1rem",textAlign:"center"},children:[t("button",{type:"button",className:lt.closeButton,onClick:n,"aria-label":"Close",children:t(j,{name:"times",size:16})}),t(j,{name:"check-circle",size:48,style:{color:"var(--accent-lighter)",marginBottom:"0.5rem"}}),t("p",{style:{fontSize:"1.1rem",fontWeight:600},children:o}),t("p",{style:{color:"var(--text-secondary)"},children:r}),c&&t("div",{style:{marginTop:"1rem",display:"flex",gap:"10px",justifyContent:"center",flexWrap:"wrap"},children:c})]})}),ps=({isOpen:e,onClose:n,title:s,message:o,resumeLabel:r="Resume",restartLabel:c="Start Over",onResume:i,onRestart:d})=>t(He,{isOpen:e,onClose:n,title:s,width:"sm",children:t("div",{style:{padding:"1rem",textAlign:"center"},children:[t("p",{children:o}),t("div",{style:{marginTop:"1rem",display:"flex",gap:"10px",justifyContent:"center"},children:[t(X,{variant:"secondary",onClick:d,children:c}),t(X,{onClick:i,children:r})]})]})}),Rn="_centerControls_1oa5h_1",Fn="_centerSkipBtn_1oa5h_14",Dn="_centerPlayPause_1oa5h_15",ae={centerControls:Rn,centerSkipBtn:Fn,centerPlayPause:Dn},fs=()=>t("div",{className:ae.centerControls,onClick:e=>e.stopPropagation(),children:[t(De,{seconds:-10,className:ae.centerSkipBtn}),t(gt,{className:ae.centerPlayPause,"data-speed-boost-ignore":"true"}),t(De,{seconds:10,className:ae.centerSkipBtn})]}),hs=({visible:e,title:n,episode:s,server:o,mode:r,audio:c,subtitles:i,onBack:d,classes:a})=>t("div",{className:`${a.overlay} ${e?"":a.hidden} `,"data-speed-boost-ignore":"true",style:{pointerEvents:"none",background:"none"},children:t("div",{className:a.top,onClick:l=>l.stopPropagation(),children:[t("button",{className:a.backBtn,onClick:l=>{l.stopPropagation(),d()},title:"Back","aria-label":"Back",children:t(j,{name:"chevron-left"})}),t("div",{className:`${a.titleInfo} ${G.topBarTitleInfo}`,children:[t("span",{className:a.title,children:n}),s&&t("span",{className:a.episode,children:s}),(r||o||c||i)&&t("div",{className:G.streamDetails,children:[r&&t("span",{className:G.modeTag,children:r.toUpperCase()}),o&&t("span",{title:`Server: ${o}`,children:["Server: ",o]}),c&&t("span",{title:`Audio: ${c}`,children:["Audio: ",c]}),i&&t("span",{title:`Subs: ${i}`,children:["Subs: ",i]})]})]})]})});function On(e){return e instanceof Element&&!!e.closest('button, input, select, textarea, a, [role="button"], [role="slider"], [data-player-ui="true"]')}function ms({engine:e,topBar:n,centerControls:s,bottomBar:o,settingsPanel:r,overlays:c,isInteracting:i=!1,nativeControls:d=!1,chromeDisabled:a=!1,className:l,onStageClick:b,children:k}){const _=ze(e),E=yt(),u=C(void 0),p=C(void 0),x=C(0),f=C(i);f.current=i;const m=A(()=>{clearTimeout(u.current),u.current=void 0},[]),g=A(()=>{m();const N=e.getState();!N.isPlaying||N.isScrubbing||f.current||d||(u.current=setTimeout(()=>{const y=e.getState();f.current||y.isScrubbing||!y.isPlaying||e.setShowControls(!1)},E?5e3:3e3))},[e,E,d,m]),B=A(()=>{e.setShowControls(!0),g()},[e,g]);_t(e,B,!d&&!a),F(()=>(i||_.isScrubbing||!_.isPlaying?(e.setShowControls(!0),m()):g(),m),[e,i,_.isPlaying,_.isScrubbing,_.showControls,m,g]),F(()=>()=>{clearTimeout(p.current)},[]);const h=N=>{if(On(N.target)||d||a)return;b?.();const y=Date.now();if(y-x.current<280){clearTimeout(p.current),p.current=void 0,x.current=0,e.toggleFullscreen();return}x.current=y,clearTimeout(p.current),p.current=setTimeout(()=>{p.current=void 0,e.setShowControls(!e.getState().showControls),g()},280)},T=_.showControls||_.isScrubbing||i||!_.isPlaying;return t(bt,{engine:e,children:t("div",{ref:e.containerRef,"data-player-root":"true",className:`${G.shell} ${_.isFullscreen?G.shellFullscreen:""} ${l??""}`,style:{cursor:!T&&_.isFullscreen?"none":"default"},onContextMenu:N=>N.preventDefault(),onPointerMove:N=>{N.pointerType==="mouse"&&B()},onFocusIn:B,onMouseLeave:()=>{window.matchMedia?.("(hover: hover) and (pointer: fine)").matches&&e.getState().isPlaying&&!f.current&&e.setShowControls(!1)},children:[t("div",{className:G.stage,onClick:h,children:k}),c,(_.error||_.playBlocked)&&t("div",{className:G.engineStatus,"data-player-ui":"true",children:t(vt,{})}),!a&&!d&&t("div",{className:G.uiLayer,children:[t("div",{"data-player-ui":"true",children:n}),T&&s&&t("div",{"data-player-ui":"true",children:s}),t("div",{"data-player-ui":"true",children:o}),r&&t("div",{"data-player-ui":"true",children:r})]})]})})}const qn=e=>(e.language??e.lang??"").toLowerCase(),Hn=e=>(e.label??"").toLowerCase(),zn=e=>`${e.language??e.lang??""}|||${e.label??""}`,Wn=e=>qn(e).startsWith("en")||Hn(e).includes("english");function gs(e,n){if(e.length===0||n?.enabled===!1)return-1;const s=n?.lastKey??null;if(s){const r=e.findIndex(i=>zn(i)===s);if(r>=0)return r;const c=s.indexOf("|||");if(c>=0){const i=s.slice(0,c),d=s.slice(c+3),a=e.findIndex(l=>{const b=l.language??l.lang??"",k=l.label??"";return d!==""&&k===d||i!==""&&i!=="undefined"&&(b===i||k===i)});if(a>=0)return a}else{const i=e.findIndex(d=>d.label===s||d.language===s||d.lang===s);if(i>=0)return i}}const o=e.findIndex(Wn);return o>=0?o:0}const Vn="_statusArea_1xccu_1",Kn="_toggleBtn_1xccu_20",Un="_shortcuts_1xccu_46",Qn="_shortcutGroup_1xccu_56",Gn="_shortcut_1xccu_46",jn="_key_1xccu_70",Yn="_label_1xccu_91",S={statusArea:Vn,toggleBtn:Kn,shortcuts:Un,shortcutGroup:Qn,shortcut:Gn,key:jn,label:Yn},ys=({showTheater:e=!0})=>{const[n,s]=P(!1);return t("div",{className:S.statusArea,children:[t("button",{type:"button",className:S.toggleBtn,onClick:()=>s(o=>!o),"aria-expanded":n,"aria-controls":"player-shortcuts",children:[t(j,{name:"keyboard",size:14}),t("span",{children:"Keyboard Shortcuts"}),n?t(j,{name:"chevron-up",size:12}):t(j,{name:"chevron-down",size:12})]}),n&&t("div",{id:"player-shortcuts",className:S.shortcuts,children:[t("div",{className:S.shortcutGroup,children:[t("div",{className:S.shortcut,children:[t("span",{className:S.key,children:"↑"}),t("span",{className:S.key,children:"↓"}),t("span",{className:S.label,children:"Volume"})]}),t("div",{className:S.shortcut,children:[t("span",{className:S.key,children:"←"}),t("span",{className:S.key,children:"→"}),t("span",{className:S.label,children:"Seek"})]})]}),t("div",{className:S.shortcutGroup,children:[t("div",{className:S.shortcut,children:[t("span",{className:S.key,children:"Space"}),t("span",{className:S.label,children:"Play/Pause"})]}),t("div",{className:S.shortcut,children:[t("span",{className:S.key,children:"F"}),t("span",{className:S.label,children:"Fullscreen"})]}),t("div",{className:S.shortcut,children:[t("span",{className:S.key,children:"M"}),t("span",{className:S.label,children:"Mute"})]}),e&&t("div",{className:S.shortcut,children:[t("span",{className:S.key,children:"T"}),t("span",{className:S.label,children:"Theater"})]}),t("div",{className:S.shortcut,children:[t("span",{className:S.key,children:"P"}),t("span",{className:S.label,children:"Previous"})]}),t("div",{className:S.shortcut,children:[t("span",{className:S.key,children:"N"}),t("span",{className:S.label,children:"Next"})]})]})]})]})},Xn="_episodeListContainer_11isr_1",Jn="_drawerContainer_11isr_9",Zn="_episodeListHeader_11isr_14",er="_drawerHeader_11isr_20",tr="_episodeListTitle_11isr_29",nr="_rangeSelector_11isr_41",rr="_rangeButton_11isr_47",sr="_active_11isr_70",ar="_episodeList_11isr_1",or="_drawerList_11isr_90",ir="_episodeItem_11isr_119",cr="_watched_11isr_147",lr="_episodeThumb_11isr_175",dr="_episodeText_11isr_185",ur="_episodeLabel_11isr_193",pr="_episodeSub_11isr_198",L={episodeListContainer:Xn,drawerContainer:Jn,episodeListHeader:Zn,drawerHeader:er,episodeListTitle:tr,rangeSelector:nr,rangeButton:rr,active:sr,episodeList:ar,drawerList:or,episodeItem:ir,watched:cr,episodeThumb:lr,episodeText:dr,episodeLabel:ur,episodeSub:pr},fr=({episodes:e,currentEpisode:n,watchedEpisodes:s=[],onEpisodeClick:o,variant:r="sidebar",title:c="Episodes",header:i})=>{const[d,a]=P(0),l=C(null),b=te(()=>e.map(u=>typeof u=="string"?{id:u,label:`Episode ${u}`}:u),[e]),k=te(()=>new Set(s),[s]);F(()=>{const u=l.current;if(!u)return;let p=u.parentElement;for(;p;){const m=window.getComputedStyle(p);if((m.overflowY==="auto"||m.overflowY==="scroll")&&p.scrollHeight>p.clientHeight)break;p=p.parentElement}if(!p)return;const x=p.getBoundingClientRect(),f=u.getBoundingClientRect();p.scrollTop+=f.top+f.height/2-(x.top+p.clientHeight/2)},[n,d]);const _=te(()=>{if(b.length<=100)return[];const u=[];for(let p=0;p<b.length;p+=100){const x=p+1,f=Math.min(p+100,b.length);u.push(`${x}-${f}`)}return u},[b]),E=te(()=>{if(_.length===0)return b;const u=_[d];if(!u)return b;const[p,x]=u.split("-"),f=parseInt(p,10),m=parseInt(x,10);return b.slice(f-1,m)},[b,_,d]);return t("div",{className:`${L.episodeListContainer} ${r==="drawer"?L.drawerContainer:""}`,children:[t("div",{className:`${L.episodeListHeader} ${r==="drawer"?L.drawerHeader:""}`,children:[i,t("h3",{className:L.episodeListTitle,children:c}),_.length>0&&t("div",{className:L.rangeSelector,children:_.map((u,p)=>t("button",{className:`${L.rangeButton} ${d===p?L.active:""}`,onClick:()=>a(p),children:u},u))})]}),t("div",{className:`${L.episodeList} ${r==="drawer"?L.drawerList:""}`,children:E.map(u=>{const p=u.id===n,x=k.has(u.id)||u.watched===!0;return t("div",{ref:p?l:void 0,className:`${L.episodeItem} ${x?L.watched:""} ${p?L.active:""}`,onClick:()=>o(u.id),children:[u.thumbnail&&t("img",{src:u.thumbnail,alt:"",loading:"lazy",decoding:"async",className:L.episodeThumb}),t("span",{className:L.episodeText,children:[t("span",{className:L.episodeLabel,children:u.label??`Episode ${u.id}`}),u.sublabel&&t("span",{className:L.episodeSub,children:u.sublabel})]})]},u.id)})})]})},_s=({variant:e="sidebar",count:n=12})=>t("div",{className:`${L.episodeListContainer} ${e==="drawer"?L.drawerContainer:""}`,children:[t("div",{className:`${L.episodeListHeader} ${e==="drawer"?L.drawerHeader:""}`,children:[t("h3",{className:L.episodeListTitle,children:"Episodes"}),t("div",{className:L.rangeSelector,children:[t(se,{width:"60px",height:"28px",variant:"rectangular"}),t(se,{width:"60px",height:"28px",variant:"rectangular"}),t(se,{width:"60px",height:"28px",variant:"rectangular"})]})]}),t("div",{className:`${L.episodeList} ${e==="drawer"?L.drawerList:""}`,children:Array.from({length:n}).map((s,o)=>t("div",{className:L.episodeItem,style:{border:"none",background:"transparent"},children:t(se,{width:"120px",height:"1.2rem",variant:"text"})},o))})]}),hr="_shell_cys6s_1",mr="_overlay_cys6s_10",gr="_drawer_cys6s_21",yr="_handle_cys6s_56",_r="_header_cys6s_64",br="_headerCopy_cys6s_73",vr="_kicker_cys6s_79",Sr="_title_cys6s_87",wr="_closeBtn_cys6s_94",Cr="_body_cys6s_116",V={shell:hr,overlay:mr,drawer:gr,handle:yr,header:_r,headerCopy:br,kicker:vr,title:Sr,closeBtn:wr,body:Cr};function bs({isOpen:e,onClose:n,episodes:s,currentEpisode:o,watchedEpisodes:r=[],onEpisodeClick:c,title:i,header:d}){return F(()=>{if(!e)return;const a=b=>{b.key==="Escape"&&n()},l=document.body.style.overflow;return document.body.style.overflow="hidden",document.addEventListener("keydown",a),()=>{document.body.style.overflow=l,document.removeEventListener("keydown",a)}},[e,n]),e?ct(t("div",{className:V.shell,role:"dialog","aria-modal":"true","aria-label":"Episode picker",children:[t("button",{className:V.overlay,type:"button",onClick:n,"aria-label":"Close episodes"}),t("aside",{className:V.drawer,children:[t("div",{className:V.handle}),t("div",{className:V.header,children:[t("div",{className:V.headerCopy,children:[t("span",{className:V.kicker,children:"Episode picker"}),t("h3",{className:V.title,children:"Choose an episode"})]}),t("button",{className:V.closeBtn,type:"button",onClick:n,"aria-label":"Close",children:t(j,{name:"times"})})]}),t("div",{className:V.body,children:t(fr,{episodes:s,currentEpisode:o,watchedEpisodes:r,onEpisodeClick:c,variant:"drawer",title:i,header:d})})]})]}),document.body):null}const kr="_sourceSelectionContainer_g7xev_1",xr="_providerSelectContainer_g7xev_14",Tr="_providerSelect_g7xev_14",Lr="_sourceSelect_g7xev_1",Nr="_sourceButtons_g7xev_70",Pr="_sourceButton_g7xev_70",Br="_active_g7xev_95",vs={sourceSelectionContainer:kr,providerSelectContainer:xr,providerSelect:Tr,sourceSelect:Lr,sourceButtons:Nr,sourceButton:Pr,active:Br},Ss=({skipIntervals:e,showId:n,episodeNumber:s,episodeCount:o,sourceType:r,showMeta:c})=>{const i=wt(),d=dt(),{engine:a,mediaRef:l}=St({volumeKey:"playerVolume",mutedKey:"playerMuted"}),{isPlaying:b,isMuted:k,volume:_,duration:E,isScrubbing:u,isBuffering:p,isFullscreen:x,isSpeedBoostActive:f,showControls:m,playbackLocked:g}=ze(a),B=a.containerRef,h=C(null),T=C(0),N=C(Math.random().toString(36).substring(2)),y=a.setShowControls,[I,q]=P(M.getItem("autoSkipEnabled")==="true"),[K,$]=P(null),[z]=P(In),[Ke,ge]=P(z.fontSize),[Ue,ye]=P(z.position),[Qe,_e]=P(z.bgOpacity),[Ge,be]=P(z.bgColor),[je,ve]=P(z.textColor),[Ye,Se]=P(z.edge),[Xe,we]=P(z.bold),Ce=A((v,R)=>{if({fontSize:w=>typeof w!="number"?!1:(ge(w),!0),position:w=>typeof w!="number"?!1:(ye(w),!0),bgOpacity:w=>typeof w!="number"?!1:(_e(w),!0),bgColor:w=>typeof w!="string"?!1:(be(w),!0),textColor:w=>typeof w!="string"?!1:(ve(w),!0),edge:w=>w!=="shadow"&&w!=="outline"&&w!=="none"?!1:(Se(w),!0),bold:w=>typeof w!="boolean"?!1:(we(w),!0)}[v](R))try{M.setItem($n[v],String(R))}catch{}},[]),[Je,Ze]=P([]),[et,tt]=P(null),[nt,rt]=P(!1),[st,at]=P(!1),[ot,ke]=P(()=>{try{return M.getItem("playerUseNativeControls")==="true"}catch{return!1}}),J=C(!1),ne=C(-1),re=A(()=>{const v=l.current;return!n||!s||!c?.name?null:{showId:n,episodeNumber:s,episodeCount:o,currentTime:a.getTimeline().currentTime,duration:a.getState().duration,showName:c.name,showThumbnail:c.thumbnail,nativeName:c.names?.native,englishName:c.names?.english,genres:Array.isArray(c.genres)?c.genres.map(R=>typeof R=="string"?R:R?.name).filter(Boolean):void 0,popularityScore:c.score,type:c.type,isPlaying:v?!v.paused:r==="iframe",sessionId:N.current,isAdult:c.isAdult}},[a,l,n,s,o,c,r]),D=A((v=!1,R=!1)=>{if(J.current)return!1;const H=re();if(!H)return!1;const w=l.current;if(!w&&!v&&r!=="iframe"||r!=="iframe"&&H.duration<=0)return!1;const W=a.getTimeline().currentTime;if(!R){if(W===0)return!1;const ee=w?Math.abs(W-ne.current):0;if(!v&&w&&W!==w.duration&&ee<5)return!1}return H.currentTime=W,ne.current=W,v?(async()=>{try{await Re("progress.updateProgress",H),i.invalidateQueries({queryKey:[U.playerData,n]}),i.invalidateQueries({queryKey:[U.videoSources,n,s]}),i.invalidateQueries({queryKey:[U.continueWatching]}),i.invalidateQueries({queryKey:[U.thisWeekSchedule]}),i.invalidateQueries(d.continueWatching.pathFilter())}catch(ee){console.error("Failed to update progress:",ee)}})():Re("progress.updateProgress",H).then(()=>{ce(H.currentTime,H.duration)&&i.invalidateQueries({queryKey:[U.playerData,n]})}).catch(ee=>console.error("Failed to update progress:",ee)),!0},[a,re,r,i,n,s,d.continueWatching,l]);F(()=>{const v=()=>{J.current||D(!0)};window.addEventListener("beforeunload",v),window.addEventListener("pagehide",v);const R=()=>{document.visibilityState==="hidden"&&v()};document.addEventListener("visibilitychange",R);const H=h;return()=>{window.removeEventListener("beforeunload",v),window.removeEventListener("pagehide",v),document.removeEventListener("visibilitychange",R),J.current||D(!0),H.current&&clearTimeout(H.current)}},[D]);const xe=A(()=>a.setShowControls(!0),[a]),Te=a.toggleFullscreen,Le=A(()=>{a.togglePlay(),y(!0)},[a,y]),Ne=A(()=>{a.toggleMute(),y(!0)},[a,y]),Pe=A(v=>{a.seekRelative(v),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>D(!1,!0),1500),y(!0)},[a,D,y]),Be=A(()=>{J.current=!1,D(!1,!0)},[D]),Ae=A(()=>{y(!0),D(!1,!0)},[D,y]);F(()=>{J.current=!1,ne.current=-1,T.current=0,N.current=Math.random().toString(36).substring(2),a.reset()},[a,n,s]);const Ee=a.reset;F(()=>{const v=N.current;return()=>{ut(v)}},[a,n,s]),F(()=>{if(r!=="iframe")return;D(!1,!0);const v=setInterval(()=>{D(!1,!0)},6e4);return()=>clearInterval(v)},[r,D]);const $e=A(()=>{const v=l.current;if(!v)return;const R=v.currentTime||0,H=Date.now(),w=ce(R,v.duration)&&!ce(ne.current,v.duration);(w||H-T.current>6e4)&&D(!1,w)&&(T.current=H);const W=e.find(Z=>R>=Z.start_time&&R<Z.end_time)||null;$(Z=>Z?.skip_id!==W?.skip_id?W:Z),I&&W&&!v.paused&&!a.getState().playbackLocked&&(a.seek(W.end_time),$(null))},[l,e,I,D,a]),Ie=A(()=>{const v=re();v&&(v.currentTime=v.duration,pt.progress.updateProgress.mutate(v).then(()=>{i.invalidateQueries({queryKey:[U.playerData,n]}),i.invalidateQueries({queryKey:[U.videoSources,n,s]}),i.invalidateQueries({queryKey:[U.continueWatching]})}).catch(R=>console.error("Failed to send final progress:",R)))},[re,i,n,s]),Me=A(()=>{J.current=!0,Ie()},[Ie]),it=te(()=>({togglePlay:Le,seek:Pe,toggleMute:Ne,toggleFullscreen:Te,onPlay:Be,onPause:Ae,formatTime:ft,onTimeUpdate:$e,onEnded:Me,setShowControls:y,setIsAutoSkipEnabled:q,setCurrentSkipInterval:$,setSubtitleFontSize:ge,setSubtitlePosition:ye,setSubtitleBgOpacity:_e,setSubtitleBgColor:be,setSubtitleTextColor:ve,setSubtitleEdge:Se,setSubtitleBold:we,setSubtitleStyle:Ce,setAvailableSubtitles:Ze,setActiveSubtitleTrack:tt,setShowSettings:rt,setShowVolumeSlider:at,flashControls:xe,sendProgressUpdate:D,setUseNativeControls:ke,resetMediaState:Ee}),[Le,Pe,Ne,Te,Be,Ae,$e,Me,D,ke,Ee,xe,Ce,y]);return{engine:a,refs:{videoRef:l,playerContainerRef:B},state:{playbackLocked:g,isPlaying:b,isMuted:k,volume:_,isFullscreen:x,duration:E,showControls:m,isScrubbing:u,isAutoSkipEnabled:I,currentSkipInterval:K,subtitleFontSize:Ke,subtitlePosition:Ue,subtitleBgOpacity:Qe,subtitleBgColor:Ge,subtitleTextColor:je,subtitleEdge:Ye,subtitleBold:Xe,availableSubtitles:Je,activeSubtitleTrack:et,showSettings:nt,showVolumeSlider:st,isBuffering:p,isSpeedBoostActive:f,useNativeControls:ot},actions:it}};function Ar(){try{return typeof navigator<"u"&&/android/i.test(navigator.userAgent)}catch{return!1}}function ws(e,n){const{refs:s,actions:o}=e,r=C(n);r.current=n;const c=C(!1),i=C(!1),d=a=>{try{if(a)return a.matches}catch{}try{return window.innerWidth>window.innerHeight}catch{return!1}};F(()=>{if(!Ar())return;let a=null;const l=()=>{const b=s.playerContainerRef.current;if(d(a)){if(!r.current||!b||ie(s.videoRef.current)||i.current)return;c.current=!0,o.toggleFullscreen()}else i.current=!1,c.current&&(c.current=!1,ie(s.videoRef.current)&&o.toggleFullscreen())};try{a=window.matchMedia("(orientation: landscape)"),a.addEventListener?a.addEventListener("change",l):a.addListener(l)}catch{}return l(),()=>{try{a&&(a.removeEventListener?a.removeEventListener("change",l):a.removeListener(l))}catch{}}},[o,s.playerContainerRef,s.videoRef,n]),F(()=>{const a=()=>{if(!ie(s.videoRef.current)){c.current=!1;try{window.matchMedia("(orientation: landscape)").matches&&(i.current=!0)}catch{i.current=!0}}};return document.addEventListener("fullscreenchange",a),document.addEventListener("webkitfullscreenchange",a),()=>{document.removeEventListener("fullscreenchange",a),document.removeEventListener("webkitfullscreenchange",a)}},[s.videoRef])}const Er=e=>Math.max(8,Math.min(40,Math.ceil(e/16.7)+4));function Cs({videoRef:e,canvasRef:n,delayMs:s,enabled:o}){const r=C(s);r.current=s;const c=C([]),i=C(-1),d=C(-1),a=C(!1),l=C(0),b=C(null);F(()=>{const k=f=>{if(f)try{f.close()}catch{}},_=()=>{for(const f of c.current)k(f.bitmap);c.current=[]};if(!o){_(),i.current=-1,d.current=-1,a.current=!1,l.current=0;return}let E=!1;const u=()=>{b.current!==null&&(cancelAnimationFrame(b.current),b.current=null)},p=()=>{E||(u(),b.current=requestAnimationFrame(()=>{x()}))};async function x(){if(E)return;const f=e.current,m=n.current;if(!f||!m||f.videoWidth===0){p();return}if(f.paused||f.ended||document.hidden||f.readyState<HTMLMediaElement.HAVE_CURRENT_DATA){p();return}const g=f.getVideoPlaybackQuality().totalVideoFrames;if(g===i.current){p();return}(f.seeking||d.current>=0&&Math.abs(f.currentTime-d.current)>.5)&&(_(),a.current=!1,l.current=0,i.current=-1),d.current=f.currentTime,(m.width!==f.videoWidth||m.height!==f.videoHeight)&&(m.width=f.videoWidth,m.height=f.videoHeight);const B=Math.max(0,r.current||0);B>l.current&&(a.current=!1);try{const h=await createImageBitmap(f);if(E){k(h);return}i.current=g;const T=performance.now(),N=m.getContext("2d"),y=$=>{N&&N.drawImage($,0,0,m.width,m.height)};if(B<=0){_(),a.current=!1,l.current=0,y(h),k(h),p();return}const I=c.current;I.push({bitmap:h,capture:T});const q=Er(B);for(;I.length>q;)k(I.shift()?.bitmap);let K=-1;for(let $=I.length-1;$>=0;$--)if(T-I[$].capture>=B){K=$;break}if(K!==-1){for(let z=0;z<K;z++)k(I.shift()?.bitmap);const $=I.shift();$?(y($.bitmap),k($.bitmap),a.current=!0,l.current=B):y(h)}else if(!a.current)y(h);else{const $=I.shift();$?(y($.bitmap),k($.bitmap)):y(h)}}catch{}p()}return p(),()=>{E=!0,u();for(const f of c.current)try{f.bitmap.close()}catch{}c.current=[]}},[o,e,n])}const Oe=(e,n)=>{try{M.setItem("playerVideoDelayMs",String(e)),M.setItem("playerVideoDelayEnabled",String(n))}catch{}},qe=e=>{try{M.setItem("playerVideoDelayEnabled",String(e))}catch{}};function ks(e,n){const[s,o]=P(()=>{try{const g=Number(M.getItem("playerVideoDelayMs"));if(Number.isFinite(g)&&g>=0&&g<=500)return Math.round(g)}catch{}return 180}),[r,c]=P(()=>{try{return M.getItem("playerVideoDelayEnabled")==="true"}catch{return!1}}),[i,d]=P(!1),[a,l]=P(!1),b=C(null),k=C(null),_=g=>{const B=Math.max(0,Math.min(500,Math.round(g)));o(B);try{M.setItem("playerVideoDelayMs",String(B))}catch{}},E=g=>{c(g),qe(g)},u=A(()=>{l(!1),d(!1)},[]);return{videoDelayMs:s,videoDelayEnabled:r,setDelayEnabled:E,handleVideoDelayChange:_,isCalibrating:i,testClipActive:a,stopCalibration:u,openAvSyncCalibrator:()=>{b.current={enabled:r,ms:s},c(!0),qe(!0),n?.(),d(!0)},cancelAvSyncCalibrator:()=>{const g=b.current;b.current=null,g&&(o(g.ms),c(g.enabled),Oe(g.ms,g.enabled)),l(!1),d(!1)},applyAvSyncCalibrator:()=>{b.current=null,c(!0),Oe(s,!0),l(!1),d(!1)},toggleTestClip:()=>{if(a){l(!1);return}const g=e.current;g&&!isNaN(g.currentTime)&&(k.current=g.currentTime),l(!0)},calibReturnRef:k,effectiveVideoDelayMs:r?s:0}}function xs(){const[e,n]=P(()=>{try{return M.getItem("playerTheaterMode")==="true"}catch{return!1}});F(()=>{try{e?document.body.classList.add("theater-mode"):document.body.classList.remove("theater-mode")}catch(r){console.error(r)}return()=>{try{document.body.classList.remove("theater-mode")}catch(r){console.error(r)}}},[e]);const s=A(()=>{n(r=>{const c=!r;try{M.setItem("playerTheaterMode",c.toString())}catch{}return c})},[]),o=A(r=>{if(e&&r.target===r.currentTarget){n(!1);try{M.setItem("playerTheaterMode","false")}catch{}}},[e]);return{isTheaterMode:e,toggleTheaterMode:s,handleLayoutClick:o}}const Y={enabled:!0,blur:60,saturation:150,brightness:70,opacity:60};function $r(){try{const e=M.getItem("playerAmbientLight");if(!e)return Y;const n=JSON.parse(e),s=(o,r,c,i)=>{const d=Number(o);return Number.isFinite(d)?Math.max(c,Math.min(i,d)):r};return{enabled:n.enabled??Y.enabled,blur:s(n.blur,Y.blur,0,120),saturation:s(n.saturation,Y.saturation,0,200),brightness:s(n.brightness,Y.brightness,20,120),opacity:s(n.opacity,Y.opacity,10,100)}}catch{return Y}}function Ts(){const[e,n]=P($r),s=A(o=>{n(r=>{const c={...r,...o};try{M.setItem("playerAmbientLight",JSON.stringify(c))}catch{}return c})},[]);return{settings:e,update:s}}const Ir="_theaterAmbient_x9t0o_1",Mr={theaterAmbient:Ir},de=160,ue=90,Rr=120,Ls=({videoRef:e,active:n,settings:s,className:o})=>{const r=C(null);return F(()=>{if(!n)return;const c=r.current,i=e.current;if(!c||!i)return;const d=c.getContext("2d",{alpha:!1});if(!d)return;let a=0,l=0,b=!1;const k=()=>{if(!(i.readyState<2||!i.videoWidth))try{const p=i.videoWidth,x=i.videoHeight,f=de/ue,m=p/x;let g=p,B=x,h=0,T=0;m>f?(g=x*f,h=(p-g)/2):(B=p/f,T=(x-B)/2),d.drawImage(i,h,T,g,B,0,0,de,ue)}catch{}},_=p=>{b||i.paused||(a=requestAnimationFrame(_),!(p-l<Rr)&&(l=p,k()))},E=()=>{b||(cancelAnimationFrame(a),l=0,a=requestAnimationFrame(_))},u=()=>cancelAnimationFrame(a);return i.addEventListener("play",E),i.addEventListener("pause",u),i.addEventListener("seeked",k),i.addEventListener("loadeddata",k),a=requestAnimationFrame(_),()=>{b=!0,cancelAnimationFrame(a),i.removeEventListener("play",E),i.removeEventListener("pause",u),i.removeEventListener("seeked",k),i.removeEventListener("loadeddata",k)}},[n,e]),n?t("canvas",{ref:r,width:de,height:ue,"aria-hidden":"true",className:o??Mr.theaterAmbient,style:{filter:`blur(${s.blur}px) saturate(${s.saturation}%) brightness(${s.brightness}%)`,opacity:s.opacity/100}}):null},Fr="_row_1fq55_1",Dr="_rowHeader_1fq55_9",Or="_rowLabel_1fq55_17",qr="_rowValue_1fq55_28",Hr="_slider_1fq55_36",zr="_swatches_1fq55_99",Wr="_swatch_1fq55_99",Vr="_swatchPicked_1fq55_114",Kr="_colorInput_1fq55_120",Ur="_segmented_1fq55_131",O={row:Fr,rowHeader:Dr,rowLabel:Or,rowValue:qr,slider:Hr,swatches:zr,swatch:Wr,swatchPicked:Vr,colorInput:Kr,segmented:Ur},Qr=({label:e,display:n,min:s,max:o,step:r,value:c,percent:i,onChange:d,onCommit:a})=>t("div",{className:O.row,children:[t("div",{className:O.rowHeader,children:[t("span",{className:O.rowLabel,children:e}),t("span",{className:O.rowValue,children:n})]}),t("input",{type:"range",className:O.slider,min:s,max:o,step:r,value:c,"aria-label":e,"data-speed-boost-ignore":"true",onInput:l=>d(Number(l.target.value)),onMouseDown:l=>l.stopPropagation(),onPointerDown:l=>l.stopPropagation(),onTouchStart:l=>l.stopPropagation(),onPointerUp:a,onPointerCancel:a,onTouchEnd:a,onKeyUp:a,onBlur:a,style:{"--slider-percent":`${i}%`}})]}),Ns=({label:e,colors:n,value:s,onChange:o})=>t("div",{className:O.row,children:[t("div",{className:O.rowHeader,children:t("span",{className:O.rowLabel,children:e})}),t("div",{className:O.swatches,children:[n.map(r=>t("button",{type:"button","aria-label":`${e} ${r}`,"aria-pressed":s.toLowerCase()===r.toLowerCase(),onClick:()=>o(r),className:`${O.swatch} ${s.toLowerCase()===r.toLowerCase()?O.swatchPicked:""}`,style:{backgroundColor:r}},r)),t("input",{type:"color","aria-label":`Custom ${e.toLowerCase()}`,className:O.colorInput,value:s,"data-speed-boost-ignore":"true",onInput:r=>o(r.target.value),onMouseDown:r=>r.stopPropagation(),onPointerDown:r=>r.stopPropagation(),onTouchStart:r=>r.stopPropagation()})]})]});function Ps({label:e,options:n,value:s,onChange:o}){return t("div",{className:O.row,children:[t("div",{className:O.rowHeader,children:t("span",{className:O.rowLabel,children:e})}),t("div",{className:O.segmented,role:"group","aria-label":e,children:n.map(r=>t("button",{type:"button","aria-pressed":s===r,onClick:()=>o(r),children:[t("span",{children:r}),s===r&&t(j,{name:"check",size:10})]},r))})]})}const oe=10,me=500,pe=e=>Math.max(0,Math.min(me,Math.round(e))),Bs=({isOpen:e,ms:n,onChange:s,onApply:o,onClose:r,testClipActive:c,onTestClip:i})=>e?t("div",{role:"dialog","aria-label":"Calibrate audio video sync","data-speed-boost-ignore":"true",onClick:d=>d.stopPropagation(),style:{position:"absolute",right:8,bottom:112,width:"min(260px, calc(100% - 16px))",maxHeight:"calc(100% - 124px)",overflowY:"auto",overflowX:"hidden",zIndex:60,display:"flex",flexDirection:"column",alignItems:"center",gap:8,padding:12,borderRadius:"var(--radius-lg)",border:"1px solid var(--glass-border)",background:"rgba(18, 18, 22, 0.95)",boxShadow:"var(--glass-shadow)",backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)",boxSizing:"border-box"},children:[t("div",{style:{fontSize:"0.8rem",fontWeight:800,color:"var(--text-primary)"},children:"A/V sync"}),t("div",{children:t(X,{size:"sm",variant:"secondary",onClick:i,children:c?"Back to video":"Preview test clip"})}),t("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:6,flexWrap:"wrap"},children:[t(X,{size:"sm",onClick:()=>s(pe(n-oe)),"aria-label":"Decrease delay by 10 milliseconds",children:["− ",oe,"ms"]}),t("div",{style:{fontSize:"1.1rem",fontWeight:800,minWidth:64,textAlign:"center"},children:[n,"ms"]}),t(X,{size:"sm",onClick:()=>s(pe(n+oe)),"aria-label":"Increase delay by 10 milliseconds",children:["+ ",oe,"ms"]})]}),t(Qr,{label:"Video delay",display:`${n}ms`,min:0,max:me,step:5,value:n,percent:n/me*100,onChange:d=>s(pe(d))}),t("div",{style:{display:"flex",gap:8,justifyContent:"center",flexWrap:"wrap"},children:[t(X,{size:"sm",variant:"secondary",onClick:r,children:"Cancel"}),t(X,{size:"sm",onClick:o,children:["Apply ",n,"ms"]})]})]}):null;function As({videoRef:e,sourceType:n,resetKey:s,onEnd:o}){const r=C(!1),c=C(o);c.current=o,F(()=>{r.current=!1},[s]);const i=A(()=>{const a=e.current?.duration;!a||!Number.isFinite(a)||console.info(`[playback] duration ${a.toFixed(2)}s`)},[e]);return{checkEnd:A((a=!1)=>{const l=e.current;!l||n==="iframe"||r.current||!a&&!Ct(l.currentTime,l.duration)||(r.current=!0,console.info(`[playback] end reached at ${l.currentTime.toFixed(2)}s / ${l.duration.toFixed(2)}s`),c.current())},[n,e]),logDuration:i}}function Es(e,n,s){const o=ht(),r=C({watch:o,selection:n,loading:s});r.current={watch:o,selection:n,loading:s};const[c,i]=P(!1),d=C(""),a=C(""),l=C(""),b=C(!1),k=!!o.session&&!o.session.host;F(()=>(!o.session&&b.current&&e.applyRemotePlayback(void 0,!1,1),b.current=!!o.session,e.setPlaybackLocked(!!o.session&&(k||!o.connected)),o.session&&!o.connected&&e.applyRemotePlayback(void 0,!1,1),()=>e.setPlaybackLocked(!1)),[e,k,o.connected,o.session]);const _=A((E=!1)=>{const{watch:u,selection:p,loading:x}=r.current,f=e.mediaRef.current;if(!u.session||!u.room||!f)return;if(u.session.host){u.connected&&u.selfId!==l.current&&!x&&p&&f.readyState>=1&&(l.current=u.selfId,Fe(p,u.room.selection)&&e.applyRemotePlayback(u.room.position,!1,u.room.rate));return}const m=u.room,g=p&&Fe(p,m.selection);if(!u.connected||x||!g||f.readyState<1){e.applyRemotePlayback(void 0,!1,m.rate);return}const B=Date.now()+u.clock.offset-m.updatedAt<15e3;if(m.playing&&!B){e.applyRemotePlayback(void 0,!1,m.rate);return}const h=m.playing&&m.hostOnline&&B,T=Math.min(f.duration||1/0,mt({...m,playing:h},Date.now()+u.clock.offset)),N=T-f.currentTime,y=Math.abs(N)>(h?1.25:.15),I=h&&!y&&Math.abs(N)>.15?Math.min(4,Math.max(.25,m.rate*(N>0?1.03:.97))):m.rate,q=e.getState().playBlocked;e.applyRemotePlayback(y?T:void 0,h&&(!q||E),I),i(q&&h)},[e]);return F(()=>{if(!o.session)return;const E=()=>{const{watch:h,selection:T,loading:N}=r.current,y=e.mediaRef.current;if(!h.connected||!h.session?.host||!h.room)return;if(!T||N||!y||y.readyState<1){h.room.playing&&h.send({type:"update",...h.room,playing:!1});return}_();const I=e.getState(),q=!y.paused&&!y.ended&&!I.isBuffering,K={type:"update",selection:T,position:y.currentTime+(q?h.clock.latency/1e3*y.playbackRate:0),playing:q,rate:y.playbackRate},$=JSON.stringify(K);!q&&a.current===$||(a.current=$,h.send(K))},u=()=>{const{watch:h,selection:T,loading:N}=r.current,y=e.getState(),I=e.mediaRef.current,q=y.error||!N&&!T?"error":y.playBlocked?"blocked":N||!I||I.readyState<1?"loading":y.isBuffering?"buffering":"ready";h.connected&&`${h.selfId}:${q}`!==d.current&&(d.current=`${h.selfId}:${q}`,h.send({type:"status",status:q})),_()};let p=null;const x=["play","pause","seeked","ratechange","playing","waiting","canplay","ended"];let f;const m=()=>{clearTimeout(f),f=setTimeout(E,100)},g=setInterval(()=>{const h=e.mediaRef.current;p!==h&&(x.forEach(T=>p?.removeEventListener(T,m)),p=h,x.forEach(T=>p?.addEventListener(T,m))),u()},500),B=setInterval(E,3e3);return()=>{clearInterval(g),clearInterval(B),clearTimeout(f),x.forEach(T=>p?.removeEventListener(T,m));const{watch:h}=r.current;h.session?.host&&h.room&&h.connected&&h.send({type:"update",...h.room,playing:!1,position:e.mediaRef.current?.currentTime??h.room.position})}},[e,o.session,_]),F(()=>{_()},[o.room,o.connected,n,s,_]),{needsPlayback:c,enablePlayback:()=>_(!0)}}export{Ls as A,is as B,hs as C,Ps as D,_s as E,Q as F,Y as G,Qr as M,ms as P,ps as R,Ns as S,os as T,fs as a,vs as b,ns as c,rs as d,ds as e,cs as f,as as g,Es as h,ks as i,Cs as j,xs as k,As as l,ws as m,Ts as n,ts as o,gs as p,us as q,ss as r,zn as s,fr as t,Ss as u,es as v,Bs as w,ys as x,bs as y,ls as z};
|