mirror of
https://github.com/SoPat712/dotfiles.git
synced 2025-08-21 18:38:46 -04:00
2 lines
39 KiB
JavaScript
2 lines
39 KiB
JavaScript
import{g as w,ae as kt,a1 as d,a2 as T,a3 as i,ab as _,W as x,Z as p,a8 as R,a6 as f,m as a,a7 as H,af as et,ag as tt,F,K as Ue,d as O,r as ot,c as C,M as Se,x as at,u,Y as J,ao as $e,D as he,$ as nt,n as N,ap as lt,aq as rt,S as Fe,a5 as se,N as _e,P as Ce,a0 as Xe,w as Tt,q as $t,ar as Ct,A as We}from"./vue-d2584a6d.js";import{V as le,a as De,b as Ge,c as Ie,d as re,u as He,e as fe,f as Ke,g as be,h as ze,i as Q,j as qe,k as M,l as Z,m as Ye,n as Be,o as Vt,p as Oe,q as Ve,r as ve,s as Te,t as ee,v as st,w as wt,x as q,C as it,_ as X,y as U,z as we,A as St,B as Dt,T as L,D as dt,E as ut,F as It,G as Bt,H as B,I as je,J as Pt,K as Et,L as xt,R as Lt,M as K,N as Je,O as Ne,P as At,Q as Rt}from"./index-135ae4c1.js";import{_ as Qe}from"./dayjs-f7aba705.js";import"./faker-c43f92d4.js";import{d as ie}from"./dayjs.min-1969f9c6.js";import{ac as ct}from"./vuetify-e547ef1b.js";import{u as Mt}from"./ArrayPagination-26934cac.js";import{d as Ot}from"./index-fd06c5c5.js";const Nt={class:"d-flex"},Ut={key:2},Ft={key:3},Gt=w({__name:"RightClickMenuEntry",props:{text:{},icon:{},action:{type:Function},hidden:{type:Boolean},disabled:{type:Boolean},disabledText:{},disabledIcon:{},divider:{type:Boolean},children:{}},setup(h){return(e,l)=>{const t=kt("RightClickMenuEntry",!0);return e.hidden?R("",!0):(d(),T(re,{key:0,class:"px-3 pointer",disabled:e.disabled,onClick:e.action},{default:i(()=>[_("div",Nt,[e.disabled&&e.disabledIcon?(d(),T(le,{key:0,class:"mr-2"},{default:i(()=>[x(p(e.disabledIcon),1)]),_:1})):e.icon?(d(),T(le,{key:1,class:"mr-2"},{default:i(()=>[x(p(e.icon),1)]),_:1})):R("",!0),e.disabled&&e.disabledText?(d(),f("span",Ut,p(e.disabledText),1)):(d(),f("span",Ft,p(e.text),1)),a(De),!e.disabled&&e.children?(d(),T(le,{key:4},{default:i(()=>[x("mdi-chevron-right")]),_:1})):R("",!0)]),e.children?(d(),T(Ge,{key:0,activator:"parent","open-on-hover":!0,"open-on-click":!0,"close-delay":"0","open-delay":"0",location:"right"},{default:i(()=>[a(Ie,null,{default:i(()=>[(d(!0),f(F,null,H(e.children,n=>(d(),T(t,et(tt(n)),null,16))),256))]),_:1})]),_:1})):R("",!0)]),_:1},8,["disabled","onClick"]))}}}),Ht=w({__name:"RenameTorrentDialog",props:{guid:{},hash:{}},setup(h){const e=h,{isOpened:l}=He(e.guid),{t}=Ue(),n=fe(),r=O(),o=O(),s=O(!1),c=ot({newName:""}),v=[P=>!!P||t("dialogs.renameTorrent.required"),P=>P!==S.value||t("dialogs.renameTorrent.sameName")],k=C(()=>n.getTorrentByHash(e.hash)),S=C(()=>k.value?.name);async function A(){await o.value?.validate(),s.value&&(await n.renameTorrent(e.hash,c.newName),y())}const y=()=>{l.value=!1};return Se(()=>{c.newName=k.value?.name||""}),at(()=>{r.value?.select()}),(P,E)=>(d(),T(Ye,{modelValue:u(l),"onUpdate:modelValue":E[3]||(E[3]=V=>he(l)?l.value=V:null)},{default:i(()=>[a(Z,null,{default:i(()=>[a(Ke,null,{default:i(()=>[x(p(P.$t("dialogs.renameTorrent.title")),1)]),_:1}),a(be,null,{default:i(()=>[a(u(ze),{modelValue:s.value,"onUpdate:modelValue":E[1]||(E[1]=V=>s.value=V),ref_key:"form",ref:o,onSubmit:E[2]||(E[2]=J(()=>{},["prevent"]))},{default:i(()=>[S.value?(d(),T(Q,{key:0,"model-value":S.value,disabled:"",label:P.$t("dialogs.renameTorrent.oldName")},null,8,["model-value","label"])):R("",!0),a(Q,{modelValue:c.newName,"onUpdate:modelValue":E[0]||(E[0]=V=>c.newName=V),ref_key:"field",ref:r,rules:v,autofocus:"",label:P.$t("dialogs.renameTorrent.newName"),onKeydown:$e(A,["enter"])},null,8,["modelValue","label"])]),_:1},8,["modelValue"])]),_:1}),a(qe,null,{default:i(()=>[a(De),a(M,{color:"error",onClick:y},{default:i(()=>[x(p(P.$t("common.cancel")),1)]),_:1}),a(M,{color:"accent",disabled:!s.value,onClick:A},{default:i(()=>[x(p(P.$t("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),ne=-2,z=-1,Kt=w({__name:"ShareLimitDialog",props:{guid:{},hashes:{}},setup(h){const e=h,{isOpened:l}=He(e.guid),t=Be(),n=fe(),r=O(!1),o=O("global"),s=O(!1),c=O(0),v=O(!1),k=O(0),S=O(!1),A=O(0),y=C(()=>o.value!=="enabled");function P(){l.value=!1}async function E(){switch(o.value){case"global":await t.setShareLimit(e.hashes,ne,ne,ne);break;case"disabled":await t.setShareLimit(e.hashes,z,z,z);break;case"enabled":await t.setShareLimit(e.hashes,s.value?c.value:z,v.value?k.value:z,S.value?A.value:z);break}P()}return Se(async()=>{const V=n.getTorrentByHash(e.hashes[0]);if(!V)return P();const g=V.ratio_limit,D=V.seeding_time_limit,Y=V.inactive_seeding_time_limit;g===ne&&D===ne&&Y===ne?o.value="global":g===z&&D===z&&Y===z?o.value="disabled":(o.value="enabled",s.value=g>=0,c.value=s.value?g:0,v.value=D>=0,k.value=v.value?D:0,S.value=Y>=0,A.value=S.value?Y:0)}),(V,g)=>(d(),T(Ye,{modelValue:u(l),"onUpdate:modelValue":g[9]||(g[9]=D=>he(l)?l.value=D:null),"max-width":"500"},{default:i(()=>[a(Z,{title:V.$t("dialogs.share_limit.title")},{default:i(()=>[a(be,null,{default:i(()=>[a(ze,{modelValue:r.value,"onUpdate:modelValue":g[7]||(g[7]=D=>r.value=D),onSubmit:g[8]||(g[8]=J(()=>{},["prevent"])),onKeydown:$e(J(E,["prevent"]),["enter"])},{default:i(()=>[a(Vt,{modelValue:o.value,"onUpdate:modelValue":g[0]||(g[0]=D=>o.value=D)},{default:i(()=>[a(Oe,{label:V.$t("dialogs.share_limit.global"),value:"global"},null,8,["label"]),a(Oe,{label:V.$t("dialogs.share_limit.disabled"),value:"disabled"},null,8,["label"]),a(Oe,{label:V.$t("dialogs.share_limit.enabled"),value:"enabled"},null,8,["label"])]),_:1},8,["modelValue"]),a(Ve,null,{default:i(()=>[a(ve,{cols:"12",class:"d-flex align-center"},{default:i(()=>[_("span",null,[a(Te,{modelValue:s.value,"onUpdate:modelValue":g[1]||(g[1]=D=>s.value=D),disabled:y.value},null,8,["modelValue","disabled"])]),a(Q,{modelValue:c.value,"onUpdate:modelValue":g[2]||(g[2]=D=>c.value=D),disabled:y.value||!s.value,density:"compact","hide-details":"",label:V.$t("dialogs.share_limit.ratio_limit")},null,8,["modelValue","disabled","label"])]),_:1}),a(ve,{cols:"12",class:"d-flex align-center"},{default:i(()=>[_("span",null,[a(Te,{modelValue:v.value,"onUpdate:modelValue":g[3]||(g[3]=D=>v.value=D),disabled:y.value},null,8,["modelValue","disabled"])]),a(Q,{modelValue:k.value,"onUpdate:modelValue":g[4]||(g[4]=D=>k.value=D),disabled:y.value||!v.value,density:"compact","hide-details":"",label:V.$t("dialogs.share_limit.seeding_time_limit")},null,8,["modelValue","disabled","label"])]),_:1}),a(ve,{cols:"12",class:"d-flex align-center"},{default:i(()=>[_("span",null,[a(Te,{modelValue:S.value,"onUpdate:modelValue":g[5]||(g[5]=D=>S.value=D),disabled:y.value},null,8,["modelValue","disabled"])]),a(Q,{modelValue:A.value,"onUpdate:modelValue":g[6]||(g[6]=D=>A.value=D),disabled:y.value||!S.value,density:"compact","hide-details":"",label:V.$t("dialogs.share_limit.inactive_seeding_time_limit")},null,8,["modelValue","disabled","label"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])]),_:1}),a(qe,null,{default:i(()=>[a(De),a(M,{color:"error",onClick:P},{default:i(()=>[x(p(V.$t("common.cancel")),1)]),_:1}),a(M,{color:"accent",disabled:!r.value,onClick:E},{default:i(()=>[x(p(V.$t("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1},8,["title"])]),_:1},8,["modelValue"]))}}),Ze=w({__name:"SpeedLimitDialog",props:{guid:{},hashes:{},mode:{}},setup(h){const e=h,{isOpened:l}=He(e.guid),t=Be(),n=fe(),r=O(!1),o=O(0);function s(){l.value=!1}async function c(){const v=Math.max(0,o.value)*1e3;switch(e.mode){case"download":await t.setDownloadLimit(v,e.hashes);break;case"upload":await t.setUploadLimit(v,e.hashes);break}s()}return Se(async()=>{const v=n.getTorrentByHash(e.hashes[0]);if(!v)return s();switch(e.mode){case"download":o.value=Math.max(0,Math.round(v.dl_limit/1e3));break;case"upload":o.value=Math.max(0,Math.round(v.up_limit/1e3));break}}),(v,k)=>(d(),T(Ye,{modelValue:u(l),"onUpdate:modelValue":k[3]||(k[3]=S=>he(l)?l.value=S:null)},{default:i(()=>[a(Z,{title:v.$t(`dialogs.speed_limit.${v.mode}`)},{default:i(()=>[a(be,null,{default:i(()=>[a(ze,{modelValue:r.value,"onUpdate:modelValue":k[1]||(k[1]=S=>r.value=S),onSubmit:k[2]||(k[2]=J(()=>{},["prevent"])),onKeydown:$e(J(c,["prevent"]),["enter"])},{default:i(()=>[a(Q,{modelValue:o.value,"onUpdate:modelValue":k[0]||(k[0]=S=>o.value=S),type:"number",autofocus:"",clearable:"",label:v.$t("dialogs.speed_limit.label"),"prepend-inner-icon":"mdi-speedometer",suffix:"kB/s",onKeydown:$e(J(c,["prevent"]),["enter"])},null,8,["modelValue","label","onKeydown"])]),_:1},8,["modelValue","onKeydown"])]),_:1}),a(qe,null,{default:i(()=>[a(De),a(M,{color:"error",onClick:s},{default:i(()=>[x(p(v.$t("common.cancel")),1)]),_:1}),a(M,{color:"accent",disabled:!r.value,onClick:c},{default:i(()=>[x(p(v.$t("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1},8,["title"])]),_:1},8,["modelValue"]))}}),Pe=h=>(lt("data-v-4e81b4b5"),h=h(),rt(),h),zt={class:"d-flex justify-space-around"},qt=Pe(()=>_("span",null,"Resume",-1)),Yt=Pe(()=>_("span",null,"Force Resume",-1)),jt=Pe(()=>_("span",null,"Pause",-1)),Xt=Pe(()=>_("span",null,"Delete",-1)),Wt=w({__name:"RightClickMenu",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(h,{emit:e}){const l=h,t=e,{t:n}=Ue(),r=nt(),o=ee(),s=st(),c=Be(),v=wt(),k=fe(),S=C({get:()=>l.modelValue,set:I=>t("update:modelValue",I)}),A=C(()=>o.selectedTorrents.length>1),y=C(()=>o.selectedTorrents),P=C(()=>y.value[0]),E=C(()=>k.getTorrentByHash(P.value)),V=C(()=>o.selectedTorrents.map(k.getTorrentByHash).filter(I=>!!I)),g=C(()=>[{name:""},...c.categories]);async function D(){await k.resumeTorrents(y)}async function Y(){await k.forceResumeTorrents(y)}async function Ee(){await k.pauseTorrents(y)}function xe(){s.createDialog(it,{hashes:[...o.selectedTorrents]})}function de(){s.createDialog(Qe,{hashes:[...o.selectedTorrents],mode:"dl"})}function j(){s.createDialog(Qe,{hashes:[...o.selectedTorrents],mode:"save"})}function te(){s.createDialog(Ht,{hash:o.selectedTorrents[0]})}async function Le(){await k.recheckTorrents(y)}async function ge(){await c.reannounceTorrents(y)}async function oe(){await c.toggleSeqDl(y)}async function Ae(){await c.toggleFLPiecePrio(y)}async function ue(){await c.toggleAutoTmm(y,!E.value?.auto_tmm)}function ye(I){return V.value.every(G=>G&&G.tags&&G.tags.includes(I))}async function Re(I){ye(I)?await k.removeTorrentTags(y.value,[I]):await k.addTorrentTags(y.value,[I])}async function W(I){await navigator.clipboard.writeText(I)}function ce(){s.createDialog(Ze,{hashes:y.value,mode:"download"})}function pe(){s.createDialog(Ze,{hashes:y.value,mode:"upload"})}function ae(){s.createDialog(Kt,{hashes:y.value})}async function ke(){y.value.forEach(I=>{k.exportTorrent(I).then(G=>{const m=window.URL.createObjectURL(G),b=document.createElement("a");b.href=m,b.style.opacity="0",b.setAttribute("download",`${I}.torrent`),document.body.appendChild(b),b.click(),document.body.removeChild(b)})})}const me=C(()=>[{text:n("dashboard.right_click.advanced.title"),icon:"mdi-head-cog",children:[{text:n("dashboard.right_click.advanced.download_path"),icon:"mdi-tray-arrow-down",action:de},{text:n("dashboard.right_click.advanced.save_path"),icon:"mdi-content-save",action:j},{text:n("dashboard.right_click.advanced.rename"),icon:"mdi-rename-box",hidden:A.value,action:te},{text:n("dashboard.right_click.advanced.recheck"),icon:"mdi-playlist-check",action:Le},{text:n("dashboard.right_click.advanced.reannounce"),icon:"mdi-bullhorn",action:ge},{text:n("dashboard.right_click.advanced.seq_dl"),icon:E.value?.seq_dl?"mdi-checkbox-marked":"mdi-checkbox-blank-outline",action:oe},{text:n("dashboard.right_click.advanced.f_l_prio"),icon:E.value?.f_l_piece_prio?"mdi-checkbox-marked":"mdi-checkbox-blank-outline",action:Ae},{text:n("dashboard.right_click.advanced.auto_tmm"),icon:E.value?.auto_tmm?"mdi-checkbox-marked":"mdi-checkbox-blank-outline",action:ue}]},{text:n("dashboard.right_click.priority.title"),icon:"mdi-priority-high",hidden:!v.preferences.queueing_enabled,children:[{text:n("dashboard.right_click.priority.top"),icon:"mdi-priority-high",action:async()=>await k.setTorrentPriority(y.value,"topPrio")},{text:n("dashboard.right_click.priority.increase"),icon:"mdi-arrow-up",action:async()=>await k.setTorrentPriority(y.value,"increasePrio")},{text:n("dashboard.right_click.priority.decrease"),icon:"mdi-arrow-down",action:async()=>await k.setTorrentPriority(y.value,"decreasePrio")},{text:n("dashboard.right_click.priority.bottom"),icon:"mdi-priority-low",action:async()=>await k.setTorrentPriority(y.value,"bottomPrio")}]},{text:n("dashboard.right_click.tags.title"),icon:"mdi-tag",disabled:c.tags.length===0,disabledText:n("dashboard.right_click.tags.disabled_title"),disabledIcon:"mdi-tag-off",children:c.tags.map(I=>({text:I,icon:ye(I)?"mdi-checkbox-marked":"mdi-checkbox-blank-outline",action:async()=>await Re(I)}))},{text:n("dashboard.right_click.category.title"),icon:"mdi-label",disabled:c.categories.length===0,disabledText:n("dashboard.right_click.category.disabled_title"),disabledIcon:"mdi-label-off",children:g.value.map(I=>({text:I.name===""?n("dashboard.right_click.category.clear"):I.name,action:async()=>await k.setTorrentCategory(y.value,I.name)}))},{text:n("dashboard.right_click.speed_limit.title"),icon:"mdi-speedometer-slow",children:[{text:n("dashboard.right_click.speed_limit.download"),icon:"mdi-download",action:ce},{text:n("dashboard.right_click.speed_limit.upload"),icon:"mdi-upload",action:pe},{text:n("dashboard.right_click.speed_limit.share"),icon:"mdi-account-group",action:ae}]},{text:n("dashboard.right_click.copy.title"),icon:"mdi-content-copy",hidden:A.value,children:[{text:n("dashboard.right_click.copy.name"),icon:"mdi-alphabetical-variant",action:async()=>E.value&&await W(E.value.name)},{text:n("dashboard.right_click.copy.hash"),icon:"mdi-pound",action:async()=>await W(P.value)},{text:n("dashboard.right_click.copy.magnet"),icon:"mdi-magnet",action:async()=>E.value&&await W(E.value.magnet)}]},{text:n("dashboard.right_click.export",o.selectedTorrents.length),icon:A.value?"mdi-download-multiple":"mdi-download",action:ke},{text:n("dashboard.right_click.info"),icon:"mdi-information",hidden:A.value,action:()=>r.push({name:"torrentDetail",params:{hash:P.value}})}]);return(I,G)=>S.value?(d(),T(Ge,{key:0,modelValue:S.value,"onUpdate:modelValue":G[0]||(G[0]=m=>S.value=m),activator:"parent","close-on-content-click":!0,transition:"slide-y-transition","scroll-strategy":"none"},{default:i(()=>[a(Ie,null,{default:i(()=>[a(re,null,{default:i(()=>[_("div",zt,[a(q,{location:"top"},{activator:i(({props:m})=>[a(M,N({density:"compact",variant:"plain",icon:"mdi-play"},m,{onClick:D}),null,16)]),default:i(()=>[qt]),_:1}),a(q,{location:"top"},{activator:i(({props:m})=>[a(M,N({density:"compact",variant:"plain",icon:"mdi-fast-forward"},m,{onClick:Y}),null,16)]),default:i(()=>[Yt]),_:1}),a(q,{location:"top"},{activator:i(({props:m})=>[a(M,N({density:"compact",variant:"plain",icon:"mdi-pause"},m,{onClick:Ee}),null,16)]),default:i(()=>[jt]),_:1}),a(q,{location:"top"},{activator:i(({props:m})=>[a(M,N({color:"red",density:"compact",variant:"plain",icon:"mdi-delete-forever"},m,{onClick:xe}),null,16)]),default:i(()=>[Xt]),_:1})])]),_:1}),(d(!0),f(F,null,H(me.value,m=>(d(),T(Gt,et(tt(m)),null,16))),256))]),_:1})]),_:1},8,["modelValue"])):R("",!0)}});const Jt=X(Wt,[["__scopeId","data-v-4e81b4b5"]]),Qt={class:"d-flex flex-column"},Zt={class:"text-caption text-grey"},eo={class:"text-caption text-grey"},pt=w({__name:"ItemAmount",props:{torrent:{},title:{},value:{},total:{}},setup(h){return(e,l)=>(d(),f("div",Qt,[_("div",Zt,p(e.$t(`torrent.properties.${e.title}`)),1),_("div",null,[x(p(e.torrent[e.value])+" ",1),_("span",eo," / "+p(e.torrent[e.total]),1)])]))}}),to={key:0,class:"d-flex flex-column"},oo={class:"text-caption text-grey"},ao={class:"d-flex flex-row gap"},no=w({__name:"ItemChip",props:{torrent:{},title:{},value:{},color:{}},setup(h){const e=h,l=U(),t=C(()=>{const r=e.torrent[e.value],o=typeof r;if(o==="string")return r.length>0?[r]:[];if(o==="object")return r}),n=C(()=>t.value.length<1);return(r,o)=>u(l).hideChipIfUnset&&n.value?R("",!0):(d(),f("div",to,[_("div",oo,p(r.$t(`torrent.properties.${r.title}`)),1),_("div",ao,[!t.value||n.value?(d(),T(we,{key:0,color:r.color.replace("$1",r.torrent[r.value]),variant:"flat"},{default:i(()=>[x(p(r.$t(`torrent.properties.empty_${r.value}`)),1)]),_:1},8,["color"])):(d(!0),f(F,{key:1},H(t.value,s=>(d(),T(we,{color:r.color.replace("$1",r.torrent.state),variant:"flat"},{default:i(()=>[x(p(s),1)]),_:2},1032,["color"]))),256))])]))}});const mt=X(no,[["__scopeId","data-v-08ef66f1"]]),lo={class:"d-flex flex-column"},ro={class:"text-caption text-grey"},so={class:"text-caption text-grey"},vt=w({__name:"ItemData",props:{torrent:{},title:{},value:{}},setup(h){const e=U();return(l,t)=>(d(),f("div",lo,[_("div",ro,p(l.$t(`torrent.properties.${l.title}`)),1),_("div",null,[x(p(u(St)(l.torrent[l.value],u(e).useBinarySize))+" ",1),_("span",so,p(u(Dt)(l.torrent[l.value],u(e).useBinarySize)),1)])]))}}),io={class:"d-flex flex-column"},uo={class:"text-caption text-grey"},co={key:0},po={key:1},ht=w({__name:"ItemDateTime",props:{torrent:{},title:{},value:{}},setup(h){const e=U();return(l,t)=>(d(),f("div",io,[_("div",uo,p(l.$t(`torrent.properties.${l.title}`)),1),_("div",null,[l.torrent[l.value]>0?(d(),f("span",co,p(u(ie)(l.torrent[l.value]*1e3).format(u(e).dateFormat??"DD/MM/YYYY, HH:mm:ss")),1)):(d(),f("span",po,p(l.$t("dashboard.not_complete")),1))])]))}}),mo={class:"d-flex flex-column"},vo={class:"text-caption text-grey"},ho={key:0},_o={key:1},_t=w({__name:"ItemDuration",props:{torrent:{},title:{},value:{}},setup(h){const e=h,l=C(()=>{const t=ie.duration(e.torrent[e.value],"seconds"),n=[t.years(),t.months(),t.days(),t.hours(),t.minutes(),t.seconds()],r=["Y","M","d","h","m","s"];let o=!1;return n.map((s,c)=>{if(o||s)return o=!0,`${s}${r[c]}`}).filter(s=>s).join(" ")});return(t,n)=>(d(),f("div",mo,[_("div",vo,p(t.$t(`torrent.properties.${t.title}`)),1),_("div",null,[t.torrent[t.value]>0?(d(),f("span",ho,p(l.value),1)):(d(),f("span",_o,p(t.$t("dashboard.not_complete")),1))])]))}}),fo={class:"d-flex flex-column"},bo={class:"text-caption text-grey"},ft=w({__name:"ItemPercent",props:{torrent:{},title:{},value:{}},setup(h){const e=h,l=C(()=>[L.UPLOADING,L.CHECKING_UP,L.FORCED_UP,L.ALLOCATING,L.DOWNLOADING,L.META_DL,L.CHECKING_DL,L.FORCED_DL,L.CHECKING_RESUME_DATA,L.MOVING].includes(e.torrent.state));return(t,n)=>(d(),f("div",fo,[_("div",bo,p(t.$t(`torrent.properties.${t.title}`)),1),a(ut,{"model-value":t.torrent[t.value],max:1,striped:l.value,height:20,color:`torrent-${t.torrent.state}`,rounded:"sm",style:{width:"10em"}},{default:i(()=>[x(p(u(dt)(t.torrent[t.value])),1)]),_:1},8,["model-value","striped","color"])]))}}),go={class:"d-flex flex-column"},yo={class:"text-caption text-grey"},bt=w({__name:"ItemRelativeTime",props:{torrent:{},title:{},value:{}},setup(h){return(e,l)=>(d(),f("div",go,[_("div",yo,p(e.$t(`torrent.properties.${e.title}`)),1),_("div",null,[_("span",null,p(u(ie)(e.torrent[e.value]*1e3).fromNow()),1)])]))}}),ko={class:"d-flex flex-column"},To={class:"text-caption text-grey"},$o={class:"text-caption text-grey"},gt=w({__name:"ItemSpeed",props:{torrent:{},title:{},value:{}},setup(h){const e=U();return(l,t)=>(d(),f("div",ko,[_("div",To,p(l.$t(`torrent.properties.${l.title}`)),1),_("div",null,[x(p(u(It)(l.torrent[l.value],u(e).useBitSpeed))+" ",1),_("span",$o,p(u(Bt)(l.torrent[l.value],u(e).useBitSpeed)),1)])]))}}),Co={class:"d-flex flex-column"},Vo={class:"text-caption text-grey"},yt=w({__name:"ItemText",props:{torrent:{},title:{},value:{}},setup(h){return(e,l)=>(d(),f("div",Co,[_("div",Vo,p(e.$t(`torrent.properties.${e.title}`)),1),_("div",null,p(e.torrent[e.value]),1)]))}}),wo={class:"d-flex gap flex-wrap"},So=w({__name:"GridTorrent",props:{torrent:{}},emits:["onTorrentClick"],setup(h){const e=h,l=ee(),t=U(),n=C(()=>(e.torrent.progress===1?t.doneGridProperties:t.busyGridProperties).filter(c=>c.active).sort((c,v)=>c.order-v.order)),r=s=>{switch(s){case B.AMOUNT:return pt;case B.CHIP:return mt;case B.DATA:return vt;case B.DATETIME:return ht;case B.DURATION:return _t;case B.PERCENT:return ft;case B.RELATIVE:return bt;case B.SPEED:return gt;case B.TEXT:default:return yt}},o=C(()=>l.isTorrentInSelection(e.torrent.hash));return(s,c)=>(d(),T(Z,{class:se(`sideborder ${s.torrent.state} pointer`),height:"100%",color:o.value?`torrent-${s.torrent.state}-darken-3`:void 0,onClick:c[0]||(c[0]=v=>s.$emit("onTorrentClick",v,s.torrent))},{default:i(()=>[a(Ke,{class:"text-wrap text-subtitle-1 pt-1 pb-0"},{default:i(()=>[x(p(s.torrent.name),1)]),_:1}),a(be,null,{default:i(()=>[_("div",wo,[(d(!0),f(F,null,H(n.value,v=>(d(),T(Fe(r(v.type)),N({torrent:s.torrent},v.props),null,16,["torrent"]))),256))])]),_:1})]),_:1},8,["class","color"]))}});const Do=X(So,[["__scopeId","data-v-60c9ae77"]]),Io={class:"d-flex align-center",style:{height:"100%",width:"100%"}},Bo=w({__name:"GridView",props:{paginatedTorrents:{}},emits:["onCheckboxClick","onTorrentClick","onTorrentDblClick","onTorrentRightClick","startPress","endPress"],setup(h){const e=ct(),l=ee();return(t,n)=>(d(),T(Ve,{id:"torrentList"},{default:i(()=>[(d(!0),f(F,null,H(t.paginatedTorrents,r=>(d(),T(ve,{cols:"12",lg:"3",md:"4",sm:"6",xl:"2",class:se([u(e).mobile?"pb-2":"pb-4","pt-0"]),onContextmenu:o=>t.$emit("onTorrentRightClick",o,r),onTouchcancel:n[1]||(n[1]=o=>t.$emit("endPress")),onTouchend:n[2]||(n[2]=o=>t.$emit("endPress")),onTouchmove:n[3]||(n[3]=o=>t.$emit("endPress")),onTouchstart:o=>t.$emit("startPress",o.touches.item(0),r),onDblclick:o=>t.$emit("onTorrentDblClick",r)},{default:i(()=>[_("div",Io,[a(je,null,{default:i(()=>[_e(a(M,{color:`torrent-${r.state}`,icon:u(l).isTorrentInSelection(r.hash)?"mdi-checkbox-marked":"mdi-checkbox-blank-outline",class:"mr-2",variant:"text",onClick:o=>t.$emit("onCheckboxClick",r)},null,8,["color","icon","onClick"]),[[Ce,u(l).isSelectionMultiple]])]),_:2},1024),a(Do,{torrent:r,onOnTorrentClick:n[0]||(n[0]=(o,s)=>t.$emit("onTorrentClick",o,s))},null,8,["torrent"])])]),_:2},1032,["class","onContextmenu","onTouchstart","onDblclick"]))),256))]),_:1}))}});const Po=X(Bo,[["__scopeId","data-v-31f288a6"]]),Eo={class:"d-flex gap flex-wrap"},xo=w({__name:"ListTorrent",props:{torrent:{}},emits:["onTorrentClick"],setup(h){const e=h,l=ee(),t=U(),n=C(()=>(e.torrent.progress===1?t.doneTorrentProperties:t.busyTorrentProperties).filter(c=>c.active).sort((c,v)=>c.order-v.order)),r=s=>{switch(s){case B.AMOUNT:return pt;case B.CHIP:return mt;case B.DATA:return vt;case B.DATETIME:return ht;case B.DURATION:return _t;case B.PERCENT:return ft;case B.RELATIVE:return bt;case B.SPEED:return gt;case B.TEXT:default:return yt}},o=C(()=>l.isTorrentInSelection(e.torrent.hash));return(s,c)=>(d(),T(Z,{class:se(`sideborder ${s.torrent.state} pointer`),width:"100%",color:o.value?`torrent-${s.torrent.state}-darken-3`:void 0,onClick:c[0]||(c[0]=v=>s.$emit("onTorrentClick",v,s.torrent))},{default:i(()=>[a(Ke,{class:"text-wrap text-subtitle-1 pt-1 pb-0"},{default:i(()=>[x(p(s.torrent.name),1)]),_:1}),a(be,{class:"pa-2 pt-0"},{default:i(()=>[_("div",Eo,[(d(!0),f(F,null,H(n.value,v=>(d(),T(Fe(r(v.type)),N({torrent:s.torrent},v.props),null,16,["torrent"]))),256))])]),_:1})]),_:1},8,["class","color"]))}});const Lo=X(xo,[["__scopeId","data-v-e5ea358f"]]),Ao={class:"d-flex align-center"},Ro=w({__name:"ListView",props:{paginatedTorrents:{}},emits:["onCheckboxClick","onTorrentClick","onTorrentDblClick","onTorrentRightClick","startPress","endPress"],setup(h){const e=ct(),l=ee();return(t,n)=>(d(),T(Ie,{id:"torrentList",class:"pa-0"},{default:i(()=>[(d(!0),f(F,null,H(t.paginatedTorrents,r=>(d(),T(re,{id:`torrent-${r.hash}`,class:se([u(e).mobile?"mb-2":"mb-4","pa-0"]),onContextmenu:o=>t.$emit("onTorrentRightClick",o,r),onTouchcancel:n[1]||(n[1]=o=>t.$emit("endPress")),onTouchend:n[2]||(n[2]=o=>t.$emit("endPress")),onTouchmove:n[3]||(n[3]=o=>t.$emit("endPress")),onTouchstart:o=>t.$emit("startPress",o.touches.item(0),r),onDblclick:o=>t.$emit("onTorrentDblClick",r)},{default:i(()=>[_("div",Ao,[a(je,null,{default:i(()=>[_e(a(M,{color:`torrent-${r.state}`,icon:u(l).isTorrentInSelection(r.hash)?"mdi-checkbox-marked":"mdi-checkbox-blank-outline",class:"mr-2",variant:"text",onClick:o=>t.$emit("onCheckboxClick",r)},null,8,["color","icon","onClick"]),[[Ce,u(l).isSelectionMultiple]])]),_:2},1024),a(Lo,{torrent:r,onOnTorrentClick:n[0]||(n[0]=(o,s)=>t.$emit("onTorrentClick",o,s))},null,8,["torrent"])])]),_:2},1032,["id","class","onContextmenu","onTouchstart","onDblclick"]))),256))]),_:1}))}});const Mo=X(Ro,[["__scopeId","data-v-e8f6336b"]]),Oo=w({__name:"ItemAmount",props:{torrent:{},title:{},value:{},total:{}},setup(h){return(e,l)=>(d(),f("td",null,p(e.torrent[e.value])+" / "+p(e.torrent[e.total]),1))}}),No={key:0,class:"d-flex flex-row gap"},Uo=w({__name:"ItemChip",props:{torrent:{},title:{},value:{},color:{}},setup(h){const e=h,l=U(),t=C(()=>{const r=e.torrent[e.value],o=typeof r;if(o==="string")return r.length>0?[r]:[];if(o==="object")return r}),n=C(()=>t.value.length<1);return(r,o)=>(d(),f("td",null,[u(l).hideChipIfUnset&&n.value?R("",!0):(d(),f("div",No,[!t.value||n.value?(d(),T(we,{key:0,color:r.color.replace("$1",r.torrent[r.value]),variant:"flat"},{default:i(()=>[x(p(r.$t(`torrent.properties.empty_${r.value}`)),1)]),_:1},8,["color"])):(d(!0),f(F,{key:1},H(t.value,s=>(d(),T(we,{color:r.color.replace("$1",r.torrent.state),variant:"flat"},{default:i(()=>[x(p(s),1)]),_:2},1032,["color"]))),256))]))]))}});const Fo=X(Uo,[["__scopeId","data-v-23c01601"]]),Go=w({__name:"ItemData",props:{torrent:{},title:{},value:{}},setup(h){const e=U();return(l,t)=>(d(),f("td",null,p(u(Pt)(l.torrent[l.value],u(e).useBinarySize)),1))}}),Ho={key:0},Ko={key:1},zo=w({__name:"ItemDateTime",props:{torrent:{},title:{},value:{}},setup(h){const e=U();return(l,t)=>l.torrent[l.value]>0?(d(),f("td",Ho,p(u(ie)(l.torrent[l.value]*1e3).format(u(e).dateFormat??"DD/MM/YYYY, HH:mm:ss")),1)):(d(),f("td",Ko,p(l.$t("dashboard.not_complete")),1))}}),qo={key:0},Yo={key:1},jo=w({__name:"ItemDuration",props:{torrent:{},title:{},value:{}},setup(h){const e=h,l=C(()=>{const t=ie.duration(e.torrent[e.value],"seconds"),n=[t.years(),t.months(),t.days(),t.hours(),t.minutes(),t.seconds()],r=["Y","M","d","h","m","s"];let o=!1;return n.map((s,c)=>{if(o||s)return o=!0,`${s}${r[c]}`}).filter(s=>s).join(" ")});return(t,n)=>t.torrent[t.value]>0?(d(),f("td",qo,p(l.value),1)):(d(),f("td",Yo,p(t.$t("dashboard.not_complete")),1))}}),Xo=w({__name:"ItemPercent",props:{torrent:{},title:{},value:{}},setup(h){const e=h,l=C(()=>[L.UPLOADING,L.CHECKING_UP,L.FORCED_UP,L.ALLOCATING,L.DOWNLOADING,L.META_DL,L.CHECKING_DL,L.FORCED_DL,L.CHECKING_RESUME_DATA,L.MOVING].includes(e.torrent.state));return(t,n)=>(d(),f("td",null,[a(ut,{"model-value":t.torrent[t.value],max:1,striped:l.value,height:20,color:`torrent-${t.torrent.state}`,rounded:"sm",style:{width:"10em"}},{default:i(()=>[x(p(u(dt)(t.torrent[t.value])),1)]),_:1},8,["model-value","striped","color"])]))}}),Wo=w({__name:"ItemRelativeTime",props:{torrent:{},title:{},value:{}},setup(h){return(e,l)=>(d(),f("td",null,p(u(ie)(e.torrent[e.value]*1e3).fromNow()),1))}}),Jo=w({__name:"ItemSpeed",props:{torrent:{},title:{},value:{}},setup(h){const e=U();return(l,t)=>(d(),f("td",null,p(u(Et)(l.torrent[l.value],u(e).useBitSpeed)),1))}}),Qo=w({__name:"ItemText",props:{torrent:{},title:{},value:{}},setup(h){return(e,l)=>(d(),f("td",null,p(e.torrent[e.value]),1))}}),Zo=w({__name:"TableTorrent",props:{torrent:{}},setup(h){const e=U(),l=C(()=>e.tableProperties.filter(n=>n.active).sort((n,r)=>n.order-r.order)),t=n=>{switch(n){case B.AMOUNT:return Oo;case B.CHIP:return Fo;case B.DATA:return Go;case B.DATETIME:return zo;case B.DURATION:return jo;case B.PERCENT:return Xo;case B.RELATIVE:return Wo;case B.SPEED:return Jo;case B.TEXT:default:return Qo}};return(n,r)=>(d(!0),f(F,null,H(l.value,o=>(d(),T(Fe(t(o.type)),N({torrent:n.torrent},o.props),null,16,["torrent"]))),256))}}),ea=h=>(lt("data-v-8832d38a"),h=h(),rt(),h),ta=ea(()=>_("th",{class:"px-1"},null,-1)),oa={key:0},aa={class:"text-left"},na={class:"text-left"},la=["onContextmenu","onTouchstart","onClick","onDblclick"],ra={key:0},sa=w({__name:"TableView",props:{paginatedTorrents:{}},emits:["onCheckboxClick","onTorrentClick","onTorrentDblClick","onTorrentRightClick","startPress","endPress"],setup(h){const e=ee(),l=U(),t=C(()=>l.tableProperties.filter(o=>o.active).sort((o,s)=>o.order-s.order));function n(o){return e.isTorrentInSelection(o.hash)}const r=o=>["pointer",n(o)?`bg-torrent-${o.state}-darken-3 selected`:""];return(o,s)=>(d(),T(xt,{id:"torrentList",class:"pa-0",density:"compact"},{default:i(()=>[_("thead",null,[_("tr",null,[ta,u(e).isSelectionMultiple?(d(),f("th",oa)):R("",!0),_("th",aa,p(o.$t("torrent.properties.name")),1),(d(!0),f(F,null,H(t.value,c=>(d(),f("th",na,p(o.$t(`torrent.properties.${c.props.title}`)),1))),256))])]),_("tbody",null,[(d(!0),f(F,null,H(o.paginatedTorrents,c=>_e((d(),f("tr",{class:se(r(c)),onContextmenu:v=>o.$emit("onTorrentRightClick",v,c),onTouchcancel:s[0]||(s[0]=v=>o.$emit("endPress")),onTouchend:s[1]||(s[1]=v=>o.$emit("endPress")),onTouchmove:s[2]||(s[2]=v=>o.$emit("endPress")),onTouchstart:v=>o.$emit("startPress",v.touches.item(0),c),onClick:v=>o.$emit("onTorrentClick",v,c),onDblclick:v=>o.$emit("onTorrentDblClick",c)},[_("td",{class:se(`pa-0 bg-torrent-${c.state}`)},null,2),u(e).isSelectionMultiple?(d(),f("td",ra,[a(Te,{"model-value":n(c),color:`torrent-${c.state}`,variant:"text",onClick:J(v=>o.$emit("onCheckboxClick",c),["stop"])},null,8,["model-value","color","onClick"])])):R("",!0),_("td",null,p(c.name),1),a(Zo,{torrent:c},null,8,["torrent"])],42,la)),[[Lt]])),256))])]),_:1}))}});const ia=X(sa,[["__scopeId","data-v-8832d38a"]]),da={class:"pt-4 px-1 px-sm-5"},ua={class:"pa-0",style:{width:"10em"}},ca={class:"text-uppercase",style:{float:"right","font-size":"0.8em"}},pa={class:"text-grey"},ma={key:0,class:"mt-5 text-xs-center"},va={class:"text-grey"},ha={key:1},_a={key:5},Va=w({__name:"Dashboard",setup(h){const{t:e}=Ue(),l=nt(),t=ee(),{currentPage:n,isSelectionMultiple:r,selectedTorrents:o,displayMode:s,torrentCountString:c}=Xe(t),v=st(),k=Be(),S=fe(),{filteredTorrents:A,sortOptions:y}=Xe(S),P=U(),E=[{value:"added_on",title:e("dashboard.sortBy.added_on")},{value:"amount_left",title:e("dashboard.sortBy.amount_left")},{value:"auto_tmm",title:e("dashboard.sortBy.auto_tmm")},{value:"availability",title:e("dashboard.sortBy.availability")},{value:"avg_download_speed",title:e("dashboard.sortBy.avg_download_speed")},{value:"avg_upload_speed",title:e("dashboard.sortBy.avg_upload_speed")},{value:"category",title:e("dashboard.sortBy.category")},{value:"completed",title:e("dashboard.sortBy.completed")},{value:"completion_on",title:e("dashboard.sortBy.completion_on")},{value:"content_path",title:e("dashboard.sortBy.content_path")},{value:"dl_limit",title:e("dashboard.sortBy.dl_limit")},{value:"dlspeed",title:e("dashboard.sortBy.dlspeed")},{value:"download_path",title:e("dashboard.sortBy.download_path")},{value:"downloaded",title:e("dashboard.sortBy.downloaded")},{value:"downloaded_session",title:e("dashboard.sortBy.downloaded_session")},{value:"eta",title:e("dashboard.sortBy.eta")},{value:"f_l_piece_prio",title:e("dashboard.sortBy.f_l_piece_prio")},{value:"force_start",title:e("dashboard.sortBy.force_start")},{value:"globalSpeed",title:e("dashboard.sortBy.globalSpeed")},{value:"globalVolume",title:e("dashboard.sortBy.globalVolume")},{value:"hash",title:e("dashboard.sortBy.hash")},{value:"infohash_v1",title:e("dashboard.sortBy.infohash_v1")},{value:"infohash_v2",title:e("dashboard.sortBy.infohash_v2")},{value:"last_activity",title:e("dashboard.sortBy.last_activity")},{value:"magnet_uri",title:e("dashboard.sortBy.magnet_uri")},{value:"max_ratio",title:e("dashboard.sortBy.max_ratio")},{value:"max_seeding_time",title:e("dashboard.sortBy.max_seeding_time")},{value:"name",title:e("dashboard.sortBy.name")},{value:"num_complete",title:e("dashboard.sortBy.num_complete")},{value:"num_incomplete",title:e("dashboard.sortBy.num_incomplete")},{value:"num_leechs",title:e("dashboard.sortBy.num_leechs")},{value:"num_seeds",title:e("dashboard.sortBy.num_seeds")},{value:"priority",title:e("dashboard.sortBy.priority")},{value:"progress",title:e("dashboard.sortBy.progress")},{value:"ratio",title:e("dashboard.sortBy.ratio")},{value:"ratio_limit",title:e("dashboard.sortBy.ratio_limit")},{value:"save_path",title:e("dashboard.sortBy.save_path")},{value:"seeding_time",title:e("dashboard.sortBy.seeding_time")},{value:"seeding_time_limit",title:e("dashboard.sortBy.seeding_time_limit")},{value:"seen_complete",title:e("dashboard.sortBy.seen_complete")},{value:"seq_dl",title:e("dashboard.sortBy.seq_dl")},{value:"size",title:e("dashboard.sortBy.size")},{value:"state",title:e("dashboard.sortBy.state")},{value:"super_seeding",title:e("dashboard.sortBy.super_seeding")},{value:"tags",title:e("dashboard.sortBy.tags")},{value:"time_active",title:e("dashboard.sortBy.time_active")},{value:"total_size",title:e("dashboard.sortBy.total_size")},{value:"tracker",title:e("dashboard.sortBy.tracker")},{value:"trackers_count",title:e("dashboard.sortBy.trackers_count")},{value:"up_limit",title:e("dashboard.sortBy.up_limit")},{value:"uploaded",title:e("dashboard.sortBy.uploaded")},{value:"uploaded_session",title:e("dashboard.sortBy.uploaded_session")},{value:"upspeed",title:e("dashboard.sortBy.upspeed")}].sort((m,b)=>m.title.localeCompare(b.title));E.splice(0,0,{value:"",title:e("dashboard.sortBy.default")});const V=O(!1),g=ot({isVisible:!1,offset:[0,0]}),D=C({get:()=>S.textFilter,set:Ot(m=>{S.textFilter=m??""},300)}),Y=C(()=>s.value===K.LIST),Ee=C(()=>s.value===K.GRID),xe=C(()=>s.value===K.TABLE),{paginatedResults:de,currentPage:j,pageCount:te}=Mt(A,P.paginationSize,n),Le=C(()=>!!S.textFilter&&S.textFilter.length>0),ge=C(()=>A.value.length<=o.value.length);function oe(m){V.value=m??!V.value,V.value&&We(()=>{document.getElementById("searchInput")?.focus()})}function Ae(){S.textFilter=""}function ue(){window.scrollTo({top:0,behavior:"smooth"})}function ye(){r.value&&t.unselectAllTorrents(),r.value=!r.value}function Re(){ge.value?t.unselectAllTorrents():t.selectTorrents(...A.value.map(m=>m.hash))}function W(m){r.value||l.push({name:"torrentDetail",params:{hash:m.hash}})}function ce(m){t.toggleSelect(m.hash)}function pe(m,b){m.shiftKey?t.spanTorrentSelection(b.hash):(Ne(m)||t.isSelectionMultiple)&&(t.isSelectionMultiple=!0,t.toggleSelect(b.hash))}async function ae(m,b){g.isVisible&&(g.isVisible=!1,await We()),g.isVisible=!0,g.offset=[m.pageX,m.pageY],r.value?o.value.length===0&&t.selectTorrent(b.hash):(t.unselectAllTorrents(),t.selectTorrent(b.hash))}const ke=O();function me(m,b){ke.value=setTimeout(()=>{ae(m,b)},500)}function I(){clearTimeout(ke.value)}function G(m){if(v.hasActiveDialog)return!1;const b=m.target;if(Ne(m)&&m.key==="a"&&b.tagName!=="INPUT")return t.unselectAllTorrents(),t.selectTorrents(...A.value.map($=>$.hash)),m.preventDefault(),!0;if(Ne(m)&&m.key==="f"){const $=document.getElementById("searchInput");if(document.activeElement!==$)return oe(!0),m.preventDefault(),!0}if(m.key==="Escape"){const $=document.getElementById("searchInput");return document.activeElement===$||V.value?oe(!1):(r.value=!1,t.unselectAllTorrents()),m.preventDefault(),!0}if(m.key==="Delete")return o.value.length===0?void 0:(v.createDialog(it,{hashes:o.value}),m.preventDefault(),!0);if(m.key==="/"){const $=document.getElementById("searchInput");return document.activeElement!==$&&!V.value&&(l.push({name:"searchEngine"}),m.preventDefault()),!0}}return Tt(()=>g.isVisible,m=>{!m&&!r.value&&t.unselectAllTorrents()}),Se(async()=>{await k.fetchCategories(),await k.fetchTags(),oe(Le.value)}),at(()=>{document.addEventListener("keydown",G),r.value=!1,ue()}),$t(()=>{document.removeEventListener("keydown",G)}),(m,b)=>(d(),f(F,null,[_("div",da,[a(Ve,{class:"ma-0 pa-0 mb-2"},{default:i(()=>[a(je,null,{default:i(()=>[_e(a(Z,{color:"transparent"},{default:i(()=>[a(Q,{id:"searchInput",modelValue:D.value,"onUpdate:modelValue":b[0]||(b[0]=$=>D.value=$),label:u(e)("dashboard.searchInputLabel"),clearable:"",density:"compact","hide-details":"","prepend-inner-icon":"mdi-magnify",rounded:"pill","single-line":"",style:{width:"200px"},variant:"solo","onClick:clear":b[1]||(b[1]=$=>Ae())},null,8,["modelValue","label"])]),_:1},512),[[Ce,V.value]])]),_:1}),a(q,{text:u(e)("dashboard.toggleSearchFilter"),location:"top"},{activator:i(({props:$})=>[a(M,N({icon:V.value?"mdi-chevron-left-circle":"mdi-text-box-search"},$,{variant:"plain",onClick:b[2]||(b[2]=Me=>oe())}),null,16,["icon"])]),_:1},8,["text"]),a(q,{text:u(e)("dashboard.toggleSelectMode"),location:"top"},{activator:i(({props:$})=>[a(M,N({icon:u(r)?"mdi-checkbox-marked":"mdi-checkbox-blank-outline"},$,{variant:"plain",onClick:ye}),null,16,["icon"])]),_:1},8,["text"]),a(Ge,null,{activator:i(({props:$})=>[a(q,{text:m.$t("dashboard.displayMode.title"),location:"top"},{activator:i(({props:Me})=>[a(M,N({icon:""},N($,Me),{variant:"plain"}),{default:i(()=>[u(s)===u(K).LIST?(d(),T(le,{key:0,icon:"mdi-view-list"})):R("",!0),u(s)===u(K).GRID?(d(),T(le,{key:1,icon:"mdi-view-grid"})):R("",!0),u(s)===u(K).TABLE?(d(),T(le,{key:2,icon:"mdi-table"})):R("",!0)]),_:2},1040)]),_:2},1032,["text"])]),default:i(()=>[a(Ie,null,{default:i(()=>[a(re,{title:m.$t("dashboard.displayMode.list"),"prepend-icon":"mdi-view-list",onClick:b[3]||(b[3]=$=>s.value=u(K).LIST)},null,8,["title"]),a(re,{title:m.$t("dashboard.displayMode.grid"),"prepend-icon":"mdi-view-grid",onClick:b[4]||(b[4]=$=>s.value=u(K).GRID)},null,8,["title"]),a(re,{title:m.$t("dashboard.displayMode.table"),"prepend-icon":"mdi-table",onClick:b[5]||(b[5]=$=>s.value=u(K).TABLE)},null,8,["title"])]),_:1})]),_:1}),a(q,{text:u(e)("dashboard.toggleSortOrder"),location:"top"},{activator:i(({props:$})=>[a(M,N({icon:u(y).reverseOrder?"mdi-arrow-up-thin":"mdi-arrow-down-thin"},$,{variant:"plain",onClick:b[6]||(b[6]=Me=>u(y).reverseOrder=!u(y).reverseOrder)}),null,16,["icon"])]),_:1},8,["text"]),_("div",ua,[a(At,{modelValue:u(y).sortBy,"onUpdate:modelValue":b[7]||(b[7]=$=>u(y).sortBy=$),items:u(E),label:u(e)("dashboard.sortLabel"),"auto-select-first":"",density:"compact","hide-details":"",variant:"solo-filled"},null,8,["modelValue","items","label"])]),a(ve,{class:"align-center justify-center"},{default:i(()=>[_("span",ca,p(u(c)),1)]),_:1})]),_:1}),a(Ve,{class:"ma-0 pa-0"},{default:i(()=>[a(Rt,null,{default:i(()=>[_e(a(Z,{color:"transparent"},{default:i(()=>[a(q,{text:u(e)("common.selectAll"),location:"bottom"},{activator:i(({props:$})=>[a(M,N({icon:ge.value?"mdi-checkbox-marked":"mdi-checkbox-blank-outline",class:"text-grey",color:"transparent",style:{left:"-8px"}},$,{onClick:Re}),null,16,["icon"])]),_:1},8,["text"]),_("span",pa,p(u(e)("dashboard.selectAll")),1)]),_:1},512),[[Ce,u(r)]])]),_:1})]),_:1}),u(A).length===0?(d(),f("div",ma,[_("p",va,p(u(e)("common.emptyList")),1)])):R("",!0),u(P).isPaginationOnTop&&!u(P).isInfiniteScrollActive&&u(te)>1?(d(),f("div",ha,[a(Je,{modelValue:u(j),"onUpdate:modelValue":b[8]||(b[8]=$=>he(j)?j.value=$:null),length:u(te),"next-icon":"mdi-menu-right","prev-icon":"mdi-menu-left",onInput:ue},null,8,["modelValue","length"])])):R("",!0),Y.value?(d(),T(Mo,{key:2,"paginated-torrents":u(de),onOnTorrentClick:pe,onOnTorrentDblClick:W,onOnCheckboxClick:ce,onOnTorrentRightClick:ae,onStartPress:me,onEndPress:I},null,8,["paginated-torrents"])):Ee.value?(d(),T(Po,{key:3,class:"mb-2","paginated-torrents":u(de),onOnTorrentClick:pe,onOnTorrentDblClick:W,onOnCheckboxClick:ce,onOnTorrentRightClick:ae,onStartPress:me,onEndPress:I},null,8,["paginated-torrents"])):xe.value?(d(),T(ia,{key:4,"paginated-torrents":u(de),onOnTorrentClick:pe,onOnTorrentDblClick:W,onOnCheckboxClick:ce,onOnTorrentRightClick:ae,onStartPress:me,onEndPress:I},null,8,["paginated-torrents"])):R("",!0),!u(P).isPaginationOnTop&&!u(P).isInfiniteScrollActive&&u(te)>1?(d(),f("div",_a,[a(Je,{modelValue:u(j),"onUpdate:modelValue":b[9]||(b[9]=$=>he(j)?j.value=$:null),length:u(te),"next-icon":"mdi-menu-right","prev-icon":"mdi-menu-left",onInput:ue},null,8,["modelValue","length"])])):R("",!0)]),_("div",{style:Ct(`position: absolute; left: ${g.offset[0]}px; top: ${g.offset[1]}px;`)},[a(Jt,{modelValue:g.isVisible,"onUpdate:modelValue":b[10]||(b[10]=$=>g.isVisible=$)},null,8,["modelValue"])],4)],64))}});export{Va as default};
|