Files
2026-10-29 14:04:46 +00:00

1 line
41 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{E as e,G as t,I as n,N as r,O as i,Q as a,S as o,_t as s,c,g as ee,h as l,l as u,m as d,o as f,p as te,r as p,s as m,u as h,w as ne,yt as g}from"./runtime-core.esm-bundler-Bf9AMS9g.js";import{o as re,s as ie,u as ae}from"./runtime-dom.esm-bundler-BEOB_s5k.js";import{t as oe}from"./packets-LMZdG6Cm.js";import{t as se}from"./dataService-CW0vYsq9.js";import{t as ce}from"./Spinner-CuS2e8w-.js";import{S as _,T as v,x as y}from"./index-B3_WAJA_.js";import{n as le,t as ue}from"./SignalBars-vI1a7o1t.js";import{t as de}from"./PacketDetailsModal-Ds97-QxM.js";var b={},x={viewBox:`0 0 20 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`};function fe(t,n){return e(),h(`svg`,x,[...n[0]||=[te(`<ellipse cx="3" cy="12" rx="1.5" ry="2.5" fill="currentColor"></ellipse><ellipse cx="9" cy="9" rx="4" ry="3" fill="currentColor"></ellipse><circle cx="13" cy="7" r="3" fill="currentColor"></circle><ellipse cx="12" cy="2" rx="1.5" ry="3" fill="currentColor"></ellipse><ellipse cx="14" cy="2" rx="1.5" ry="3" fill="currentColor"></ellipse><ellipse cx="16" cy="11" rx="1.5" ry="2" fill="currentColor"></ellipse><circle cx="5" cy="8" r="2" fill="currentColor" opacity="0.8"></circle>`,7)]])}var S=v(b,[[`render`,fe]]),pe=v(ee({__name:`HopConnector`,props:{status:{default:`received`}},setup(t){return(n,r)=>(e(),h(`span`,{class:s([`hop-connector`,`hop-connector-${t.status}`]),title:`Rabbit hop`},[l(S,{class:`hop-rabbit`})],2))}}),[[`__scopeId`,`data-v-5fc98e84`]]),me={class:`glass-card w-full max-w-none rounded-[20px] p-6`},he={class:`flex items-center gap-2 header-info relative`},ge={class:`text-content-primary text-xl font-semibold`},_e={class:`text-content-secondary dark:text-content-muted text-sm packet-count`},ve=[`title`],ye={class:`hidden sm:inline`},be=[`title`],xe={key:2,class:`text-accent-red text-sm error-indicator`},Se={key:0,class:`archive-controls`},Ce={class:`flex flex-col archive-search-control`},we={class:`relative`},Te={class:`archive-meta-controls`},Ee={class:`flex flex-col archive-range-control`},De={class:`archive-range-buttons`},Oe=[`onClick`],ke={class:`flex flex-col`},Ae={class:`flex flex-col`},je={class:`flex flex-col`},Me={class:`flex flex-col`},Ne=[`value`],Pe={class:`flex flex-col`},Fe=[`value`],Ie={key:0,class:`flex flex-col`},Le=[`value`],Re={key:1,class:`flex flex-col`},ze=[`disabled`],Be={class:`space-y-4 w-full`},Ve=[`onClick`],He={key:0,class:`duplicate-group-banner mb-2 flex items-center justify-between gap-2 rounded-[8px] px-2 py-1`},Ue={class:`text-[10px] text-content-secondary dark:text-content-muted`},We={class:`hidden lg:block w-full space-y-2`},Ge={class:`grid w-full grid-cols-11 gap-2 items-center`},Ke={class:`col-span-1 text-content-primary text-sm`},qe={class:`col-span-1 flex items-center gap-2`},Je={class:`flex flex-col`},Ye={class:`text-content-primary text-xs`},Xe=[`title`],Ze={class:`whitespace-normal break-words`},Qe={class:`col-span-2`},$e={class:`col-span-1 text-content-primary text-xs`},et={class:`col-span-1 text-content-primary text-xs`},tt={class:`col-span-1 text-content-primary text-xs flex items-center gap-1`},nt={class:`col-span-1 text-content-primary text-xs`},rt={class:`col-span-1 text-content-primary text-xs`},it={key:0,class:`flex items-center gap-1`},at={class:`col-span-2`},ot={class:`flex items-center gap-1`},st={key:0,class:`inline-flex items-center text-[10px] font-medium text-accent-amber`,title:`Policy blocked`},ct={key:0,class:`mt-1 flex items-center gap-2`},lt=[`onClick`],ut={key:1,class:`mt-1 text-[10px] text-content-secondary dark:text-content-muted`},dt={class:`mt-1 text-[10px] text-content-secondary dark:text-content-muted font-mono`},ft={key:2,class:`text-accent-red text-[8px] italic truncate`},pt={class:`grid w-full grid-cols-11 gap-2 items-start`},mt={class:`col-span-11`},ht={class:`space-y-1`},gt={class:`flex items-center gap-2`},_t={class:`text-[9px] text-content-muted`},vt={class:`flex items-center gap-0.5 flex-wrap`},yt=[`title`],bt={key:1,class:`flex items-center gap-1`},xt={class:`inline-block px-2 py-0.5 rounded bg-badge-cyan-bg text-badge-cyan-text text-xs font-mono`},St={class:`lg:hidden space-y-2`},Ct={class:`mobile-packet-card space-y-3 rounded-[16px] p-4`},wt={class:`flex items-start justify-between gap-3`},Tt={class:`flex items-start gap-3 min-w-0`},Et={class:`min-w-0`},Dt={class:`flex items-center gap-2 flex-wrap`},Ot={class:`text-content-primary text-xl font-semibold tracking-wide`},kt={key:0,class:`text-content-secondary dark:text-content-muted text-[10px] font-medium leading-tight`},At=[`title`],jt={class:`whitespace-normal break-words`},Mt={class:`flex items-start gap-2 flex-shrink-0`},Nt={class:`flex flex-col items-end`},Pt={class:`text-content-secondary dark:text-content-muted text-xs`},Ft={class:`mt-1 flex items-center gap-1 justify-end`},It={key:0,class:`inline-flex items-center text-[10px] font-medium text-accent-amber`,title:`Policy blocked`},Lt=[`title`,`aria-label`,`onClick`],Rt={class:`absolute -top-1 -right-1 min-w-[18px] h-[18px] px-1 rounded-full bg-surface dark:bg-surface-elevated border border-primary/opacity-heavy text-[10px] leading-none font-semibold text-primary flex items-center justify-center`},zt={class:`space-y-2`},Bt={class:`flex items-center gap-2`},Vt={class:`text-content-muted text-xs`},Ht={key:0,class:`flex flex-wrap items-center gap-1.5`},Ut=[`title`],Wt={key:1,class:`flex items-center gap-1`},Gt={class:`inline-block px-2 py-0.5 rounded bg-badge-cyan-bg text-badge-cyan-text text-xs font-mono font-semibold`},Kt={class:`pt-3 border-t border-stroke-subtle/70 dark:border-stroke/opacity-heavy`},qt={class:`mobile-metrics-grid grid gap-0`},Jt={class:`mobile-metric-cell`},Yt={class:`text-content-primary text-base font-semibold`},Xt={class:`mobile-metric-cell`},Zt={class:`text-content-primary text-base font-semibold`},Qt={class:`mobile-metric-cell`},$t={class:`flex items-center gap-1 min-w-0`},en={class:`text-content-primary text-[11px] font-medium leading-tight`},tn={class:`mobile-metric-cell`},nn={class:`flex items-center gap-1`},rn={class:`text-content-primary text-base font-semibold`},an={class:`text-content-secondary dark:text-content-muted text-xs font-mono`},on={key:0,class:`text-accent-red text-xs italic`},sn={key:0,class:`flex justify-between items-center mt-6 pt-4 border-t border-stroke-subtle dark:border-stroke pagination-container`},cn={class:`flex items-center gap-4 pagination-info`},ln={class:`text-content-secondary dark:text-content-muted text-sm`},un={class:`text-xs`},dn={key:0,class:`flex items-center gap-2 load-more-section`},fn=[`disabled`],pn={class:`text-content-secondary dark:text-content-muted text-xs load-more-count`},mn={class:`flex items-center gap-2 pagination-controls`},hn=[`disabled`],gn={class:`flex items-center gap-1 page-numbers`},_n={key:1,class:`text-content-secondary dark:text-content-muted text-sm px-2 ellipsis`},vn=[`onClick`],yn={key:2,class:`text-content-secondary dark:text-content-muted text-sm px-2 ellipsis`},bn=[`disabled`],xn={key:1,class:`flex justify-center mt-6 pt-4 border-t border-stroke-subtle dark:border-stroke`},Sn={class:`flex items-center gap-4`},Cn={class:`text-content-secondary dark:text-content-muted text-sm`},wn={class:`text-content-secondary dark:text-content-muted text-xs`},Tn={key:2,class:`flex justify-center mt-6 pt-4 border-t border-stroke-subtle dark:border-stroke`},En={class:`flex items-center gap-2`},C=10,w=1e3,Dn=`__none__`,T=v(ee({name:`PacketTable`,__name:`PacketTable`,props:{mode:{default:`dashboard`},title:{default:`Recent Packets`},defaultHours:{default:24}},setup(ee){let v=ee,b=oe(),{getSignalQualityFromSNR:x}=le(),fe=se(),S=t(1),T=t(Math.floor((Date.now()-v.defaultHours*60*60*1e3)/1e3)),E=t(Math.floor(Date.now()/1e3)),D=t(``),On=[{label:`1h`,hours:1},{label:`6h`,hours:6},{label:`24h`,hours:24},{label:`7d`,hours:168},{label:`30d`,hours:720}],O=t(y(`packetArchive_autoUpdateEnabled`,!0)),k=t([]),kn=e=>{let t=new Date(e*1e3),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`},An=f({get:()=>kn(T.value),set:e=>{if(!e)return;let t=new Date(e);Number.isNaN(t.getTime())||(T.value=Math.floor(t.getTime()/1e3))}}),jn=f({get:()=>kn(E.value),set:e=>{if(!e)return;let t=new Date(e);Number.isNaN(t.getTime())||(E.value=Math.floor(t.getTime()/1e3))}}),A=t(100),j=t(!1),Mn=t(!1),M=null;r(()=>b.isLoading,e=>{e?(M&&=(clearTimeout(M),null),Mn.value=!0):M=window.setTimeout(()=>{Mn.value=!1,M=null},600)});let N=t(null),P=t(!1),F=t(null),Nn=t(0),I=(e,t)=>!e||!t?!1:e.packet_hash===t.packet_hash&&e.timestamp===t.timestamp&&e.type===t.type&&e.route===t.route&&e.src_hash===t.src_hash&&e.dst_hash===t.dst_hash&&e.length===t.length,Pn=async(e,t)=>{if((e.id||e.packet_hash)&&(!e.header||!e.raw_packet)){let n=++Nn.value;try{let r=e.id==null?await b.getPacketByHash(e.packet_hash):await b.getPacketById(e.id);r&&Nn.value===n&&N.value&&I(N.value,e)&&F.value===t&&(N.value={...N.value,...r})}catch{}}},Fn=async e=>{let t=G.value.findIndex(t=>I(t,e));F.value=t>=0?t:null,N.value=e,P.value=!0,await Pn(e,F.value)},In=async e=>{let t=G.value[e];t&&(F.value=e,N.value=t,P.value=!0,await Pn(t,e))},Ln=async()=>{F.value==null||F.value<=0||await In(F.value-1)},Rn=async()=>{F.value==null||F.value>=G.value.length-1||await In(F.value+1)},zn=()=>{P.value=!1,N.value=null,F.value=null,Nn.value+=1},L=t(y(`packetTable_selectedType`,`all`)),R=t(y(`packetTable_selectedRoute`,`all`)),z=t(y(`packetArchive_selectedDropReason`,`all`)),B=t(!1),V=t(null),Bn=[`all`,`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`],Vn=[{value:`all`,label:`All Routes`},{value:`0`,label:`flood_transport`},{value:`1`,label:`flood`},{value:`2`,label:`direct`},{value:`3`,label:`direct_transport`}],H=t(new Set);r(L,e=>{_(`packetTable_selectedType`,e),S.value=1,v.mode===`archive`&&$()}),r(R,e=>{_(`packetTable_selectedRoute`,e),S.value=1,v.mode===`archive`&&$()}),r(z,e=>{_(`packetArchive_selectedDropReason`,e),S.value=1}),r(B,()=>{S.value=1}),r([T,E],()=>{S.value=1,v.mode===`archive`&&$()},{flush:`post`}),r(D,()=>{S.value=1}),r(O,e=>{if(_(`packetArchive_autoUpdateEnabled`,e),v.mode===`archive`){if(e){$();return}k.value=[...b.recentPackets]}});let Hn=f(()=>v.mode===`archive`&&!O.value?k.value:b.recentPackets);function Un(e){return e?e.trim().toLowerCase():``}let Wn=f(()=>{let e=new Map;for(let t of Hn.value){let n=Un(t.drop_reason);!n||e.has(n)||e.set(n,t.drop_reason.trim())}let t=[{value:`all`,label:`All Drop Reasons`},{value:Dn,label:`No drop reason`}];for(let[n,r]of e.entries())t.push({value:n,label:r});return t}),Gn=e=>{let t=Math.floor(Date.now()/1e3);E.value=t,T.value=Math.floor(t-e*60*60)},Kn=f(()=>{if(E.value<=T.value)return`Custom range`;let e=new Date(T.value*1e3),t=new Date(E.value*1e3);return`${e.toLocaleDateString(void 0,{month:`short`,day:`numeric`})} ${e.toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`})} → ${t.toLocaleDateString(void 0,{month:`short`,day:`numeric`})} ${t.toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`})}`}),U=f(()=>{let e=Hn.value;if(L.value!==`all`){let t=parseInt(L.value);e=e.filter(e=>e.type===t)}if(R.value!==`all`&&(e=e.filter(e=>pr(e.route)===R.value)),v.mode===`archive`&&z.value!==`all`&&(e=z.value===Dn?e.filter(e=>!Un(e.drop_reason)):e.filter(e=>Un(e.drop_reason)===z.value)),v.mode===`archive`&&D.value.trim()){let t=D.value.trim().toLowerCase();e=e.filter(e=>[e.packet_hash,e.src_hash,e.dst_hash,e.rx_radio_id,e.tx_radio_id,e.drop_reason,Y(e.type),mr(e.route),e.payload,e.header,e.raw_packet].filter(Boolean).join(` `).toLowerCase().includes(t))}return B.value&&V.value!==null&&(e=e.filter(e=>e.timestamp>=V.value)),e}),W=f(()=>{let e=new Map,t=[];return U.value.forEach((n,r)=>{let i=n.packet_hash?.trim(),a=i?`hash:${i}`:`nohash:${n.timestamp}:${r}`,o=e.get(a);if(o){o.packets.push(n);return}let s={key:a,packetHash:i??``,packets:[n],primary:n,duplicates:[],duplicateCount:0,hasDuplicates:!1};e.set(a,s),t.push(s)}),t.map(e=>{let t=e.packets.findIndex(e=>e.transmitted&&!e.drop_reason),n=t>=0?t:e.packets.findIndex(e=>e.transmitted),r=n>=0?n:e.packets.findIndex(e=>!e.is_duplicate),i=r>=0?r:0,a=e.packets[i],o=e.packets.filter((e,t)=>t!==i);return{...e,primary:a,duplicates:o,duplicateCount:o.length,hasDuplicates:o.length>0}})}),qn=f(()=>{let e=(S.value-1)*C,t=e+C;return W.value.slice(e,t)}),G=f(()=>W.value.flatMap(e=>[e.primary,...e.duplicates])),Jn=f(()=>{let e=N.value;return e?W.value.find(t=>t.packets.some(t=>I(t,e)))?.packets??[]:[]}),Yn=f(()=>F.value!=null&&F.value>0),Xn=f(()=>F.value!=null&&F.value<G.value.length-1),Zn=f(()=>{let e=new Map;for(let t of qn.value)e.set(t.primary,{group:t,isPrimary:!0,duplicateIndex:0}),t.duplicates.forEach((n,r)=>{e.set(n,{group:t,isPrimary:!1,duplicateIndex:r+1})});return e}),K=f(()=>Math.ceil(W.value.length/C));r(W,e=>{let t=new Set(e.filter(e=>e.hasDuplicates).map(e=>e.key)),n=new Set([...H.value].filter(e=>t.has(e)));n.size!==H.value.size&&(H.value=n),K.value>0&&S.value>K.value&&(S.value=K.value)},{immediate:!0}),r([G,N,P],([e,t,n])=>{if(!n||!t)return;let r=e.findIndex(e=>I(e,t));F.value=r>=0?r:null},{immediate:!0});let Qn=f(()=>S.value===K.value),$n=f(()=>b.recentPackets.length>=A.value&&A.value<w),er=f(()=>Qn.value&&$n.value&&!j.value),q=e=>Zn.value.get(e),tr=e=>q(e)?.isPrimary??!0,nr=e=>!tr(e),rr=e=>ir(e)&&J(e),ir=e=>{let t=q(e);return!!(t?.isPrimary&&t.group.hasDuplicates)},ar=e=>{let t=q(e);return t?.isPrimary?t.group.duplicateCount:0},or=e=>{let t=ar(e);return`${J(e)?`Hide`:`Show`} ${t} duplicate${t===1?``:`s`}`},J=e=>{let t=q(e);return t?.isPrimary?H.value.has(t.group.key):!1},sr=e=>{let t=q(e);return!t||t.isPrimary?0:t.duplicateIndex},cr=e=>q(e)?.group.packets.length??1,lr=e=>sr(e)===1,ur=e=>e.hasDuplicates&&H.value.has(e.key)?[e.primary,...e.duplicates]:[e.primary],dr=e=>{let t=q(e);if(!t?.isPrimary||!t.group.hasDuplicates)return;let n=new Set(H.value);n.has(t.group.key)?n.delete(t.group.key):n.add(t.group.key),H.value=n},fr=e=>new Date(e*1e3).toLocaleTimeString(void 0,{hour12:!0}),Y=e=>({0:`REQ`,1:`RESPONSE`,2:`TXT_MSG`,3:`ACK`,4:`ADVERT`,5:`GRP_TXT`,6:`GRP_DATA`,7:`ANON_REQ`,8:`PATH`,9:`TRACE`,10:`MULTI_PART`,11:`CONTROL`})[e]||`TYPE_${e}`;function pr(e){if(e==null)return``;if(typeof e==`number`&&Number.isFinite(e))return String(e);let t=String(e).trim().toLowerCase(),n={flood_transport:`0`,transport_flood:`0`,"t-flood":`0`,flood:`1`,direct:`2`,direct_transport:`3`,transport_direct:`3`,"t-direct":`3`};return t in n?n[t]:t}function mr(e){return{0:`flood_transport`,1:`flood`,2:`direct`,3:`direct_transport`}[pr(e)]||`Route ${e}`}let hr=e=>{let t=e.packets.filter(e=>e.transmitted&&!e.drop_reason).length,n=e.packets.filter(e=>!!e.drop_reason).length;return t>0&&n>0?{label:`Forwarded — ${n} duplicate${n===1?``:`s`} dropped`,className:`text-accent-green`,forwardedCount:t,droppedCount:n}:t>0?{label:`Forwarded`,className:`text-accent-green`,forwardedCount:t,droppedCount:n}:n>0?{label:`Dropped — ${n} ${n===1?`copy`:`copies`} rejected`,className:`text-accent-red`,forwardedCount:t,droppedCount:n}:{label:`Received`,className:`text-primary`,forwardedCount:t,droppedCount:n}},gr=e=>{let t=q(e)?.group;return t&&q(e)?.isPrimary?hr(t).className:e.transmitted?`text-accent-green`:`text-primary`},_r=e=>{let t=q(e);return t?.isPrimary&&t.group.hasDuplicates?hr(t.group).label:e.drop_reason?`Dropped`:e.transmitted?`Forward`:`Received`},vr=e=>{let t=e.drop_reason?.toLowerCase();return!!(t&&t.includes(`policy blocked`))},yr=e=>(vr(e),``);function br(e){let t=pr(e);return t===`0`||t===`1`?`bg-badge-cyan-bg text-badge-cyan-text`:`bg-badge-neutral-bg text-badge-neutral-text`}let xr=e=>({0:`bg-primary`,1:`bg-accent-green`,2:`bg-secondary`,3:`bg-accent-purple`,4:`bg-accent-red`,5:`bg-accent-cyan`,6:`bg-primary`,7:`bg-accent-purple`,8:`bg-accent-green`,9:`bg-secondary`})[e]||`bg-background-mute`,Sr=e=>({0:`border-l-primary`,1:`border-l-accent-green`,2:`border-l-accent-amber`,3:`border-l-accent-purple`,4:`border-l-accent-red`,5:`border-l-accent-cyan`,6:`border-l-primary`,7:`border-l-accent-purple`,8:`border-l-accent-green`,9:`border-l-accent-amber`})[e]||`border-l-gray-500`,Cr=e=>!e.transmitted||!e.lbt_attempts||e.lbt_attempts===0?`status-dot-green`:e.lbt_attempts===1?`status-dot-muted`:e.lbt_attempts===2?`status-dot-amber`:`status-dot-red`,wr=e=>e>=1e3?(e/1e3).toFixed(2)+`s`:e.toFixed(1)+`ms`,X=e=>{if(typeof e!=`string`)return`N/A`;let t=e.trim();return t.length>0?t:`N/A`},Tr=e=>{if(!e)return[];if(Array.isArray(e))return e;if(typeof e==`string`)try{let t=JSON.parse(e);return typeof t==`string`?JSON.parse(t):Array.isArray(t)?t:[]}catch{return[]}return[]},Z=e=>{let t=Tr(e.original_path),n=Tr(e.forwarded_path),r=e.transmitted&&n.length>0?n:t.length>0?t:n;return r.length===0?null:{hops:r.length-1,nodes:r.map(e=>e.toUpperCase())}},Er=e=>e<=0?`Direct`:`${e} hop${e>1?`s`:``}`,Q=e=>{if(e.type!==4||!e.payload)return null;try{let t=e.payload.replace(/\s+/g,``).toUpperCase(),n=t,r=0;if(t.length/2>=100)if(t.length>200)n=t.slice(200),r=0;else return null;if(n.length>=2){let e=parseInt(n.slice(0,2),16);r+=2;let t=!!(e&16),i=!!(e&32),a=!!(e&64);if(!(e&128))return null;if(t&&n.length>=r+16&&(r+=16),i&&n.length>=r+4&&(r+=4),a&&n.length>=r+4&&(r+=4),n.length>r){let e=(n.slice(r).match(/.{2}/g)||[]).map(e=>{let t=parseInt(e,16);return t>=32&&t<=126?String.fromCharCode(t):`.`}).join(``).replace(/\.*$/,``);return e.length>0?e:null}}}catch(e){console.error(`Error parsing ADVERT node name:`,e)}return null},Dr=()=>{L.value=`all`,R.value=`all`,v.mode===`archive`&&(z.value=`all`),B.value=!1,V.value=null,S.value=1},Or=()=>{B.value?(B.value=!1,V.value=null):(B.value=!0,V.value=Date.now()/1e3),S.value=1},kr=f(()=>V.value?new Date(V.value*1e3).toLocaleTimeString(void 0,{hour12:!0}):``),$=async e=>{try{let t=e??A.value;if(v.mode===`archive`){let e=L.value===`all`?void 0:Number(L.value),n=R.value===`all`?void 0:Number(R.value),r=await b.fetchFilteredPackets({type:e,route:n,start_timestamp:T.value,end_timestamp:E.value,limit:t});r&&(k.value=[...r]);return}await b.fetchRecentPackets({limit:t})}catch(e){console.error(`Error fetching packet data:`,e)}},Ar=async()=>{if(!(j.value||A.value>=w)){j.value=!0;try{let e=Math.min(A.value+200,w);A.value=e,await $(e)}catch(e){console.error(`Error loading more records:`,e)}finally{j.value=!1}}};return ne(()=>{if(v.mode===`archive`){$();return}fe.ensure(`recentPackets`)}),o(()=>{M&&clearTimeout(M)}),(t,r)=>(e(),h(p,null,[m(`div`,me,[m(`div`,{class:s([`flex flex-col mb-6 gap-4 filter-container`,{"lg:flex-row lg:justify-between lg:items-center":v.mode!==`archive`}])},[m(`div`,he,[m(`h3`,ge,g(v.title),1),m(`span`,_e,` (`+g(U.value.length)+` of `+g(a(b).recentPackets.length)+`) `,1),B.value&&v.mode!==`archive`?(e(),h(`span`,{key:0,class:`text-primary text-xs sm:text-sm bg-primary/opacity-light px-2 py-1 rounded-md border border-primary/opacity-medium live-mode-badge whitespace-nowrap`,title:`Filter activated at ${kr.value}`},[m(`span`,ye,`Live Mode (since `+g(kr.value)+`)`,1),r[12]||=m(`span`,{class:`sm:hidden`},`Live`,-1)],8,ve)):u(``,!0),v.mode===`archive`?(e(),h(`span`,{key:1,class:`text-primary text-xs sm:text-sm bg-primary/opacity-light px-2 py-1 rounded-md border border-primary/opacity-medium live-mode-badge whitespace-nowrap`,title:Kn.value},g(Kn.value),9,be)):u(``,!0),a(b).error?(e(),h(`span`,xe,g(a(b).error),1)):u(``,!0)]),m(`div`,{class:s([`filter-controls w-full`,{"archive-filter-controls":v.mode===`archive`}])},[v.mode===`archive`?(e(),h(`div`,Se,[m(`div`,Ce,[r[13]||=m(`label`,{class:`text-content-secondary dark:text-content-muted text-xs mb-1`},`Search`,-1),m(`div`,we,[n(m(`input`,{"onUpdate:modelValue":r[0]||=e=>D.value=e,type:`search`,placeholder:`hash, src, dst, payload...`,class:`glass-card border border-stroke-subtle dark:border-stroke rounded-[10px] px-3 py-2 pr-9 text-content-primary text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/opacity-medium transition-all duration-200 archive-search-input`},null,512),[[ie,D.value]]),D.value?(e(),h(`button`,{key:0,type:`button`,class:`absolute right-2 top-1/2 -translate-y-1/2 text-content-muted hover:text-content-primary`,"aria-label":`Clear search`,onClick:r[1]||=e=>D.value=``},` × `)):u(``,!0)])]),m(`div`,Te,[m(`div`,Ee,[r[14]||=m(`label`,{class:`text-content-secondary dark:text-content-muted text-xs mb-1`},`Range`,-1),m(`div`,De,[(e(),h(p,null,i(On,e=>m(`button`,{key:e.label,type:`button`,class:s([`glass-card border rounded-[10px] px-2.5 py-2 text-xs transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium`,{"border-primary bg-primary/opacity-light text-primary":Math.abs(E.value-T.value-e.hours*60*60)<120,"border-stroke-subtle dark:border-stroke text-content-secondary dark:text-content-muted hover:border-primary dark:hover:border-primary hover:text-content-primary dark:hover:text-content-primary":Math.abs(E.value-T.value-e.hours*60*60)>=120}]),onClick:t=>Gn(e.hours)},g(e.label),11,Oe)),64))])]),m(`div`,ke,[r[15]||=m(`label`,{class:`text-content-secondary dark:text-content-muted text-xs mb-1`},`Start`,-1),n(m(`input`,{"onUpdate:modelValue":r[2]||=e=>An.value=e,type:`datetime-local`,class:`glass-card border border-stroke-subtle dark:border-stroke rounded-[10px] px-3 py-2 text-content-primary text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/opacity-medium transition-all duration-200 w-full`},null,512),[[ie,An.value]])]),m(`div`,Ae,[r[16]||=m(`label`,{class:`text-content-secondary dark:text-content-muted text-xs mb-1`},`End`,-1),n(m(`input`,{"onUpdate:modelValue":r[3]||=e=>jn.value=e,type:`datetime-local`,class:`glass-card border border-stroke-subtle dark:border-stroke rounded-[10px] px-3 py-2 text-content-primary text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/opacity-medium transition-all duration-200 w-full`},null,512),[[ie,jn.value]])]),m(`div`,je,[r[17]||=m(`label`,{class:`text-content-secondary dark:text-content-muted text-xs mb-1`},`Updates`,-1),m(`button`,{type:`button`,class:s([`glass-card border rounded-[10px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium w-full`,{"border-primary bg-primary/opacity-light text-primary":O.value,"border-stroke-subtle dark:border-stroke text-content-secondary dark:text-content-muted hover:border-primary dark:hover:border-primary hover:text-content-primary dark:hover:text-content-primary":!O.value}]),onClick:r[4]||=e=>O.value=!O.value},g(O.value?`Auto Update: On`:`Auto Update: Off`),3)])])])):u(``,!0),m(`div`,{class:s([`common-filter-controls`,{"archive-common-filter-controls":v.mode===`archive`}])},[m(`div`,Me,[r[18]||=m(`label`,{class:`text-content-secondary dark:text-content-muted text-xs mb-1`},`Type`,-1),n(m(`select`,{"onUpdate:modelValue":r[5]||=e=>L.value=e,class:`glass-card border border-stroke-subtle dark:border-stroke rounded-[10px] px-3 py-2 text-content-primary text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/opacity-medium transition-all duration-200 min-w-[120px] cursor-pointer hover:border-primary/opacity-heavy dark:hover:border-primary/opacity-heavy`},[(e(),h(p,null,i(Bn,e=>m(`option`,{key:e,value:e,class:`bg-surface dark:bg-surface-elevated text-content-primary`},g(e===`all`?`All Types`:`Type ${e} (${Y(parseInt(e))})`),9,Ne)),64))],512),[[re,L.value]])]),m(`div`,Pe,[r[19]||=m(`label`,{class:`text-content-secondary dark:text-content-muted text-xs mb-1`},`Route`,-1),n(m(`select`,{"onUpdate:modelValue":r[6]||=e=>R.value=e,class:`glass-card border border-stroke-subtle dark:border-stroke rounded-[10px] px-3 py-2 text-content-primary text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/opacity-medium transition-all duration-200 min-w-[120px] cursor-pointer hover:border-primary/opacity-heavy dark:hover:border-primary/opacity-heavy`},[(e(),h(p,null,i(Vn,e=>m(`option`,{key:e.value,value:e.value,class:`bg-surface dark:bg-surface-elevated text-content-primary`},g(e.label),9,Fe)),64))],512),[[re,R.value]])]),v.mode===`archive`?(e(),h(`div`,Ie,[r[20]||=m(`label`,{class:`text-content-secondary dark:text-content-muted text-xs mb-1`},`Drop`,-1),n(m(`select`,{"onUpdate:modelValue":r[7]||=e=>z.value=e,class:`glass-card border border-stroke-subtle dark:border-stroke rounded-[10px] px-3 py-2 text-content-primary text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/opacity-medium transition-all duration-200 min-w-[170px] cursor-pointer hover:border-primary/opacity-heavy dark:hover:border-primary/opacity-heavy`},[(e(!0),h(p,null,i(Wn.value,t=>(e(),h(`option`,{key:t.value,value:t.value,class:`bg-surface dark:bg-surface-elevated text-content-primary`},g(t.label),9,Le))),128))],512),[[re,z.value]])])):u(``,!0),v.mode===`archive`?u(``,!0):(e(),h(`div`,Re,[r[21]||=m(`label`,{class:`text-content-secondary dark:text-content-muted text-xs mb-1`},`Filter`,-1),m(`button`,{onClick:Or,class:s([`glass-card border rounded-[10px] px-4 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium min-w-[120px]`,{"border-primary bg-primary/opacity-light text-primary":B.value,"border-stroke-subtle dark:border-stroke text-content-secondary dark:text-content-muted hover:border-primary dark:hover:border-primary hover:text-content-primary dark:hover:text-content-primary hover:bg-primary/opacity-light":!B.value}])},g(B.value?`New Only`:`Show New`),3)])),m(`div`,{class:s([`flex flex-col reset-container`,{"archive-reset-container":v.mode===`archive`}])},[r[22]||=m(`label`,{class:`text-transparent text-xs mb-1`},`.`,-1),m(`button`,{onClick:Dr,class:s([`glass-card border border-stroke-subtle dark:border-stroke hover:border-primary dark:hover:border-primary rounded-[10px] px-4 py-2 text-content-secondary dark:text-content-muted hover:text-content-primary dark:hover:text-content-primary text-sm transition-all duration-200 focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/opacity-medium`,{"opacity-50 cursor-not-allowed hover:border-stroke-subtle dark:hover:border-stroke hover:text-content-secondary dark:hover:text-content-muted":L.value===`all`&&R.value===`all`&&(v.mode!==`archive`||z.value===`all`)&&!B.value,"hover:bg-primary/opacity-light":L.value!==`all`||R.value!==`all`||v.mode===`archive`&&z.value!==`all`||B.value}]),disabled:L.value===`all`&&R.value===`all`&&(v.mode!==`archive`||z.value===`all`)&&!B.value},` Reset `,10,ze)],2)],2)],2)],2),r[45]||=te(`<div class="hidden lg:block w-full pb-3 border-b border-stroke-subtle dark:border-stroke text-content-secondary dark:text-content-muted text-xs uppercase mb-4" data-v-7be58559><div class="grid w-full grid-cols-11 gap-2" data-v-7be58559><div class="col-span-1" data-v-7be58559>Time</div><div class="col-span-1" data-v-7be58559>Type</div><div class="col-span-2" data-v-7be58559>Route</div><div class="col-span-1" data-v-7be58559>LEN</div><div class="col-span-1" data-v-7be58559>RSSI</div><div class="col-span-1" data-v-7be58559>SNR</div><div class="col-span-1" data-v-7be58559>Score</div><div class="col-span-1" data-v-7be58559>TX Delay</div><div class="col-span-2" data-v-7be58559>Status</div></div><div class="grid w-full grid-cols-11 gap-2 mt-2 pt-2 border-t border-stroke-subtle/70 dark:border-stroke/opacity-heavy" data-v-7be58559><div class="col-span-11" data-v-7be58559>Path/Hashes</div></div></div>`,1),m(`div`,Be,[(e(!0),h(p,null,i(qn.value,t=>(e(),h(`div`,{key:t.key,class:s([`space-y-2 w-full`,t.hasDuplicates?`duplicate-group-container rounded-[12px] overflow-hidden`:``])},[(e(!0),h(p,null,i(ur(t),(n,o)=>(e(),h(`div`,{key:`${t.key}_${n.packet_hash}_${n.timestamp}_${o}`,class:s([`packet-row w-full border-b border-stroke-subtle dark:border-dark-border/50 pb-4 hover:bg-background-mute dark:hover:bg-stroke/opacity-subtle transition-colors duration-150 cursor-pointer rounded-[10px] p-2 border-l-4`,[Sr(n.type),yr(n),nr(n)?`duplicate-packet-row`:``,rr(n)?`duplicate-group-expanded-row`:``]]),onClick:e=>Fn(n)},[lr(n)?(e(),h(`div`,He,[r[23]||=m(`span`,{class:`text-[10px] font-semibold uppercase tracking-wide text-primary`},`Duplicate Group`,-1),m(`span`,Ue,g(cr(n)-1)+` duplicate`+g(cr(n)-1==1?``:`s`),1)])):u(``,!0),m(`div`,We,[m(`div`,Ge,[m(`div`,Ke,g(fr(n.timestamp)),1),m(`div`,qe,[m(`div`,{class:s([`w-2 h-2 rounded-full`,xr(n.type)])},null,2),m(`div`,Je,[m(`span`,Ye,g(Y(n.type)),1),n.type===4&&Q(n)?(e(),h(`span`,{key:0,class:`inline-flex items-start gap-1 px-2 py-1 rounded-md bg-accent-red/opacity-light text-content-primary dark:text-content-primary border border-accent-red/opacity-heavy text-[10px] font-semibold whitespace-normal break-words leading-tight`,title:Q(n)||void 0},[r[24]||=m(`span`,{class:`inline-block w-1.5 h-1.5 rounded-full bg-accent-red mt-1 shrink-0`},null,-1),m(`span`,Ze,g(Q(n)),1)],8,Xe)):u(``,!0)])]),m(`div`,Qe,[m(`span`,{class:s([`inline-block px-2 py-1 rounded text-xs font-medium`,br(n.route)])},g(mr(n.route)),3)]),m(`div`,$e,g(n.length)+`B `,1),m(`div`,et,g(n.rssi==null?`N/A`:n.rssi.toFixed(0)+` dBm`),1),m(`div`,tt,[n.rssi==null?u(``,!0):(e(),c(ue,{key:0,bars:a(x)(n.snr).bars,color:a(x)(n.snr).color},null,8,[`bars`,`color`])),d(` `+g(n.snr==null?`N/A`:n.snr.toFixed(1)+`dB`),1)]),m(`div`,nt,g(n.score==null?`N/A`:n.score.toFixed(2)),1),m(`div`,rt,[Number(n.tx_delay_ms)>0?(e(),h(`div`,it,[n.transmitted?(e(),h(`div`,{key:0,class:s([`w-1.5 h-1.5 rounded-full flex-shrink-0`,Cr(n)])},null,2)):u(``,!0),m(`span`,null,g(wr(Number(n.tx_delay_ms))),1)])):u(``,!0)]),m(`div`,at,[m(`div`,null,[m(`div`,ot,[m(`span`,{class:s([`text-xs font-medium`,gr(n)])},g(_r(n)),3),vr(n)?(e(),h(`span`,st,[...r[25]||=[m(`svg`,{class:`w-3 h-3`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,"aria-hidden":`true`},[m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 3l7 4v5c0 5-3.5 8-7 9-3.5-1-7-4-7-9V7l7-4z`}),m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M8 8l8 8`})],-1)]])):u(``,!0)]),ir(n)?(e(),h(`div`,ct,[m(`button`,{type:`button`,class:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-semibold transition-all duration-200 border bg-primary/opacity-medium hover:bg-primary/opacity-medium border-primary/opacity-heavy text-primary`,onClick:ae(e=>dr(n),[`stop`])},[(e(),h(`svg`,{class:s([`w-2.5 h-2.5 transition-transform duration-200`,{"rotate-180":J(n)}]),fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[...r[26]||=[m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2.5`,d:`M19 9l-7 7-7-7`},null,-1)]],2)),d(` `+g(J(n)?`Hide`:`Show`)+` details `,1)],8,lt)])):nr(n)?(e(),h(`div`,ut,` Duplicate #`+g(q(n)?.duplicateIndex),1)):u(``,!0),m(`p`,dt,[d(` RX `+g(X(n.rx_radio_id))+` `,1),r[27]||=m(`span`,{class:`mx-1`},`•`,-1),d(` TX `+g(n.transmitted?X(n.tx_radio_id):`-`),1)]),n.drop_reason?(e(),h(`p`,ft,g(n.drop_reason),1)):u(``,!0)])])]),m(`div`,pt,[m(`div`,mt,[m(`div`,ht,[Z(n)?(e(),h(p,{key:0},[m(`div`,gt,[r[28]||=m(`span`,{class:`text-[9px] uppercase tracking-wide text-content-muted font-semibold`},` Path `,-1),m(`span`,_t,g(Er(Z(n).hops)),1)]),m(`div`,vt,[(e(!0),h(p,null,i(Z(n).nodes,(t,r)=>(e(),h(p,{key:r},[m(`span`,{class:s([`inline-block max-w-full truncate px-1.5 py-0.5 rounded text-[9px] font-mono font-semibold leading-tight tracking-tight`,r===0?`bg-badge-cyan-bg text-badge-cyan-text`:`bg-background-mute/opacity-medium text-content-muted`]),title:t},g(t),11,yt),r<Z(n).nodes.length-1?(e(),c(pe,{key:0,status:n.drop_reason?`drop`:n.transmitted?`forward`:`received`},null,8,[`status`])):u(``,!0)],64))),128))])],64)):(e(),h(`div`,bt,[m(`span`,xt,g(n.src_hash?.slice(-4).toUpperCase()||`????`),1),r[29]||=m(`svg`,{class:`w-3 h-3 text-content-muted/opacity-heavy`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2.5`,d:`M9 5l7 7-7 7`})],-1),m(`span`,{class:s([`inline-block px-2 py-0.5 rounded text-xs font-mono`,n.dst_hash?`bg-badge-cyan-bg text-badge-cyan-text`:`bg-accent-amber/opacity-medium text-accent-amber`])},g(n.dst_hash?n.dst_hash.slice(-4).toUpperCase():`BCAST`),3)]))])])])]),m(`div`,St,[m(`div`,Ct,[m(`div`,wt,[m(`div`,Tt,[m(`div`,{class:s([`w-2 h-2 rounded-full flex-shrink-0 mt-2`,xr(n.type)])},null,2),m(`div`,Et,[m(`div`,Dt,[m(`span`,Ot,g(Y(n.type)),1),m(`span`,{class:s([`inline-block px-2.5 py-1 rounded text-xs font-medium`,br(n.route)])},g(mr(n.route)),3)]),nr(n)?(e(),h(`span`,kt,` Duplicate #`+g(q(n)?.duplicateIndex),1)):u(``,!0),n.type===4&&Q(n)?(e(),h(`span`,{key:1,class:`inline-flex items-start gap-1 px-2 py-1 rounded-md bg-accent-red/opacity-light text-content-primary dark:text-content-primary border border-accent-red/opacity-heavy text-[10px] font-semibold whitespace-normal break-words leading-tight mt-1`,title:Q(n)||void 0},[r[30]||=m(`span`,{class:`inline-block w-1.5 h-1.5 rounded-full bg-accent-red mt-1 shrink-0`},null,-1),m(`span`,jt,g(Q(n)),1)],8,At)):u(``,!0)])]),m(`div`,Mt,[m(`div`,Nt,[m(`span`,Pt,g(fr(n.timestamp)),1),m(`div`,Ft,[m(`span`,{class:s([`text-sm font-medium`,gr(n)])},g(_r(n)),3),vr(n)?(e(),h(`span`,It,[...r[31]||=[m(`svg`,{class:`w-3 h-3`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,"aria-hidden":`true`},[m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 3l7 4v5c0 5-3.5 8-7 9-3.5-1-7-4-7-9V7l7-4z`}),m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M8 8l8 8`})],-1)]])):u(``,!0)])]),ir(n)?(e(),h(`button`,{key:0,type:`button`,class:s([`mobile-duplicate-icon-btn relative inline-flex h-11 w-11 items-center justify-center rounded-xl border border-primary/opacity-heavy bg-primary/opacity-medium text-primary transition-colors duration-200 hover:bg-primary/opacity-medium focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium`,{"border-primary text-primary":J(n)}]),title:or(n),"aria-label":or(n),onClick:ae(e=>dr(n),[`stop`])},[r[32]||=m(`svg`,{class:`w-5 h-5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,"aria-hidden":`true`},[m(`rect`,{x:`9`,y:`9`,width:`11`,height:`11`,rx:`2`,ry:`2`,"stroke-width":`2`}),m(`path`,{d:`M6 15H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v1`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`})],-1),m(`span`,Rt,g(ar(n)),1)],10,Lt)):u(``,!0)])]),m(`div`,zt,[m(`div`,Bt,[r[33]||=m(`span`,{class:`text-primary text-xs font-semibold uppercase tracking-wide`},`Path`,-1),m(`span`,Vt,g(Z(n)?Er(Z(n).hops):`Unknown`),1)]),Z(n)?(e(),h(`div`,Ht,[(e(!0),h(p,null,i(Z(n).nodes,(t,r)=>(e(),h(p,{key:`mobile-path-${r}`},[m(`span`,{class:s([`mobile-path-chip inline-flex items-center px-2 py-1 rounded-lg text-xs font-mono font-semibold leading-tight`,r===0?`bg-badge-cyan-bg text-badge-cyan-text`:`text-content-secondary dark:text-content-muted`]),title:t},g(t),11,Ut),r<Z(n).nodes.length-1?(e(),c(pe,{key:0,status:n.drop_reason?`drop`:n.transmitted?`forward`:`received`},null,8,[`status`])):u(``,!0)],64))),128))])):(e(),h(`div`,Wt,[m(`span`,Gt,g(n.src_hash?.slice(-4)||`????`),1),r[34]||=m(`svg`,{class:`w-3 h-3 text-content-muted/opacity-heavy`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2.5`,d:`M9 5l7 7-7 7`})],-1),m(`span`,{class:s([`inline-block px-2 py-0.5 rounded text-xs font-mono font-semibold`,n.dst_hash?`bg-badge-cyan-bg text-badge-cyan-text`:`bg-accent-amber/opacity-medium text-accent-amber`])},g(n.dst_hash?n.dst_hash.slice(-4).toUpperCase():`BCAST`),3)]))]),m(`div`,Kt,[m(`div`,qt,[m(`div`,Jt,[r[35]||=m(`div`,{class:`text-content-muted uppercase tracking-wide text-[10px] mb-1`},`Size`,-1),m(`div`,Yt,g(n.length)+`B`,1)]),m(`div`,Xt,[r[36]||=m(`div`,{class:`text-content-muted uppercase tracking-wide text-[10px] mb-1`},`SNR`,-1),m(`div`,Zt,g(n.snr==null?`N/A`:n.snr.toFixed(1)+` dB`),1)]),m(`div`,Qt,[r[37]||=m(`div`,{class:`text-content-muted uppercase tracking-wide text-[10px] mb-1`},`RSSI`,-1),m(`div`,$t,[n.rssi==null?u(``,!0):(e(),c(ue,{key:0,bars:a(x)(n.snr).bars,color:a(x)(n.snr).color},null,8,[`bars`,`color`])),m(`span`,en,g(n.rssi==null?`TX`:n.rssi.toFixed(0)+` dBm`),1)])]),m(`div`,tn,[r[38]||=m(`div`,{class:`text-content-muted uppercase tracking-wide text-[10px] mb-1`},`Latency`,-1),m(`div`,nn,[Number(n.tx_delay_ms)>0&&n.transmitted?(e(),h(`div`,{key:0,class:s([`w-1.5 h-1.5 rounded-full flex-shrink-0`,Cr(n)])},null,2)):u(``,!0),m(`span`,rn,g(Number(n.tx_delay_ms)>0?wr(Number(n.tx_delay_ms)):`--`),1)])])])]),m(`div`,an,[d(` RX `+g(X(n.rx_radio_id))+` `,1),r[39]||=m(`span`,{class:`mx-1`},`•`,-1),d(` TX `+g(n.transmitted?X(n.tx_radio_id):`-`),1)]),n.drop_reason?(e(),h(`div`,on,g(n.drop_reason),1)):u(``,!0)])])],10,Ve))),128))],2))),128))]),K.value>1?(e(),h(`div`,sn,[m(`div`,cn,[m(`span`,ln,[d(` Showing `+g((S.value-1)*C+1)+` - `+g(Math.min(S.value*C,W.value.length))+` of `+g(W.value.length)+` hash groups `,1),m(`span`,un,`(`+g(U.value.length)+` packets)`,1)]),er.value?(e(),h(`div`,dn,[r[40]||=m(`span`,{class:`text-content-secondary dark:text-content-muted text-xs`},`•`,-1),m(`button`,{onClick:Ar,disabled:j.value,class:s([`glass-card border border-primary rounded-[8px] px-3 py-1.5 text-xs transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium hover:bg-primary/opacity-light`,{"text-primary border-primary cursor-pointer":!j.value,"text-content-secondary dark:text-content-muted border-stroke-subtle dark:border-stroke cursor-not-allowed opacity-50":j.value}])},g(j.value?`Loading...`:`Load ${Math.min(200,w-A.value)} more`),11,fn),m(`span`,pn,`(`+g(A.value)+`/`+g(w)+` max)`,1)])):u(``,!0)]),m(`div`,mn,[m(`button`,{onClick:r[8]||=e=>--S.value,disabled:S.value<=1,class:s([`glass-card border rounded-[10px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium prev-next-btn`,{"border-stroke-subtle dark:border-stroke text-content-muted cursor-not-allowed opacity-50":S.value<=1,"border-stroke-subtle dark:border-stroke text-content-primary hover:border-primary dark:hover:border-primary hover:text-primary hover:bg-primary/opacity-light":S.value>1}])},[...r[41]||=[m(`span`,{class:`hidden sm:inline`},`Previous`,-1),m(`span`,{class:`sm:hidden`},`‹`,-1)]],10,hn),m(`div`,gn,[S.value>3?(e(),h(`button`,{key:0,onClick:r[9]||=e=>S.value=1,class:`glass-card border border-stroke-subtle dark:border-stroke hover:border-primary dark:hover:border-primary rounded-[8px] px-3 py-2 text-sm text-content-primary hover:text-primary hover:bg-primary/opacity-light transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium`},` 1 `)):u(``,!0),S.value>4?(e(),h(`span`,_n,`...`)):u(``,!0),(e(!0),h(p,null,i(Array.from({length:Math.min(5,K.value)},(e,t)=>Math.max(1,Math.min(S.value-2,K.value-4))+t).filter(e=>e<=K.value),t=>(e(),h(`button`,{key:t,onClick:e=>S.value=t,class:s([`glass-card border rounded-[8px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium page-number`,{"border-primary bg-primary/opacity-light text-primary":S.value===t,"border-stroke-subtle dark:border-stroke text-content-primary hover:border-primary dark:hover:border-primary hover:text-primary hover:bg-primary/opacity-light":S.value!==t}])},g(t),11,vn))),128)),S.value<K.value-3?(e(),h(`span`,yn,`...`)):u(``,!0),S.value<K.value-2?(e(),h(`button`,{key:3,onClick:r[10]||=e=>S.value=K.value,class:`glass-card border border-stroke-subtle dark:border-stroke hover:border-primary dark:hover:border-primary rounded-[8px] px-3 py-2 text-sm text-content-primary hover:text-primary hover:bg-primary/opacity-light transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium`},g(K.value),1)):u(``,!0)]),m(`button`,{onClick:r[11]||=e=>S.value+=1,disabled:S.value>=K.value,class:s([`glass-card border rounded-[10px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium prev-next-btn`,{"border-stroke-subtle dark:border-stroke text-content-muted cursor-not-allowed opacity-50":S.value>=K.value,"border-stroke-subtle dark:border-stroke text-content-primary hover:border-primary dark:hover:border-primary hover:text-primary hover:bg-primary/opacity-light":S.value<K.value}])},[...r[42]||=[m(`span`,{class:`hidden sm:inline`},`Next`,-1),m(`span`,{class:`sm:inline`},`›`,-1)]],10,bn)])])):$n.value&&!j.value?(e(),h(`div`,xn,[m(`div`,Sn,[m(`span`,Cn,` Showing `+g(U.value.length)+` packets `,1),r[43]||=m(`span`,{class:`text-content-secondary dark:text-content-muted text-xs`},`•`,-1),m(`button`,{onClick:Ar,class:`glass-card border border-primary rounded-[8px] px-4 py-2 text-sm text-primary hover:bg-primary/opacity-light transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium`},` Load `+g(Math.min(200,w-A.value))+` more records `,1),m(`span`,wn,`(`+g(A.value)+`/`+g(w)+` max)`,1)])])):j.value?(e(),h(`div`,Tn,[m(`div`,En,[l(ce,{size:`sm`}),r[44]||=m(`span`,{class:`text-primary text-sm`},`Loading more records...`,-1)])])):u(``,!0)]),l(de,{packet:N.value,packets:G.value,linkedDuplicatePackets:Jn.value,currentIndex:F.value,canGoPrevious:Yn.value,canGoNext:Xn.value,isOpen:P.value,onPrevious:Ln,onNext:Rn,onClose:zn},null,8,[`packet`,`packets`,`linkedDuplicatePackets`,`currentIndex`,`canGoPrevious`,`canGoNext`,`isOpen`])],64))}}),[[`__scopeId`,`data-v-7be58559`]]);export{T as t};