From dee79fc74fff3029593e76a601eadf7ac345875e Mon Sep 17 00:00:00 2001 From: aceberg <1502200+aceberg@users.noreply.github.com> Date: Fri, 5 Sep 2025 02:40:00 +0700 Subject: [PATCH] Wake-on-LAN frontend --- CHANGELOG.md | 7 +++++++ frontend/package.json | 2 +- internal/web/public/assets/HostPage.js | 2 +- internal/web/public/assets/MacHistory.js | 4 ++-- internal/web/public/assets/index.js | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14ada86..c6aaabd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log All notable changes to this project will be documented in this file. +## [v2.1.4] - 2025-09 +### Added +- Wake-on-LAN [#135](https://github.com/aceberg/WatchYourLAN/issues/135), [#196](https://github.com/aceberg/WatchYourLAN/issues/196) + +### Fixed +- Names not fully saved while editing with GUI + ## [v2.1.3] - 2025-07-26 ### Fixed - Memory leak bug [#149](https://github.com/aceberg/WatchYourLAN/issues/149) diff --git a/frontend/package.json b/frontend/package.json index 286c66c..d9bf825 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "watchyourlan", "private": true, - "version": "2.1.3", + "version": "2.1.4", "type": "module", "scripts": { "dev": "vite", diff --git a/internal/web/public/assets/HostPage.js b/internal/web/public/assets/HostPage.js index d876656..0d1c42e 100644 --- a/internal/web/public/assets/HostPage.js +++ b/internal/web/public/assets/HostPage.js @@ -1 +1 @@ -import{t as u,i as l,j as I,b as p,s as O,u as K,v as L,w as it,h as N,c as _,e as y,F as nt,x as rt,o as z,k as at,y as st,z as dt,A as ct}from"./index.js";import{M as ot}from"./MacHistory.js";var $t=u('
Host
ID
Name
DNS name
Iface
IP
MAC
Hardware
Date
Known
Online
'),gt=u('
Scanning port: '),_t=u("");function mt(t){let e=!1;const[i,n]=_(""),[a,o]=_(""),[f,m]=_(""),[b,v]=_([]),$=async()=>{e=!1;let s=Number(i());(Number.isNaN(s)||s<1||s>65535)&&(s=1);let d=Number(a());(Number.isNaN(d)||d<1||d>65535)&&(d=65535);let g;for(let c=s;c<=d&&!e;c++)m(c.toString()),g=await rt(t.IP,c),g&&v([...b(),c])},P=()=>{e?(n(f()),$()):e=!0};return(()=>{var s=ft(),d=s.firstChild,g=d.nextSibling,c=g.firstChild,S=c.firstChild,x=S.nextSibling,k=x.nextSibling,w=c.nextSibling;return S.$$input=r=>n(r.target.value),x.$$input=r=>o(r.target.value),k.$$click=$,l(g,(()=>{var r=I(()=>f()!="");return()=>r()?(()=>{var h=gt(),H=h.firstChild,C=H.nextSibling;return C.firstChild,H.$$click=P,l(C,f,null),h})():[]})(),w),l(w,y(nt,{get each(){return b()},children:r=>(()=>{var h=_t();return l(h,r),p(()=>O(h,"href","http://"+t.IP+":"+r)),h})()})),s})()}N(["input","click"]);var vt=u('
Host History for
');function St(t){const[e,i]=_("");z(()=>{at(15e3),i(new Date().toLocaleDateString("en-CA"))});const n=a=>{i(""),i(a)};return(()=>{var a=vt(),o=a.firstChild,f=o.firstChild,m=f.firstChild,b=m.nextSibling,v=o.nextSibling;return b.$$input=$=>n($.currentTarget.value),l(v,(()=>{var $=I(()=>t.mac!==""&&e()!=="");return()=>$()?y(ot,{get mac(){return t.mac},get date(){return e()}}):"Loading..."})()),p(()=>b.value=e()),a})()}N(["input"]);var xt=u("
"),Ct=u('
');function wt(){const[t,e]=_(st);return z(async()=>{const i=dt(),n=await ct(i.id);e(n)}),[(()=>{var i=xt(),n=i.firstChild,a=n.nextSibling;return l(n,y(ht,{get host(){return t()}})),l(a,y(mt,{get IP(){return t().IP}})),i})(),(()=>{var i=Ct(),n=i.firstChild;return l(n,y(St,{get mac(){return t().Mac}})),i})()]}export{wt as default}; +import{u as at,t as o,i as e,j as I,b as C,s as K,v as j,w as B,x as st,y as dt,h as N,c as m,e as p,F as ct,z as ot,o as z,k as $t,A as ut,B as bt,C as ht}from"./index.js";import{M as ft}from"./MacHistory.js";var gt=o('
Host
ID
Name
DNS name
Iface
IP
MAC
Hardware
Date
Known
Online
'),Ct=o('
Scanning port: '),pt=o("");function yt(t){let l=!1;const[i,n]=m(""),[d,_]=m(""),[h,r]=m(""),[f,v]=m([]),$=async()=>{l=!1;let a=Number(i());(Number.isNaN(a)||a<1||a>65535)&&(a=1);let u=Number(d());(Number.isNaN(u)||u<1||u>65535)&&(u=65535);let g;for(let s=a;s<=u&&!l;s++)r(s.toString()),g=await ot(t.IP,s),g&&v([...f(),s])},P=()=>{l?(n(h()),$()):l=!0};return(()=>{var a=xt(),u=a.firstChild,g=u.nextSibling,s=g.firstChild,y=s.firstChild,w=y.nextSibling,k=w.nextSibling,S=s.nextSibling;return y.$$input=c=>n(c.target.value),w.$$input=c=>_(c.target.value),k.$$click=$,e(g,(()=>{var c=I(()=>h()!="");return()=>c()?(()=>{var b=Ct(),x=b.firstChild,H=x.nextSibling;return H.firstChild,x.$$click=P,e(H,h,null),b})():[]})(),S),e(S,p(ct,{get each(){return f()},children:c=>(()=>{var b=pt();return e(b,c),C(()=>K(b,"href","http://"+t.IP+":"+c)),b})()})),a})()}N(["input","click"]);var wt=o('
Host History for
');function kt(t){const[l,i]=m("");z(()=>{$t(15e3),i(new Date().toLocaleDateString("en-CA"))});const n=d=>{i(""),i(d)};return(()=>{var d=wt(),_=d.firstChild,h=_.firstChild,r=h.firstChild,f=r.nextSibling,v=_.nextSibling;return f.$$input=$=>n($.currentTarget.value),e(v,(()=>{var $=I(()=>t.mac!==""&&l()!=="");return()=>$()?p(ft,{get mac(){return t.mac},get date(){return l()}}):"Loading..."})()),C(()=>f.value=l()),d})()}N(["input"]);var Ht=o("
"),Pt=o('
');function Nt(){const[t,l]=m(ut);return z(async()=>{const i=bt(),n=await ht(i.id);l(n)}),[(()=>{var i=Ht(),n=i.firstChild,d=n.nextSibling;return e(n,p(St,{get host(){return t()}})),e(d,p(yt,{get IP(){return t().IP}})),i})(),(()=>{var i=Pt(),n=i.firstChild;return e(n,p(kt,{get mac(){return t().Mac}})),i})()]}export{Nt as default}; diff --git a/internal/web/public/assets/MacHistory.js b/internal/web/public/assets/MacHistory.js index 973ae95..4c2a326 100644 --- a/internal/web/public/assets/MacHistory.js +++ b/internal/web/public/assets/MacHistory.js @@ -1,4 +1,4 @@ -import{B as y,C as f,D as v,o as m,E as H,e as u,S as d,t as D,b as I,s as b,G as h,l as M,F as g}from"./index.js";async function w(a,r){let e=[];return r===""?e=await y(a):e=await f(a,r),e!=null?(e.sort((s,t)=>s.Date");function F(a){const[r,e]=v([]);let s;return m(async()=>{const t=await w(a.mac,a.date);e(t),s=setInterval(async()=>{const o=await w(a.mac,a.date);e(o)},6e4)}),H(()=>{clearInterval(s)}),u(g,{each:r,children:(t,o)=>u(d,{get when(){return o(){var c="Date:"+t.Date+` +import{D as y,E as f,G as v,o as m,H,e as u,S as I,t as d,b as D,s as b,I as h,l as M,F as g}from"./index.js";async function w(a,r){let e=[];return r===""?e=await y(a):e=await f(a,r),e!=null?(e.sort((s,t)=>s.Date");function G(a){const[r,e]=v([]);let s;return m(async()=>{const t=await w(a.mac,a.date);e(t),s=setInterval(async()=>{const o=await w(a.mac,a.date);e(o)},6e4)}),H(()=>{clearInterval(s)}),u(g,{each:r,children:(t,o)=>u(I,{get when(){return o(){var c="Date:"+t.Date+` Iface:`+t.Iface+` IP:`+t.IP+` -Known:`+t.Known,l=t.Now===0?"my-box-off":"my-box-on";return c!==n.e&&b(i,"title",n.e=c),l!==n.t&&h(i,n.t=l),n},{e:void 0,t:void 0}),i}})})}export{F as M}; +Known:`+t.Known,l=t.Now===0?"my-box-off":"my-box-on";return c!==n.e&&b(i,"title",n.e=c),l!==n.t&&h(i,n.t=l),n},{e:void 0,t:void 0}),i}})})}export{G as M}; diff --git a/internal/web/public/assets/index.js b/internal/web/public/assets/index.js index 62ef7e3..16fae28 100644 --- a/internal/web/public/assets/index.js +++ b/internal/web/public/assets/index.js @@ -1,2 +1,2 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["fs/public/assets/History.js","fs/public/assets/MacHistory.js","fs/public/assets/HostPage.js"])))=>i.map(i=>d[i]); -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();const y={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return st(this.context.count)},getNextContextId(){return st(this.context.count++)}};function st(e){const t=String(e),n=t.length-1;return y.context.id+(n?String.fromCharCode(96+n):"")+t}function ie(e){y.context=e}const pt=!1,Mt=(e,t)=>e===t,M=Symbol("solid-proxy"),Vt=typeof Proxy=="function",Be=Symbol("solid-track"),we={equals:Mt};let mt=xt;const X=1,be=2,yt={owned:null,cleanups:null,context:null,owner:null},Ne={};var w=null;let Te=null,qt=null,S=null,T=null,G=null,Ee=0;function ae(e,t){const n=S,r=w,s=e.length===0,o=t===void 0?r:t,i=s?yt:{owned:null,cleanups:null,context:o?o.context:null,owner:o},l=s?e:()=>e(()=>D(()=>ue(i)));w=i,S=null;try{return V(l,!0)}finally{S=n,w=r}}function E(e,t){t=t?Object.assign({},we,t):we;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),Pt(n,s));return[At.bind(n),r]}function Wt(e,t,n){const r=Oe(e,t,!0,X);re(r)}function H(e,t,n){const r=Oe(e,t,!1,X);re(r)}function Gt(e,t,n){mt=tn;const r=Oe(e,t,!1,X);r.user=!0,G?G.push(r):re(r)}function R(e,t,n){n=n?Object.assign({},we,n):we;const r=Oe(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,re(r),At.bind(r)}function Xt(e){return e&&typeof e=="object"&&"then"in e}function Yt(e,t,n){let r,s,o;r=!0,s=e,o={};let i=null,l=Ne,a=null,c=!1,f="initialValue"in o,u=typeof r=="function"&&R(r);const h=new Set,[g,v]=(o.storage||E)(o.initialValue),[d,p]=E(void 0),[b,m]=E(void 0,{equals:!1}),[C,A]=E(f?"ready":"unresolved");y.context&&(a=y.getNextContextId(),o.ssrLoadFrom==="initial"?l=o.initialValue:y.load&&y.has(a)&&(l=y.load(a)));function O(I,_,k,Y){return i===I&&(i=null,Y!==void 0&&(f=!0),(I===l||_===l)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(Y,{value:_})),l=Ne,U(_,k)),_}function U(I,_){V(()=>{_===void 0&&v(()=>I),A(_!==void 0?"errored":f?"ready":"unresolved"),p(_);for(const k of h.keys())k.decrement();h.clear()},!1)}function N(){const I=Qt,_=g(),k=d();if(k!==void 0&&!i)throw k;return S&&S.user,_}function K(I=!0){if(I!==!1&&c)return;c=!1;const _=u?u():r;if(_==null||_===!1){O(i,D(g));return}const k=l!==Ne?l:D(()=>s(_,{value:g(),refetching:I}));return Xt(k)?(i=k,"value"in k?(k.status==="success"?O(i,k.value,void 0,_):O(i,void 0,Ve(k.value),_),k):(c=!0,queueMicrotask(()=>c=!1),V(()=>{A(f?"refreshing":"pending"),m()},!1),k.then(Y=>O(k,Y,void 0,_),Y=>O(k,void 0,Ve(Y),_)))):(O(i,k,void 0,_),k)}return Object.defineProperties(N,{state:{get:()=>C()},error:{get:()=>d()},loading:{get(){const I=C();return I==="pending"||I==="refreshing"}},latest:{get(){if(!f)return N();const I=d();if(I&&!i)throw I;return g()}}}),u?Wt(()=>K(!1)):K(!1),[N,{refetch:K,mutate:v}]}function wt(e){return V(e,!1)}function D(e){if(S===null)return e();const t=S;S=null;try{return e()}finally{S=t}}function Je(e,t,n){const r=Array.isArray(e);let s,o=n&&n.defer;return i=>{let l;if(r){l=Array(e.length);for(let c=0;ct(l,s,i));return s=l,a}}function Jt(e){Gt(()=>D(e))}function ze(e){return w===null||(w.cleanups===null?w.cleanups=[e]:w.cleanups.push(e)),e}function Me(){return S}function bt(){return w}function vt(e,t){const n=w,r=S;w=e,S=null;try{return V(t,!0)}catch(s){Ze(s)}finally{w=n,S=r}}function zt(e){const t=S,n=w;return Promise.resolve().then(()=>{S=t,w=n;let r;return V(e,!1),S=w=null,r?r.done:void 0})}const[Nr,Tr]=E(!1);function St(e,t){const n=Symbol("context");return{id:n,Provider:nn(n),defaultValue:e}}function $t(e){let t;return w&&w.context&&(t=w.context[e.id])!==void 0?t:e.defaultValue}function Qe(e){const t=R(e),n=R(()=>qe(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let Qt;function At(){if(this.sources&&this.state)if(this.state===X)re(this);else{const e=T;T=null,V(()=>Se(this),!1),T=e}if(S){const e=this.observers?this.observers.length:0;S.sources?(S.sources.push(this),S.sourceSlots.push(e)):(S.sources=[this],S.sourceSlots=[e]),this.observers?(this.observers.push(S),this.observerSlots.push(S.sources.length-1)):(this.observers=[S],this.observerSlots=[S.sources.length-1])}return this.value}function Pt(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&V(()=>{for(let s=0;s1e6)throw T=[],new Error},!1)),t}function re(e){if(!e.fn)return;ue(e);const t=Ee;Zt(e,e.value,t)}function Zt(e,t,n){let r;const s=w,o=S;S=w=e;try{r=e.fn(t)}catch(i){return e.pure&&(e.state=X,e.owned&&e.owned.forEach(ue),e.owned=null),e.updatedAt=n+1,Ze(i)}finally{S=o,w=s}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Pt(e,r):e.value=r,e.updatedAt=n)}function Oe(e,t,n,r=X,s){const o={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:w,context:w?w.context:null,pure:n};return w===null||w!==yt&&(w.owned?w.owned.push(o):w.owned=[o]),o}function ve(e){if(e.state===0)return;if(e.state===be)return Se(e);if(e.suspense&&D(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;n--)if(e=t[n],e.state===X)re(e);else if(e.state===be){const r=T;T=null,V(()=>Se(e,t[0]),!1),T=r}}function V(e,t){if(T)return e();let n=!1;t||(T=[]),G?n=!0:G=[],Ee++;try{const r=e();return en(n),r}catch(r){n||(G=null),T=null,Ze(r)}}function en(e){if(T&&(xt(T),T=null),e)return;const t=G;G=null,t.length&&V(()=>mt(t),!1)}function xt(e){for(let t=0;t=0;t--)ue(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)ue(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Ve(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Ze(e,t=w){throw Ve(e)}function qe(e){if(typeof e=="function"&&!e.length)return qe(e());if(Array.isArray(e)){const t=[];for(let n=0;ns=D(()=>(w.context={...w.context,[e]:r.value},Qe(()=>r.children))),void 0),s}}const rn=Symbol("fallback");function ot(e){for(let t=0;t1?[]:null;return ze(()=>ot(o)),()=>{let a=e()||[],c=a.length,f,u;return a[Be],D(()=>{let g,v,d,p,b,m,C,A,O;if(c===0)i!==0&&(ot(o),o=[],r=[],s=[],i=0,l&&(l=[])),n.fallback&&(r=[rn],s[0]=ae(U=>(o[0]=U,n.fallback())),i=1);else if(i===0){for(s=new Array(c),u=0;u=m&&A>=m&&r[C]===a[A];C--,A--)d[A]=s[C],p[A]=o[C],l&&(b[A]=l[C]);for(g=new Map,v=new Array(A+1),u=A;u>=m;u--)O=a[u],f=g.get(O),v[u]=f===void 0?-1:f,g.set(O,u);for(f=m;f<=C;f++)O=r[f],u=g.get(O),u!==void 0&&u!==-1?(d[u]=s[f],p[u]=o[f],l&&(b[u]=l[f]),u=v[u],g.set(O,u)):o[f]();for(u=m;ue(t||{}))}function pe(){return!0}const on={get(e,t,n){return t===M?n:e.get(t)},has(e,t){return t===M?!0:e.has(t)},set:pe,deleteProperty:pe,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:pe,deleteProperty:pe}},ownKeys(e){return e.keys()}};function je(e){return(e=typeof e=="function"?e():e)?e:{}}function ln(){for(let e=0,t=this.length;e=0;l--){const a=je(e[l])[i];if(a!==void 0)return a}},has(i){for(let l=e.length-1;l>=0;l--)if(i in je(e[l]))return!0;return!1},keys(){const i=[];for(let l=0;l=0;i--){const l=e[i];if(!l)continue;const a=Object.getOwnPropertyNames(l);for(let c=a.length-1;c>=0;c--){const f=a[c];if(f==="__proto__"||f==="constructor")continue;const u=Object.getOwnPropertyDescriptor(l,f);if(!r[f])r[f]=u.get?{enumerable:!0,configurable:!0,get:ln.bind(n[f]=[u.get.bind(l)])}:u.value!==void 0?u:void 0;else{const h=n[f];h&&(u.get?h.push(u.get.bind(l)):u.value!==void 0&&h.push(()=>u.value))}}}const s={},o=Object.keys(r);for(let i=o.length-1;i>=0;i--){const l=o[i],a=r[l];a&&a.get?Object.defineProperty(s,l,a):s[l]=a?a.value:void 0}return s}function De(e){let t,n;const r=s=>{const o=y.context;if(o){const[l,a]=E();y.count||(y.count=0),y.count++,(n||(n=e())).then(c=>{!y.done&&ie(o),y.count--,a(()=>c.default),ie()}),t=l}else if(!t){const[l]=Yt(()=>(n||(n=e())).then(a=>a.default));t=l}let i;return R(()=>(i=t())?D(()=>{if(!o||y.done)return i(s);const l=y.context;ie(o);const a=i(s);return ie(l),a}):"")};return r.preload=()=>n||((n=e()).then(s=>t=()=>s.default),n),r}const cn=e=>`Stale read from <${e}>.`;function et(e){const t="fallback"in e&&{fallback:()=>e.fallback};return R(sn(()=>e.each,e.children,t||void 0))}function Ie(e){const t=e.keyed,n=R(()=>e.when,void 0,void 0),r=t?n:R(n,void 0,{equals:(s,o)=>!s==!o});return R(()=>{const s=r();if(s){const o=e.children;return typeof o=="function"&&o.length>0?D(()=>o(t?s:()=>{if(!D(r))throw cn("Show");return n()})):o}return e.fallback},void 0,void 0)}function un(e,t,n){let r=n.length,s=t.length,o=r,i=0,l=0,a=t[s-1].nextSibling,c=null;for(;if-l){const v=t[i];for(;l{s=o,t===document?e():L(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{s(),t.textContent=""}}function j(e,t,n,r){let s;const o=()=>{const l=document.createElement("template");return l.innerHTML=e,l.content.firstChild},i=()=>(s||(s=o())).cloneNode(!0);return i.cloneNode=i,i}function se(e,t=window.document){const n=t[it]||(t[it]=new Set);for(let r=0,s=e.length;r$e(e,t(),s,n),r)}function tt(e){return!!y.context&&!y.done&&(!e||e.isConnected)}function hn(e){if(y.registry&&y.events&&y.events.find(([a,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,s=e.currentTarget,o=a=>Object.defineProperty(e,"target",{configurable:!0,value:a}),i=()=>{const a=t[n];if(a&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?a.call(t,c,e):a.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&o(t.host),!0},l=()=>{for(;i()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),y.registry&&!y.done&&(y.done=_$HY.done=!0),e.composedPath){const a=e.composedPath();o(a[0]);for(let c=0;c{let a=t();for(;typeof a=="function";)a=a();n=$e(e,a,n,r)}),()=>n;if(Array.isArray(t)){const a=[],c=n&&Array.isArray(n);if(We(a,t,n,s))return H(()=>n=$e(e,a,n,r,!0)),()=>n;if(o){if(!a.length)return n;if(r===void 0)return n=[...e.childNodes];let f=a[0];if(f.parentNode!==e)return n;const u=[f];for(;(f=f.nextSibling)!==r;)u.push(f);return n=u}if(a.length===0){if(n=te(e,n,r),l)return n}else c?n.length===0?lt(e,a,r):un(e,n,a):(n&&te(e),lt(e,a));n=a}else if(t.nodeType){if(o&&t.parentNode)return n=l?[t]:t;if(Array.isArray(n)){if(l)return n=te(e,n,r,t);te(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function We(e,t,n,r){let s=!1;for(let o=0,i=t.length;o=0;i--){const l=t[i];if(s!==l){const a=l.parentNode===e;!o&&!i?a?e.replaceChild(s,l):e.insertBefore(s,n):a&&l.remove()}else o=!0}}else e.insertBefore(s,n);return[s]}const gn=!1,pn="modulepreload",mn=function(e){return"/"+e},at={},Fe=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=Promise.allSettled(n.map(a=>{if(a=mn(a),a in at)return;at[a]=!0;const c=a.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${f}`))return;const u=document.createElement("link");if(u.rel=c?"stylesheet":pn,c||(u.as="script"),u.crossOrigin="",u.href=a,l&&u.setAttribute("nonce",l),document.head.appendChild(u),c)return new Promise((h,g)=>{u.addEventListener("load",h),u.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${a}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return s.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};function _t(){let e=new Set;function t(s){return e.add(s),()=>e.delete(s)}let n=!1;function r(s,o){if(n)return!(n=!1);const i={to:s,options:o,defaultPrevented:!1,preventDefault:()=>i.defaultPrevented=!0};for(const l of e)l.listener({...i,from:l.location,retry:a=>{a&&(n=!0),l.navigate(s,{...o,resolve:!1})}});return!i.defaultPrevented}return{subscribe:t,confirm:r}}let Ge;function nt(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),Ge=window.history.state._depth}nt();function yn(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function wn(e,t){let n=!1;return()=>{const r=Ge;nt();const s=r==null?null:Ge-r;if(n){n=!1;return}s&&t(s)?(n=!0,window.history.go(-s)):e()}}const bn=/^(?:[a-z0-9]+:)?\/\//i,vn=/^\/+|(\/)\/+$/g,Et="http://sr";function ce(e,t=!1){const n=e.replace(vn,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function ye(e,t,n){if(bn.test(t))return;const r=ce(e),s=n&&ce(n);let o="";return!s||t.startsWith("/")?o=r:s.toLowerCase().indexOf(r.toLowerCase())!==0?o=r+s:o=s,(o||"/")+ce(t,!o)}function Sn(e,t){if(e==null)throw new Error(t);return e}function $n(e,t){return ce(e).replace(/\/*(\*.*)?$/g,"")+ce(t)}function Ot(e){const t={};return e.searchParams.forEach((n,r)=>{r in t?Array.isArray(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n}),t}function An(e,t,n){const[r,s]=e.split("/*",2),o=r.split("/").filter(Boolean),i=o.length;return l=>{const a=l.split("/").filter(Boolean),c=a.length-i;if(c<0||c>0&&s===void 0&&!t)return null;const f={path:i?"":"/",params:{}},u=h=>n===void 0?void 0:n[h];for(let h=0;hr===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function Pn(e){const[t,n]=e.pattern.split("/*",2),r=t.split("/").filter(Boolean);return r.reduce((s,o)=>s+(o.startsWith(":")?2:3),r.length-(n===void 0?0:1))}function It(e){const t=new Map,n=bt();return new Proxy({},{get(r,s){return t.has(s)||vt(n,()=>t.set(s,R(()=>e()[s]))),t.get(s)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())}})}function kt(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),r=e.slice(t.index+t[0].length);const s=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(r);)s.push(n+=t[1]),r=r.slice(t[0].length);return kt(r).reduce((o,i)=>[...o,...s.map(l=>l+i)],[])}const xn=100,Lt=St(),Rt=St(),Cn=()=>Sn($t(Lt)," and 'use' router primitives can be only used inside a Route."),Dr=()=>Cn().params;function _n(e,t=""){const{component:n,preload:r,load:s,children:o,info:i}=e,l=!o||Array.isArray(o)&&!o.length,a={key:e,component:n,preload:r||s,info:i};return Nt(e.path).reduce((c,f)=>{for(const u of kt(f)){const h=$n(t,u);let g=l?h:h.split("/*",1)[0];g=g.split("/").map(v=>v.startsWith(":")||v.startsWith("*")?v:encodeURIComponent(v)).join("/"),c.push({...a,originalPath:f,pattern:g,matcher:An(g,!l,e.matchFilters)})}return c},[])}function En(e,t=0){return{routes:e,score:Pn(e[e.length-1])*1e4-t,matcher(n){const r=[];for(let s=e.length-1;s>=0;s--){const o=e[s],i=o.matcher(n);if(!i)return null;r.unshift({...i,route:o})}return r}}}function Nt(e){return Array.isArray(e)?e:[e]}function Tt(e,t="",n=[],r=[]){const s=Nt(e);for(let o=0,i=s.length;oi.score-o.score)}function Ue(e,t){for(let n=0,r=e.length;n{const u=e();try{return new URL(u,r)}catch{return console.error(`Invalid path ${u}`),f}},r,{equals:(f,u)=>f.href===u.href}),o=R(()=>s().pathname),i=R(()=>s().search,!0),l=R(()=>s().hash),a=()=>"",c=Je(i,()=>Ot(s()));return{get pathname(){return o()},get search(){return i()},get hash(){return l()},get state(){return t()},get key(){return a()},query:n?n(c):It(c)}}let z;function In(){return z}function kn(e,t,n,r={}){const{signal:[s,o],utils:i={}}=e,l=i.parsePath||($=>$),a=i.renderPath||($=>$),c=i.beforeLeave||_t(),f=ye("",r.base||"");if(f===void 0)throw new Error(`${f} is not a valid base path`);f&&!s().value&&o({value:f,replace:!0,scroll:!1});const[u,h]=E(!1);let g;const v=($,P)=>{P.value===d()&&P.state===b()||(g===void 0&&h(!0),z=$,g=P,zt(()=>{g===P&&(p(g.value),m(g.state),O[1](F=>F.filter(Z=>Z.pending)))}).finally(()=>{g===P&&wt(()=>{z=void 0,$==="navigate"&&Y(g),h(!1),g=void 0})}))},[d,p]=E(s().value),[b,m]=E(s().state),C=On(d,b,i.queryWrapper),A=[],O=E([]),U=R(()=>typeof r.transformUrl=="function"?Ue(t(),r.transformUrl(C.pathname)):Ue(t(),C.pathname)),N=()=>{const $=U(),P={};for(let F=0;F<$.length;F++)Object.assign(P,$[F].params);return P},K=i.paramsWrapper?i.paramsWrapper(N,t):It(N),I={pattern:f,path:()=>f,outlet:()=>null,resolvePath($){return ye(f,$)}};return H(Je(s,$=>v("native",$),{defer:!0})),{base:I,location:C,params:K,isRouting:u,renderPath:a,parsePath:l,navigatorFactory:k,matches:U,beforeLeave:c,preloadRoute:Bt,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:O};function _($,P,F){D(()=>{if(typeof P=="number"){P&&(i.go?i.go(P):console.warn("Router integration does not support relative routing"));return}const Z=!P||P[0]==="?",{replace:Le,resolve:ee,scroll:Re,state:oe}={replace:!1,resolve:!Z,scroll:!0,...F},ge=ee?$.resolvePath(P):ye(Z&&C.pathname||"",P);if(ge===void 0)throw new Error(`Path '${P}' is not a routable path`);if(A.length>=xn)throw new Error("Too many redirects");const rt=d();(ge!==rt||oe!==b())&&(gn||c.confirm(ge,F)&&(A.push({value:rt,replace:Le,scroll:Re,state:b()}),v("navigate",{value:ge,state:oe})))})}function k($){return $=$||$t(Rt)||I,(P,F)=>_($,P,F)}function Y($){const P=A[0];P&&(o({...$,replace:P.replace,scroll:P.scroll}),A.length=0)}function Bt($,P){const F=Ue(t(),$.pathname),Z=z;z="preload";for(let Le in F){const{route:ee,params:Re}=F[Le];ee.component&&ee.component.preload&&ee.component.preload();const{preload:oe}=ee;P&&oe&&vt(n(),()=>oe({params:Re,location:{pathname:$.pathname,search:$.search,hash:$.hash,query:Ot($),state:null,key:""},intent:"preload"}))}z=Z}}function Ln(e,t,n,r){const{base:s,location:o,params:i}=e,{pattern:l,component:a,preload:c}=r().route,f=R(()=>r().path);a&&a.preload&&a.preload();const u=c?c({params:i,location:o,intent:z||"initial"}):void 0;return{parent:t,pattern:l,path:f,outlet:()=>a?x(a,{params:i,location:o,data:u,get children(){return n()}}):n(),resolvePath(g){return ye(s.path(),g,f())}}}const Rn=e=>t=>{const{base:n}=t,r=Qe(()=>t.children),s=R(()=>Tt(r(),t.base||""));let o;const i=kn(e,s,()=>o,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(i),x(Lt.Provider,{value:i,get children(){return x(Nn,{routerState:i,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[R(()=>(o=bt())&&null),x(Tn,{routerState:i,get branches(){return s()}})]}})}})};function Nn(e){const t=e.routerState.location,n=e.routerState.params,r=R(()=>e.preload&&D(()=>{e.preload({params:n,location:t,intent:In()||"initial"})}));return x(Ie,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:s=>x(s,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function Tn(e){const t=[];let n;const r=R(Je(e.routerState.matches,(s,o,i)=>{let l=o&&s.length===o.length;const a=[];for(let c=0,f=s.length;c{t[c]=g,a[c]=Ln(e.routerState,a[c-1]||e.routerState.base,ct(()=>r()[c+1]),()=>e.routerState.matches()[c])}))}return t.splice(s.length).forEach(c=>c()),i&&l?i:(n=a[0],a)}));return ct(()=>r()&&n)()}const ct=e=>()=>x(Ie,{get when(){return e()},keyed:!0,children:t=>x(Rt.Provider,{value:t,get children(){return t.outlet()}})}),me=e=>{const t=Qe(()=>e.children);return an(e,{get children(){return t()}})};function jn([e,t],n,r){return[e,r?s=>t(r(s)):t]}function Dn(e){let t=!1;const n=s=>typeof s=="string"?{value:s}:s,r=jn(E(n(e.get()),{equals:(s,o)=>s.value===o.value&&s.state===o.state}),void 0,s=>(!t&&e.set(s),y.registry&&!y.done&&(y.done=!0),s));return e.init&&ze(e.init((s=e.get())=>{t=!0,r[1](n(s)),t=!1})),Rn({signal:r,create:e.create,utils:e.utils})}function Fn(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function Hn(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const Un=new Map;function Kn(e=!0,t=!1,n="/_server",r){return s=>{const o=s.base.path(),i=s.navigatorFactory(s.base);let l,a;function c(d){return d.namespaceURI==="http://www.w3.org/2000/svg"}function f(d){if(d.defaultPrevented||d.button!==0||d.metaKey||d.altKey||d.ctrlKey||d.shiftKey)return;const p=d.composedPath().find(U=>U instanceof Node&&U.nodeName.toUpperCase()==="A");if(!p||t&&!p.hasAttribute("link"))return;const b=c(p),m=b?p.href.baseVal:p.href;if((b?p.target.baseVal:p.target)||!m&&!p.hasAttribute("state"))return;const A=(p.getAttribute("rel")||"").split(/\s+/);if(p.hasAttribute("download")||A&&A.includes("external"))return;const O=b?new URL(m,document.baseURI):new URL(m);if(!(O.origin!==window.location.origin||o&&O.pathname&&!O.pathname.toLowerCase().startsWith(o.toLowerCase())))return[p,O]}function u(d){const p=f(d);if(!p)return;const[b,m]=p,C=s.parsePath(m.pathname+m.search+m.hash),A=b.getAttribute("state");d.preventDefault(),i(C,{resolve:!1,replace:b.hasAttribute("replace"),scroll:!b.hasAttribute("noscroll"),state:A?JSON.parse(A):void 0})}function h(d){const p=f(d);if(!p)return;const[b,m]=p;r&&(m.pathname=r(m.pathname)),s.preloadRoute(m,b.getAttribute("preload")!=="false")}function g(d){clearTimeout(l);const p=f(d);if(!p)return a=null;const[b,m]=p;a!==b&&(r&&(m.pathname=r(m.pathname)),l=setTimeout(()=>{s.preloadRoute(m,b.getAttribute("preload")!=="false"),a=b},20))}function v(d){if(d.defaultPrevented)return;let p=d.submitter&&d.submitter.hasAttribute("formaction")?d.submitter.getAttribute("formaction"):d.target.getAttribute("action");if(!p)return;if(!p.startsWith("https://action/")){const m=new URL(p,Et);if(p=s.parsePath(m.pathname+m.search),!p.startsWith(n))return}if(d.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const b=Un.get(p);if(b){d.preventDefault();const m=new FormData(d.target,d.submitter);b.call({r:s,f:d.target},d.target.enctype==="multipart/form-data"?m:new URLSearchParams(m))}}se(["click","submit"]),document.addEventListener("click",u),e&&(document.addEventListener("mousemove",g,{passive:!0}),document.addEventListener("focusin",h,{passive:!0}),document.addEventListener("touchstart",h,{passive:!0})),document.addEventListener("submit",v),ze(()=>{document.removeEventListener("click",u),e&&(document.removeEventListener("mousemove",g),document.removeEventListener("focusin",h),document.removeEventListener("touchstart",h)),document.removeEventListener("submit",v)})}}function Bn(e){const t=()=>{const r=window.location.pathname.replace(/^\/+/,"/")+window.location.search,s=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:r+window.location.hash,state:s}},n=_t();return Dn({get:t,set({value:r,replace:s,scroll:o,state:i}){s?window.history.replaceState(yn(i),"",r):window.history.pushState(i,"",r),Hn(decodeURIComponent(window.location.hash.slice(1)),o),nt()},init:r=>Fn(window,"popstate",wn(r,s=>{if(s&&s<0)return!n.confirm(s);{const o=t();return!n.confirm(o.value,{state:o.state})}})),create:Kn(e.preload,e.explicitLinks,e.actionBase,e.transformUrl),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}const Xe=Symbol("store-raw"),ne=Symbol("store-node"),W=Symbol("store-has"),jt=Symbol("store-self");function Dt(e){let t=e[M];if(!t&&(Object.defineProperty(e,M,{value:t=new Proxy(e,qn)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let s=0,o=n.length;se[M][t]),n}function Ft(e){Me()&&de(Pe(e,ne),jt)()}function Vn(e){return Ft(e),Reflect.ownKeys(e)}const qn={get(e,t,n){if(t===Xe)return e;if(t===M)return n;if(t===Be)return Ft(e),n;const r=Pe(e,ne),s=r[t];let o=s?s():e[t];if(t===ne||t===W||t==="__proto__")return o;if(!s){const i=Object.getOwnPropertyDescriptor(e,t);Me()&&(typeof o!="function"||e.hasOwnProperty(t))&&!(i&&i.get)&&(o=de(r,t,o)())}return Ae(o)?Dt(o):o},has(e,t){return t===Xe||t===M||t===Be||t===ne||t===W||t==="__proto__"?!0:(Me()&&de(Pe(e,W),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Vn,getOwnPropertyDescriptor:Mn};function xe(e,t,n,r=!1){if(!r&&e[t]===n)return;const s=e[t],o=e.length;n===void 0?(delete e[t],e[W]&&e[W][t]&&s!==void 0&&e[W][t].$()):(e[t]=n,e[W]&&e[W][t]&&s===void 0&&e[W][t].$());let i=Pe(e,ne),l;if((l=de(i,t,s))&&l.$(()=>n),Array.isArray(e)&&e.length!==o){for(let a=e.length;a1){r=t.shift();const i=typeof r,l=Array.isArray(e);if(Array.isArray(r)){for(let a=0;a1){le(e[r],t,[r].concat(n));return}s=e[r],n=[r].concat(n)}let o=t[0];typeof o=="function"&&(o=o(s,n),o===s)||r===void 0&&o==null||(o=fe(o),r===void 0||Ae(s)&&Ae(o)&&!Array.isArray(o)?Ht(s,o):xe(e,r,o))}function Gn(...[e,t]){const n=fe(e||{}),r=Array.isArray(n),s=Dt(n);function o(...i){wt(()=>{r&&i.length===1?Wn(n,i[0]):le(n,i)})}return[s,o]}const q="",Xn=async()=>{const e=q+"/api/all";return await(await fetch(e)).json()},Yn=async()=>{const e=q+"/api/config";return await(await fetch(e)).json()},Fr=async()=>{const e=q+"/api/version";return await(await fetch(e)).json()},Hr=async()=>{const e=q+"/api/notify_test";await fetch(e)},ut=async(e,t,n)=>{const r=q+"/api/edit/"+e+"/"+t+"/"+n;return await(await fetch(r)).json()},Ur=async e=>{const t=q+"/api/host/"+e;return await(await fetch(t)).json()},Kr=async e=>{const t=q+"/api/host/del/"+e;return await(await fetch(t)).json()},Br=async(e,t)=>{const n=q+"/api/port/"+e+"/"+t;return await(await fetch(n)).json()},Mr=async e=>{const t=q+"/api/history/"+e+"/?num=210";return await(await fetch(t)).json()},Vr=async(e,t)=>{const n=q+"/api/history/"+e+"/"+t;return await(await fetch(n)).json()},qr={ID:0,Name:"",DNS:"",Iface:"",IP:"",Mac:"",Hw:"",Date:"",Known:0,Now:0},Jn={Host:"",Port:"",Theme:"",Color:"",DirPath:"",Timeout:120,NodePath:"",LogLevel:"",Ifaces:"",ArpArgs:"",ArpStrs:[],TrimHist:48,ShoutURL:"",UseDB:"",PGConnect:"",InfluxEnable:!1,InfluxAddr:"",InfluxToken:"",InfluxOrg:"",InfluxBucket:"",InfluxSkipTLS:!1,PrometheusEnable:!1},[ke,he]=Gn([]),[Ce,zn]=E([]),[Qn,Zn]=E([]),[J,er]=E(Jn),[Ut,tr]=E(!1),[Wr,Gr]=E(200),[Xr,ft]=E(!1);let dt="ID";function nr(){const e=localStorage.getItem("filterField"),t=localStorage.getItem("filterValue");_e(e,t)}function _e(e,t){let n=ke;switch(dt==e&&(n=Ce()),dt=e,localStorage.setItem("filterField",e),localStorage.setItem("filterValue",t),e){case"Iface":n=n.filter(r=>r.Iface==t);break;case"Known":n=n.filter(r=>r.Known==t);break;case"Now":n=n.filter(r=>r.Now==t);break;default:n=Ce()}he(n)}let B=!1,Ke="";function rr(){const e=localStorage.getItem("sortField");B=JSON.parse(localStorage.getItem("sortDown")),B=!B,Kt(e)}function Kt(e){e!=Ke?(Ke=e,B=!B):(Ke="",B=!B),localStorage.setItem("sortDown",B.toString()),localStorage.setItem("sortField",e);let t=Ce();e=="IP"?t.sort((n,r)=>or(n,r,B)):t.sort((n,r)=>sr(n,r,e,B)),he(t)}function sr(e,t,n,r){return e[n]>t[n]?r?1:-1:r?-1:1}function or(e,t,n){const r=ht(e),s=ht(t);return n?r-s:s-r}function ht(e){return Number(e.IP.split(".").map(t=>`000${t}`.slice(-3)).join(""))}function ir(){Ye(),_e("ID",0),setInterval(()=>{Ye()},6e4)}async function Ye(){const e=await Xn();e!==null&&e.length>0&&(he(e),zn(e),lr(),rr(),nr())}function lr(){let e=[];for(let t of ke)e.includes(t.Iface)||e.push(t.Iface);Zn(e)}var ar=j(''),cr=j(''),ur=j(""),fr=j('.
');function dr(e){const[t,n]=E(e.host.Name);let r=ar();e.host.Now==1&&(r=cr());let s;e.host.Known===1?s=!0:s=!1;const o=async l=>{n(l),await ut(e.host.ID,t(),"")},i=async()=>{await ut(e.host.ID,t(),"toggle")};return(()=>{var l=fr(),a=l.firstChild,c=a.firstChild,f=a.nextSibling,u=f.nextSibling,h=u.nextSibling,g=h.firstChild,v=h.nextSibling,d=v.nextSibling,p=d.nextSibling,b=p.nextSibling,m=b.firstChild,C=m.firstChild,A=b.nextSibling,O=A.nextSibling,U=O.firstChild;return L(a,()=>e.index,c),L(f,x(Ie,{get when(){return Ut()},get fallback(){return t()},get children(){var N=ur();return N.$$input=K=>o(K.target.value),H(()=>N.value=t()),N}})),L(u,()=>e.host.Iface),L(g,()=>e.host.IP),L(v,()=>e.host.Mac),L(d,()=>e.host.Hw.slice(0,12)+".."),L(p,()=>e.host.Date),C.$$click=i,C.checked=s,L(A,r),H(N=>{var K="http://"+e.host.IP,I=e.host.Hw,_="/host/"+e.host.ID;return K!==N.e&&Q(g,"href",N.e=K),I!==N.t&&Q(d,"title",N.t=I),_!==N.a&&Q(U,"href",N.a=_),N},{e:void 0,t:void 0,a:void 0}),l})()}se(["input","click"]);var hr=j(""),gr=j(' ');function pr(){const[e,t]=E("");(()=>{let s=localStorage.getItem("sortField");s==="Mac"&&(s="MAC"),s==="Hw"&&(s="Hardware"),s==="Now"&&(s="On"),t(s)})();const r=s=>{t(s),s==="MAC"&&(s="Mac"),s==="Hardware"&&(s="Hw"),s==="On"&&(s="Now"),Kt(s)};return(()=>{var s=hr(),o=s.firstChild,i=o.firstChild,l=i.nextSibling;return L(o,x(et,{each:["Name","Iface","IP","MAC","Hardware","Date","Known","On"],children:a=>(()=>{var c=gr(),f=c.firstChild,u=f.nextSibling;return L(c,a,f),u.$$click=r,u.$$clickData=a,Q(u,"title","Sort by "+a),H(h=>dn(c,a===e()?"color: var(--bs-primary);":"",h)),c})()}),l),s})()}se(["click"]);var mr=j('