39246-vm/frontend/out/_next/static/chunks/b40235c9485dbf9a.js
2026-03-14 17:32:05 +03:00

9 lines
49 KiB
JavaScript

(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 n}});let n=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 n(e){setTimeout(e,0)}e.s(["systemSetTimeoutZero",()=>n,"timeoutManager",()=>r],80166);var i="u"<typeof window||"Deno"in globalThis;function s(){}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:n,fetchStatus:i,predicate:s,queryKey:a,stale:o}=e;if(a){if(n){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)&&(!s||!!s(t))}function d(e,t){let{exact:r,status:n,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(r){if(p(t.options.mutationKey)!==p(s))return!1}else if(!y(t.options.mutationKey,s))return!1}return(!n||t.state.status===n)&&(!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(!x(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!x(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function x(e){return"[object Object]"===Object.prototype.toString.call(e)}function w(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,n=0){if(t===r)return t;if(n>500)return r;let i=b(t)&&b(r);if(!i&&!(v(t)&&v(r)))return r;let s=(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<s: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,n+1);u[o]=f,f===h&&l++}return s===o&&l===s?t:u}(e,t):t}function S(e,t,r=0){let n=[...e,t];return r&&n.length>r?n.slice(1):n}function j(e,t,r=0){let n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var O=Symbol();function P(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==O?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}function E(e,t){return"function"==typeof e?e(...t):!!e}function M(e,t,r){let n,i=!1;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(n??=t(),i||(i=!0,n.aborted?r():n.addEventListener("abort",r,{once:!0})),n)}),e}e.s(["addConsumeAwareSignal",()=>M,"addToEnd",()=>S,"addToStart",()=>j,"ensureQueryFn",()=>P,"functionalUpdate",()=>a,"hashKey",()=>p,"hashQueryKeyByOptions",()=>f,"isServer",()=>i,"isValidTimeout",()=>o,"matchMutation",()=>d,"matchQuery",()=>h,"noop",()=>s,"partialMatchKey",()=>y,"replaceData",()=>C,"resolveEnabled",()=>c,"resolveStaleTime",()=>l,"shallowEqualObjects",()=>g,"shouldThrowError",()=>E,"skipToken",()=>O,"sleep",()=>w,"timeUntilStale",()=>u],19273)},40143,e=>{"use strict";let t,r,n,i,s,a;var o=e.i(80166).systemSetTimeoutZero,u=(t=[],r=0,n=e=>{e()},i=e=>{e()},s=o,{batch:e=>{let a;r++;try{a=e()}finally{let e;--r||(e=t,t=[],e.length&&s(()=>{i(()=>{e.forEach(e=>{n(e)})})}))}return a},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a=e=>{r?t.push(e):s(()=>{n(e)})},setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{i=e},setScheduler:e=>{s=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),n=new class extends t.Subscribable{#r;#n;#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.#n||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#i=e,this.#n?.(),this.#n=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",()=>n])},86491,14448,93803,36553,88587,e=>{"use strict";e.i(47167);var t=e.i(19273),r=e.i(40143),n=e.i(75555),i=e.i(15823),s=new class extends i.Subscribable{#s=!0;#n;#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.#n||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#i=e,this.#n?.(),this.#n=e(this.setOnline.bind(this))}setOnline(e){this.#s!==e&&(this.#s=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#s}};function a(){let e,t,r=new Promise((r,n)=>{e=r,t=n});function n(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},r.reject=e=>{n({status:"rejected",reason:e}),t(e)},r}function o(e){return Math.min(1e3*2**e,3e4)}function u(e){return(e??"online")!=="online"||s.isOnline()}e.s(["onlineManager",()=>s],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=()=>n.focusManager.isFocused()&&("always"===e.networkMode||s.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 n=0===c?e.initialPromise:void 0;try{r=n??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(p).catch(r=>{if("pending"!==h.status)return;let n=e.retry??3*!t.isServer,s=e.retryDelay??o,a="function"==typeof s?s(c,r):s,u=!0===n||"number"==typeof n&&c<n||"function"==typeof n&&n(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 n=(0,t.replaceData)(this.state.data,e,this.options);return this.#p({data:n,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),n}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 n;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,s=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#f=!0,i.signal)})},a=()=>{let e,n=(0,t.ensureQueryFn)(this.options,r),i=(s(e={client:this.#c,queryKey:this.queryKey,meta:this.meta}),e);return(this.#f=!1,this.options.persister)?this.options.persister(n,i,this):n(i)},o=(s(n={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:a}),n);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 n=e.error;return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,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,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??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),n=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||s(),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,n.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,s=!this.#h.canStart();try{if(i)t();else{this.#p({type:"pending",variables:e,isPaused:s}),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:s})}let n=await this.#h.start();return await this.#m.config.onSuccess?.(n,e,this.state.context,this,r),await this.options.onSuccess?.(n,e,this.state.context,r),await this.#m.config.onSettled?.(n,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(n,null,e,this.state.context,r),this.#p({type:"success",data:n}),n}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 s(){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",()=>s])},12598,e=>{"use strict";var t=e.i(71645),r=e.i(43476),n=t.createContext(void 0),i=e=>{let r=t.useContext(n);if(e)return e;if(!r)throw Error("No QueryClient set, use QueryClientProvider to set one");return r},s=({client:e,children:i})=>(t.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,r.jsx)(n.Provider,{value:e,children:i}));e.s(["QueryClientProvider",()=>s,"useQueryClient",()=>i])},68834,e=>{"use strict";var t=e.i(71645);let r=e=>{let t,r=new Set,n=(e,n)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=n?n:"object"!=typeof i||null===i)?i:Object.assign({},t,i),r.forEach(r=>r(t,e))}},i=()=>t,s={setState:n,getState:i,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e))},a=t=e(n,i,s);return s},n=e=>{let n=e?r(e):r,i=e=>(function(e,r=e=>e){let n=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(n),n})(n,e);return Object.assign(i,n),i},i=e=>e?n(e):n;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])},88653,e=>{"use strict";e.i(47167);var t=e.i(43476),r=e.i(71645),n=e.i(31178),i=e.i(47414),s=e.i(74008),a=e.i(21476),o=e.i(72846),u=r,l=e.i(37806);function c(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class h extends u.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if((0,o.isHTMLElement)(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,r=(0,o.isHTMLElement)(e)&&e.offsetWidth||0,n=(0,o.isHTMLElement)(e)&&e.offsetHeight||0,i=getComputedStyle(t),s=this.props.sizeRef.current;s.height=parseFloat(i.height),s.width=parseFloat(i.width),s.top=t.offsetTop,s.left=t.offsetLeft,s.right=r-s.width-s.left,s.bottom=n-s.height-s.top}return null}componentDidUpdate(){}render(){return this.props.children}}function d({children:e,isPresent:n,anchorX:i,anchorY:s,root:a,pop:o}){let d=(0,u.useId)(),f=(0,u.useRef)(null),p=(0,u.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:y}=(0,u.useContext)(l.MotionConfigContext),m=function(...e){return r.useCallback(function(...e){return t=>{let r=!1,n=e.map(e=>{let n=c(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():c(e[t],null)}}}}(...e),e)}(f,e.props?.ref??e?.ref);return(0,u.useInsertionEffect)(()=>{let{width:e,height:t,top:r,left:u,right:l,bottom:c}=p.current;if(n||!1===o||!f.current||!e||!t)return;let h="left"===i?`left: ${u}`:`right: ${l}`,m="bottom"===s?`bottom: ${c}`:`top: ${r}`;f.current.dataset.motionPopId=d;let g=document.createElement("style");y&&(g.nonce=y);let b=a??document.head;return b.appendChild(g),g.sheet&&g.sheet.insertRule(`
[data-motion-pop-id="${d}"] {
position: absolute !important;
width: ${e}px !important;
height: ${t}px !important;
${h}px !important;
${m}px !important;
}
`),()=>{f.current?.removeAttribute("data-motion-pop-id"),b.contains(g)&&b.removeChild(g)}},[n]),(0,t.jsx)(h,{isPresent:n,childRef:f,sizeRef:p,pop:o,children:!1===o?e:u.cloneElement(e,{ref:m})})}let f=({children:e,initial:n,isPresent:s,onExitComplete:o,custom:u,presenceAffectsLayout:l,mode:c,anchorX:h,anchorY:f,root:y})=>{let m=(0,i.useConstant)(p),g=(0,r.useId)(),b=!0,v=(0,r.useMemo)(()=>(b=!1,{id:g,initial:n,isPresent:s,custom:u,onExitComplete:e=>{for(let t of(m.set(e,!0),m.values()))if(!t)return;o&&o()},register:e=>(m.set(e,!1),()=>m.delete(e))}),[s,m,o]);return l&&b&&(v={...v}),(0,r.useMemo)(()=>{m.forEach((e,t)=>m.set(t,!1))},[s]),r.useEffect(()=>{s||m.size||!o||o()},[s]),e=(0,t.jsx)(d,{pop:"popLayout"===c,isPresent:s,anchorX:h,anchorY:f,root:y,children:e}),(0,t.jsx)(a.PresenceContext.Provider,{value:v,children:e})};function p(){return new Map}var y=e.i(64978);let m=e=>e.key||"";function g(e){let t=[];return r.Children.forEach(e,e=>{(0,r.isValidElement)(e)&&t.push(e)}),t}let b=({children:e,custom:a,initial:o=!0,onExitComplete:u,presenceAffectsLayout:l=!0,mode:c="sync",propagate:h=!1,anchorX:d="left",anchorY:p="top",root:b})=>{let[v,x]=(0,y.usePresence)(h),w=(0,r.useMemo)(()=>g(e),[e]),C=h&&!v?[]:w.map(m),S=(0,r.useRef)(!0),j=(0,r.useRef)(w),O=(0,i.useConstant)(()=>new Map),P=(0,r.useRef)(new Set),[E,M]=(0,r.useState)(w),[T,k]=(0,r.useState)(w);(0,s.useIsomorphicLayoutEffect)(()=>{S.current=!1,j.current=w;for(let e=0;e<T.length;e++){let t=m(T[e]);C.includes(t)?(O.delete(t),P.current.delete(t)):!0!==O.get(t)&&O.set(t,!1)}},[T,C.length,C.join("-")]);let q=[];if(w!==E){let e=[...w];for(let t=0;t<T.length;t++){let r=T[t],n=m(r);C.includes(n)||(e.splice(t,0,r),q.push(r))}return"wait"===c&&q.length&&(e=q),k(g(e)),M(w),null}let{forceRender:R}=(0,r.useContext)(n.LayoutGroupContext);return(0,t.jsx)(t.Fragment,{children:T.map(e=>{let r=m(e),n=(!h||!!v)&&(w===T||C.includes(r));return(0,t.jsx)(f,{isPresent:n,initial:(!S.current||!!o)&&void 0,custom:a,presenceAffectsLayout:l,mode:c,root:b,onExitComplete:n?void 0:()=>{if(P.current.has(r)||!O.has(r))return;P.current.add(r),O.set(r,!0);let e=!0;O.forEach(t=>{t||(e=!1)}),e&&(R?.(),k(j.current),h&&x?.(),u&&u())},anchorX:d,anchorY:p,children:e},r)})})};e.s(["AnimatePresence",()=>b],88653)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return i}});let n=e.r(71645);function i(e,t){let r=(0,n.useRef)(null),i=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(r.current=s(e,n)),t&&(i.current=s(t,n))},[e,t])}function s(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)},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return u},searchParamsToUrlQuery:function(){return s},urlQueryToSearchParams:function(){return o}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});function s(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}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,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,a(e));else t.set(r,a(n));return t}function u(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return o},formatWithValidation:function(){return l},urlObjectKeys:function(){return u}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,n=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(s.urlQueryToSearchParams(u)));let c=e.search||u&&`?${u}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||a.test(n))&&!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"),`${n}${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 n={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return x},NormalizeError:function(){return b},PageNotFoundError:function(){return v},SP:function(){return y},ST:function(){return m},WEB_VITALS:function(){return s},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 n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),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 n=await e.getInitialProps(t);if(r&&d(r))return n;if(!n)throw Object.defineProperty(Error(`"${h(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}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 x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w 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 s}});let n=e.r(18967),i=e.r(52817);function s(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.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 n}});let n=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return v}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=e.r(90809),a=e.r(43476),o=s._(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 n,i,s,[u,g]=(0,o.useOptimistic)(f.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:x,as:w,children:C,prefetch:S=null,passHref:j,replace:O,shallow:P,scroll:E,onClick:M,onMouseEnter:T,onTouchStart:k,legacyBehavior:q=!1,onNavigate:R,ref:A,unstable_dynamicOnHover:F,...N}=t;n=C,q&&("string"==typeof n||"number"==typeof n)&&(n=(0,a.jsx)("a",{children:n}));let _=o.default.useContext(l.AppRouterContext),D=!1!==S,Q=!1!==S?null===(r=S)||"auto"===r?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,{href:I,as:U}=o.default.useMemo(()=>{let e=m(x);return{href:e,as:w?m(w):e}},[x,w]);if(q){if(n?.$$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(n)}let L=q?i&&"object"==typeof i&&i.ref:A,K=o.default.useCallback(e=>(null!==_&&(v.current=(0,f.mountLinkInstance)(e,I,_,Q,D,g)),()=>{v.current&&((0,f.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,f.unmountPrefetchableInstance)(e)}),[D,I,_,Q,g]),$={ref:(0,c.useMergedRef)(K,L),onClick(t){q||"function"!=typeof M||M(t),q&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!_||t.defaultPrevented||function(t,r,n,i,s,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)){s&&(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(n||r,s?"replace":"push",a??!0,i.current)})}}(t,I,U,v,O,E,R)},onMouseEnter(e){q||"function"!=typeof T||T(e),q&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),_&&D&&(0,f.onNavigationIntent)(e.currentTarget,!0===F)},onTouchStart:function(e){q||"function"!=typeof k||k(e),q&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),_&&D&&(0,f.onNavigationIntent)(e.currentTarget,!0===F)}};return(0,h.isAbsoluteUrl)(U)?$.href=U:q&&!j&&("a"!==i.type||"href"in i.props)||($.href=(0,d.addBasePath)(U)),s=q?o.default.cloneElement(i,$):(0,a.jsx)("a",{...N,...$,children:n}),(0,a.jsx)(b.Provider,{value:u,children:s})}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)},96923,e=>{"use strict";var t=e.i(43476),r=e.i(19273),n=e.i(86491),i=e.i(40143),s=e.i(15823),a=class extends s.Subscribable{constructor(e={}){super(),this.config=e,this.#g=new Map}#g;build(e,t,i){let s=t.queryKey,a=t.queryHash??(0,r.hashQueryKeyByOptions)(s,t),o=this.get(a);return o||(o=new n.Query({client:e,queryKey:s,queryHash:a,options:e.defaultQueryOptions(t),state:i,defaultOptions:e.getQueryDefaults(s)}),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=s,l=class extends u.Subscribable{constructor(e={}){super(),this.config=e,this.#b=new Set,this.#v=new Map,this.#x=0}#b;#v;#x;build(e,t,r){let n=new o.Mutation({client:e,mutationCache:this,mutationId:++this.#x,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}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),n=r?.find(e=>"pending"===e.state.status);return!n||n===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,n)=>{let i=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],u={pages:[],pageParams:[]},l=0,c=async()=>{let n=!1,c=(0,r.ensureQueryFn)(t.options,t.fetchOptions),h=async(e,i,s)=>{let a;if(n)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:s?"backward":"forward",meta:t.options.meta},(0,r.addConsumeAwareSignal)(a,()=>t.signal,()=>n=!0),a),u=await c(o),{maxPages:l}=t.options,h=s?r.addToStart:r.addToEnd;return{pages:h(e.pages,u,l),pageParams:h(e.pageParams,i,l)}};if(s&&a.length){let e="backward"===s,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},n):t.fetchFn=c}}}function p(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}var y=class{#w;#m;#d;#C;#S;#j;#O;#P;constructor(e={}){this.#w=e.queryCache||new a,this.#m=e.mutationCache||new l,this.#d=e.defaultOptions||{},this.#C=new Map,this.#S=new Map,this.#j=0}mount(){this.#j++,1===this.#j&&(this.#O=h.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#w.onFocus())}),this.#P=d.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#w.onOnline())}))}unmount(){this.#j--,0===this.#j&&(this.#O?.(),this.#O=void 0,this.#P?.(),this.#P=void 0)}isFetching(e){return this.#w.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.#w.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#w.build(this,t),i=n.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime((0,r.resolveStaleTime)(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#w.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let i=this.defaultQueryOptions({queryKey:e}),s=this.#w.get(i.queryHash),a=s?.state.data,o=(0,r.functionalUpdate)(t,a);if(void 0!==o)return this.#w.build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,r){return i.notifyManager.batch(()=>this.#w.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#w.get(t.queryHash)?.state}removeQueries(e){let t=this.#w;i.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#w;return i.notifyManager.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t};return Promise.all(i.notifyManager.batch(()=>this.#w.findAll(e).map(e=>e.cancel(n)))).then(r.noop).catch(r.noop)}invalidateQueries(e,t={}){return i.notifyManager.batch(()=>(this.#w.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 n={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(i.notifyManager.batch(()=>this.#w.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.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 n=this.#w.build(this,t);return n.isStaleByTime((0,r.resolveStaleTime)(t.staleTime,n))?n.fetch(t):Promise.resolve(n.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.#w}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()],n={};return t.forEach(t=>{(0,r.partialMatchKey)(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#S.set((0,r.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#S.values()],n={};return t.forEach(t=>{(0,r.partialMatchKey)(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}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.#w.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(22016),n=e.i(96666),i=e.i(47163),s=e.i(71645),a=e.i(46932),o=e.i(88653);let u="ghost-theme";function l(){let[e,r]=function(){let[e,t]=(0,s.useState)("dark");return(0,s.useEffect)(()=>{let e=localStorage.getItem(u)??"dark";t(e),document.documentElement.setAttribute("data-theme",e)},[]),[e,()=>{let r="dark"===e?"light":"dark";t(r),document.documentElement.setAttribute("data-theme",r),localStorage.setItem(u,r)}]}(),n="light"===e;return(0,t.jsx)(a.motion.button,{onClick:r,whileHover:{scale:1.08},whileTap:{scale:.9},className:"relative g-btn h-8 w-8 px-0 flex items-center justify-center overflow-hidden",title:`Switch to ${n?"dark":"light"} mode`,"aria-label":`Switch to ${n?"dark":"light"} mode`,children:(0,t.jsx)(o.AnimatePresence,{mode:"wait",initial:!1,children:n?(0,t.jsx)(a.motion.svg,{initial:{rotate:-90,opacity:0,scale:.5},animate:{rotate:0,opacity:1,scale:1},exit:{rotate:90,opacity:0,scale:.5},transition:{duration:.2},width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})},"moon"):(0,t.jsxs)(a.motion.svg,{initial:{rotate:90,opacity:0,scale:.5},animate:{rotate:0,opacity:1,scale:1},exit:{rotate:-90,opacity:0,scale:.5},transition:{duration:.2},width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"5"}),(0,t.jsx)("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),(0,t.jsx)("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),(0,t.jsx)("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),(0,t.jsx)("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),(0,t.jsx)("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),(0,t.jsx)("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),(0,t.jsx)("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),(0,t.jsx)("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]},"sun")})})}function c(){let e=(0,n.useEngineStore)(e=>e.status),s=e=>fetch(`/api/engine/${e}`,{method:"POST"}),a="Running"===e,o="Paused"===e;return(0,t.jsxs)("header",{className:"glass-strong sticky top-0 z-40",children:[(0,t.jsx)("div",{className:"absolute bottom-0 inset-x-0 h-px bg-gradient-to-r from-transparent via-g-green/30 to-transparent"}),(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 h-[56px]",children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-3.5 group cursor-pointer",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded-xl bg-gradient-to-br from-g-green/25 to-g-cyan/15 border border-g-green/20 group-hover:border-g-green/40 transition-colors",children:(0,t.jsx)("span",{className:"font-extrabold text-g-green text-sm leading-none",children:"G"})}),(0,t.jsx)("div",{className:"absolute inset-0 rounded-xl bg-g-green/10 blur-lg -z-10 group-hover:bg-g-green/20 transition-colors"})]}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-[15px] font-bold text-g-text tracking-tight leading-none group-hover:text-g-green transition-colors",children:"Ghost Node"}),(0,t.jsx)("span",{className:"text-[10px] text-g-faint leading-none mt-1 tracking-[0.15em] uppercase",children:"Auction Sniper · v2.7"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsxs)("div",{className:(0,i.cn)("flex items-center gap-2 px-3.5 py-1.5 rounded-full text-xs font-semibold mr-1 border transition-all duration-300",a?"bg-g-green/8 border-g-green/20 text-g-green shadow-[0_0_16px_rgba(0,232,123,0.08)]":o?"bg-g-amber/8 border-g-amber/20 text-g-amber":"bg-g-faint/10 border-g-border text-g-muted"),children:[(0,t.jsx)("span",{className:(0,i.cn)("w-2 h-2 rounded-full transition-all duration-300",a?"bg-g-green shadow-[0_0_8px_rgba(0,232,123,0.8)] animate-pulse":o?"bg-g-amber":"bg-g-faint")}),e]}),(0,t.jsx)("button",{onClick:()=>s("pause"),className:"g-btn text-xs h-8",children:"Pause"}),(0,t.jsx)("button",{onClick:()=>s("resume"),className:"g-btn text-xs h-8",children:"Resume"}),(0,t.jsx)("button",{onClick:()=>s("restart"),className:"g-btn text-xs h-8",children:"Restart"}),(0,t.jsx)("button",{onClick:()=>{confirm("Kill the engine?")&&s("kill")},className:"g-btn-danger text-xs h-8",children:"Kill"}),(0,t.jsx)("div",{className:"w-px h-5 bg-g-border/50 mx-0.5"}),(0,t.jsx)(l,{})]})]})]})}e.s(["default",()=>c],93983)},18566,(e,t,r)=>{t.exports=e.r(76562)},34172,e=>{"use strict";var t=e.i(43476),r=e.i(22016),n=e.i(18566),i=e.i(47163);let s=[{href:"/dashboard",label:"Dashboard",icon:"◈"},{href:"/listings",label:"Listings",icon:"≡"},{href:"/keywords",label:"Targets",icon:"⌖"},{href:"/sites",label:"Sites",icon:"⬡"},{href:"/settings",label:"Settings",icon:"⚙"},{href:"/ai-log",label:"AI Log",icon:"◎"}];function a(){let e=(0,n.usePathname)();return(0,t.jsxs)("nav",{className:"glass sticky top-[56px] z-30",children:[(0,t.jsx)("div",{className:"absolute bottom-0 inset-x-0 h-px bg-gradient-to-r from-transparent via-g-border to-transparent"}),(0,t.jsx)("div",{className:"flex gap-0.5 px-6 overflow-x-auto scrollbar-none",children:s.map(n=>{let s=e===n.href||e.startsWith(n.href+"/");return(0,t.jsxs)(r.default,{href:n.href,className:(0,i.cn)("relative flex items-center gap-1.5 px-4 py-3 text-[13px] font-semibold whitespace-nowrap transition-all duration-200",s?"text-g-green":"text-g-faint hover:text-g-muted"),children:[(0,t.jsx)("span",{className:(0,i.cn)("text-[11px] transition-all duration-200",s?"text-g-green opacity-100":"text-g-faint opacity-50"),children:n.icon}),n.label,s&&(0,t.jsx)("span",{className:"absolute bottom-0 inset-x-2 h-[2px] rounded-full bg-gradient-to-r from-g-green to-g-cyan shadow-[0_0_8px_rgba(0,232,123,0.5)]"})]},n.href)})})]})}e.s(["default",()=>a])},3802,e=>{"use strict";var t=e.i(43476),r=e.i(96666),n=e.i(71645),i=e.i(47163);function s(){let e,s;e=(0,r.useEngineStore)(e=>e.setStats),s=(0,r.useEngineStore)(e=>e.setOffline),(0,n.useEffect)(()=>{let t=!0,r=async()=>{try{let r=await fetch("http://localhost:8000/api/stats");if(!r.ok)throw Error("not ok");let n=await r.json();t&&e(n)}catch{t&&s(!0)}};r();let n=setInterval(r,5e3);return()=>{t=!1,clearInterval(n)}},[e,s]);let{status:o,uptime_seconds:u,total_scanned:l,total_alerts:c,isOffline:h}=(0,r.useEngineStore)();if(h)return(0,t.jsxs)("div",{className:"flex items-center gap-2 bg-g-red/5 border-b border-g-red/15 px-6 py-1.5 text-xs text-g-red",children:[(0,t.jsx)("span",{className:"w-2 h-2 rounded-full bg-g-red animate-pulse flex-shrink-0"}),"Engine offline — cannot reach server"]});let d="Running"===o,f="Paused"===o;return(0,t.jsxs)("div",{className:"flex items-center gap-6 bg-g-base/60 backdrop-blur-sm border-b border-g-border/30 px-6 py-1.5 text-xs text-g-faint",children:[(0,t.jsx)(a,{dot:d?"bg-g-green shadow-[0_0_4px_rgba(0,232,123,0.6)] animate-pulse":f?"bg-g-amber":"bg-g-faint",label:"Engine",value:o,valueClass:d?"text-g-green":f?"text-g-amber":"text-g-muted"}),(0,t.jsx)(a,{label:"Uptime",value:(0,i.formatUptime)(u),valueClass:"text-g-muted"}),(0,t.jsx)(a,{label:"Scanned",value:String(l),valueClass:"text-g-text font-semibold"}),(0,t.jsx)(a,{label:"Alerts",value:String(c),valueClass:c>0?"text-g-amber font-semibold":"text-g-muted"})]})}function a({label:e,value:r,valueClass:n="text-g-muted",dot:s}){return(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[s&&(0,t.jsx)("span",{className:(0,i.cn)("w-1.5 h-1.5 rounded-full flex-shrink-0",s)}),(0,t.jsx)("span",{className:"text-g-faint/70",children:e}),(0,t.jsx)("span",{className:(0,i.cn)("font-medium tabular-nums",n),children:r})]})}e.s(["default",()=>s],3802)},94313,e=>{"use strict";var t=e.i(43476);function r(){return(0,t.jsxs)("div",{className:"fixed inset-0 -z-10 overflow-hidden pointer-events-none","aria-hidden":!0,children:[(0,t.jsx)("div",{className:"absolute -top-[40%] -left-[20%] w-[70vw] h-[70vw] rounded-full opacity-[0.035]",style:{background:"radial-gradient(circle, #00e87b 0%, transparent 70%)",animation:"float-orb 20s ease-in-out infinite"}}),(0,t.jsx)("div",{className:"absolute -bottom-[30%] -right-[20%] w-[60vw] h-[60vw] rounded-full opacity-[0.025]",style:{background:"radial-gradient(circle, #06b6d4 0%, transparent 70%)",animation:"float-orb 25s ease-in-out infinite reverse"}}),(0,t.jsx)("div",{className:"absolute top-[40%] left-[50%] w-[40vw] h-[40vw] rounded-full opacity-[0.02]",style:{background:"radial-gradient(circle, #a78bfa 0%, transparent 70%)",animation:"float-orb 30s ease-in-out infinite 5s"}}),(0,t.jsx)("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:"radial-gradient(circle, #8896b8 1px, transparent 1px)",backgroundSize:"32px 32px"}}),(0,t.jsx)("div",{className:"absolute top-0 inset-x-0 h-px bg-gradient-to-r from-transparent via-g-green/20 to-transparent"})]})}e.s(["default",()=>r])}]);