1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7255],{3333:(e,l,r)=>{r.d(l,{A:()=>n});var t=r(33308),a=r(94402);function n(e,l,r,s={}){let d={...s};r?.refreshInterval&&(d.refreshInterval=r.refreshInterval);let i=(0,a.$C)(e,l,r);""===l&&(i=null);let{data:u,error:o,mutate:c}=(0,t.u)(i,d);return{data:u,error:u?.error??o,mutate:c}}},59333:(e,l,r)=>{r.d(l,{A:()=>a});var t=r(15383);function a({title:e,activity:l,timeLeft:r,progress:n,size:s}){return(0,t.jsxs)("div",{className:"text-theme-700 dark:text-theme-200 relative h-5 rounded-md bg-theme-200/50 dark:bg-theme-900/20 m-1 px-1 flex",children:[(0,t.jsx)("div",{className:"absolute h-5 rounded-md bg-theme-200 dark:bg-theme-900/40 z-0 -ml-1",style:{width:`${n}%`}}),(0,t.jsx)("div",{className:"text-xs z-10 self-center ml-2 relative h-4 grow mr-2",children:(0,t.jsx)("div",{className:"absolute w-full whitespace-nowrap text-ellipsis overflow-hidden text-left",children:e})}),(0,t.jsxs)("div",{className:"self-center text-xs flex justify-end mr-1.5 pl-1 z-10 text-ellipsis overflow-hidden whitespace-nowrap",children:[s&&`${s} - `,r?`${l} - ${r}`:l]})]})}},94402:(e,l,r)=>{function t(e,l=null){return null==e||""===e?l:"number"==typeof e?Number.isInteger(e)&&e>=0?e:l:"string"==typeof e&&/^\d+$/.test(e)?Number(e):l}function a(e,l){let r=new URLSearchParams({group:e.service_group,service:e.service_name,index:e.index});return l&&r.append("endpoint",l),r}function n(e,l,r){let t=a(e,l);return r&&t.append("query",JSON.stringify(r)),`/api/services/proxy?${t.toString()}`}r.d(l,{$C:()=>n,Sk:()=>t,_V:()=>a})},97255:(e,l,r)=>{r.r(l),r.d(l,{default:()=>u});var t=r(15383),a=r(31912),n=r(59333),s=r(87717),d=r(89651),i=r(3333);function u({service:e}){let{t:l}=(0,a.Bd)(),{widget:r}=e,{data:o,error:c}=(0,i.A)(r);if(c)return(0,t.jsx)(d.A,{service:e,error:c});if(!o)return(0,t.jsxs)(d.A,{service:e,children:[(0,t.jsx)(s.A,{label:"deluge.leech"}),(0,t.jsx)(s.A,{label:"deluge.download"}),(0,t.jsx)(s.A,{label:"deluge.seed"}),(0,t.jsx)(s.A,{label:"deluge.upload"})]});let{torrents:m}=o,h=m?Object.keys(m):[],x=0,g=0,v=0,p=[];for(let e=0;e<h.length;e+=1){let l=m[h[e]];x+=l.download_payload_rate,g+=l.upload_payload_rate,v+=+(0===l.total_remaining),"Downloading"===l.state&&p.push(l)}let f=h.length-v||0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(d.A,{service:e,children:[(0,t.jsx)(s.A,{label:"deluge.leech",value:l("common.number",{value:f})}),(0,t.jsx)(s.A,{label:"deluge.download",value:l("common.byterate",{value:x}),highlightValue:x}),(0,t.jsx)(s.A,{label:"deluge.seed",value:l("common.number",{value:v})}),(0,t.jsx)(s.A,{label:"deluge.upload",value:l("common.byterate",{value:g}),highlightValue:g})]}),r?.enableLeechProgress&&p.map(e=>(0,t.jsx)(n.A,{progress:e.progress,timeLeft:l("common.duration",{value:e.eta}),title:e.name,activity:e.state},`${e.name}-${e.total_remaining}`))]})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.