1 line
40 KiB
Plaintext
1 line
40 KiB
Plaintext
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return s}});let s=e=>{}},19273,80166,e=>{"use strict";e.i(47167);var t={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},r=new class{#e=t;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function s(e){setTimeout(e,0)}e.s(["systemSetTimeoutZero",()=>s,"timeoutManager",()=>r],80166);var i="u"<typeof window||"Deno"in globalThis;function n(){}function a(e,t){return"function"==typeof e?e(t):e}function o(e){return"number"==typeof e&&e>=0&&e!==1/0}function u(e,t){return Math.max(e+(t||0)-Date.now(),0)}function l(e,t){return"function"==typeof e?e(t):e}function c(e,t){return"function"==typeof e?e(t):e}function h(e,t){let{type:r="all",exact:s,fetchStatus:i,predicate:n,queryKey:a,stale:o}=e;if(a){if(s){if(t.queryHash!==f(a,t.options))return!1}else if(!y(t.queryKey,a))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&(!i||i===t.state.fetchStatus)&&(!n||!!n(t))}function d(e,t){let{exact:r,status:s,predicate:i,mutationKey:n}=e;if(n){if(!t.options.mutationKey)return!1;if(r){if(p(t.options.mutationKey)!==p(n))return!1}else if(!y(t.options.mutationKey,n))return!1}return(!s||t.state.status===s)&&(!i||!!i(t))}function f(e,t){return(t?.queryKeyHashFn||p)(e)}function p(e){return JSON.stringify(e,(e,t)=>v(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function y(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(r=>y(e[r],t[r]))}var m=Object.prototype.hasOwnProperty;function g(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function b(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function v(e){if(!S(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!S(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function S(e){return"[object Object]"===Object.prototype.toString.call(e)}function O(e){return new Promise(t=>{r.setTimeout(t,e)})}function C(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?function e(t,r,s=0){if(t===r)return t;if(s>500)return r;let i=b(t)&&b(r);if(!i&&!(v(t)&&v(r)))return r;let n=(i?t:Object.keys(t)).length,a=i?r:Object.keys(r),o=a.length,u=i?Array(o):{},l=0;for(let c=0;c<o;c++){let o=i?c:a[c],h=t[o],d=r[o];if(h===d){u[o]=h,(i?c<n:m.call(t,o))&&l++;continue}if(null===h||null===d||"object"!=typeof h||"object"!=typeof d){u[o]=d;continue}let f=e(h,d,s+1);u[o]=f,f===h&&l++}return n===o&&l===n?t:u}(e,t):t}function x(e,t,r=0){let s=[...e,t];return r&&s.length>r?s.slice(1):s}function P(e,t,r=0){let s=[t,...e];return r&&s.length>r?s.slice(0,-1):s}var w=Symbol();function E(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==w?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}function T(e,t){return"function"==typeof e?e(...t):!!e}function j(e,t,r){let s,i=!1;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),i||(i=!0,s.aborted?r():s.addEventListener("abort",r,{once:!0})),s)}),e}e.s(["addConsumeAwareSignal",()=>j,"addToEnd",()=>x,"addToStart",()=>P,"ensureQueryFn",()=>E,"functionalUpdate",()=>a,"hashKey",()=>p,"hashQueryKeyByOptions",()=>f,"isServer",()=>i,"isValidTimeout",()=>o,"matchMutation",()=>d,"matchQuery",()=>h,"noop",()=>n,"partialMatchKey",()=>y,"replaceData",()=>C,"resolveEnabled",()=>c,"resolveStaleTime",()=>l,"shallowEqualObjects",()=>g,"shouldThrowError",()=>T,"skipToken",()=>w,"sleep",()=>O,"timeUntilStale",()=>u],19273)},40143,e=>{"use strict";let t,r,s,i,n,a;var o=e.i(80166).systemSetTimeoutZero,u=(t=[],r=0,s=e=>{e()},i=e=>{e()},n=o,{batch:e=>{let a;r++;try{a=e()}finally{let e;--r||(e=t,t=[],e.length&&n(()=>{i(()=>{e.forEach(e=>{s(e)})})}))}return a},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a=e=>{r?t.push(e):n(()=>{s(e)})},setNotifyFunction:e=>{s=e},setBatchNotifyFunction:e=>{i=e},setScheduler:e=>{n=e}});e.s(["notifyManager",()=>u])},15823,e=>{"use strict";var t=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};e.s(["Subscribable",()=>t])},75555,e=>{"use strict";var t=e.i(15823),r=e.i(19273),s=new class extends t.Subscribable{#r;#s;#i;constructor(){super(),this.#i=e=>{if(!r.isServer&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#s||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#s?.(),this.#s=void 0)}setEventListener(e){this.#i=e,this.#s?.(),this.#s=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#r!==e&&(this.#r=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#r?this.#r:globalThis.document?.visibilityState!=="hidden"}};e.s(["focusManager",()=>s])},86491,14448,93803,36553,88587,e=>{"use strict";e.i(47167);var t=e.i(19273),r=e.i(40143),s=e.i(75555),i=e.i(15823),n=new class extends i.Subscribable{#n=!0;#s;#i;constructor(){super(),this.#i=e=>{if(!t.isServer&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#s||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#s?.(),this.#s=void 0)}setEventListener(e){this.#i=e,this.#s?.(),this.#s=e(this.setOnline.bind(this))}setOnline(e){this.#n!==e&&(this.#n=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#n}};function a(){let e,t,r=new Promise((r,s)=>{e=r,t=s});function s(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{s({status:"fulfilled",value:t}),e(t)},r.reject=e=>{s({status:"rejected",reason:e}),t(e)},r}function o(e){return Math.min(1e3*2**e,3e4)}function u(e){return(e??"online")!=="online"||n.isOnline()}e.s(["onlineManager",()=>n],14448),e.s(["pendingThenable",()=>a],93803);var l=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function c(e){let r,i=!1,c=0,h=a(),d=()=>s.focusManager.isFocused()&&("always"===e.networkMode||n.isOnline())&&e.canRun(),f=()=>u(e.networkMode)&&e.canRun(),p=e=>{"pending"===h.status&&(r?.(),h.resolve(e))},y=e=>{"pending"===h.status&&(r?.(),h.reject(e))},m=()=>new Promise(t=>{r=e=>{("pending"!==h.status||d())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,"pending"===h.status&&e.onContinue?.()}),g=()=>{let r;if("pending"!==h.status)return;let s=0===c?e.initialPromise:void 0;try{r=s??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(p).catch(r=>{if("pending"!==h.status)return;let s=e.retry??3*!t.isServer,n=e.retryDelay??o,a="function"==typeof n?n(c,r):n,u=!0===s||"number"==typeof s&&c<s||"function"==typeof s&&s(c,r);i||!u?y(r):(c++,e.onFail?.(c,r),(0,t.sleep)(a).then(()=>d()?void 0:m()).then(()=>{i?y(r):g()}))})};return{promise:h,status:()=>h.status,cancel:t=>{if("pending"===h.status){let r=new l(t);y(r),e.onCancel?.(r)}},continue:()=>(r?.(),h),cancelRetry:()=>{i=!0},continueRetry:()=>{i=!1},canStart:f,start:()=>(f()?g():m().then(g),h)}}e.s(["CancelledError",()=>l,"canFetch",()=>u,"createRetryer",()=>c],36553);var h=e.i(80166),d=class{#a;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,t.isValidTimeout)(this.gcTime)&&(this.#a=h.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(t.isServer?1/0:3e5))}clearGcTimeout(){this.#a&&(h.timeoutManager.clearTimeout(this.#a),this.#a=void 0)}};e.s(["Removable",()=>d],88587);var f=class extends d{#o;#u;#l;#c;#h;#d;#f;constructor(e){super(),this.#f=!1,this.#d=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#c=e.client,this.#l=this.#c.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#o=m(this.options),this.state=e.state??this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#h?.promise}setOptions(e){if(this.options={...this.#d,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=m(this.options);void 0!==e.data&&(this.setState(y(e.data,e.dataUpdatedAt)),this.#o=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#l.remove(this)}setData(e,r){let s=(0,t.replaceData)(this.state.data,e,this.options);return this.#p({data:s,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),s}setState(e,t){this.#p({type:"setState",state:e,setStateOptions:t})}cancel(e){let r=this.#h?.promise;return this.#h?.cancel(e),r?r.then(t.noop).catch(t.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#o)}isActive(){return this.observers.some(e=>!1!==(0,t.resolveEnabled)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===t.skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,t.resolveStaleTime)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,t.timeUntilStale)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#l.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#h&&(this.#f?this.#h.cancel({revert:!0}):this.#h.cancelRetry()),this.scheduleGc()),this.#l.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#p({type:"invalidate"})}async fetch(e,r){let s;if("idle"!==this.state.fetchStatus&&this.#h?.status()!=="rejected"){if(void 0!==this.state.data&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#h)return this.#h.continueRetry(),this.#h.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let i=new AbortController,n=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#f=!0,i.signal)})},a=()=>{let e,s=(0,t.ensureQueryFn)(this.options,r),i=(n(e={client:this.#c,queryKey:this.queryKey,meta:this.meta}),e);return(this.#f=!1,this.options.persister)?this.options.persister(s,i,this):s(i)},o=(n(s={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:a}),s);this.options.behavior?.onFetch(o,this),this.#u=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#p({type:"fetch",meta:o.fetchOptions?.meta}),this.#h=c({initialPromise:r?.initialPromise,fn:o.fetchFn,onCancel:e=>{e instanceof l&&e.revert&&this.setState({...this.#u,fetchStatus:"idle"}),i.abort()},onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:()=>{this.#p({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{let e=await this.#h.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#l.config.onSuccess?.(e,this),this.#l.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof l){if(e.silent)return this.#h.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#p({type:"error",error:e}),this.#l.config.onError?.(e,this),this.#l.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#p(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...p(t.data,this.options),fetchMeta:e.meta??null};case"success":let r={...t,...y(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#u=e.manual?r:void 0,r;case"error":let s=e.error;return{...t,error:s,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),r.notifyManager.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#l.notify({query:this,type:"updated",action:e})})}};function p(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:u(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function y(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function m(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,s=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}e.s(["Query",()=>f,"fetchState",()=>p],86491)},14272,e=>{"use strict";var t=e.i(40143),r=e.i(88587),s=e.i(36553),i=class extends r.Removable{#c;#y;#m;#h;constructor(e){super(),this.#c=e.client,this.mutationId=e.mutationId,this.#m=e.mutationCache,this.#y=[],this.state=e.state||n(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#y.includes(e)||(this.#y.push(e),this.clearGcTimeout(),this.#m.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#y=this.#y.filter(t=>t!==e),this.scheduleGc(),this.#m.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#y.length||("pending"===this.state.status?this.scheduleGc():this.#m.remove(this))}continue(){return this.#h?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#p({type:"continue"})},r={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#h=(0,s.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#m.canRun(this)});let i="pending"===this.state.status,n=!this.#h.canStart();try{if(i)t();else{this.#p({type:"pending",variables:e,isPaused:n}),this.#m.config.onMutate&&await this.#m.config.onMutate(e,this,r);let t=await this.options.onMutate?.(e,r);t!==this.state.context&&this.#p({type:"pending",context:t,variables:e,isPaused:n})}let s=await this.#h.start();return await this.#m.config.onSuccess?.(s,e,this.state.context,this,r),await this.options.onSuccess?.(s,e,this.state.context,r),await this.#m.config.onSettled?.(s,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(s,null,e,this.state.context,r),this.#p({type:"success",data:s}),s}catch(t){try{await this.#m.config.onError?.(t,e,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,r)}catch(e){Promise.reject(e)}try{await this.#m.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,r)}catch(e){Promise.reject(e)}throw this.#p({type:"error",error:t}),t}finally{this.#m.runNext(this)}}#p(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),t.notifyManager.batch(()=>{this.#y.forEach(t=>{t.onMutationUpdate(e)}),this.#m.notify({mutation:this,type:"updated",action:e})})}};function n(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}e.s(["Mutation",()=>i,"getDefaultState",()=>n])},12598,e=>{"use strict";var t=e.i(71645),r=e.i(43476),s=t.createContext(void 0),i=e=>{let r=t.useContext(s);if(e)return e;if(!r)throw Error("No QueryClient set, use QueryClientProvider to set one");return r},n=({client:e,children:i})=>(t.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,r.jsx)(s.Provider,{value:e,children:i}));e.s(["QueryClientProvider",()=>n,"useQueryClient",()=>i])},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return i}});let s=e.r(71645);function i(e,t){let r=(0,s.useRef)(null),i=(0,s.useRef)(null);return(0,s.useCallback)(s=>{if(null===s){let e=r.current;e&&(r.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(r.current=n(e,s)),t&&(i.current=n(t,s))},[e,t])}function n(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},68834,e=>{"use strict";var t=e.i(71645);let r=e=>{let t,r=new Set,s=(e,s)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=s?s:"object"!=typeof i||null===i)?i:Object.assign({},t,i),r.forEach(r=>r(t,e))}},i=()=>t,n={setState:s,getState:i,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e))},a=t=e(s,i,n);return n},s=e=>{let s=e?r(e):r,i=e=>(function(e,r=e=>e){let s=t.default.useSyncExternalStore(e.subscribe,t.default.useCallback(()=>r(e.getState()),[e,r]),t.default.useCallback(()=>r(e.getInitialState()),[e,r]));return t.default.useDebugValue(s),s})(s,e);return Object.assign(i,s),i},i=e=>e?s(e):s;e.s(["create",()=>i],68834)},96666,e=>{"use strict";let t=(0,e.i(68834).create)(e=>({status:"Idle",uptime_seconds:0,total_scanned:0,total_alerts:0,last_cycle:"Never",isOffline:!1,setStats:t=>e({status:t.engine_status,uptime_seconds:t.uptime_seconds,total_scanned:t.total_scanned,total_alerts:t.total_alerts,last_cycle:t.last_cycle,isOffline:!1}),setOffline:t=>e({isOffline:t})}));e.s(["useEngineStore",0,t])},96923,e=>{"use strict";var t=e.i(43476),r=e.i(19273),s=e.i(86491),i=e.i(40143),n=e.i(15823),a=class extends n.Subscribable{constructor(e={}){super(),this.config=e,this.#g=new Map}#g;build(e,t,i){let n=t.queryKey,a=t.queryHash??(0,r.hashQueryKeyByOptions)(n,t),o=this.get(a);return o||(o=new s.Query({client:e,queryKey:n,queryHash:a,options:e.defaultQueryOptions(t),state:i,defaultOptions:e.getQueryDefaults(n)}),this.add(o)),o}add(e){this.#g.has(e.queryHash)||(this.#g.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#g.get(e.queryHash);t&&(e.destroy(),t===e&&this.#g.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){i.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#g.get(e)}getAll(){return[...this.#g.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,r.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,r.matchQuery)(e,t)):t}notify(e){i.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){i.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){i.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},o=e.i(14272),u=n,l=class extends u.Subscribable{constructor(e={}){super(),this.config=e,this.#b=new Set,this.#v=new Map,this.#S=0}#b;#v;#S;build(e,t,r){let s=new o.Mutation({client:e,mutationCache:this,mutationId:++this.#S,options:e.defaultMutationOptions(t),state:r});return this.add(s),s}add(e){this.#b.add(e);let t=c(e);if("string"==typeof t){let r=this.#v.get(t);r?r.push(e):this.#v.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#b.delete(e)){let t=c(e);if("string"==typeof t){let r=this.#v.get(t);if(r)if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#v.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=c(e);if("string"!=typeof t)return!0;{let r=this.#v.get(t),s=r?.find(e=>"pending"===e.state.status);return!s||s===e}}runNext(e){let t=c(e);if("string"!=typeof t)return Promise.resolve();{let r=this.#v.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){i.notifyManager.batch(()=>{this.#b.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#b.clear(),this.#v.clear()})}getAll(){return Array.from(this.#b)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,r.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,r.matchMutation)(e,t))}notify(e){i.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return i.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(r.noop))))}};function c(e){return e.options.scope?.id}var h=e.i(75555),d=e.i(14448);function f(e){return{onFetch:(t,s)=>{let i=t.options,n=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],u={pages:[],pageParams:[]},l=0,c=async()=>{let s=!1,c=(0,r.ensureQueryFn)(t.options,t.fetchOptions),h=async(e,i,n)=>{let a;if(s)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);let o=(a={client:t.client,queryKey:t.queryKey,pageParam:i,direction:n?"backward":"forward",meta:t.options.meta},(0,r.addConsumeAwareSignal)(a,()=>t.signal,()=>s=!0),a),u=await c(o),{maxPages:l}=t.options,h=n?r.addToStart:r.addToEnd;return{pages:h(e.pages,u,l),pageParams:h(e.pageParams,i,l)}};if(n&&a.length){let e="backward"===n,t={pages:a,pageParams:o},r=(e?function(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}:p)(i,t);u=await h(t,r,e)}else{let t=e??a.length;do{let e=0===l?o[0]??i.initialPageParam:p(i,u);if(l>0&&null==e)break;u=await h(u,e),l++}while(l<t)}return u};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=c}}}function p(e,{pages:t,pageParams:r}){let s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,r[s],r):void 0}var y=class{#O;#m;#d;#C;#x;#P;#w;#E;constructor(e={}){this.#O=e.queryCache||new a,this.#m=e.mutationCache||new l,this.#d=e.defaultOptions||{},this.#C=new Map,this.#x=new Map,this.#P=0}mount(){this.#P++,1===this.#P&&(this.#w=h.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#O.onFocus())}),this.#E=d.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#O.onOnline())}))}unmount(){this.#P--,0===this.#P&&(this.#w?.(),this.#w=void 0,this.#E?.(),this.#E=void 0)}isFetching(e){return this.#O.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#m.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#O.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),s=this.#O.build(this,t),i=s.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime((0,r.resolveStaleTime)(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#O.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,s){let i=this.defaultQueryOptions({queryKey:e}),n=this.#O.get(i.queryHash),a=n?.state.data,o=(0,r.functionalUpdate)(t,a);if(void 0!==o)return this.#O.build(this,i).setData(o,{...s,manual:!0})}setQueriesData(e,t,r){return i.notifyManager.batch(()=>this.#O.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#O.get(t.queryHash)?.state}removeQueries(e){let t=this.#O;i.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#O;return i.notifyManager.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let s={revert:!0,...t};return Promise.all(i.notifyManager.batch(()=>this.#O.findAll(e).map(e=>e.cancel(s)))).then(r.noop).catch(r.noop)}invalidateQueries(e,t={}){return i.notifyManager.batch(()=>(this.#O.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let s={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(i.notifyManager.batch(()=>this.#O.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,s);return s.throwOnError||(t=t.catch(r.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(r.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let s=this.#O.build(this,t);return s.isStaleByTime((0,r.resolveStaleTime)(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(r.noop).catch(r.noop)}fetchInfiniteQuery(e){return e.behavior=f(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(r.noop).catch(r.noop)}ensureInfiniteQueryData(e){return e.behavior=f(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return d.onlineManager.isOnline()?this.#m.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#O}getMutationCache(){return this.#m}getDefaultOptions(){return this.#d}setDefaultOptions(e){this.#d=e}setQueryDefaults(e,t){this.#C.set((0,r.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#C.values()],s={};return t.forEach(t=>{(0,r.partialMatchKey)(e,t.queryKey)&&Object.assign(s,t.defaultOptions)}),s}setMutationDefaults(e,t){this.#x.set((0,r.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#x.values()],s={};return t.forEach(t=>{(0,r.partialMatchKey)(e,t.mutationKey)&&Object.assign(s,t.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#d.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,r.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===r.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#d.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#O.clear(),this.#m.clear()}},m=e.i(12598),g=e.i(71645);function b({children:e}){let[r]=(0,g.useState)(()=>new y({defaultOptions:{queries:{staleTime:5e3,retry:1}}}));return(0,t.jsx)(m.QueryClientProvider,{client:r,children:e})}e.s(["default",()=>b],96923)},93983,e=>{"use strict";var t=e.i(43476),r=e.i(96666);function s(){(0,r.useEngineStore)(e=>e.status);let e=e=>fetch(`/api/engine/${e}`,{method:"POST"});return(0,t.jsxs)("header",{className:"flex items-center justify-between px-4 py-2 bg-ghost-bg border-b border-ghost-border",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("span",{className:"text-2xl",children:"👻"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-mono text-ghost-accent font-bold tracking-widest text-sm",children:"GHOST NODE"}),(0,t.jsx)("div",{className:"font-mono text-ghost-dim text-xs",children:"AUCTION SNIPER v2.7"})]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("button",{onClick:()=>e("pause"),className:"px-3 py-1 text-xs font-mono border border-ghost-border text-ghost-dim hover:text-ghost-gold hover:border-ghost-gold transition-colors",children:"⏸ PAUSE"}),(0,t.jsx)("button",{onClick:()=>e("resume"),className:"px-3 py-1 text-xs font-mono border border-ghost-border text-ghost-dim hover:text-ghost-accent hover:border-ghost-accent transition-colors",children:"▶ RESUME"}),(0,t.jsx)("button",{onClick:()=>e("restart"),className:"px-3 py-1 text-xs font-mono border border-ghost-border text-ghost-dim hover:text-ghost-text hover:border-ghost-text transition-colors",children:"🔄 RESTART"}),(0,t.jsx)("button",{onClick:()=>{confirm("Kill engine?")&&e("kill")},className:"px-3 py-1 text-xs font-mono border border-ghost-danger text-ghost-danger hover:bg-ghost-danger hover:text-ghost-bg transition-colors",children:"☠ KILL"})]})]})}e.s(["default",()=>s])},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={assign:function(){return u},searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return o}};for(var i in s)Object.defineProperty(r,i,{enumerable:!0,get:s[i]});function n(e){let t={};for(let[r,s]of e.entries()){let e=t[r];void 0===e?t[r]=s:Array.isArray(e)?e.push(s):t[r]=[e,s]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[r,s]of Object.entries(e))if(Array.isArray(s))for(let e of s)t.append(r,a(e));else t.set(r,a(s));return t}function u(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,s]of r.entries())e.append(t,s)}return e}},95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={formatUrl:function(){return o},formatWithValidation:function(){return l},urlObjectKeys:function(){return u}};for(var i in s)Object.defineProperty(r,i,{enumerable:!0,get:s[i]});let n=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,s=e.protocol||"",i=e.pathname||"",o=e.hash||"",u=e.query||"",l=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?l=t+e.host:r&&(l=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(l+=":"+e.port)),u&&"object"==typeof u&&(u=String(n.urlQueryToSearchParams(u)));let c=e.search||u&&`?${u}`||"";return s&&!s.endsWith(":")&&(s+=":"),e.slashes||(!s||a.test(s))&&!1!==l?(l="//"+(l||""),i&&"/"!==i[0]&&(i="/"+i)):l||(l=""),o&&"#"!==o[0]&&(o="#"+o),c&&"?"!==c[0]&&(c="?"+c),i=i.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${s}${l}${i}${c}${o}`}let u=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(e){return o(e)}},18967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return O},MissingStaticPage:function(){return S},NormalizeError:function(){return b},PageNotFoundError:function(){return v},SP:function(){return y},ST:function(){return m},WEB_VITALS:function(){return n},execOnce:function(){return a},getDisplayName:function(){return h},getLocationOrigin:function(){return l},getURL:function(){return c},isAbsoluteUrl:function(){return u},isResSent:function(){return d},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return C}};for(var i in s)Object.defineProperty(r,i,{enumerable:!0,get:s[i]});let n=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...s)=>(r||(r=!0,t=e(...s)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,u=e=>o.test(e);function l(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=l();return e.substring(t.length)}function h(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let s=await e.getInitialProps(t);if(r&&d(r))return s;if(!s)throw Object.defineProperty(Error(`"${h(e)}.getInitialProps()" should resolve to an object. But found "${s}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return s}let y="u">typeof performance,m=y&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class b extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class S extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class O extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function C(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return n}});let s=e.r(18967),i=e.r(52817);function n(e){if(!(0,s.isAbsoluteUrl)(e))return!0;try{let t=(0,s.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,i.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return s}});let s=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return g},useLinkStatus:function(){return v}};for(var i in s)Object.defineProperty(r,i,{enumerable:!0,get:s[i]});let n=e.r(90809),a=e.r(43476),o=n._(e.r(71645)),u=e.r(95057),l=e.r(8372),c=e.r(18581),h=e.r(18967),d=e.r(5550);e.r(33525);let f=e.r(91949),p=e.r(73668),y=e.r(9396);function m(e){return"string"==typeof e?e:(0,u.formatUrl)(e)}function g(t){var r;let s,i,n,[u,g]=(0,o.useOptimistic)(f.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:S,as:O,children:C,prefetch:x=null,passHref:P,replace:w,shallow:E,scroll:T,onClick:j,onMouseEnter:M,onTouchStart:q,legacyBehavior:A=!1,onNavigate:F,ref:R,unstable_dynamicOnHover:D,...N}=t;s=C,A&&("string"==typeof s||"number"==typeof s)&&(s=(0,a.jsx)("a",{children:s}));let I=o.default.useContext(l.AppRouterContext),Q=!1!==x,_=!1!==x?null===(r=x)||"auto"===r?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,{href:U,as:k}=o.default.useMemo(()=>{let e=m(S);return{href:e,as:O?m(O):e}},[S,O]);if(A){if(s?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});i=o.default.Children.only(s)}let K=A?i&&"object"==typeof i&&i.ref:R,L=o.default.useCallback(e=>(null!==I&&(v.current=(0,f.mountLinkInstance)(e,U,I,_,Q,g)),()=>{v.current&&((0,f.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,f.unmountPrefetchableInstance)(e)}),[Q,U,I,_,g]),G={ref:(0,c.useMergedRef)(L,K),onClick(t){A||"function"!=typeof j||j(t),A&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!I||t.defaultPrevented||function(t,r,s,i,n,a,u){if("u">typeof window){let l,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((l=t.currentTarget.getAttribute("target"))&&"_self"!==l||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,p.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),u){let e=!1;if(u({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:h}=e.r(99781);o.default.startTransition(()=>{h(s||r,n?"replace":"push",a??!0,i.current)})}}(t,U,k,v,w,T,F)},onMouseEnter(e){A||"function"!=typeof M||M(e),A&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),I&&Q&&(0,f.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){A||"function"!=typeof q||q(e),A&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),I&&Q&&(0,f.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,h.isAbsoluteUrl)(k)?G.href=k:A&&!P&&("a"!==i.type||"href"in i.props)||(G.href=(0,d.addBasePath)(k)),n=A?o.default.cloneElement(i,G):(0,a.jsx)("a",{...N,...G,children:s}),(0,a.jsx)(b.Provider,{value:u,children:n})}e.r(84508);let b=(0,o.createContext)(f.IDLE_LINK_STATUS),v=()=>(0,o.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18566,(e,t,r)=>{t.exports=e.r(76562)},34172,e=>{"use strict";var t=e.i(43476),r=e.i(22016),s=e.i(18566),i=e.i(47163);let n=[{href:"/dashboard",label:"DASHBOARD",icon:"📡"},{href:"/listings",label:"LISTINGS",icon:"🎯"},{href:"/keywords",label:"KEYWORDS",icon:"🔍"},{href:"/sites",label:"TARGET SITES",icon:"🌐"},{href:"/settings",label:"SETTINGS",icon:"⚙️"},{href:"/ai-log",label:"AI LOG",icon:"🧠"}];function a(){let e=(0,s.usePathname)();return(0,t.jsx)("nav",{className:"flex border-b border-ghost-border bg-ghost-panel",children:n.map(s=>(0,t.jsxs)(r.default,{href:s.href,className:(0,i.cn)("px-4 py-2 text-xs font-mono tracking-wider transition-colors border-b-2",e.startsWith(s.href)?"border-ghost-accent text-ghost-accent":"border-transparent text-ghost-dim hover:text-ghost-text"),children:[s.icon," ",s.label]},s.href))})}e.s(["default",()=>a])},3802,e=>{"use strict";var t=e.i(43476),r=e.i(96666),s=e.i(71645),i=e.i(47163);function n(){let e,n;e=(0,r.useEngineStore)(e=>e.setStats),n=(0,r.useEngineStore)(e=>e.setOffline),(0,s.useEffect)(()=>{let t=new EventSource("/api/stream");return t.onmessage=t=>{try{let r=JSON.parse(t.data);"stats"===r.type&&e(r.payload),"offline"===r.type&&n(!0)}catch{}},t.onerror=()=>n(!0),()=>t.close()},[e,n]);let{status:a,uptime_seconds:o,total_scanned:u,total_alerts:l,isOffline:c}=(0,r.useEngineStore)();if(c)return(0,t.jsx)("div",{className:"bg-ghost-danger/20 border-b border-ghost-danger px-4 py-1 text-center text-xs font-mono text-ghost-danger",children:"ENGINE OFFLINE — cannot reach localhost:8000"});let h="Running"===a?"text-ghost-accent":"Paused"===a?"text-ghost-gold":"text-ghost-dim";return(0,t.jsxs)("div",{className:"border-b border-ghost-border bg-ghost-panel px-4 py-1 flex gap-6 text-xs font-mono",children:[(0,t.jsxs)("span",{children:["ENGINE: ",(0,t.jsx)("span",{className:h,children:a.toUpperCase()})]}),(0,t.jsxs)("span",{className:"text-ghost-dim",children:["UPTIME: ",(0,t.jsx)("span",{className:"text-ghost-text",children:(0,i.formatUptime)(o)})]}),(0,t.jsxs)("span",{className:"text-ghost-dim",children:["SCANNED: ",(0,t.jsx)("span",{className:"text-ghost-text",children:u})]}),(0,t.jsxs)("span",{className:"text-ghost-dim",children:["ALERTS: ",(0,t.jsx)("span",{className:"text-ghost-gold",children:l})]})]})}e.s(["default",()=>n],3802)}]); |