1 line
36 KiB
JavaScript
1 line
36 KiB
JavaScript
(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 w={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return He(this.context.count)},getNextContextId(){return He(this.context.count++)}};function He(e){const t=String(e),n=t.length-1;return w.context.id+(n?String.fromCharCode(96+n):"")+t}function te(e){w.context=e}const Ze=!1,xt=(e,t)=>e===t,Ce=Symbol("solid-proxy"),_t=typeof Proxy=="function",At=Symbol("solid-track"),ue={equals:xt};let ze=lt;const V=1,fe=2,et={owned:null,cleanups:null,context:null,owner:null},$e={};var $=null;let ve=null,Ct=null,v=null,N=null,q=null,pe=0;function ne(e,t){const n=v,r=$,s=e.length===0,o=t===void 0?r:t,i=s?et:{owned:null,cleanups:null,context:o?o.context:null,owner:o},l=s?e:()=>e(()=>T(()=>se(i)));$=i,v=null;try{return K(l,!0)}finally{v=n,$=r}}function R(e,t){t=t?Object.assign({},ue,t):ue;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),it(n,s));return[ot.bind(n),r]}function Pt(e,t,n){const r=me(e,t,!0,V);Z(r)}function Q(e,t,n){const r=me(e,t,!1,V);Z(r)}function kt(e,t,n){ze=Ft;const r=me(e,t,!1,V);r.user=!0,q?q.push(r):Z(r)}function L(e,t,n){n=n?Object.assign({},ue,n):ue;const r=me(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Z(r),ot.bind(r)}function Et(e){return e&&typeof e=="object"&&"then"in e}function It(e,t,n){let r,s,o;r=!0,s=e,o={};let i=null,l=$e,a=null,c=!1,f="initialValue"in o,u=typeof r=="function"&&L(r);const g=new Set,[h,b]=(o.storage||R)(o.initialValue),[d,p]=R(void 0),[y,m]=R(void 0,{equals:!1}),[S,x]=R(f?"ready":"unresolved");w.context&&(a=w.getNextContextId(),o.ssrLoadFrom==="initial"?l=o.initialValue:w.load&&w.has(a)&&(l=w.load(a)));function _(k,C,E,W){return i===k&&(i=null,W!==void 0&&(f=!0),(k===l||C===l)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(W,{value:C})),l=$e,D(C,E)),C}function D(k,C){K(()=>{C===void 0&&b(()=>k),x(C!==void 0?"errored":f?"ready":"unresolved"),p(C);for(const E of g.keys())E.decrement();g.clear()},!1)}function H(){const k=Nt,C=h(),E=d();if(E!==void 0&&!i)throw E;return v&&v.user,C}function U(k=!0){if(k!==!1&&c)return;c=!1;const C=u?u():r;if(C==null||C===!1){_(i,T(h));return}const E=l!==$e?l:T(()=>s(C,{value:h(),refetching:k}));return Et(E)?(i=E,"value"in E?(E.status==="success"?_(i,E.value,void 0,C):_(i,void 0,Pe(E.value),C),E):(c=!0,queueMicrotask(()=>c=!1),K(()=>{x(f?"refreshing":"pending"),m()},!1),E.then(W=>_(E,W,void 0,C),W=>_(E,void 0,Pe(W),C)))):(_(i,E,void 0,C),E)}return Object.defineProperties(H,{state:{get:()=>S()},error:{get:()=>d()},loading:{get(){const k=S();return k==="pending"||k==="refreshing"}},latest:{get(){if(!f)return H();const k=d();if(k&&!i)throw k;return h()}}}),u?Pt(()=>U(!1)):U(!1),[H,{refetch:U,mutate:b}]}function Lt(e){return K(e,!1)}function T(e){if(v===null)return e();const t=v;v=null;try{return e()}finally{v=t}}function Re(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=T(()=>t(l,s,i));return s=l,a}}function Rt(e){kt(()=>T(e))}function Oe(e){return $===null||($.cleanups===null?$.cleanups=[e]:$.cleanups.push(e)),e}function tt(){return $}function nt(e,t){const n=$,r=v;$=e,v=null;try{return K(t,!0)}catch(s){De(s)}finally{$=n,v=r}}function Ot(e){const t=v,n=$;return Promise.resolve().then(()=>{v=t,$=n;let r;return K(e,!1),v=$=null,r?r.done:void 0})}const[ir,lr]=R(!1);function rt(e,t){const n=Symbol("context");return{id:n,Provider:jt(n),defaultValue:e}}function st(e){let t;return $&&$.context&&(t=$.context[e.id])!==void 0?t:e.defaultValue}function Ne(e){const t=L(e),n=L(()=>ke(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let Nt;function ot(){if(this.sources&&this.state)if(this.state===V)Z(this);else{const e=N;N=null,K(()=>he(this),!1),N=e}if(v){const e=this.observers?this.observers.length:0;v.sources?(v.sources.push(this),v.sourceSlots.push(e)):(v.sources=[this],v.sourceSlots=[e]),this.observers?(this.observers.push(v),this.observerSlots.push(v.sources.length-1)):(this.observers=[v],this.observerSlots=[v.sources.length-1])}return this.value}function it(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&K(()=>{for(let s=0;s<e.observers.length;s+=1){const o=e.observers[s],i=ve&&ve.running;i&&ve.disposed.has(o),(i?!o.tState:!o.state)&&(o.pure?N.push(o):q.push(o),o.observers&&at(o)),i||(o.state=V)}if(N.length>1e6)throw N=[],new Error},!1)),t}function Z(e){if(!e.fn)return;se(e);const t=pe;Dt(e,e.value,t)}function Dt(e,t,n){let r;const s=$,o=v;v=$=e;try{r=e.fn(t)}catch(i){return e.pure&&(e.state=V,e.owned&&e.owned.forEach(se),e.owned=null),e.updatedAt=n+1,De(i)}finally{v=o,$=s}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?it(e,r):e.value=r,e.updatedAt=n)}function me(e,t,n,r=V,s){const o={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:$,context:$?$.context:null,pure:n};return $===null||$!==et&&($.owned?$.owned.push(o):$.owned=[o]),o}function de(e){if(e.state===0)return;if(e.state===fe)return he(e);if(e.suspense&&T(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<pe);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===V)Z(e);else if(e.state===fe){const r=N;N=null,K(()=>he(e,t[0]),!1),N=r}}function K(e,t){if(N)return e();let n=!1;t||(N=[]),q?n=!0:q=[],pe++;try{const r=e();return Tt(n),r}catch(r){n||(q=null),N=null,De(r)}}function Tt(e){if(N&&(lt(N),N=null),e)return;const t=q;q=null,t.length&&K(()=>ze(t),!1)}function lt(e){for(let t=0;t<e.length;t++)de(e[t])}function Ft(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:de(r)}if(w.context){if(w.count){w.effects||(w.effects=[]),w.effects.push(...e.slice(0,n));return}te()}for(w.effects&&(w.done||!w.count)&&(e=[...w.effects,...e],n+=w.effects.length,delete w.effects),t=0;t<n;t++)de(e[t])}function he(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===V?r!==t&&(!r.updatedAt||r.updatedAt<pe)&&de(r):s===fe&&he(r,t)}}}function at(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=fe,n.pure?N.push(n):q.push(n),n.observers&&at(n))}}function se(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--)se(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)se(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 Pe(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function De(e,t=$){throw Pe(e)}function ke(e){if(typeof e=="function"&&!e.length)return ke(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=ke(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function jt(e,t){return function(r){let s;return Q(()=>s=T(()=>($.context={...$.context,[e]:r.value},Ne(()=>r.children))),void 0),s}}const Ht=Symbol("fallback");function Ue(e){for(let t=0;t<e.length;t++)e[t]()}function Ut(e,t,n={}){let r=[],s=[],o=[],i=0,l=t.length>1?[]:null;return Oe(()=>Ue(o)),()=>{let a=e()||[],c=a.length,f,u;return a[At],T(()=>{let h,b,d,p,y,m,S,x,_;if(c===0)i!==0&&(Ue(o),o=[],r=[],s=[],i=0,l&&(l=[])),n.fallback&&(r=[Ht],s[0]=ne(D=>(o[0]=D,n.fallback())),i=1);else if(i===0){for(s=new Array(c),u=0;u<c;u++)r[u]=a[u],s[u]=ne(g);i=c}else{for(d=new Array(c),p=new Array(c),l&&(y=new Array(c)),m=0,S=Math.min(i,c);m<S&&r[m]===a[m];m++);for(S=i-1,x=c-1;S>=m&&x>=m&&r[S]===a[x];S--,x--)d[x]=s[S],p[x]=o[S],l&&(y[x]=l[S]);for(h=new Map,b=new Array(x+1),u=x;u>=m;u--)_=a[u],f=h.get(_),b[u]=f===void 0?-1:f,h.set(_,u);for(f=m;f<=S;f++)_=r[f],u=h.get(_),u!==void 0&&u!==-1?(d[u]=s[f],p[u]=o[f],l&&(y[u]=l[f]),u=b[u],h.set(_,u)):o[f]();for(u=m;u<c;u++)u in d?(s[u]=d[u],o[u]=p[u],l&&(l[u]=y[u],l[u](u))):s[u]=ne(g);s=s.slice(0,i=c),r=a.slice(0)}return s});function g(h){if(o[u]=h,l){const[b,d]=R(u);return l[u]=d,t(a[u],b)}return t(a[u])}}}function I(e,t){return T(()=>e(t||{}))}function ae(){return!0}const Bt={get(e,t,n){return t===Ce?n:e.get(t)},has(e,t){return t===Ce?!0:e.has(t)},set:ae,deleteProperty:ae,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:ae,deleteProperty:ae}},ownKeys(e){return e.keys()}};function Se(e){return(e=typeof e=="function"?e():e)?e:{}}function Kt(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function Mt(...e){let t=!1;for(let i=0;i<e.length;i++){const l=e[i];t=t||!!l&&Ce in l,e[i]=typeof l=="function"?(t=!0,L(l)):l}if(_t&&t)return new Proxy({get(i){for(let l=e.length-1;l>=0;l--){const a=Se(e[l])[i];if(a!==void 0)return a}},has(i){for(let l=e.length-1;l>=0;l--)if(i in Se(e[l]))return!0;return!1},keys(){const i=[];for(let l=0;l<e.length;l++)i.push(...Object.keys(Se(e[l])));return[...new Set(i)]}},Bt);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:Kt.bind(n[f]=[u.get.bind(l)])}:u.value!==void 0?u:void 0;else{const g=n[f];g&&(u.get?g.push(u.get.bind(l)):u.value!==void 0&&g.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 qt(e){let t,n;const r=s=>{const o=w.context;if(o){const[l,a]=R();w.count||(w.count=0),w.count++,(n||(n=e())).then(c=>{!w.done&&te(o),w.count--,a(()=>c.default),te()}),t=l}else if(!t){const[l]=It(()=>(n||(n=e())).then(a=>a.default));t=l}let i;return L(()=>(i=t())?T(()=>{if(!o||w.done)return i(s);const l=w.context;te(o);const a=i(s);return te(l),a}):"")};return r.preload=()=>n||((n=e()).then(s=>t=()=>s.default),n),r}const Vt=e=>`Stale read from <${e}>.`;function ct(e){const t="fallback"in e&&{fallback:()=>e.fallback};return L(Ut(()=>e.each,e.children,t||void 0))}function we(e){const t=e.keyed,n=L(()=>e.when,void 0,void 0),r=t?n:L(n,void 0,{equals:(s,o)=>!s==!o});return L(()=>{const s=r();if(s){const o=e.children;return typeof o=="function"&&o.length>0?T(()=>o(t?s:()=>{if(!T(r))throw Vt("Show");return n()})):o}return e.fallback},void 0,void 0)}function Wt(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,g=1,h;for(;++u<s&&u<o&&!((h=c.get(t[u]))==null||h!==f+g);)g++;if(g>f-l){const b=t[i];for(;l<f;)e.insertBefore(n[l++],b)}else e.replaceChild(n[l++],t[i++])}else i++;else t[i++].remove()}}}const Be="_$DX_DELEGATE";function Gt(e,t,n,r={}){let s;return ne(o=>{s=o,t===document?e():O(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 z(e,t=window.document){const n=t[Be]||(t[Be]=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,Xt))}}function Ke(e,t,n){ut(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function O(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return ge(e,t,r,n);Q(s=>ge(e,t(),s,n),r)}function ut(e){return!!w.context&&!w.done&&(!e||e.isConnected)}function Xt(e){if(w.registry&&w.events&&w.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}}),w.registry&&!w.done&&(w.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 ge(e,t,n,r,s){const o=ut(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=J(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=J(e,n,r)}else{if(i==="function")return Q(()=>{let a=t();for(;typeof a=="function";)a=a();n=ge(e,a,n,r)}),()=>n;if(Array.isArray(t)){const a=[],c=n&&Array.isArray(n);if(Ee(a,t,n,s))return Q(()=>n=ge(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=J(e,n,r),l)return n}else c?n.length===0?Me(e,a,r):Wt(e,n,a):(n&&J(e),Me(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=J(e,n,r,t);J(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Ee(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=Ee(e,l,a)||s;else if(c==="function")if(r){for(;typeof l=="function";)l=l();s=Ee(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 Me(e,t,n=null){for(let r=0,s=t.length;r<s;r++)e.insertBefore(t[r],n)}function J(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 Yt=!1,Jt="modulepreload",Qt=function(e){return"/"+e},qe={},Zt=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=Qt(a),a in qe)return;qe[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":Jt,c||(u.as="script"),u.crossOrigin="",u.href=a,l&&u.setAttribute("nonce",l),document.head.appendChild(u),c)return new Promise((g,h)=>{u.addEventListener("load",g),u.addEventListener("error",()=>h(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 ft(){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 Ie;function Te(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),Ie=window.history.state._depth}Te();function zt(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function en(e,t){let n=!1;return()=>{const r=Ie;Te();const s=r==null?null:Ie-r;if(n){n=!1;return}s&&t(s)?(n=!0,window.history.go(-s)):e()}}const tn=/^(?:[a-z0-9]+:)?\/\//i,nn=/^\/+|(\/)\/+$/g,dt="http://sr";function re(e,t=!1){const n=e.replace(nn,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function ce(e,t,n){if(tn.test(t))return;const r=re(e),s=n&&re(n);let o="";return!s||t.startsWith("/")?o=r:s.toLowerCase().indexOf(r.toLowerCase())!==0?o=r+s:o=s,(o||"/")+re(t,!o)}function rn(e,t){if(e==null)throw new Error(t);return e}function sn(e,t){return re(e).replace(/\/*(\*.*)?$/g,"")+re(t)}function ht(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 on(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=g=>n===void 0?void 0:n[g];for(let g=0;g<i;g++){const h=o[g],b=h[0]===":",d=b?a[g]:a[g].toLowerCase(),p=b?h.slice(1):h.toLowerCase();if(b&&xe(d,u(p)))f.params[p]=d;else if(b||!xe(d,p))return null;f.path+=`/${d}`}if(s){const g=c?a.slice(-c).join("/"):"";if(xe(g,u(s)))f.params[s]=g;else return null}return f}}function xe(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 ln(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 gt(e){const t=new Map,n=tt();return new Proxy({},{get(r,s){return t.has(s)||nt(n,()=>t.set(s,L(()=>e()[s]))),t.get(s)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())}})}function pt(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 pt(r).reduce((o,i)=>[...o,...s.map(l=>l+i)],[])}const an=100,mt=rt(),wt=rt(),cn=()=>rn(st(mt),"<A> and 'use' router primitives can be only used inside a Route."),ar=()=>cn().params;function un(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 bt(e.path).reduce((c,f)=>{for(const u of pt(f)){const g=sn(t,u);let h=l?g:g.split("/*",1)[0];h=h.split("/").map(b=>b.startsWith(":")||b.startsWith("*")?b:encodeURIComponent(b)).join("/"),c.push({...a,originalPath:f,pattern:h,matcher:on(h,!l,e.matchFilters)})}return c},[])}function fn(e,t=0){return{routes:e,score:ln(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 bt(e){return Array.isArray(e)?e:[e]}function yt(e,t="",n=[],r=[]){const s=bt(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=un(l,t);for(const c of a){n.push(c);const f=Array.isArray(l.children)&&l.children.length===0;if(l.children&&!f)yt(l.children,c.pattern,n,r);else{const u=fn([...n],r.length);r.push(u)}n.pop()}}}return n.length?r:r.sort((o,i)=>i.score-o.score)}function _e(e,t){for(let n=0,r=e.length;n<r;n++){const s=e[n].matcher(t);if(s)return s}return[]}function dn(e,t,n){const r=new URL(dt),s=L(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=L(()=>s().pathname),i=L(()=>s().search,!0),l=L(()=>s().hash),a=()=>"",c=Re(i,()=>ht(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):gt(c)}}let G;function hn(){return G}function gn(e,t,n,r={}){const{signal:[s,o],utils:i={}}=e,l=i.parsePath||(A=>A),a=i.renderPath||(A=>A),c=i.beforeLeave||ft(),f=ce("",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,g]=R(!1);let h;const b=(A,P)=>{P.value===d()&&P.state===y()||(h===void 0&&g(!0),G=A,h=P,Ot(()=>{h===P&&(p(h.value),m(h.state),_[1](F=>F.filter(X=>X.pending)))}).finally(()=>{h===P&&Lt(()=>{G=void 0,A==="navigate"&&W(h),g(!1),h=void 0})}))},[d,p]=R(s().value),[y,m]=R(s().state),S=dn(d,y,i.queryWrapper),x=[],_=R([]),D=L(()=>typeof r.transformUrl=="function"?_e(t(),r.transformUrl(S.pathname)):_e(t(),S.pathname)),H=()=>{const A=D(),P={};for(let F=0;F<A.length;F++)Object.assign(P,A[F].params);return P},U=i.paramsWrapper?i.paramsWrapper(H,t):gt(H),k={pattern:f,path:()=>f,outlet:()=>null,resolvePath(A){return ce(f,A)}};return Q(Re(s,A=>b("native",A),{defer:!0})),{base:k,location:S,params:U,isRouting:u,renderPath:a,parsePath:l,navigatorFactory:E,matches:D,beforeLeave:c,preloadRoute:St,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:_};function C(A,P,F){T(()=>{if(typeof P=="number"){P&&(i.go?i.go(P):console.warn("Router integration does not support relative routing"));return}const X=!P||P[0]==="?",{replace:be,resolve:Y,scroll:ye,state:ee}={replace:!1,resolve:!X,scroll:!0,...F},le=Y?A.resolvePath(P):ce(X&&S.pathname||"",P);if(le===void 0)throw new Error(`Path '${P}' is not a routable path`);if(x.length>=an)throw new Error("Too many redirects");const je=d();(le!==je||ee!==y())&&(Yt||c.confirm(le,F)&&(x.push({value:je,replace:be,scroll:ye,state:y()}),b("navigate",{value:le,state:ee})))})}function E(A){return A=A||st(wt)||k,(P,F)=>C(A,P,F)}function W(A){const P=x[0];P&&(o({...A,replace:P.replace,scroll:P.scroll}),x.length=0)}function St(A,P){const F=_e(t(),A.pathname),X=G;G="preload";for(let be in F){const{route:Y,params:ye}=F[be];Y.component&&Y.component.preload&&Y.component.preload();const{preload:ee}=Y;P&&ee&&nt(n(),()=>ee({params:ye,location:{pathname:A.pathname,search:A.search,hash:A.hash,query:ht(A),state:null,key:""},intent:"preload"}))}G=X}}function pn(e,t,n,r){const{base:s,location:o,params:i}=e,{pattern:l,component:a,preload:c}=r().route,f=L(()=>r().path);a&&a.preload&&a.preload();const u=c?c({params:i,location:o,intent:G||"initial"}):void 0;return{parent:t,pattern:l,path:f,outlet:()=>a?I(a,{params:i,location:o,data:u,get children(){return n()}}):n(),resolvePath(h){return ce(s.path(),h,f())}}}const mn=e=>t=>{const{base:n}=t,r=Ne(()=>t.children),s=L(()=>yt(r(),t.base||""));let o;const i=gn(e,s,()=>o,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(i),I(mt.Provider,{value:i,get children(){return I(wn,{routerState:i,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[L(()=>(o=tt())&&null),I(bn,{routerState:i,get branches(){return s()}})]}})}})};function wn(e){const t=e.routerState.location,n=e.routerState.params,r=L(()=>e.preload&&T(()=>{e.preload({params:n,location:t,intent:hn()||"initial"})}));return I(we,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:s=>I(s,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function bn(e){const t=[];let n;const r=L(Re(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],g=s[c];i&&u&&g.route.key===u.route.key?a[c]=i[c]:(l=!1,t[c]&&t[c](),ne(h=>{t[c]=h,a[c]=pn(e.routerState,a[c-1]||e.routerState.base,Ve(()=>r()[c+1]),()=>e.routerState.matches()[c])}))}return t.splice(s.length).forEach(c=>c()),i&&l?i:(n=a[0],a)}));return Ve(()=>r()&&n)()}const Ve=e=>()=>I(we,{get when(){return e()},keyed:!0,children:t=>I(wt.Provider,{value:t,get children(){return t.outlet()}})}),We=e=>{const t=Ne(()=>e.children);return Mt(e,{get children(){return t()}})};function yn([e,t],n,r){return[e,r?s=>t(r(s)):t]}function $n(e){let t=!1;const n=s=>typeof s=="string"?{value:s}:s,r=yn(R(n(e.get()),{equals:(s,o)=>s.value===o.value&&s.state===o.state}),void 0,s=>(!t&&e.set(s),w.registry&&!w.done&&(w.done=!0),s));return e.init&&Oe(e.init((s=e.get())=>{t=!0,r[1](n(s)),t=!1})),mn({signal:r,create:e.create,utils:e.utils})}function vn(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function Sn(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const xn=new Map;function _n(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(D=>D instanceof Node&&D.nodeName.toUpperCase()==="A");if(!p||t&&!p.hasAttribute("link"))return;const y=c(p),m=y?p.href.baseVal:p.href;if((y?p.target.baseVal:p.target)||!m&&!p.hasAttribute("state"))return;const x=(p.getAttribute("rel")||"").split(/\s+/);if(p.hasAttribute("download")||x&&x.includes("external"))return;const _=y?new URL(m,document.baseURI):new URL(m);if(!(_.origin!==window.location.origin||o&&_.pathname&&!_.pathname.toLowerCase().startsWith(o.toLowerCase())))return[p,_]}function u(d){const p=f(d);if(!p)return;const[y,m]=p,S=s.parsePath(m.pathname+m.search+m.hash),x=y.getAttribute("state");d.preventDefault(),i(S,{resolve:!1,replace:y.hasAttribute("replace"),scroll:!y.hasAttribute("noscroll"),state:x?JSON.parse(x):void 0})}function g(d){const p=f(d);if(!p)return;const[y,m]=p;r&&(m.pathname=r(m.pathname)),s.preloadRoute(m,y.getAttribute("preload")!=="false")}function h(d){clearTimeout(l);const p=f(d);if(!p)return a=null;const[y,m]=p;a!==y&&(r&&(m.pathname=r(m.pathname)),l=setTimeout(()=>{s.preloadRoute(m,y.getAttribute("preload")!=="false"),a=y},20))}function b(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,dt);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 y=xn.get(p);if(y){d.preventDefault();const m=new FormData(d.target,d.submitter);y.call({r:s,f:d.target},d.target.enctype==="multipart/form-data"?m:new URLSearchParams(m))}}z(["click","submit"]),document.addEventListener("click",u),e&&(document.addEventListener("mousemove",h,{passive:!0}),document.addEventListener("focusin",g,{passive:!0}),document.addEventListener("touchstart",g,{passive:!0})),document.addEventListener("submit",b),Oe(()=>{document.removeEventListener("click",u),e&&(document.removeEventListener("mousemove",h),document.removeEventListener("focusin",g),document.removeEventListener("touchstart",g)),document.removeEventListener("submit",b)})}}function An(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=ft();return $n({get:t,set({value:r,replace:s,scroll:o,state:i}){s?window.history.replaceState(zt(i),"",r):window.history.pushState(i,"",r),Sn(decodeURIComponent(window.location.hash.slice(1)),o),Te()},init:r=>vn(window,"popstate",en(r,s=>{if(s&&s<0)return!n.confirm(s);{const o=t();return!n.confirm(o.value,{state:o.state})}})),create:_n(e.preload,e.explicitLinks,e.actionBase,e.transformUrl),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}const oe="",Cn=async()=>{const e=oe+"/api/all";return await(await fetch(e)).json()},Ge=async(e,t,n)=>{const r=oe+"/api/edit/"+e+"/"+t+"/"+n;return await(await fetch(r)).json()},cr=async e=>{const t=oe+"/api/host/"+e;return await(await fetch(t)).json()},ur=async e=>{const t=oe+"/api/host/del/"+e;return await(await fetch(t)).json()},fr=async(e,t)=>{const n=oe+"/api/port/"+e+"/"+t;return await(await fetch(n)).json()},Pn={ID:0,Name:"",DNS:"",Iface:"",IP:"",Mac:"",Hw:"",Date:"",Known:0,Now:0},[ie,M]=R([]),[Le,kn]=R([]),[En,In]=R([]),[dr,hr]=R(),[$t,Xe]=R(!1),[gr,pr]=R(Pn);let Ye="ID";function Ln(){const e=localStorage.getItem("filterField"),t=localStorage.getItem("filterValue");Fe(e,t)}function Fe(e,t){let n=ie();switch(Ye==e&&(n=Le()),Ye=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=Le()}M([]),M(n)}let B=!1,Ae="";function Rn(){const e=localStorage.getItem("sortField");B=JSON.parse(localStorage.getItem("sortDown")),B=!B,vt(e)}function vt(e){e!=Ae?(Ae=e,B=!B):(Ae="",B=!B),localStorage.setItem("sortDown",B.toString()),localStorage.setItem("sortField",e);let t=ie();e=="IP"?t.sort((n,r)=>Nn(n,r,B)):t.sort((n,r)=>On(n,r,e,B)),M([]),M(t)}function On(e,t,n,r){return e[n]>t[n]?r?1:-1:r?-1:1}function Nn(e,t,n){const r=Je(e),s=Je(t);return n?r-s:s-r}function Je(e){return Number(e.IP.split(".").map(t=>`000${t}`.slice(-3)).join(""))}function Dn(){Qe(),Fe("ID",0),setInterval(()=>{Qe()},6e4)}async function Qe(){const e=await Cn();M(e),kn(e),Rn(),Ln(),Tn()}function Tn(){let e=[];for(let t of ie())e.includes(t.Iface)||e.push(t.Iface);In(e)}var Fn=j('<i class="bi bi-circle-fill"style=color:var(--bs-gray-500);>'),jn=j('<i class="bi bi-check-circle-fill"style=color:var(--bs-success);>'),Hn=j("<input type=text class=form-control>"),Un=j('<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><a><i class="bi bi-pencil-square my-btn">');function Bn(e){const[t,n]=R(e.host.Name),r="http://"+e.host.IP,s="/host/"+e.host.ID;let o=Fn();e.host.Now==1&&(o=jn());let i=!1;e.host.Known==1&&(i=!0);const l=async c=>{n(c),await Ge(e.host.ID,t(),"")},a=async()=>{await Ge(e.host.ID,t(),"toggle")};return(()=>{var c=Un(),f=c.firstChild,u=f.firstChild,g=f.nextSibling,h=g.nextSibling,b=h.nextSibling,d=b.firstChild,p=b.nextSibling,y=p.nextSibling,m=y.nextSibling,S=m.nextSibling,x=S.firstChild,_=x.firstChild,D=S.nextSibling,H=D.nextSibling,U=H.firstChild;return O(f,()=>e.index,u),O(g,I(we,{get when(){return $t()},get fallback(){return t()},get children(){var k=Hn();return k.$$input=C=>l(C.target.value),Q(()=>k.value=t()),k}})),O(h,()=>e.host.Iface),Ke(d,"href",r),O(d,()=>e.host.IP),O(p,()=>e.host.Mac),O(y,()=>e.host.Hw),O(m,()=>e.host.Date),_.$$click=a,_.checked=i,O(D,o),Ke(U,"href",s),c})()}z(["input","click"]);var Kn=j('<thead><tr><th style=width:3em;></th><th>Name <i class="bi bi-sort-down-alt my-btn"></i></th><th>Iface <i class="bi bi-sort-down-alt my-btn"></i></th><th>IP <i class="bi bi-sort-down-alt my-btn"></i></th><th>MAC <i class="bi bi-sort-down-alt my-btn"></i></th><th>Hardware <i class="bi bi-sort-down-alt my-btn"></i></th><th>Date <i class="bi bi-sort-down-alt my-btn"></i></th><th>Known <i class="bi bi-sort-down-alt my-btn"></i></th><th>Online <i class="bi bi-sort-down-alt my-btn"></i></th><th style=width:2em;>');function Mn(){const e=t=>{vt(t)};return(()=>{var t=Kn(),n=t.firstChild,r=n.firstChild,s=r.nextSibling,o=s.firstChild,i=o.nextSibling,l=s.nextSibling,a=l.firstChild,c=a.nextSibling,f=l.nextSibling,u=f.firstChild,g=u.nextSibling,h=f.nextSibling,b=h.firstChild,d=b.nextSibling,p=h.nextSibling,y=p.firstChild,m=y.nextSibling,S=p.nextSibling,x=S.firstChild,_=x.nextSibling,D=S.nextSibling,H=D.firstChild,U=H.nextSibling,k=D.nextSibling,C=k.firstChild,E=C.nextSibling;return i.$$click=e,i.$$clickData="Name",c.$$click=e,c.$$clickData="Iface",g.$$click=e,g.$$clickData="IP",d.$$click=e,d.$$clickData="Mac",m.$$click=e,m.$$clickData="Hw",_.$$click=e,_.$$clickData="Date",U.$$click=e,U.$$clickData="Known",E.$$click=e,E.$$clickData="Now",t})()}z(["click"]);var qn=j('<div class=row><div class="col input-group"><span class=input-group-text>Filter by</span><select class=form-select><option selected disabled>Iface</option></select><select class=form-select><option selected disabled>Known</option><option>Known</option><option>Unknown</option></select><select class=form-select><option selected disabled>Online</option><option>Online</option><option>Offline</option></select><button class="btn btn-outline-primary">Reset filter'),Vn=j("<option>");function Wn(){const e=(t,n)=>{Fe(t,n)};return(()=>{var t=qn(),n=t.firstChild,r=n.firstChild,s=r.nextSibling;s.firstChild;var o=s.nextSibling,i=o.firstChild,l=i.nextSibling,a=l.nextSibling,c=o.nextSibling,f=c.firstChild,u=f.nextSibling,g=u.nextSibling,h=c.nextSibling;return O(s,I(ct,{get each(){return En()},children:b=>(()=>{var d=Vn();return d.$$click=()=>{e("Iface",b)},O(d,b),d})()}),null),l.$$click=()=>{e("Known",1)},a.$$click=()=>{e("Known",0)},u.$$click=()=>{e("Now",1)},g.$$click=()=>{e("Now",0)},h.$$click=()=>{e("ID",0)},t})()}z(["click"]);function Gn(e){if(e!=""){const t=e.toLowerCase();let n=[];for(let r of ie())Xn(r,t)&&n.push(r);M([]),M(n)}else M([]),M(Le())}function Xn(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 Yn=j("<input class=form-control placeholder=Search style=max-width:10em;>");function Jn(){const e=t=>{Gn(t)};return(()=>{var t=Yn();return t.$$input=n=>e(n.target.value),t})()}z(["input"]);var Qn=j('<button class="btn btn-primary">Edit names'),Zn=j('<div class=row><div class="col-md mt-1 mb-1"></div><div class="col-md mt-1 mb-1"><div class="d-flex justify-content-between">'),zn=j('<button class="btn btn-outline-primary">Edit names');function er(){return(()=>{var e=Zn(),t=e.firstChild,n=t.nextSibling,r=n.firstChild;return O(t,I(Wn,{})),O(r,I(Jn,{}),null),O(r,I(we,{get when(){return $t()},get fallback(){return(()=>{var s=zn();return s.$$click=Xe,s.$$clickData=!0,s})()},get children(){var s=Qn();return s.$$click=Xe,s.$$clickData=!1,s}}),null),e})()}z(["click"]);var tr=j('<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(()=>{var e=tr(),t=e.firstChild,n=t.nextSibling,r=n.firstChild,s=r.firstChild;return O(t,I(er,{})),O(r,I(Mn,{}),s),O(s,I(ct,{get each(){return ie()},children:(o,i)=>I(Bn,{host:o,index:i})})),e})()}var rr=j('<div class=container-lg><div class=row><div class="col-md mt-4 mb-4">');function sr(){Rt(()=>{Dn()});const e=qt(()=>Zt(()=>import("./HostPage-BkN2pMDv.js"),[]));return(()=>{var t=rr(),n=t.firstChild,r=n.firstChild;return O(r,I(An,{get children(){return[I(We,{path:"/",component:nr}),I(We,{path:"/host/:id",component:e})]}})),t})()}const or=document.getElementById("root");Gt(()=>I(sr,{}),or);export{ct as F,L as a,Q as b,gr as c,Ge as d,ur as e,z as f,R as g,I as h,O as i,fr as j,cr as k,pr as l,Rt as o,Ke as s,j as t,ar as u};
|