MCPcopy
hub / github.com/aceberg/WatchYourLAN / F

Function F

backend/internal/web/public/assets/index.js:2–2  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

1const __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]);
2(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 it(this.context.count)},getNextContextId(){return it(this.context.count++)}};function it(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 yt=!1,Wt=(e,t)=>e===t,M=Symbol("solid-proxy"),qt=typeof Proxy=="function",Ve=Symbol("solid-track"),be={equals:Wt};let wt=Ct;const G=1,ve=2,bt={owned:null,cleanups:null,context:null,owner:null},De={};var b=null;let je=null,Gt=null,S=null,D=null,q=null,Ie=0;function ae(e,t){const n=S,r=b,s=e.length===0,o=t===void 0?r:t,i=s?bt:{owned:null,cleanups:null,context:o?o.context:null,owner:o},l=s?e:()=>e(()=>F(()=>ue(i)));b=i,S=null;try{return V(l,!0)}finally{S=n,b=r}}function C(e,t){t=t?Object.assign({},be,t):be;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),xt(n,s));return[_t.bind(n),r]}function Xt(e,t,n){const r=Le(e,t,!0,G);re(r)}function j(e,t,n){const r=Le(e,t,!1,G);re(r)}function Yt(e,t,n){wt=nn;const r=Le(e,t,!1,G);r.user=!0,q?q.push(r):re(r)}function T(e,t,n){n=n?Object.assign({},be,n):be;const r=Le(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,re(r),_t.bind(r)}function Jt(e){return e&&typeof e=="object"&&"then"in e}function zt(e,t,n){let r,s,o;r=!0,s=e,o={};let i=null,l=De,a=null,c=!1,f="initialValue"in o,u=typeof r=="function"&&T(r);const h=new Set,[g,v]=(o.storage||C)(o.initialValue),[d,p]=C(void 0),[w,m]=C(void 0,{equals:!1}),[E,P]=C(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,L,Y){return i===_&&(i=null,Y!==void 0&&(f=!0),(_===l||I===l)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(Y,{value:I})),l=De,U(I,L)),I}function U(_,I){V(()=>{I===void 0&&v(()=>_),P(I!==void 0?"errored":f?"ready":"unresolved"),p(I);for(const L of h.keys())L.decrement();h.clear()},!1)}function X(){const _=Zt,I=g(),L=d();if(L!==void 0&&!i)throw L;return S&&S.user,I}function k(_=!0){if(_!==!1&&c)return;c=!1;const I=u?u():r;if(I==null||I===!1){O(i,F(g));return}const L=l!==De?l:F(()=>s(I,{value:g(),refetching:_}));return Jt(L)?(i=L,"value"in L?(L.status==="success"?O(i,L.value,void 0,I):O(i,void 0,qe(L.value),I),L):(c=!0,queueMicrotask(()=>c=!1),V(()=>{P(f?"refreshing":"pending"),m()},!1),L.then(Y=>O(L,Y,void 0,I),Y=>O(L,void 0,qe(Y),I)))):(O(i,L,void 0,I),L)}return Object.defineProperties(X,{state:{get:()=>E()},error:{get:()=>d()},loading:{get(){const _=E();return _==="pending"||_==="refreshing"}},latest:{get(){if(!f)return X();const _=d();if(_&&!i)throw _;return g()}}}),u?Xt(()=>k(!1)):k(!1),[X,{refetch:k,mutate:v}]}function vt(e){return V(e,!1)}function F(e){if(S===null)return e();const t=S;S=null;try{return e()}finally{S=t}}function Qe(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;c<e.length;c++)l[c]=e[c]()}else l=e();if(o)return o=!1,i;const a=F(()=>t(l,s,i));return s=l,a}}function St(e){Yt(()=>F(e))}function ke(e){return b===null||(b.cleanups===null?b.cleanups=[e]:b.cleanups.push(e)),e}function We(){return S}function Ze(){return b}function $t(e,t){const n=b,r=S;b=e,S=null;try{return V(t,!0)}catch(s){tt(s)}finally{b=n,S=r}}function Qt(e){const t=S,n=b;return Promise.resolve().then(()=>{S=t,b=n;let r;return V(e,!1),S=b=null,r?r.done:void 0})}const[Kr,Br]=C(!1);function At(e,t){const n=Symbol("context");return{id:n,Provider:rn(n),defaultValue:e}}function Pt(e){let t;return b&&b.context&&(t=b.context[e.id])!==void 0?t:e.defaultValue}function et(e){const t=T(e),n=T(()=>Ge(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let Zt;function _t(){if(this.sources&&this.state)if(this.state===G)re(this);else{const e=D;D=null,V(()=>$e(this),!1),D=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 xt(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;s<e.observers.length;s+=1){const o=e.observers[s],i=je&&je.running;i&&je.disposed.has(o),(i?!o.tState:!o.state)&&(o.pure?D.push(o):q.push(o),o.observers&&Et(o)),i||(o.state=G)}if(D.length>1e6)throw D=[],new Error},!1)),t}function re(e){if(!e.fn)return;ue(e);const t=Ie;en(e,e.value,t)}function en(e,t,n){let r;const s=b,o=S;S=b=e;try{r=e.fn(t)}catch(i){return e.pure&&(e.state=G,e.owned&&e.owned.forEach(ue),e.owned=null),e.updatedAt=n+1,tt(i)}finally{S=o,b=s}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?xt(e,r):e.value=r,e.updatedAt=n)}function Le(e,t,n,r=G,s){const o={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:b,context:b?b.context:null,pure:n};return b===null||b!==bt&&(b.owned?b.owned.push(o):b.owned=[o]),o}function Se(e){if(e.state===0)return;if(e.state===ve)return $e(e);if(e.suspense&&F(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Ie);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===G)re(e);else if(e.state===ve){const r=D;D=null,V(()=>$e(e,t[0]),!1),D=r}}function V(e,t){if(D)return e();let n=!1;t||(D=[]),q?n=!0:q=[],Ie++;try{const r=e();return tn(n),r}catch(r){n||(q=null),D=null,tt(r)}}function tn(e){if(D&&(Ct(D),D=null),e)return;const t=q;q=null,t.length&&V(()=>wt(t),!1)}function Ct(e){for(let t=0;t<e.length;t++)Se(e[t])}function nn(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Se(r)}if(y.context){if(y.count){y.effects||(y.effects=[]),y.effects.push(...e.slice(0,n));return}ie()}for(y.effects&&(y.done||!y.count)&&(e=[...y.effects,...e],n+=y.effects.length,delete y.effects),t=0;t<n;t++)Se(e[t])}function $e(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const s=r.state;s===G?r!==t&&(!r.updatedAt||r.updatedAt<Ie)&&Se(r):s===ve&&$e(r,t)}}}function Et(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=ve,n.pure?D.push(n):q.push(n),n.observers&&Et(n))}}function ue(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),s=n.observers;if(s&&s.length){const o=s.pop(),i=n.observerSlots.pop();r<s.length&&(o.sourceSlots[i]=r,s[r]=o,n.observerSlots[r]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;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 qe(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function tt(e,t=b){throw qe(e)}function Ge(e){if(typeof e=="function"&&!e.length)return Ge(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=Ge(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function rn(e,t){return function(r){let s;return j(()=>s=F(()=>(b.context={...b.context,[e]:r.value},et(()=>r.children))),void 0),s}}const sn=Symbol("fallback");function lt(e){for(let t=0;t<e.length;t++)e[t]()}function on(e,t,n={}){let r=[],s=[],o=[],i=0,l=t.length>1?[]:null;return ke(()=>lt(o)),()=>{let a=e()||[],c=a.length,f,u;return a[Ve],F(()=>{let g,v,d,p,w,m,E,P,O;if(c===0)i!==0&&(lt(o),o=[],r=[],s=[],i=0,l&&(l=[])),n.fallback&&(r=[sn],s[0]=ae(U=>(o[0]=U,n.fallback())),i=1);else if(i===0){for(s=new Array(c),u=0;u<c;u++)r[u]=a[u],s[u]=ae(h);i=c}else{for(d=new Array(c),p=new Array(c),l&&(w=new Array(c)),m=0,E=Math.min(i,c);m<E&&r[m]===a[m];m++);for(E=i-1,P=c-1;E>=m&&P>=m&&r[E]===a[P];E--,P--)d[P]=s[E],p[P]=o[E],l&&(w[P]=l[E]);for(g=new Map,v=new Array(P+1),u=P;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<=E;f++)O=r[f],u=g.get(O),u!==void 0&&u!==-1?(d[u]=s[f],p[u]=o[f],l&&(w[u]=l[f]),u=v[u],g.set(O,u)):o[f]();for(u=m;u<c;u++)u in d?(s[u]=d[u],o[u]=p[u],l&&(l[u]=w[u],l[u](u))):s[u]=ae(h);s=s.slice(0,i=c),r=a.slice(0)}return s});function h(g){if(o[u]=g,l){const[v,d]=C(u);return l[u]=d,t(a[u],v)}return t(a[u])}}}function A(e,t){return F(()=>e(t||{}))}function me(){return!0}const ln={get(e,t,n){return t===M?n:e.get(t)},has(e,t){return t===M?!0:e.has(t)},set:me,deleteProperty:me,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:me,deleteProperty:me}},ownKeys(e){return e.keys()}};function Fe(e){return(e=typeof e=="function"?e():e)?e:{}}function an(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function cn(...e){let t=!1;for(let i=0;i<e.length;i++){const l=e[i];t=t||!!l&&M in l,e[i]=typeof l=="function"?(t=!0,T(l)):l}if(qt&&t)return new Proxy({get(i){for(let l=e.length-1;l>=0;l--){const a=Fe(e[l])[i];if(a!==void 0)return a}},has(i){for(let l=e.length-1;l>=0;l--)if(i in Fe(e[l]))return!0;return!1},keys(){const i=[];for(let l=0;l<e.length;l++)i.push(...Object.keys(Fe(e[l])));return[...new Set(i)]}},ln);const n={},r=Object.create(null);for(let i=e.length-1;i>=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:an.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 He(e){let t,n;const r=s=>{const o=y.context;if(o){const[l,a]=C();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]=zt(()=>(n||(n=e())).then(a=>a.default));t=l}let i;return T(()=>(i=t())?F(()=>{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 un=e=>`Stale read from <${e}>.`;function nt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return T(on(()=>e.each,e.children,t||void 0))}function fe(e){const t=e.keyed,n=T(()=>e.when,void 0,void 0),r=t?n:T(n,void 0,{equals:(s,o)=>!s==!o});return T(()=>{const s=r();if(s){const o=e.children;return typeof o=="function"&&o.length>0?F(()=>o(t?s:()=>{if(!F(r))throw un("Show");return n()})):o}return e.fallback},void 0,void 0)}function fn(e,t,n){let r=n.length,s=t.length,o=r,i=0,l=0,a=t[s-1].nextSibling,c=null;for(;i<s||l<o;){if(t[i]===n[l]){i++,l++;continue}for(;t[s-1]===n[o-1];)s--,o--;if(s===i){const f=o<r?l?n[l-1].nextSibling:n[o-l]:a;for(;l<o;)e.insertBefore(n[l++],f)}else if(o===l)for(;i<s;)(!c||!c.has(t[i]))&&t[i].remove(),i++;else if(t[i]===n[o-1]&&n[l]===t[s-1]){const f=t[--s].nextSibling;e.insertBefore(n[l++],t[i++].nextSibling),e.insertBefore(n[--o],f),t[s]=n[o]}else{if(!c){c=new Map;let u=l;for(;u<o;)c.set(n[u],u++)}const f=c.get(t[i]);if(f!=null)if(l<f&&f<o){let u=i,h=1,g;for(;++u<s&&u<o&&!((g=c.get(t[u]))==null||g!==f+h);)h++;if(h>f-l){const v=t[i];for(;l<f;)e.insertBefore(n[l++],v)}else e.replaceChild(n[l++],t[i++])}else i++;else t[i++].remove()}}}const at="_$DX_DELEGATE";function dn(e,t,n,r={}){let s;return ae(o=>{s=o,t===document?e():R(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{s(),t.textContent=""}}function N(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[at]||(t[at]=new Set);for(let r=0,s=e.length;r<s;r++){const o=e[r];n.has(o)||(n.add(o),t.addEventListener(o,gn))}}function Q(e,t,n){rt(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Mr(e,t){rt(e)||(t==null?e.removeAttribute("class"):e.className=t)}function hn(e,t,n){if(!t)return n?Q(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let s,o;for(o in n)t[o]==null&&r.removeProperty(o),delete n[o];for(o in t)s=t[o],s!==n[o]&&(r.setProperty(o,s),n[o]=s);return n}function R(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Ae(e,t,r,n);j(s=>Ae(e,t(),s,n),r)}function rt(e){return!!y.context&&!y.done&&(!e||e.isConnected)}function gn(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<a.length-2&&(t=a[c],!!i());c++){if(t._$host){t=t._$host,l();break}if(t.parentNode===s)break}}else l();o(r)}function Ae(e,t,n,r,s){const o=rt(e);if(o){!n&&(n=[...e.childNodes]);let a=[];for(let c=0;c<n.length;c++){const f=n[c];f.nodeType===8&&f.data.slice(0,2)==="!$"?f.remove():a.push(f)}n=a}for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,l=r!==void 0;if(e=l&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(o||i==="number"&&(t=t.toString(),t===n))return n;if(l){let a=n[0];a&&a.nodeType===3?a.data!==t&&(a.data=t):a=document.createTextNode(t),n=te(e,n,r,a)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||i==="boolean"){if(o)return n;n=te(e,n,r)}else{if(i==="function")return j(()=>{let a=t();for(;typeof a=="function";)a=a();n=Ae(e,a,n,r)}),()=>n;if(Array.isArray(t)){const a=[],c=n&&Array.isArray(n);if(Xe(a,t,n,s))return j(()=>n=Ae(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?ct(e,a,r):fn(e,n,a):(n&&te(e),ct(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 Xe(e,t,n,r){let s=!1;for(let o=0,i=t.length;o<i;o++){let l=t[o],a=n&&n[e.length],c;if(!(l==null||l===!0||l===!1))if((c=typeof l)=="object"&&l.nodeType)e.push(l);else if(Array.isArray(l))s=Xe(e,l,a)||s;else if(c==="function")if(r){for(;typeof l=="function";)l=l();s=Xe(e,Array.isArray(l)?l:[l],Array.isArray(a)?a:[a])||s}else e.push(l),s=!0;else{const f=String(l);a&&a.nodeType===3&&a.data===f?e.push(a):e.push(document.createTextNode(f))}}return s}function ct(e,t,n=null){for(let r=0,s=t.length;r<s;r++)e.insertBefore(t[r],n)}function te(e,t,n,r){if(n===void 0)return e.textContent="";const s=r||document.createTextNode("");if(t.length){let o=!1;for(let i=t.length-1;i>=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 pn=!1,mn="modulepreload",yn=function(e){return"/"+e},ut={},Ue=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=yn(a),a in ut)return;ut[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":mn,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 Ot(){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 Ye;function st(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),Ye=window.history.state._depth}st();function wn(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function bn(e,t){let n=!1;return()=>{const r=Ye;st();const s=r==null?null:Ye-r;if(n){n=!1;return}s&&t(s)?(n=!0,window.history.go(-s)):e()}}const vn=/^(?:[a-z0-9]+:)?\/\//i,Sn=/^\/+|(\/)\/+$/g,It="http://sr";function ce(e,t=!1){const n=e.replace(Sn,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function we(e,t,n){if(vn.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 $n(e,t){if(e==null)throw new Error(t);return e}function An(e,t){return ce(e).replace(/\/*(\*.*)?$/g,"")+ce(t)}function kt(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 Pn(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;h<i;h++){const g=o[h],v=g[0]===":",d=v?a[h]:a[h].toLowerCase(),p=v?g.slice(1):g.toLowerCase();if(v&&Ke(d,u(p)))f.params[p]=d;else if(v||!Ke(d,p))return null;f.path+=`/${d}`}if(s){const h=c?a.slice(-c).join("/"):"";if(Ke(h,u(s)))f.params[s]=h;else return null}return f}}function Ke(e,t){const n=r=>r===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 _n(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 Lt(e){const t=new Map,n=Ze();return new Proxy({},{get(r,s){return t.has(s)||$t(n,()=>t.set(s,T(()=>e()[s]))),t.get(s)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())}})}function Rt(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 Rt(r).reduce((o,i)=>[...o,...s.map(l=>l+i)],[])}const xn=100,Tt=At(),Nt=At(),Cn=()=>$n(Pt(Tt),"<A> and 'use' router primitives can be only used inside a Route."),Vr=()=>Cn().params;function En(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 Dt(e.path).reduce((c,f)=>{for(const u of Rt(f)){const h=An(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:Pn(g,!l,e.matchFilters)})}return c},[])}function On(e,t=0){return{routes:e,score:_n(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 Dt(e){return Array.isArray(e)?e:[e]}function jt(e,t="",n=[],r=[]){const s=Dt(e);for(let o=0,i=s.length;o<i;o++){const l=s[o];if(l&&typeof l=="object"){l.hasOwnProperty("path")||(l.path="");const a=En(l,t);for(const c of a){n.push(c);const f=Array.isArray(l.children)&&l.children.length===0;if(l.children&&!f)jt(l.children,c.pattern,n,r);else{const u=On([...n],r.length);r.push(u)}n.pop()}}}return n.length?r:r.sort((o,i)=>i.score-o.score)}function Be(e,t){for(let n=0,r=e.length;n<r;n++){const s=e[n].matcher(t);if(s)return s}return[]}function In(e,t,n){const r=new URL(It),s=T(f=>{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=T(()=>s().pathname),i=T(()=>s().search,!0),l=T(()=>s().hash),a=()=>"",c=Qe(i,()=>kt(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):Lt(c)}}let z;function kn(){return z}function Ln(e,t,n,r={}){const{signal:[s,o],utils:i={}}=e,l=i.parsePath||($=>$),a=i.renderPath||($=>$),c=i.beforeLeave||Ot(),f=we("",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]=C(!1);let g;const v=($,x)=>{x.value===d()&&x.state===w()||(g===void 0&&h(!0),z=$,g=x,Qt(()=>{g===x&&(p(g.value),m(g.state),O[1](H=>H.filter(Z=>Z.pending)))}).finally(()=>{g===x&&vt(()=>{z=void 0,$==="navigate"&&Y(g),h(!1),g=void 0})}))},[d,p]=C(s().value),[w,m]=C(s().state),E=In(d,w,i.queryWrapper),P=[],O=C([]),U=T(()=>typeof r.transformUrl=="function"?Be(t(),r.transformUrl(E.pathname)):Be(t(),E.pathname)),X=()=>{const $=U(),x={};for(let H=0;H<$.length;H++)Object.assign(x,$[H].params);return x},k=i.paramsWrapper?i.paramsWrapper(X,t):Lt(X),_={pattern:f,path:()=>f,outlet:()=>null,resolvePath($){return we(f,$)}};return j(Qe(s,$=>v("native",$),{defer:!0})),{base:_,location:E,params:k,isRouting:u,renderPath:a,parsePath:l,navigatorFactory:L,matches:U,beforeLeave:c,preloadRoute:Vt,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:O};function I($,x,H){F(()=>{if(typeof x=="number"){x&&(i.go?i.go(x):console.warn("Router integration does not support relative routing"));return}const Z=!x||x[0]==="?",{replace:Te,resolve:ee,scroll:Ne,state:oe}={replace:!1,resolve:!Z,scroll:!0,...H},pe=ee?$.resolvePath(x):we(Z&&E.pathname||"",x);if(pe===void 0)throw new Error(`Path '${x}' is not a routable path`);if(P.length>=xn)throw new Error("Too many redirects");const ot=d();(pe!==ot||oe!==w())&&(pn||c.confirm(pe,H)&&(P.push({value:ot,replace:Te,scroll:Ne,state:w()}),v("navigate",{value:pe,state:oe})))})}function L($){return $=$||Pt(Nt)||_,(x,H)=>I($,x,H)}function Y($){const x=P[0];x&&(o({...$,replace:x.replace,scroll:x.scroll}),P.length=0)}function Vt($,x){const H=Be(t(),$.pathname),Z=z;z="preload";for(let Te in H){const{route:ee,params:Ne}=H[Te];ee.component&&ee.component.preload&&ee.component.preload();const{preload:oe}=ee;x&&oe&&$t(n(),()=>oe({params:Ne,location:{pathname:$.pathname,search:$.search,hash:$.hash,query:kt($),state:null,key:""},intent:"preload"}))}z=Z}}function Rn(e,t,n,r){const{base:s,location:o,params:i}=e,{pattern:l,component:a,preload:c}=r().route,f=T(()=>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?A(a,{params:i,location:o,data:u,get children(){return n()}}):n(),resolvePath(g){return we(s.path(),g,f())}}}const Tn=e=>t=>{const{base:n}=t,r=et(()=>t.children),s=T(()=>jt(r(),t.base||""));let o;const i=Ln(e,s,()=>o,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(i),A(Tt.Provider,{value:i,get children(){return A(Nn,{routerState:i,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[T(()=>(o=Ze())&&null),A(Dn,{routerState:i,get branches(){return s()}})]}})}})};function Nn(e){const t=e.routerState.location,n=e.routerState.params,r=T(()=>e.preload&&F(()=>{e.preload({params:n,location:t,intent:kn()||"initial"})}));return A(fe,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:s=>A(s,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function Dn(e){const t=[];let n;const r=T(Qe(e.routerState.matches,(s,o,i)=>{let l=o&&s.length===o.length;const a=[];for(let c=0,f=s.length;c<f;c++){const u=o&&o[c],h=s[c];i&&u&&h.route.key===u.route.key?a[c]=i[c]:(l=!1,t[c]&&t[c](),ae(g=>{t[c]=g,a[c]=Rn(e.routerState,a[c-1]||e.routerState.base,ft(()=>r()[c+1]),()=>e.routerState.matches()[c])}))}return t.splice(s.length).forEach(c=>c()),i&&l?i:(n=a[0],a)}));return ft(()=>r()&&n)()}const ft=e=>()=>A(fe,{get when(){return e()},keyed:!0,children:t=>A(Nt.Provider,{value:t,get children(){return t.outlet()}})}),ye=e=>{const t=et(()=>e.children);return cn(e,{get children(){return t()}})};function jn([e,t],n,r){return[e,r?s=>t(r(s)):t]}function Fn(e){let t=!1;const n=s=>typeof s=="string"?{value:s}:s,r=jn(C(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&&ke(e.init((s=e.get())=>{t=!0,r[1](n(s)),t=!1})),Tn({signal:r,create:e.create,utils:e.utils})}function Hn(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function Un(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const Kn=new Map;function Bn(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 w=c(p),m=w?p.href.baseVal:p.href;if((w?p.target.baseVal:p.target)||!m&&!p.hasAttribute("state"))return;const P=(p.getAttribute("rel")||"").split(/\s+/);if(p.hasAttribute("download")||P&&P.includes("external"))return;const O=w?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[w,m]=p,E=s.parsePath(m.pathname+m.search+m.hash),P=w.getAttribute("state");d.preventDefault(),i(E,{resolve:!1,replace:w.hasAttribute("replace"),scroll:!w.hasAttribute("noscroll"),state:P?JSON.parse(P):void 0})}function h(d){const p=f(d);if(!p)return;const[w,m]=p;r&&(m.pathname=r(m.pathname)),s.preloadRoute(m,w.getAttribute("preload")!=="false")}function g(d){clearTimeout(l);const p=f(d);if(!p)return a=null;const[w,m]=p;a!==w&&(r&&(m.pathname=r(m.pathname)),l=setTimeout(()=>{s.preloadRoute(m,w.getAttribute("preload")!=="false"),a=w},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,It);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 w=Kn.get(p);if(w){d.preventDefault();const m=new FormData(d.target,d.submitter);w.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),ke(()=>{document.removeEventListener("click",u),e&&(document.removeEventListener("mousemove",g),document.removeEventListener("focusin",h),document.removeEventListener("touchstart",h)),document.removeEventListener("submit",v)})}}function Mn(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=Ot();return Fn({get:t,set({value:r,replace:s,scroll:o,state:i}){s?window.history.replaceState(wn(i),"",r):window.history.pushState(i,"",r),Un(decodeURIComponent(window.location.hash.slice(1)),o),st()},init:r=>Hn(window,"popstate",bn(r,s=>{if(s&&s<0)return!n.confirm(s);{const o=t();return!n.confirm(o.value,{state:o.state})}})),create:Bn(e.preload,e.explicitLinks,e.actionBase,e.transformUrl),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}const Je=Symbol("store-raw"),ne=Symbol("store-node"),W=Symbol("store-has"),Ft=Symbol("store-self");function Ht(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;s<o;s++){const i=n[s];r[i].get&&Object.defineProperty(e,i,{enumerable:r[i].enumerable,get:r[i].get.bind(t)})}}return t}function Pe(e){let t;return e!=null&&typeof e=="object"&&(e[M]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function de(e,t=new Set){let n,r,s,o;if(n=e!=null&&e[Je])return n;if(!Pe(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let i=0,l=e.length;i<l;i++)s=e[i],(r=de(s,t))!==s&&(e[i]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const i=Object.keys(e),l=Object.getOwnPropertyDescriptors(e);for(let a=0,c=i.length;a<c;a++)o=i[a],!l[o].get&&(s=e[o],(r=de(s,t))!==s&&(e[o]=r))}return e}function _e(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function he(e,t,n){if(e[t])return e[t];const[r,s]=C(n,{equals:!1,internal:!0});return r.$=s,e[t]=r}function Vn(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===M||t===ne||(delete n.value,delete n.writable,n.get=()=>e[M][t]),n}function Ut(e){We()&&he(_e(e,ne),Ft)()}function Wn(e){return Ut(e),Reflect.ownKeys(e)}const qn={get(e,t,n){if(t===Je)return e;if(t===M)return n;if(t===Ve)return Ut(e),n;const r=_e(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);We()&&(typeof o!="function"||e.hasOwnProperty(t))&&!(i&&i.get)&&(o=he(r,t,o)())}return Pe(o)?Ht(o):o},has(e,t){return t===Je||t===M||t===Ve||t===ne||t===W||t==="__proto__"?!0:(We()&&he(_e(e,W),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Wn,getOwnPropertyDescriptor:Vn};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=_e(e,ne),l;if((l=he(i,t,s))&&l.$(()=>n),Array.isArray(e)&&e.length!==o){for(let a=e.length;a<o;a++)(l=i[a])&&l.$();(l=he(i,"length",o))&&l.$(e.length)}(l=i[Ft])&&l.$()}function Kt(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const s=n[r];xe(e,s,t[s])}}function Gn(e,t){if(typeof t=="function"&&(t=t(e)),t=de(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const s=t[n];e[n]!==s&&xe(e,n,s)}xe(e,"length",r)}else Kt(e,t)}function le(e,t,n=[]){let r,s=e;if(t.length>1){r=t.shift();const i=typeof r,l=Array.isArray(e);if(Array.isArray(r)){for(let a=0;a<r.length;a++)le(e,[r[a]].concat(t),n);return}else if(l&&i==="function"){for(let a=0;a<e.length;a++)r(e[a],a)&&le(e,[a].concat(t),n);return}else if(l&&i==="object"){const{from:a=0,to:c=e.length-1,by:f=1}=r;for(let u=a;u<=c;u+=f)le(e,[u].concat(t),n);return}else if(t.length>1){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=de(o),r===void 0||Pe(s)&&Pe(o)&&!Array.isArray(o)?Kt(s,o):xe(e,r,o))}function Xn(...[e,t]){const n=de(e||{}),r=Array.isArray(n),s=Ht(n);function o(...i){vt(()=>{r&&i.length===1?Gn(n,i[0]):le(n,i)})}return[s,o]}const K="",Yn=async()=>{const e=K+"/api/all";return await(await fetch(e)).json()},Jn=async()=>{const e=K+"/api/config";return await(await fetch(e)).json()},Wr=async()=>{const e=K+"/api/version";return await(await fetch(e)).json()},qr=async()=>{const e=K+"/api/notify_test";await fetch(e)},dt=async(e,t,n)=>{const r=K+"/api/edit/"+e+"/"+t+"/"+n;return await(await fetch(r)).json()},Gr=async e=>{const t=K+"/api/host/"+e;return await(await fetch(t)).json()},zn=async e=>{const t=K+"/api/host/del/"+e;return await(await fetch(t)).json()},Xr=async(e,t)=>{const n=K+"/api/port/"+e+"/"+t;return await(await fetch(n)).json()},Yr=async e=>{const t=K+"/api/history/"+e+"/?num=210";return await(await fetch(t)).json()},Jr=async(e,t)=>{const n=K+"/api/history/"+e+"/"+t;return await(await fetch(n)).json()},zr=async e=>{const t=K+"/api/wol/"+e;return await(await fetch(t)).json()},Qr={ID:0,Name:"",DNS:"",Iface:"",IP:"",Mac:"",Hw:"",Date:"",Known:0,Now:0},Qn={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},[Re,ge]=Xn([]),[Ce,Zn]=C([]),[er,tr]=C([]),[J,nr]=C(Qn),[ze,rr]=C(!1),[Zr,es]=C(200),[ts,ht]=C(!1),[Bt,sr]=C([]);let gt="ID";function or(){const e=localStorage.getItem("filterField"),t=localStorage.getItem("filterValue");Ee(e,t)}function Ee(e,t){let n=Re;switch(gt==e&&(n=Ce()),gt=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()}ge(n)}let B=!1,Me="";function ir(){const e=localStorage.getItem("sortField");B=JSON.parse(localStorage.getItem("sortDown")),B=!B,Mt(e)}function Mt(e){e!=Me?(Me=e,B=!B):(Me="",B=!B),localStorage.setItem("sortDown",B.toString()),localStorage.setItem("sortField",e);let t=Ce();e=="IP"?t.sort((n,r)=>ar(n,r,B)):t.sort((n,r)=>lr(n,r,e,B)),ge(t)}function lr(e,t,n,r){return e[n]>t[n]?r?1:-1:r?-1:1}function ar(e,t,n){const r=pt(e),s=pt(t);return n?r-s:s-r}function pt(e){return Number(e.IP.split(".").map(t=>`000${t}`.slice(-3)).join(""))}function cr(){Oe(),Ee("ID",0),setInterval(()=>{Oe()},6e4)}async function Oe(){const e=await Yn();e!==null&&e.length>0&&(ge(e),Zn(e),ur(),ir(),or())}function ur(){let e=[];for(let t of Re)e.includes(t.Iface)||e.push(t.Iface);tr(e)}const fr=(e,t)=>{let n;const r=()=>clearTimeout(n);return Ze()&&ke(r),Object.assign((...o)=>{n!==void 0&&r(),n=setTimeout(()=>e(...o),t)},{clear:r})};var dr=N('<i class="bi bi-circle-fill"style=color:var(--bs-gray-500);>'),hr=N('<i class="bi bi-check-circle-fill"style=color:var(--bs-success);>'),gr=N("<input type=text class=form-control>"),pr=N("<input type=checkbox class=form-check-input>"),mr=N('<tr><td class=opacity-50>.</td><td></td><td></td><td><a target=_blank></a></td><td></td><td></td><td></td><td><div class="form-check form-switch"><input class=form-check-input type=checkbox></div></td><td></td><td>'),yr=N('<a><i class="bi bi-three-dots-vertical my-btn p-2"title=More>');function wr(e){const[t,n]=C(e.host.Name);let r=dr();e.host.Now==1&&(r=hr());let s;e.host.Known===1?s=!0:s=!1;const o=fr(async c=>{await dt(e.host.ID,c,"")},300),i=async c=>{n(c),o(c)},l=async()=>{await dt(e.host.ID,t(),"toggle")},a=c=>{const f=e.host.ID;sr(u=>c?u.includes(f)?u:[...u,f]:u.filter(h=>h!==f))};return(()=>{var c=mr(),f=c.firstChild,u=f.firstChild,h=f.nextSibling,g=h.nextSibling,v=g.nextSibling,d=v.firstChild,p=v.nextSibling,w=p.nextSibling,m=w.nextSibling,E=m.nextSibling,P=E.firstChild,O=P.firstChild,U=E.nextSibling,X=U.nextSibling;return R(f,()=>e.index,u),R(h,A(fe,{get when(){return ze()},get fallback(){return t()},get children(){var k=gr();return k.$$input=_=>i(_.target.value),j(()=>k.value=t()),k}})),R(g,()=>e.host.Iface),R(d,()=>e.host.IP),R(p,()=>e.host.Mac),R(w,()=>e.host.Hw.slice(0,12)+".."),R(m,()=>e.host.Date),O.$$click=l,O.checked=s,R(U,r),R(X,A(fe,{get when(){return ze()},get fallback(){return(()=>{var k=yr();return j(()=>Q(k,"href","/host/"+e.host.ID)),k})()},get children(){var k=pr();return k.addEventListener("change",_=>a(_.target.checked)),j(()=>k.checked=Bt().includes(e.host.ID)),k}})),j(k=>{var _="http://"+e.host.IP,I=e.host.Hw;return _!==k.e&&Q(d,"href",k.e=_),I!==k.t&&Q(w,"title",k.t=I),k},{e:void 0,t:void 0}),c})()}se(["input","click"]);var br=N('<thead><tr><th style=width:2em;></th><th style=width:2em; title=Edit><i class="bi bi-pencil-fill">'),vr=N('<th> <i class="bi bi-sort-down-alt my-btn">');function Sr(){const[e,t]=C("");(()=>{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"),Mt(s)};return(()=>{var s=br(),o=s.firstChild,i=o.firstChild,l=i.nextSibling;return R(o,A(nt,{each:["Name","Iface","IP","MAC","Hardware","Date","Known","On"],children:a=>(()=>{var c=vr(),f=c.firstChild,u=f.nextSibling;return R(c,a,f),u.$$click=r,u.$$clickData=a,Q(u,"title","Sort by "+a),j(h=>hn(c,a===e()?"color: var(--bs-primary);":"",h)),c})()}),l),s})()}se(["click"]);var $r=N('<div class=row><div class="col input-group"><select class=form-select title="Filter by Iface"><option value selected disabled>Iface</option></select><select class=form-select title="Filter by Known"><option value selected disabled>Known</option><option value=1>Known</option><option value=0>Unknown</option></select><select class=form-select title="Filter by Online"><option value selected disabled>Online</option><option value=1>On</option><option value=0>Off</option></select><button class="btn btn-outline-primary"title="Reset filter">Reset filter'),Ar=N("<option>");function Pr(){const[e,t]=C(""),n=(s,o)=>{const i=o.target?o.target.value:0;Ee(s,i),ht(!0)},r=()=>{Ee("ID",0),t("something"),t(""),ht(!0)};return(()=>{var s=$r(),o=s.firstChild,i=o.firstChild;i.firstChild;var l=i.nextSibling,a=l.nextSibling,c=a.nextSibling;return i.addEventListener("change",f=>{n("Iface",f)}),R(i,A(nt,{get each(){return er()},children:f=>(()=>{var u=Ar();return u.value=f,R(u,f),u})()}),null),l.addEventListener("change",f=>{n("Known",f)}),a.addEventListener("change",f=>{n("Now",f)}),c.$$click=r,j(()=>i.value=e()),j(()=>l.value=e()),j(()=>a.value=e()),s})()}se(["click"]);function _r(e){if(e!=""){const t=e.toLowerCase();let n=[];for(let r of Re)xr(r,t)&&n.push(r);ge(n)}else ge(Ce())}function xr(e,t){const n=e.Name.toLowerCase(),r=e.Hw.toLowerCase(),s=e.Mac.toLowerCase();return!!(n.includes(t)||e.Iface.includes(t)||e.IP.includes(t)||s.includes(t)||r.includes(t)||e.Date.includes(t))}var Cr=N("<input class=form-control placeholder=Search style=max-width:10em; title=Search>");function Er(){const e=t=>{_r(t)};return(()=>{var t=Cr();return t.$$input=n=>e(n.target.value),t})()}se(["input"]);var Or=N('<button type=button title="Delete selected hosts"class="btn btn-outline-danger">Delete selected'),Ir=N('<button class="btn btn-primary"title="Toggle edit">Edit'),kr=N('<div class=row><div class="col-md mt-1 mb-1"><div class="d-flex justify-left"></div></div><div class="col-md mt-1 mb-1"><div class="d-flex justify-content-between">'),Lr=N('<button class="btn btn-outline-primary"title="Toggle edit">Edit');function Rr(){const e=n=>{n||Oe(),rr(n)},t=async()=>{const n=Bt();for(let r of n)await zn(r);window.location.href="/"};return(()=>{var n=kr(),r=n.firstChild,s=r.firstChild,o=r.nextSibling,i=o.firstChild;return R(s,A(Pr,{})),R(i,A(Er,{}),null),R(i,A(fe,{get when(){return ze()},get fallback(){return(()=>{var l=Lr();return l.$$click=e,l.$$clickData=!0,l})()},get children(){return[(()=>{var l=Or();return l.$$click=t,l})(),(()=>{var l=Ir();return l.$$click=e,l.$$clickData=!1,l})()]}}),null),n})()}se(["click"]);var Tr=N('<div class="card border-primary"><div class=card-header></div><div class="card-body table-responsive"><table class="table table-striped table-hover"><tbody></tbody>');function Nr(){return St(()=>{Oe()}),(()=>{var e=Tr(),t=e.firstChild,n=t.nextSibling,r=n.firstChild,s=r.firstChild;return R(t,A(Rr,{})),R(r,A(Sr,{}),s),R(s,A(nt,{each:Re,children:(o,i)=>A(wr,{host:o,get index(){return i()+1}})})),e})()}var mt=N("<link rel=stylesheet>"),Dr=N('<nav class="navbar navbar-expand-md navbar-dark bg-primary"><div class=container-lg><a class=navbar-brand href=/><img src=/fs/public/favicon.png style=width:2em></a><ul class="navbar-nav me-auto mb-2 mb-md-0"><li class=nav-item><a class="nav-link active"href=/ title=Home>Home</a></li><li class=nav-item><a class="nav-link active"href=/config/ title=Config>Config</a></li><li class=nav-item><a class="nav-link active"href=/history/ title=History>History</a></li></ul><ul class=navbar-nav><li class=nav-item><a class="nav-link active fs-3 ms-md-2"target=_blank href=https://github.com/aceberg/WatchYourLAN title=Github><i class="bi bi-github">');function jr(){const[e,t]=C(""),[n,r]=C("");return(async()=>{nr(await Jn());const o=J().Theme?J().Theme:"sand",i=J().Color?J().Color:"dark";J().NodePath==""?(t("https://cdn.jsdelivr.net/npm/aceberg-bootswatch-fork@v5.3.3-2/dist/"+o+"/bootstrap.min.css"),r("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css")):(t(J().NodePath+"/node_modules/bootswatch/dist/"+o+"/bootstrap.min.css"),r(J().NodePath+"/node_modules/bootstrap-icons/font/bootstrap-icons.css")),document.documentElement.setAttribute("data-bs-theme",i),i==="dark"?document.documentElement.style.setProperty("--transparent-light","#ffffff15"):document.documentElement.style.setProperty("--transparent-light","#00000015")})(),[(()=>{var o=mt();return j(()=>Q(o,"href",n())),o})()," ",(()=>{var o=mt();return j(()=>Q(o,"href",e())),o})()," ",Dr()]}var Fr=N('<div class=container-lg><div class=row><div class="col-md mt-4 mb-4">');function Hr(){St(()=>{cr()});const e=He(()=>Ue(()=>import("./Config.js"),[])),t=He(()=>Ue(()=>import("./History.js"),__vite__mapDeps([0,1]))),n=He(()=>Ue(()=>import("./HostPage.js"),__vite__mapDeps([2,1])));return[A(jr,{}),(()=>{var r=Fr(),s=r.firstChild,o=s.firstChild;return R(o,A(Mn,{get children(){return[A(ye,{path:"/",component:Nr}),A(ye,{path:"/config",component:e}),A(ye,{path:"/history",component:t}),A(ye,{path:"/host/:id",component:n})]}})),r})()]}const Ur=document.getElementById("root");dn(()=>A(Hr,{}),Ur);export{Vr as A,Gr as B,Yr as C,Jr as D,Xn as E,nt as F,ke as G,Mr as H,fe as S,Wr as a,j as b,C as c,K as d,A as e,J as f,qr as g,se as h,R as i,T as j,es as k,Zr as l,Re as m,Yt as n,St as o,ts as p,ht as q,Pr as r,Q as s,N as t,fr as u,dt as v,zr as w,zn as x,Xr as y,Qr as z};

Callers 12

aeFunction · 0.70
kFunction · 0.70
QeFunction · 0.70
StFunction · 0.70
SeFunction · 0.70
rnFunction · 0.70
onFunction · 0.70
AFunction · 0.70
rFunction · 0.70
feFunction · 0.70
IFunction · 0.70
NnFunction · 0.70

Calls 1

eFunction · 0.85

Tested by

no test coverage detected